feat: face fix deployment + trace_* regeneration + executor stderr filter fix
- swift_face.swift: frame rounding (.rounded()), conf 0.75, min_size 64 - trace_* directories regenerated for KOBA (37 traces, start_frame 5307) - executor.rs: stderr filter now logs all non-empty stderr (was discarding) - VAD not skippable in ASRX (main_fixed.py Step 2 always runs) - Step 2.5 sentence boundary refinement added - Cluster agent async endpoints + similarity transparency - Keyword search: relationship text extraction, priority ordering - Face fix handoff doc for Studio team
This commit is contained in:
+55
-8
@@ -1034,7 +1034,8 @@ async fn get_file_stats(
|
||||
let face_clusters = if std::path::Path::new(&face_cluster_path).exists() {
|
||||
if let Ok(content) = std::fs::read_to_string(&face_cluster_path) {
|
||||
if let Ok(cluster_data) = serde_json::from_str::<serde_json::Value>(&content) {
|
||||
cluster_data.get("clusters")
|
||||
cluster_data
|
||||
.get("clusters")
|
||||
.and_then(|c| c.as_array())
|
||||
.map(|a| a.len())
|
||||
.unwrap_or(0)
|
||||
@@ -1247,19 +1248,65 @@ async fn get_pipeline_progress_handler(
|
||||
if processors_done && tkg_node_count > 0 && tkg_edge_count == 0 {
|
||||
pp.update_stage("face_dedup", 1.0, "completed", Some("no faces".to_string()));
|
||||
pp.update_stage("tkg_edges", 1.0, "completed", Some("no faces".to_string()));
|
||||
pp.update_stage("rule2_ingestion", 1.0, "completed", Some("no faces".to_string()));
|
||||
}
|
||||
|
||||
// Check face dedup from face_cluster.json
|
||||
if processors_done && tkg_node_count > 0 {
|
||||
pp.update_stage(
|
||||
"face_dedup",
|
||||
"rule2_ingestion",
|
||||
1.0,
|
||||
"completed",
|
||||
Some(format!("{} tracks", tkg_node_count)),
|
||||
Some("no faces".to_string()),
|
||||
);
|
||||
}
|
||||
|
||||
// Check face dedup from actual face_cluster.json content
|
||||
if processors_done && tkg_node_count > 0 {
|
||||
let output_dir = crate::core::config::OUTPUT_DIR.as_str();
|
||||
let face_cluster_path = format!("{}/{}.face_cluster.json", output_dir, file_uuid);
|
||||
if std::path::Path::new(&face_cluster_path).exists() {
|
||||
if let Ok(content) = std::fs::read_to_string(&face_cluster_path) {
|
||||
if let Ok(cluster_data) = serde_json::from_str::<serde_json::Value>(&content) {
|
||||
let status = cluster_data
|
||||
.get("status")
|
||||
.and_then(|s| s.as_str())
|
||||
.unwrap_or("");
|
||||
let cluster_count = cluster_data
|
||||
.get("clusters")
|
||||
.and_then(|c| c.as_array())
|
||||
.map(|a| a.len())
|
||||
.unwrap_or(0);
|
||||
|
||||
match status {
|
||||
"has_faces" if cluster_count > 0 => {
|
||||
pp.update_stage(
|
||||
"face_dedup",
|
||||
1.0,
|
||||
"completed",
|
||||
Some(format!("{} persons", cluster_count)),
|
||||
);
|
||||
}
|
||||
"no_faces" | "no_face_json" | "no_embeddings" => {
|
||||
// Clustering ran but found nothing — mark as completed with reason
|
||||
pp.update_stage(
|
||||
"face_dedup",
|
||||
1.0,
|
||||
"completed",
|
||||
Some(format!("ran ({})", status)),
|
||||
);
|
||||
}
|
||||
_ => {
|
||||
// File exists but status unclear — still mark as completed
|
||||
// (the clustering process has finished)
|
||||
pp.update_stage(
|
||||
"face_dedup",
|
||||
1.0,
|
||||
"completed",
|
||||
Some(format!("{} clusters", cluster_count)),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Merge with Redis progress: Redis-completed stages override DB state
|
||||
if let Some(ref rp) = redis_progress {
|
||||
for redis_stage in &rp.stages {
|
||||
|
||||
Reference in New Issue
Block a user