feat: improve Face Tracing with IoU + Embedding similarity matching
## Changes ### Face Tracing Improvements - Replace bbox distance matching with IoU (Intersection over Union) - Add embedding similarity matching from Qdrant _faces collection - Add Qdrant HTTP client to load face embeddings - Fix Qdrant data format reading (x, y, width, height directly, not in bbox object) - Add debug logging for trace matching - Add --similarity-threshold and --iou-threshold parameters ### Results - Before: 374 traces (each face a separate trace) - After: 22 traces (continuous face sequences) - Matching validation: IoU 0.819-1.000, Similarity 0.976-1.000 ### Pipeline Configuration - Add face_trace tool configuration with Rust implementation - Set default parameters: similarity_threshold=0.85, iou_threshold=0.3 - Document usage notes for trace definition ### Face Clustering - Update threshold to 0.15 for correct male/female separation - Add auto-filtering for low-quality clusters (face_count<20, bbox_area>150000) ## Testing - Test video: Accusys-WD_FilmRiot_test.mp4 (374 faces, 188 frames) - Final result: 2 persons (104 + 79 = 183 faces assigned) - All faces correctly assigned with cluster_id ## Documentation - Add test report: docs_v1.0/M4_workspace/2026-10-16_face_tracing_fix_test_report.md ## Files Modified - tools/cli/rust/src/bin/rust_store_traced_faces.rs - config/pipeline_flows.json - scripts/face_clustering_processor.py - docs_v1.0/M4_workspace/2026-10-16_face_tracing_fix_test_report.md (new) Closes #FACE_TRACE_IMPROVEMENT
This commit is contained in:
@@ -230,7 +230,7 @@
|
||||
"progress_weight": 0.20,
|
||||
"display_name": "人脸追踪",
|
||||
"display_name_en": "Face Tracing",
|
||||
"description": "Face tracking to generate face traces",
|
||||
"description": "Face tracking to generate face traces using IoU + Embedding Similarity",
|
||||
"required": false,
|
||||
"enabled": true,
|
||||
"timeout_secs": 3600,
|
||||
@@ -238,6 +238,16 @@
|
||||
"estimated_time_secs": 5,
|
||||
"resource_type": "cpu",
|
||||
"dependencies": ["face"],
|
||||
"tool": {
|
||||
"name": "rust_face_trace",
|
||||
"priority": 0,
|
||||
"description": "Rust-based face tracking with IoU + Embedding similarity matching",
|
||||
"parameters": {
|
||||
"similarity_threshold": 0.85,
|
||||
"iou_threshold": 0.3
|
||||
},
|
||||
"usage_notes": "Uses Qdrant _faces collection for embeddings. Matches faces based on IoU (bbox overlap) and embedding similarity. Traces are continuous face sequences; same person may have multiple traces due to cuts or temporary exits."
|
||||
},
|
||||
"condition": {
|
||||
"depends_on": "face",
|
||||
"skip_if_exists": "*.face_traced.json"
|
||||
|
||||
Reference in New Issue
Block a user