|
Download audit/vision.md from SolutionChallenge/solution_challenge_backend: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/SolutionChallenge/solution_challenge_backend/resolve/main/audit/vision.md
- Command line
-
hf download hf://spaces/SolutionChallenge/solution_challenge_backend/audit/vision.md
-
curl -L -o vision.md https://huggingface.co/spaces/SolutionChallenge/solution_challenge_backend/resolve/main/audit/vision.md
1.01 kB
| # Vision & Face Recognition Audit | |
| The Face Recognition system is located in `backend/Face_Recognition`. | |
| ## Key Findings: | |
| 1. **Matcher Engine**: `FaceMatcher` handles operations via `InsightFace` models. | |
| 2. **Embedding Storage**: Enrollments are saved as `.npy` files. Stored inside `faces_db` and `temp_faces_db`. | |
| 3. **Concurrency**: It employs thread locks (`threading.Lock()`) for updating the embedding dict safely across background refreshes and API calls. | |
| 4. **Background Refresh**: Boot sequence kicks off a thread to refresh stale embeddings without blocking startup. | |
| 5. **Dynamic Thresholds**: Reads defaults via env vars (`FACE_MATCH_THRESHOLD`) but overrides them based on a `PERSON_THRESHOLDS` mapping for predefined demo identities (mk, urvi, vidit), ensuring fewer false positives. | |
| ## Recommendations: | |
| - Transition from file-based `.npy` lookups to a vector database if the identity count exceeds a few thousand. | |
| - Ensure the background thread handles InsightFace GPU resource contention if any. | |