|
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:
- Matcher Engine:
FaceMatcherhandles operations viaInsightFacemodels. - Embedding Storage: Enrollments are saved as
.npyfiles. Stored insidefaces_dbandtemp_faces_db. - Concurrency: It employs thread locks (
threading.Lock()) for updating the embedding dict safely across background refreshes and API calls. - Background Refresh: Boot sequence kicks off a thread to refresh stale embeddings without blocking startup.
- Dynamic Thresholds: Reads defaults via env vars (
FACE_MATCH_THRESHOLD) but overrides them based on aPERSON_THRESHOLDSmapping for predefined demo identities (mk, urvi, vidit), ensuring fewer false positives.
Recommendations:
- Transition from file-based
.npylookups to a vector database if the identity count exceeds a few thousand. - Ensure the background thread handles InsightFace GPU resource contention if any.