fix: keep all traces in face clustering (remove min_faces=4 cutoff)
Large files (>1000 traces) used min_faces_per_trace=4, silently dropping short traces (<=3 face points) from dedup. For 44c37c this excluded 484/1430 traces (34%) — walk-ons and passers-by never got a person label. Now use min_faces=1 constant; noise is handled by the confidence>=0.5 filter in cluster_by_trace instead of dropping short appearances. Result on 44c37c: 1430/1430 traces clustered, 21717/21717 faces assigned, clusters 104 -> 203.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user