Spaces:
Running
Running
Commit History
-
Dockerfile: surface YuNet pre-download outcome in the build log
ClaudeThe previous '|| echo' chain swallowed curl failures silently, and the 0.2s build step couldn't be distinguished from a successful download from a silent fall-through. Restructured the RUN step to set -e and explicitly branch on curl exit status, so the build log now prints exactly one of three lines: ==> OK: YuNet model bundled at <path> (<size> bytes) ==> WARN: YuNet download too small … removing stub ==> WARN: YuNet pre-download failed (curl exit <N>) … Also added curl --retry 3 --retry-delay 2 so transient network blips during the build don't permanently shift the image to the Haar fallback. Runtime detection of which path actually got used: the filter logs 'INFO videoguidemaker.filter: Instructor-frame detector: yunet|haar' once per pipeline run.8c7cc2e -
Instructor filter: prefer YuNet ONNX, Haar as fallback
ClaudeHaar's frontal-face cascade misses too many angled / hands-up / partly- occluded instructor frames; even with the multi-cascade extension, threshold sliders had no effect on undetected faces. YuNet (the small ~230 KB ONNX model bundled by the OpenCV Zoo) is far more robust to those conditions and one inference covers frontal + profile in any orientation. Wiring: app/pipeline/yunet.py — new module: * resolve_model_path() looks in (1) VGM_YUNET_MODEL env override, (2) bundled app/pipeline/models/, (3) ~/.cache/videoguidemaker/ models/. If none of those exist and allow_download=True, fetches from the opencv_zoo LFS media URL, validates SHA-256 + size to reject LFS pointer stubs (~130 B), and atomic-renames into the cache. Returns None if anything fails — the filter has a Haar fallback so this is non-fatal. * YuNetDetector.try_load() returns None on any error so callers can fall through. * largest_face_area() reuses the cv2.FaceDete…2619c42
-
Add Dockerfile and HF Spaces metadata for free deployment
ClaudeProvides a Docker image compatible with the Hugging Face Spaces free CPU tier: Python 3.11 slim base, ffmpeg + tesseract installed, runs uvicorn on port 7860 as a non-root user (UID 1000) per HF requirements. README frontmatter declares the Space metadata so a git push deploys the app end-to-end.2128d4b