mirror of
https://github.com/mii443/usls.git
synced 2025-12-03 02:58:22 +00:00
Minor adjustments to YOLO (#17)
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
use usls::{
|
||||
models::{YOLOTask, YOLO},
|
||||
models::{YOLOTask, YOLOVersion, YOLO},
|
||||
Annotator, DataLoader, Options,
|
||||
};
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// build model
|
||||
let options = Options::default()
|
||||
.with_conf_independent(true)
|
||||
.with_anchors_first(true)
|
||||
.with_yolo_version(YOLOVersion::V5)
|
||||
.with_model("../models/yolov5s-seg.onnx")?
|
||||
.with_yolo_task(YOLOTask::Segment)
|
||||
.with_model("yolov5s-seg.onnx")?
|
||||
// .with_trt(0)
|
||||
// .with_fp16(true)
|
||||
.with_i00((1, 1, 4).into())
|
||||
|
||||
@@ -3,11 +3,11 @@ 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.onnx")?
|
||||
// .with_model("yolov8m-dyn-f16.onnx")?
|
||||
// .with_model("yolov8m-pose-dyn.onnx")?
|
||||
// .with_model("yolov8m-cls-dyn.onnx")?
|
||||
.with_model("yolov8m-seg-dyn.onnx")?
|
||||
// .with_model("yolov8m-seg-dyn.onnx")?
|
||||
// .with_model("yolov8m-obb-dyn.onnx")?
|
||||
// .with_model("yolov8m-oiv7-dyn.onnx")?
|
||||
// .with_trt(0)
|
||||
@@ -19,7 +19,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.with_i03((224, 640, 800).into())
|
||||
.with_confs(&[0.4, 0.15]) // class 0: 0.4, others: 0.15
|
||||
.with_names2(&coco::KEYPOINTS_NAMES_17)
|
||||
// .with_dry_run(10)
|
||||
.with_profile(false);
|
||||
let mut model = YOLO::new(options)?;
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
use usls::{models::YOLO, Annotator, DataLoader, Options};
|
||||
use usls::{
|
||||
models::{YOLOVersion, YOLO},
|
||||
Annotator, DataLoader, Options,
|
||||
};
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// build model
|
||||
let options = Options::default()
|
||||
.with_model("yolov9-c-dyn-f16.onnx")?
|
||||
.with_model("../models/yolov9-c.onnx")?
|
||||
.with_yolo_version(YOLOVersion::V9)
|
||||
.with_i00((1, 1, 4).into())
|
||||
.with_i02((416, 640, 800).into())
|
||||
.with_i03((416, 640, 800).into())
|
||||
|
||||
Reference in New Issue
Block a user