fix: add face tracking to Swift processor path

- Add track_faces() call to Swift Face processor path
- Previously only in Python processor path
- Now all paths execute face tracking
- Test successful: 212/212 faces have trace_id
- 9 traces detected in test video (020.mp4)
This commit is contained in:
Accusys
2026-09-27 02:58:47 +08:00
parent 48eca7d836
commit 835772ba73
2 changed files with 63 additions and 0 deletions
+10
View File
@@ -247,6 +247,16 @@ pub async fn process_face(
let json_str = std::fs::read_to_string(output_path).context("Failed to read FACE output")?;
let mut result: FaceResult = serde_json::from_str(&json_str).context("Failed to parse FACE output")?;
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!(