Skip to content

Commit

Permalink
Update yolo.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamjamjon committed Sep 11, 2024
1 parent f79a876 commit 252f0fb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions benches/yolo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,17 @@ pub fn benchmark_cuda(c: &mut Criterion, h: isize, w: isize) -> Result<()> {
let options = Options::default()
.with_yolo_version(YOLOVersion::V8) // YOLOVersion: V5, V6, V7, V8, V9, V10, RTDETR
.with_yolo_task(YOLOTask::Detect) // YOLOTask: Classify, Detect, Pose, Segment, Obb
.with_model("yolov8m-dyn.onnx")?
.with_model("yolo/v8-m-dyn.onnx")?
.with_cuda(0)
// .with_cpu()
.with_dry_run(0)
.with_i00((1, 1, 4).into())
.with_i02((320, h, 1280).into())
.with_i03((320, w, 1280).into())
.with_confs(&[0.2, 0.15]) // class_0: 0.4, others: 0.15
.with_names2(&COCO_KEYPOINTS_17);
.with_confs(&[0.2, 0.15]);
let mut model = YOLO::new(options)?;

let xs = vec![DataLoader::try_read("./assets/bus.jpg")?];
let xs = [DataLoader::try_read("./assets/bus.jpg")?];

group.bench_function("pre-process", |b| {
b.iter_custom(|n| yolo_stage_bench(&mut model, &xs, Stage::Pre, n))
Expand Down

0 comments on commit 252f0fb

Please sign in to comment.