Skip to content

Commit

Permalink
Update ort to 2.0.0-rc.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jamjamjon committed May 8, 2024
1 parent b7615b3 commit e98f905
Show file tree
Hide file tree
Showing 5 changed files with 169 additions and 123 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ exclude = ["assets/*", "examples/*"]
[dependencies]
clap = { version = "4.2.4", features = ["derive"] }
ndarray = { version = "0.15.6" }
ort = { version = "2.0.0-alpha.4", default-features = false, features = [
ort = { version = "2.0.0-rc.2", default-features = false, features = [
"load-dynamic",
"copy-dylibs",
"profiling",
"half",
"ndarray",
"cuda",
"tensorrt",
"coreml",
"ureq",
"openvino",
"rocm",
"openvino",
"operator-libraries"
] }
anyhow = { version = "1.0.75" }
regex = { version = "1.5.4" }
Expand All @@ -42,5 +43,4 @@ imageproc = { version = "0.24" }
ab_glyph = "0.2.23"
geo = "0.28.0"
prost = "0.12.4"
human_bytes = "0.4.3"
sysinfo = "0.30.12"
human_bytes = "0.4.3"
8 changes: 5 additions & 3 deletions examples/yolov8/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ use usls::{coco, models::YOLO, Annotator, DataLoader, Options};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// build model
let options = Options::default()
.with_model("yolov8m-dyn.onnx")?
.with_model("yolov8m-dyn-f16.onnx")?
// .with_model("yolov8m-dyn.onnx")?
// .with_model("yolov8m-pose-dyn.onnx")?
// .with_model("yolov8m-cls-dyn.onnx")?
// .with_model("yolov8m-seg-dyn.onnx")?
// .with_model("yolov8m-obb-dyn.onnx")?
// .with_model("yolov8m-oiv7-dyn.onnx")?
.with_trt(0)
// .with_trt(0)
// .with_fp16(true)
// .with_coreml(0)
.with_i00((1, 1, 4).into())
.with_i02((224, 640, 800).into())
.with_i03((224, 640, 800).into())
.with_confs(&[0.4, 0.15]) // person: 0.4, others: 0.15
.with_names2(&coco::KEYPOINTS_NAMES_17)
.with_profile(false);
.with_dry_run(10)
.with_profile(true);
let mut model = YOLO::new(&options)?;

// build dataloader
Expand Down
Loading

0 comments on commit e98f905

Please sign in to comment.