refactor: remove Rule 3, Story, and Caption processors
- Remove Rule 3 (Scene Chunking) from worker auto-trigger - Remove rule3_ingest.rs and related imports - Remove Story/Caption from playground module parsing - Clean up scan.rs Rule 3 display - Fix ASRX field name conversion (start_time -> start) Reason: Story/5W1H/Scene accuracy too poor - will redesign later
This commit is contained in:
@@ -1067,15 +1067,13 @@ async fn main() -> Result<()> {
|
||||
"cut" => Some(ProcessorType::Cut),
|
||||
"asrx" => Some(ProcessorType::Asrx),
|
||||
"yolo" => Some(ProcessorType::Yolo),
|
||||
"ocr" => Some(ProcessorType::Ocr),
|
||||
"face" => Some(ProcessorType::Face),
|
||||
"pose" => Some(ProcessorType::Pose),
|
||||
"story" => Some(ProcessorType::Story),
|
||||
"caption" => Some(ProcessorType::Caption),
|
||||
_ => {
|
||||
eprintln!("Unknown module: {}", name);
|
||||
None
|
||||
}
|
||||
"ocr" => Some(ProcessorType::Ocr),
|
||||
"face" => Some(ProcessorType::Face),
|
||||
"pose" => Some(ProcessorType::Pose),
|
||||
_ => {
|
||||
eprintln!("Unknown module: {}", name);
|
||||
None
|
||||
}
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
@@ -1095,14 +1093,12 @@ async fn main() -> Result<()> {
|
||||
"asrx" => Some(ProcessorType::Asrx),
|
||||
"yolo" => Some(ProcessorType::Yolo),
|
||||
"ocr" => Some(ProcessorType::Ocr),
|
||||
"face" => Some(ProcessorType::Face),
|
||||
"pose" => Some(ProcessorType::Pose),
|
||||
"story" => Some(ProcessorType::Story),
|
||||
"caption" => Some(ProcessorType::Caption),
|
||||
_ => {
|
||||
eprintln!("Unknown cloud module: {}", name);
|
||||
None
|
||||
}
|
||||
"face" => Some(ProcessorType::Face),
|
||||
"pose" => Some(ProcessorType::Pose),
|
||||
_ => {
|
||||
eprintln!("Unknown cloud module: {}", name);
|
||||
None
|
||||
}
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
@@ -1732,127 +1728,9 @@ async fn main() -> Result<()> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Process Story (video narrative)
|
||||
if should_process(ProcessorType::Story) {
|
||||
let story_path = output_dir.get_output_path(&uuid, "story.json");
|
||||
let decision = decide_processing(&story_path, force, resume);
|
||||
|
||||
match decision {
|
||||
ProcessingDecision::SkipComplete => {
|
||||
println!("\nStory: ✓ Already complete, skipping");
|
||||
}
|
||||
ProcessingDecision::ForceReprocess => {
|
||||
println!("\nStory: ⟳ Force reprocessing from scratch...");
|
||||
std::fs::remove_file(&story_path).ok();
|
||||
if is_cloud(ProcessorType::Story) {
|
||||
println!(" [Cloud processing not implemented yet - run locally]");
|
||||
} else {
|
||||
process_story_module(
|
||||
&story_path,
|
||||
video_path,
|
||||
&uuid,
|
||||
&progress_state,
|
||||
&ui,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
ProcessingDecision::ResumePartial => {
|
||||
println!("\nStory: ↻ Resuming from checkpoint...");
|
||||
if is_cloud(ProcessorType::Story) {
|
||||
println!(" [Cloud processing not implemented yet - run locally]");
|
||||
} else {
|
||||
process_story_module(
|
||||
&story_path,
|
||||
video_path,
|
||||
&uuid,
|
||||
&progress_state,
|
||||
&ui,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
ProcessingDecision::Process => {
|
||||
if is_cloud(ProcessorType::Story) {
|
||||
println!("\nStory: ☁️ Running via cloud...");
|
||||
println!(" [Cloud processing not implemented yet - run locally]");
|
||||
} else {
|
||||
println!("\nStory: ⚙️ Processing...");
|
||||
process_story_module(
|
||||
&story_path,
|
||||
video_path,
|
||||
&uuid,
|
||||
&progress_state,
|
||||
&ui,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Process Caption (image captions)
|
||||
if should_process(ProcessorType::Caption) {
|
||||
let caption_path = output_dir.get_output_path(&uuid, "caption.json");
|
||||
let decision = decide_processing(&caption_path, force, resume);
|
||||
|
||||
match decision {
|
||||
ProcessingDecision::SkipComplete => {
|
||||
println!("\nCaption: ✓ Already complete, skipping");
|
||||
}
|
||||
ProcessingDecision::ForceReprocess => {
|
||||
println!("\nCaption: ⟳ Force reprocessing from scratch...");
|
||||
std::fs::remove_file(&caption_path).ok();
|
||||
if is_cloud(ProcessorType::Caption) {
|
||||
println!(" [Cloud processing not implemented yet - run locally]");
|
||||
} else {
|
||||
process_caption_module(
|
||||
&caption_path,
|
||||
video_path,
|
||||
&uuid,
|
||||
&progress_state,
|
||||
&ui,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
ProcessingDecision::ResumePartial => {
|
||||
println!("\nCaption: ↻ Resuming from checkpoint...");
|
||||
if is_cloud(ProcessorType::Caption) {
|
||||
println!(" [Cloud processing not implemented yet - run locally]");
|
||||
} else {
|
||||
process_caption_module(
|
||||
&caption_path,
|
||||
video_path,
|
||||
&uuid,
|
||||
&progress_state,
|
||||
&ui,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
ProcessingDecision::Process => {
|
||||
if is_cloud(ProcessorType::Caption) {
|
||||
println!("\nCaption: ☁️ Running via cloud...");
|
||||
println!(" [Cloud processing not implemented yet - run locally]");
|
||||
} else {
|
||||
println!("\nCaption: ⚙️ Processing...");
|
||||
process_caption_module(
|
||||
&caption_path,
|
||||
video_path,
|
||||
&uuid,
|
||||
&progress_state,
|
||||
&ui,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Store pre_chunks and frames to database
|
||||
// TODO: Store pre_chunks and frames to database
|
||||
|
||||
// Stop Redis subscriber
|
||||
redis_handle.abort();
|
||||
@@ -1889,18 +1767,10 @@ async fn main() -> Result<()> {
|
||||
if should_process(ProcessorType::Appearance) {
|
||||
let path = output_dir.get_output_path(&uuid, "appearance.json");
|
||||
println!(" - Appearance JSON: {}", path.display());
|
||||
}
|
||||
if should_process(ProcessorType::Story) {
|
||||
let path = output_dir.get_output_path(&uuid, "story.json");
|
||||
println!(" - Story JSON: {}", path.display());
|
||||
}
|
||||
if should_process(ProcessorType::Caption) {
|
||||
let path = output_dir.get_output_path(&uuid, "caption.json");
|
||||
println!(" - Caption JSON: {}", path.display());
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Commands::Chunk { uuid } => {
|
||||
println!("Chunking: {}", uuid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user