Expand description
Object detection interface (detectors, config, results). Object detection interface.
§Example
use vision_rs::detect::{DetectorConfig, ObjectDetector, Yolo26DetectorConfig};
use vision_rs::models::yolo::yolo26::Yolo26Variant;
let config = DetectorConfig::Yolo26(Yolo26DetectorConfig::new(
Yolo26Variant::N,
"weights/yolo26n.bin",
vec!["car".into(), "truck".into(), "person".into()],
));
let detector = ObjectDetector::new(config)?;
let image_bytes = std::fs::read("frame.jpg")?;
let detections = detector.detect(&image_bytes).await?;
for d in &detections {
println!("{} {:.2} {:?}", d.class, d.confidence, d.bbox);
}Structs§
- Detection
- A single detected object.
- Object
Detector - A model-agnostic object detector, dispatching to the configured model family.
- Yolo26
Detector Config - Configuration for a YOLO26-backed
ObjectDetector.
Enums§
- Detector
Config - Detector configuration, tagged by model family.