feat: add YuNet detector option, multi-scale detection, and streamlined CLI

- Add YuNet face detector as alternative option (built into OpenCV)
- Add multi-scale detection (1.0x + 1.5x) to catch faces at different distances
- Add NMS to remove duplicate detections from multi-scale
- Move frame interval and clustering settings to advanced options
- Increase default blur padding from 25% to 40%
- Change default frame interval from 30 to 15
- Change default confidence threshold from 0.7 to 0.8
- Add limitations section to README (extreme angles, small faces, motion blur)
- Require scikit-learn>=1.3.0 for HDBSCAN support
This commit is contained in:
fiatcode 2026-03-01 01:54:27 +07:00
parent baf1899616
commit 236e0d2ff2
7 changed files with 553 additions and 27 deletions

View file

@ -51,3 +51,9 @@ The original proof-of-concept command-line interface is also still available for
```bash
uv run pyfaceblur-legacy detect --video input.mp4 --output ./output --interval 30 --confidence 0.7
```
## Limitations
- **Extreme face angles:** Faces viewed from extreme angles (e.g., strong profile views, looking up/down) may not be detected or may be clustered as separate identities. For best results, use videos where faces are mostly front-facing or at moderate angles.
- **Small/distant faces:** Very small faces (below 50 pixels) may not be reliably detected or produce accurate embeddings for clustering.
- **Rapid motion blur:** Fast head movements causing motion blur can affect detection accuracy.