diff --git a/scripts/face_clustering_processor.py b/scripts/face_clustering_processor.py index 38ee3335..ccd96a8a 100644 --- a/scripts/face_clustering_processor.py +++ b/scripts/face_clustering_processor.py @@ -430,12 +430,14 @@ def main(): if tid is not None and tid >= 0: unique_trace_ids.add(tid) - # Adaptive threshold: only filter noise when trace count is large - # For small files (<=1000 traces), keep all traces for maximum recall - # For large files (>1000 traces), filter out single-face noise - min_faces = 4 if len(unique_trace_ids) > 1000 else 1 + # Keep all traces for maximum recall. Noise is handled by the + # confidence_threshold filter in cluster_by_trace (0.5), not by + # dropping short traces — short appearances (walk-ons, passers-by) + # are real people and must stay in the dedup pool, even for + # large files with many faces. + min_faces = 1 print( - f"[CONFIG] unique_traces={len(unique_trace_ids)}, min_faces_per_trace={min_faces} (adaptive)" + f"[CONFIG] unique_traces={len(unique_trace_ids)}, min_faces_per_trace={min_faces}" ) trace_embeddings, traces = cluster_by_trace(