feat: face clustering pipeline improvements and Rust/Swift face processing
- Add Rust face processor module (detection, embedding, tracking, qdrant) - Add Facenet CoreML/ONNX conversion scripts and tests - Refactor swift_face into Sources/swift_face with ArgumentParser support - Update store_traced_faces to handle face.json correctly - Fix ASRX parsing and TKG bbox reading from Qdrant - Improve admin_config and trace_agent APIs - Add M4 workspace docs for face clustering, dedup, and Facenet validation - Fix worker heartbeat TTL (poll_interval x 3, min 60s) for offline detection
This commit is contained in:
@@ -49,7 +49,7 @@ OUTPUT_DIR = os.getenv("MOMENTRY_OUTPUT_DIR", "./output")
|
||||
OUTPUT_JSON_PATH = os.path.join(OUTPUT_DIR, f"{UUID}.face_clustered.json")
|
||||
ASRX_JSON_PATH = os.path.join(OUTPUT_DIR, f"{UUID}.asrx.json")
|
||||
|
||||
CLUSTER_THRESHOLD = 0.35
|
||||
CLUSTER_THRESHOLD = 0.20 # Updated for facenet-pytorch (was 0.15 for CoreML)
|
||||
CLUSTER_METHOD = "leader"
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ def cluster_by_trace(
|
||||
return trace_embeddings, traces
|
||||
|
||||
|
||||
def single_stage_clustering(trace_embeddings: dict, threshold: float = 0.35) -> tuple:
|
||||
def single_stage_clustering(trace_embeddings: dict, threshold: float = 0.15) -> tuple:
|
||||
"""
|
||||
Single-stage AgglomerativeClustering on trace means.
|
||||
No Stage 2 merge (the problematic logic has been removed).
|
||||
@@ -216,7 +216,7 @@ def single_stage_clustering(trace_embeddings: dict, threshold: float = 0.35) ->
|
||||
return trace_to_person, trace_similarities
|
||||
|
||||
|
||||
def seed_leader_cluster(trace_embeddings: dict, threshold: float = 0.35) -> tuple:
|
||||
def seed_leader_cluster(trace_embeddings: dict, threshold: float = 0.15) -> tuple:
|
||||
"""
|
||||
Seed-leader clustering with incremental mean centroids.
|
||||
Algorithm:
|
||||
|
||||
Reference in New Issue
Block a user