Files
usls/examples/yolov8-head/main.rs
jamjamjon af934086bb Initial
2024-03-29 15:54:24 +08:00

20 lines
506 B
Rust

use usls::{models::YOLO, DataLoader, Options};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// build model
let options = Options::default()
.with_model("../models/yolov8-head-f16.onnx")
.with_confs(&[0.3])
.with_saveout("YOLOv8-Head")
.with_profile(false);
let mut model = YOLO::new(&options)?;
// build dataloader
let mut dl = DataLoader::default().load("./assets/kids.jpg")?;
// run
model.run(&dl.next().unwrap().0)?;
Ok(())
}