| license | Apache-2.0 |
| name | face-recognition-system-builder |
| description | Build face recognition systems with InsightFace, ArcFace, enrollment pipelines, HDBSCAN clustering, and privacy-compliant architecture. Activate on: face recognition, face enrollment, face clustering, identity verification, facial search. NOT for: general object detection (computer-vision-pipeline), emotion analysis (ai-engineer). |
| allowed-tools | Read,Write,Edit,Bash(python:*,pip:*,npm:*,npx:*) |
| category | AI & Machine Learning |
| tags | ["face-recognition","insightface","arcface","biometrics","privacy"] |
| pairs-with | [{"skill":"computer-vision-pipeline","reason":"Face detection is a specialization of the general CV pipeline"},{"skill":"video-frame-extraction-analysis","reason":"Face recognition on video requires keyframe extraction first"},{"skill":"data-pipeline-engineer","reason":"Large-scale enrollment and batch processing need pipeline orchestration"}] |
Face Recognition System Builder
Build production face recognition systems with InsightFace/ArcFace for enrollment, verification, identification, and clustering with privacy-compliant architecture.
Decision Points
Model Selection Decision Tree
Requirements Analysis:
├── Latency < 50ms per face?
│ ├── YES: Use buffalo_sc (lightweight, 0.7 accuracy)
│ └── NO: Continue to accuracy analysis
├── Accuracy > 95% required?
│ ├── YES: Use AdaFace (premium accuracy, 200ms latency)
│ └── NO: Use buffalo_l (balanced, 100ms latency)
└── Mobile/Edge deployment?
├── YES: buffalo_sc or custom quantized model
└── NO: buffalo_l or AdaFace
Threshold Tuning Heuristic
| Use Case | FAR Target | FRR Target | Threshold Range | Validation |
|---|
| Security/Access Control | <0.1% | 1-5% | 0.55-0.65 | Test on impostor pairs |
| Photo Organization | 2-5% | <1% | 0.35-0.45 | Test on family albums |
| Investigation/Forensics | <0.01% | 10-20% | 0.65-0.75 | Test on mugshot datasets |
| Social Media Tagging | 5-10% | <2% | 0.30-0.40 | Test on casual photos |
Enrollment Quality Decision
Per photo assessment:
├── Face detected with confidence > 0.7?
│ ├── NO: Reject photo, request new one
│ └── YES: Continue
├── Face size > 80px AND < 50% of image?
│ ├── NO: Reject (too small or too close)
│ └── YES: Continue
├── Pose deviation < 30 degrees (yaw/pitch)?
│ ├── NO: Flag as "supplementary only"
│ └── YES: Mark as "primary reference"
└── Final decision:
├── 3+ primary references: Complete enrollment
├── 1-2 primary + 2+ supplementary: Proceed with warning
└── <3 total valid: Require additional photos
Failure Modes
1. Pose/Lighting Degradation
Detection: Similarity scores dropping consistently below historical baseline (>10% decrease)
Symptoms: Good enrollments start failing verification, complaints of "system doesn't recognize me"
Diagnosis: Environmental conditions changed (new lighting, camera angle, seasonal changes)
Fix:
- Re-tune threshold based on recent data
- Add current condition photos to existing enrollments
- Implement adaptive threshold based on lighting detection