From 74288a7dddd0a9f02d8653d73435a5251d4433bd Mon Sep 17 00:00:00 2001 From: Accusys Date: Sun, 27 Sep 2026 02:12:13 +0800 Subject: [PATCH] feat: integrate Rust face_tracker into process_face() - Add track_faces() call after FaceNet embedding generation - Apply to both Swift and Python processor paths - Add logging for tracking status - Face tracking now runs automatically during face processing - face.json will include trace_id automatically --- src/core/processor/face.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/processor/face.rs b/src/core/processor/face.rs index cde3eac8..45e42cec 100644 --- a/src/core/processor/face.rs +++ b/src/core/processor/face.rs @@ -286,8 +286,18 @@ pub async fn process_face( let mut result: FaceResult = serde_json::from_str(&json_str).context("Failed to parse FACE output")?; - result.compute_status(); - result.save_to_file(output_path)?; +result.compute_status(); + + // Execute face tracking + tracing::info!("[FACE] Starting face tracking"); + use crate::core::processor::face_tracker::track_faces; + if let Err(e) = track_faces(&mut result, 0.3, 0.7, 100.0, true, None) { + tracing::warn!("[FACE] Face tracking failed: {}", e); + } else { + tracing::info!("[FACE] Face tracking completed successfully"); + } + + result.save_to_file(output_path)?; tracing::info!( "[FACE] Result: status={}, {} frames, {} total faces",