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:
@@ -87,10 +87,6 @@ impl SystemResources {
|
||||
pub fn recommend_parallel_modules(&self) -> Vec<&'static str> {
|
||||
let mut recommended = Vec::new();
|
||||
|
||||
if self.gpu_available {
|
||||
recommended.push("yolo");
|
||||
}
|
||||
|
||||
if self.memory_available_mb >= 8192 {
|
||||
recommended.push("ocr");
|
||||
recommended.push("face");
|
||||
|
||||
@@ -8,7 +8,6 @@ pub mod cut;
|
||||
pub mod face;
|
||||
pub mod ocr;
|
||||
pub mod pose;
|
||||
pub mod yolo;
|
||||
|
||||
pub use appearance::*;
|
||||
pub use asr::*;
|
||||
@@ -18,4 +17,3 @@ pub use cut::*;
|
||||
pub use face::*;
|
||||
pub use ocr::*;
|
||||
pub use pose::*;
|
||||
pub use yolo::*;
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
//! YOLO (Object Detection) processing module
|
||||
|
||||
use anyhow::Result;
|
||||
use momentry_core::ui::progress::{ProcessorType, ProgressState, ProgressUi};
|
||||
use momentry_core::OutputDir;
|
||||
use std::path::Path;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
/// Process YOLO module
|
||||
pub async fn process_yolo_module(
|
||||
yolo_path: &Path,
|
||||
video_path: &str,
|
||||
uuid: &str,
|
||||
progress_state: &Arc<Mutex<ProgressState>>,
|
||||
ui: &Arc<Mutex<Option<ProgressUi>>>,
|
||||
) -> Result<()> {
|
||||
{
|
||||
let mut state = progress_state.lock().unwrap();
|
||||
state.get_processor(ProcessorType::Yolo).start(1);
|
||||
}
|
||||
|
||||
let yolo_result = momentry_core::core::processor::process_yolo(
|
||||
video_path,
|
||||
yolo_path.to_str().unwrap(),
|
||||
Some(uuid),
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
|
||||
let yolo_json = serde_json::to_string_pretty(&yolo_result)?;
|
||||
std::fs::write(yolo_path, &yolo_json)?;
|
||||
|
||||
let output_dir = OutputDir::new();
|
||||
let _ = output_dir.backup_file(uuid, "yolo.json");
|
||||
|
||||
println!(" ✓ YOLO saved: {} frames", yolo_result.frame_count);
|
||||
|
||||
{
|
||||
let mut state = progress_state.lock().unwrap();
|
||||
state
|
||||
.get_processor(ProcessorType::Yolo)
|
||||
.complete(&format!("{} frames", yolo_result.frame_count));
|
||||
}
|
||||
|
||||
if let Some(ref mut ui) = *ui.lock().unwrap() {
|
||||
let _ = ui.render();
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user