Modified files:
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 is contained in:
@@ -212,7 +212,7 @@ class AutoMatchRequest(BaseModel):
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
tolerance: float = Field(0.6, ge=0.0, le=1.0, description="Tolerance threshold (lower = stricter matching)")
|
||||
tolerance: float = Field(0.5, ge=0.0, le=1.0, description="Tolerance threshold (lower = stricter matching)")
|
||||
auto_accept: bool = Field(False, description="Enable automatic acceptance of matching faces")
|
||||
auto_accept_threshold: float = Field(70.0, ge=0.0, le=100.0, description="Similarity threshold for auto-acceptance (0-100%)")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user