- Replace localStorage-based dev mode with VITE_DEVELOPER_MODE env var
- Remove setDeveloperMode function and localStorage logic
- Update Settings page to show status instead of toggle
- Add VITE_DEVELOPER_MODE to vite-env.d.ts type definitions
- Update .env_example with developer mode documentation
Developer mode is now controlled by setting VITE_DEVELOPER_MODE=true
in admin-frontend/.env file (requires rebuild to take effect)
- 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