use serde::Serialize; #[derive(Debug, Clone, Serialize)] pub struct Detection { pub label: String, pub confidence: f32, } /// Stand-in for real ONNX Runtime inference (the `ort` crate, using a model /// trained on failure images). Always reports one fixed "failure" so the /// rest of the pipeline — reporting, acking the stream entry — has /// something to do and can be tested without a real model file. /// /// Swap this out once you're comfortable with the pipeline around it: /// decode `frame_bytes` with the `image` crate, run it through an `ort` /// session, and turn the model's output into real `Detection`s. pub fn detect(_frame_bytes: &[u8]) -> Vec { vec![Detection { label: "spaghetti".to_string(), confidence: 0.91 }] }