From f615a0a85b85bd4dd4dcf66bb60570020d93ff40 Mon Sep 17 00:00:00 2001
From: Jamjamjon <51357717+jamjamjon@users.noreply.github.com>
Date: Thu, 11 Jul 2024 21:47:45 +0800
Subject: [PATCH] Update README.md
---
README.md | 35 ++++++++++-------------------------
1 file changed, 10 insertions(+), 25 deletions(-)
diff --git a/README.md b/README.md
index 1f6bfb6..f15fc28 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,8 @@ A Rust library integrated with **ONNXRuntime**, providing a collection of **Comp
| Model | Task / Type | Example | CUDA
f32 | CUDA
f16 | TensorRT
f32 | TensorRT
f16 |
| :---------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------: | :--------------------------: | :-----------: | :-----------: | :------------------------: | :-----------------------: |
| [YOLOv5](https://github.com/ultralytics/yolov5) | Classification
Object Detection
Instance Segmentation | [demo](examples/yolo) | ✅ | ✅ | ✅ | ✅ |
+| [YOLOv6](https://github.com/meituan/YOLOv6) | Object Detection | [demo](examples/yolo) | ✅ | ✅ | ✅ | ✅ |
+| [YOLOv7](https://github.com/WongKinYiu/yolov7) | Object Detection | [demo](examples/yolo) | ✅ | ✅ | ✅ | ✅ |
| [YOLOv8](https://github.com/ultralytics/ultralytics) | Object Detection
Instance Segmentation
Classification
Oriented Object Detection
Keypoint Detection | [demo](examples/yolo) | ✅ | ✅ | ✅ | ✅ |
| [YOLOv9](https://github.com/WongKinYiu/yolov9) | Object Detection | [demo](examples/yolo) | ✅ | ✅ | ✅ | ✅ |
| [YOLOv10](https://github.com/THU-MIG/yolov10) | Object Detection | [demo](examples/yolo) | ✅ | ✅ | ✅ | ✅ |
@@ -62,9 +64,6 @@ cargo run -r --example yolov8 # yolov10, blip, clip, yolop, svtr, db, ...
## Integrate into your own project
-
-Expand
-
### 1. Add `usls` as a dependency to your project's `Cargo.toml`
```Shell
@@ -81,7 +80,9 @@ usls = { git = "https://github.com/jamjamjon/usls", rev = "???sha???"}
```Rust
let options = Options::default()
- .with_model("../models/yolov8m-seg-dyn-f16.onnx");
+ .with_yolo_version(YOLOVersion::V5) // YOLOVersion: V5, V6, V7, V8, V9, V10, RTDETR
+ .with_yolo_task(YOLOTask::Classify) // YOLOTask: Classify, Detect, Pose, Segment, Obb
+ .with_model("xxxx.onnx")?;
let mut model = YOLO::new(options)?;
```
@@ -104,9 +105,9 @@ let mut model = YOLO::new(options)?;
```Rust
let options = Options::default()
- .with_confs(&[0.4, 0.15]) // class 0: 0.4, others: 0.15
+ .with_confs(&[0.4, 0.15]) // class_0: 0.4, others: 0.15
```
-- Go check [Options](src/options.rs) for more model options.
+- Go check [Options](src/core/options.rs) for more model options.
#### 3. Prepare inputs, and then you're ready to go
@@ -132,7 +133,7 @@ let y = model.run(&x)?;
#### 4. Annotate and save results
```Rust
-let annotator = Annotator::default().with_saveout("YOLOv8");
+let annotator = Annotator::default().with_saveout("YOLO");
annotator.annotate(&x, &y);
```
@@ -140,19 +141,6 @@ annotator.annotate(&x, &y);
The inference outputs of provided models will be saved to `Vec`.
-```Rust
-pub struct Y {
- probs: Option,
- bboxes: Option>,
- keypoints: Option>>,
- mbrs: Option>,
- polygons: Option>,
- texts: Option>,
- masks: Option>,
- embedding: Option,
-}
-```
-
- You can get detection bboxes with `y.bboxes()`:
```Rust
@@ -174,8 +162,5 @@ pub struct Y {
}
}
```
-
- More `Bbox` methods here: `src/ys/bbox.rs`
-- Other tasks results can be found at: `src/ys/y.rs`
-
-
+
+- Other: [Docs](https://docs.rs/usls/latest/usls/struct.Y.html)