-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: oatiz <iamoatiz@gmail.com>
- Loading branch information
Showing
7 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## Quick Start | ||
|
||
```shell | ||
cargo run -r --example yolov10 | ||
``` | ||
|
||
## Export ONNX Model | ||
|
||
- **Export** | ||
|
||
```shell | ||
# clone repo and install dependencies | ||
git clone https://github.com/THU-MIG/yolov10.git | ||
cd yolov10 | ||
pip install -r requirements.txt | ||
|
||
# donwload `pt` weights | ||
wget https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10n.pt | ||
|
||
# export ONNX model | ||
yolo export model=yolov10n.pt format=onnx opset=13 simplify dynamic | ||
``` | ||
|
||
## Results | ||
|
||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use usls::{ | ||
models::{YOLOVersion, YOLO}, | ||
Annotator, DataLoader, Options, | ||
}; | ||
|
||
fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
// build model | ||
let options = Options::default() | ||
.with_model("yolov10n-dyn.onnx")? | ||
.with_yolo_version(YOLOVersion::V10) | ||
.with_i00((1, 1, 4).into()) | ||
.with_i02((416, 640, 800).into()) | ||
.with_i03((416, 640, 800).into()) | ||
.with_confs(&[0.4, 0.15]); | ||
let mut model = YOLO::new(options)?; | ||
|
||
// load image | ||
let x = vec![DataLoader::try_read("./assets/bus.jpg")?]; | ||
|
||
// run | ||
let y = model.run(&x)?; | ||
|
||
// annotate | ||
let annotator = Annotator::default().with_saveout("YOLOv10"); | ||
annotator.annotate(&x, &y); | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters