midas_depth_estimation

Estimación de profundidad facial para verificar volumen real (3D) con modelo monocular MiDaS

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "midas_depth_estimation" with this command: npx skills add davidcastagnetoa/skills/davidcastagnetoa-skills-midas-depth-estimation

midas_depth_estimation

MiDaS (Monocular Depth Estimation) estima un mapa de profundidad a partir de una sola imagen RGB. Permite distinguir entre un rostro real 3D y una foto plana (impresa o en pantalla) analizando la variación de profundidad.

When to use

Usar como capa adicional de liveness pasivo en el liveness_agent. Complementa a MiniFASNet y Silent-Face para detectar ataques con fotos impresas o pantallas que no tienen variación de profundidad.

Instructions

  1. Instalar: pip install timm torch torchvision.
  2. Descargar modelo MiDaS v3.1 small: torch.hub.load('intel-isl/MiDaS', 'MiDaS_small').
  3. Preprocesar frame: resize a 256x256, normalizar con transforms de MiDaS.
  4. Inferir mapa de profundidad: depth_map = model(input_tensor).
  5. Recortar la región del rostro del mapa de profundidad usando bounding box de face detection.
  6. Calcular la varianza de profundidad en la región facial: depth_variance = np.var(face_depth).
  7. Umbral: si depth_variance < 0.05, clasificar como posible ataque plano (foto/pantalla).
  8. Registrar depth_variance en el evento de auditoría.

Notes

  • MiDaS small es suficiente para liveness (~50ms en GPU); no usar el modelo large en producción.
  • La estimación monocular no reemplaza a una cámara de profundidad real, pero detecta ataques obvios.
  • Combinar con análisis de textura (LBP/Fourier) para mayor robustez.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

traefik

No summary provided by upstream source.

Repository SourceNeeds Review
General

c4_model_structurizr

No summary provided by upstream source.

Repository SourceNeeds Review
General

fastapi

No summary provided by upstream source.

Repository SourceNeeds Review
General

exif_metadata_analyzer

No summary provided by upstream source.

Repository SourceNeeds Review