refactor: remove face embedding architecture - single Qdrant _faces collection

- Delete FaceEmbeddingDb module (face_embedding_db.rs)
- Stub match_faces_iterative, generate_seed_embeddings, tmdb_match_handler
- Remove sync_trace_embeddings, populate_face_embeddings_to_qdrant
- Remove embedding from face.json output (face_processor.py)
- Remove embedding from PG UPDATE (store_traced_faces.py)
- Remove workspace traces staging (checkin.rs, qdrant_workspace.rs)
- Fix tests: add pose_angle to Face, hand_nodes to TkgResult

Disabled functions (need reimplement with _faces):
- match_faces_iterative (identity agent)
- generate_seed_embeddings (TMDb seeds)
- tmdb_match_handler (TMDb matching)
- cluster_face_embeddings, search_similar_faces
- merge_traces_within_cuts
This commit is contained in:
Accusys
2026-06-24 22:27:09 +08:00
parent 360cb991e1
commit 074cdcdbed
60 changed files with 657 additions and 9454 deletions
-42
View File
@@ -209,48 +209,6 @@ pub const PROCESSOR_SCHEMAS: &[ProcessorJsonSchema] = &[
],
min_data_threshold: 1,
},
ProcessorJsonSchema {
processor: ProcessorType::Story,
required_fields: &[
RequiredField {
path: "child_chunks",
field_type: FieldType::Array,
allow_empty: true,
},
RequiredField {
path: "parent_chunks",
field_type: FieldType::Array,
allow_empty: true,
},
RequiredField {
path: "stats",
field_type: FieldType::Object,
allow_empty: false,
},
],
min_data_threshold: 0,
},
ProcessorJsonSchema {
processor: ProcessorType::MediaPipe,
required_fields: &[
RequiredField {
path: "frame_count",
field_type: FieldType::PositiveNumber,
allow_empty: false,
},
RequiredField {
path: "fps",
field_type: FieldType::PositiveNumber,
allow_empty: false,
},
RequiredField {
path: "frames",
field_type: FieldType::Array,
allow_empty: true,
},
],
min_data_threshold: 0,
},
];
/// Get schema for a processor
+2 -48
View File
@@ -161,24 +161,6 @@ fn count_data_items(processor: &ProcessorType, value: &serde_json::Value) -> usi
.and_then(|v| v.as_array())
.map(|a| a.len())
.unwrap_or(0),
ProcessorType::Story => {
let child = value
.get("child_chunks")
.and_then(|v| v.as_array())
.map(|a| a.len())
.unwrap_or(0);
let parent = value
.get("parent_chunks")
.and_then(|v| v.as_array())
.map(|a| a.len())
.unwrap_or(0);
child + parent
}
ProcessorType::MediaPipe => value
.get("frames")
.and_then(|v| v.as_array())
.map(|a| a.len())
.unwrap_or(0),
_ => 0,
}
}
@@ -318,23 +300,6 @@ fn check_reasonableness(
}
}
// Story-specific: check chunk count vs cut scene count
if *processor == ProcessorType::Story {
if let Some(cut_value) = all_values.get("cut") {
let story_chunks = count_data_items(processor, value);
let cut_scenes = count_data_items(&ProcessorType::Cut, cut_value);
if story_chunks > 0 && cut_scenes > 0 {
// Story chunks should be >= cut scenes (one chunk per scene minimum)
if story_chunks < cut_scenes / 2 {
issues.push(format!(
"story chunk count ({}) much less than cut scene count ({})",
story_chunks, cut_scenes
));
}
}
}
}
// ASR-specific: check segments vs cut scenes
if *processor == ProcessorType::Asr {
if let Some(cut_value) = all_values.get("cut") {
@@ -499,11 +464,6 @@ fn build_data_summary(processor: &ProcessorType, value: &serde_json::Value) -> s
summary["speaker_count"] = serde_json::json!(speakers.len());
}
}
ProcessorType::Story => {
if let Some(stats) = value.get("stats") {
summary["stats"] = stats.clone();
}
}
_ => {}
}
@@ -538,10 +498,7 @@ pub fn verify_file(file_uuid: &str) -> FileVerificationReport {
let mut all_values: HashMap<String, serde_json::Value> = HashMap::new();
for processor in &processors {
let proc_name = processor.as_str();
let filename = match processor {
ProcessorType::Story => format!("{}.story_story.json", full_uuid),
_ => format!("{}.{}.json", full_uuid, proc_name),
};
let filename = format!("{}.{}.json", full_uuid, proc_name);
let path = PathBuf::from(OUTPUT_DIR.as_str()).join(&filename);
if let Ok(content) = std::fs::read_to_string(&path) {
@@ -639,10 +596,7 @@ pub fn verify_file(file_uuid: &str) -> FileVerificationReport {
/// Legacy verification function (backward compatible)
pub fn verify_output(processor: &ProcessorType, file_uuid: &str) -> VerificationResult {
let proc_name = processor.as_str();
let filename = match processor {
ProcessorType::Story => format!("{}.story_story.json", file_uuid),
_ => format!("{}.{}.json", file_uuid, proc_name),
};
let filename = format!("{}.{}.json", file_uuid, proc_name);
let output_path = PathBuf::from(OUTPUT_DIR.as_str()).join(&filename);
if !output_path.exists() {