refactor: remove YOLO processor and dependencies

- Delete YOLO processor implementation (src/core/processor/yolo.rs)
- Remove YOLO from processing pipeline and worker
- Clean up YOLO-related code across multiple modules
- Add migration 033_remove_yolo.sql

YOLO functionality removed as part of architecture simplification
This commit is contained in:
Accusys
2026-09-17 16:56:25 +08:00
parent 791c782606
commit 474a5bee99
20 changed files with 161 additions and 731 deletions
+1 -22
View File
@@ -48,28 +48,7 @@ pub const PROCESSOR_SCHEMAS: &[ProcessorJsonSchema] = &[
field_type: FieldType::Array,
allow_empty: true,
},
],
min_data_threshold: 0,
},
ProcessorJsonSchema {
processor: ProcessorType::Yolo,
required_fields: &[
RequiredField {
path: "metadata.fps",
field_type: FieldType::PositiveNumber,
allow_empty: false,
},
RequiredField {
path: "metadata.total_frames",
field_type: FieldType::PositiveNumber,
allow_empty: false,
},
RequiredField {
path: "frames",
field_type: FieldType::Object,
allow_empty: true,
},
],
],
min_data_threshold: 0,
},
ProcessorJsonSchema {
-32
View File
@@ -130,14 +130,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::Yolo => {
// YOLO uses dict-based frames
value
.get("frames")
.and_then(|v| v.as_object())
.map(|o| o.len())
.unwrap_or(0)
}
ProcessorType::Ocr
| ProcessorType::Face
| ProcessorType::Pose
@@ -277,7 +269,6 @@ fn check_reasonableness(
let is_sampled = matches!(
processor,
ProcessorType::Cut
| ProcessorType::Yolo
| ProcessorType::Ocr
| ProcessorType::Face
| ProcessorType::Pose
@@ -419,29 +410,6 @@ fn build_data_summary(processor: &ProcessorType, value: &serde_json::Value) -> s
.count());
}
}
ProcessorType::Yolo => {
if let Some(frames) = value.get("frames").and_then(|v| v.as_object()) {
let total_detections: usize = frames
.values()
.map(|f| {
f.get("objects")
.and_then(|v| v.as_array())
.map(|a| a.len())
.unwrap_or(0)
})
.sum();
summary["total_detections"] = serde_json::json!(total_detections);
summary["frames_with_data"] = serde_json::json!(frames
.values()
.filter(|f| {
f.get("objects")
.and_then(|v| v.as_array())
.map(|a| !a.is_empty())
.unwrap_or(false)
})
.count());
}
}
ProcessorType::Asr => {
if let Some(segments) = value.get("segments").and_then(|v| v.as_array()) {
summary["segment_count"] = serde_json::json!(segments.len());