- Add debug mode support for encoding statistics in API responses
- Debug info includes encoding length, min/max/mean/std, and first 10 values
- Frontend logs encoding stats to browser console when debug enabled
- Identify page enables debug mode by default
- Implement distance-based confidence thresholds for stricter matching
- Borderline distances require higher confidence (70-95% vs 50%)
- Applied when use_distance_based_thresholds=True (auto-match)
- Reduces false positives for borderline matches
- Dual tolerance system for auto-match
- Default tolerance 0.6 for regular browsing (more lenient)
- Run auto-match button uses 0.5 tolerance with distance-based thresholds (stricter)
- Auto-accept threshold updated to 85% (from 70%)
- Enhance pose detection with single-eye detection
- Profile threshold reduced from 30° to 15° (stricter)
- Detect single-eye visibility for extreme profile views
- Infer profile direction from landmark visibility
- Improved face width threshold (20px vs 10px)
- Clean up debug code
- Remove test photo UUID checks from production code
- Remove debug print statements
- Replace print statements with proper logging
backend/config.py - Added MIN_AUTO_MATCH_FACE_SIZE_RATIO = 0.005
backend/services/face_service.py - Multiple changes:
Added load_face_encoding() function (supports float32 and float64)
Added _calculate_face_size_ratio() function
Updated find_similar_faces() to filter small faces
Updated find_auto_match_matches() to exclude small reference faces
Fixed reference face quality calculation (use actual quality, not hardcoded 0.5)
Fixed duplicate detection (exclude faces from same photo)
Updated confidence threshold from 40% to 50%
Updated confidence calibration (moderate version)
backend/api/faces.py - Updated default tolerance to 0.5 for auto-match endpoints
backend/schemas/faces.py - Updated default tolerance to 0.5
admin-frontend/src/pages/AutoMatch.tsx - Updated default tolerance to 0.5
admin-frontend/src/api/faces.ts - Added tolerance parameter support
This commit enhances the face identification process by adding validation checks for person ID and names, ensuring that users provide necessary information before proceeding. It also introduces detailed logging for better debugging and user feedback during the identification process. Additionally, error handling is improved to provide user-friendly messages in case of failures, enhancing the overall user experience.
This commit introduces several new analysis documents, including Auto-Match Load Performance Analysis, Folder Picker Analysis, Monorepo Migration Summary, and various performance analysis documents. Additionally, the installation scripts are updated to reflect changes in backend service paths, ensuring proper integration with the new backend structure. These enhancements provide better documentation and streamline the setup process for users.