Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jamjamjon authored Jul 11, 2024
1 parent f1a57a3 commit 873f2f4
Showing 1 changed file with 68 additions and 28 deletions.
96 changes: 68 additions & 28 deletions examples/yolo/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

## TODO: Demo pictures(combine into one)

| Detection | Instance Segmentation | Pose | Classification | Obb |
| :---------------: | :------------------------: |:---------------: | :------------------------: |:------------------------: |
| <img src='examples/yolo/demos/det.png' width="250px"> | <img src='examples/yolo/demos/seg.png' width="250px"> |<img src='examples/yolo/demos/pose.png' width="250px"> | <img src='examples/yolo/demos/cls.png' width="250px"> |<img src='examples/yolo/demos/obb.png' width="250px">


### Quick Start for all YOLOs

### Quick Start
```Shell

# Classify
Expand Down Expand Up @@ -33,19 +36,18 @@ cargo run -r --example yolo -- --task obb --version v8 # YOLOv8-Obb
```

**Some other options**
`--source` to specify the input image
`--source` to specify the input images
`--model` to specify the ONNX model
`--width --height` to specify the resolution
`--width --height` to specify the input resolution
`--nc` to specify the number of model's classes
`--plot` to annotate
`--plot` to annotate with inference results
`--profile` to profile
`--cuda --trt --coreml` to select device
`--device_id` to decide which device to use
`--cuda --trt --coreml --device_id` to select device
`--half` to use float16 when using TensorRT EP



### YOLOs configs with `Options`
## YOLOs configs with `Options`

**Use `YOLOVersion` and `YOLOTask`**
```Rust
Expand Down Expand Up @@ -74,11 +76,50 @@ let options = Options::default()
.with_model("xxxx.onnx")?;
```

# -----------------------------------------------------------

## Export `YOLOv8` ONNX Models
## Other YOLOv8 Solution Models

| Model | Weights | Datasets|
|:---------------------: | :--------------------------: | :-------------------------------: |
| Face-Landmark Detection | [yolov8-face-dyn-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-face-dyn-f16.onnx) | |
| Head Detection | [yolov8-head-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-head-f16.onnx) | |
| Fall Detection | [yolov8-falldown-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-falldown-f16.onnx) | |
| Trash Detection | [yolov8-plastic-bag-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-plastic-bag-f16.onnx) | |
| FaceParsing | [face-parsing-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/face-parsing-dyn.onnx) | [CelebAMask-HQ](https://github.com/switchablenorms/CelebAMask-HQ/tree/master/face_parsing)<br />[[Processed YOLO labels]](https://github.com/jamjamjon/assets/releases/download/v0.0.1/CelebAMask-HQ-YOLO-Labels.zip)[[Python Script]](https://github.com/jamjamjon/assets/releases/download/v0.0.1/CelebAMask-HQ-YOLO-Labels.zip) |




## Export ONNX Models


<details close>
<summary>YOLOv5</summary>

[Here](https://docs.ultralytics.com/yolov5/tutorials/model_export/)

</details>


<details close>
<summary>YOLOv6</summary>

[Here](https://github.com/meituan/YOLOv6/tree/main/deploy/ONNX)

</details>

```bash

<details close>
<summary>YOLOv7</summary>

[Here](https://github.com/WongKinYiu/yolov7?tab=readme-ov-file#export)

</details>

<details close>
<summary>YOLOv8</summary>

```Shell
pip install -U ultralytics

# export onnx model with dynamic shapes
Expand All @@ -95,24 +136,23 @@ yolo export model=yolov8m-pose.pt format=onnx simplify
yolo export model=yolov8m-seg.pt format=onnx simplify
yolo export model=yolov8m-obb.pt format=onnx simplify
```
</details>


<details close>
<summary>YOLOv9</summary>

[Here](https://github.com/WongKinYiu/yolov9/blob/main/export.py)

</details>

<details close>
<summary>YOLOv10</summary>

[Here](https://github.com/THU-MIG/yolov10#export)

</details>

## Result

| Task | Annotated image |
| :-------------------: | ----------------------------------------------------------- |
| Obb | |
| Instance Segmentation | <img src='examples/yolov8/demos/seg.png' height="300px"> |
| Classification | <img src='examples/yolov8/demos/cls.png' height="300px"> |
| Detection | <img src='examples/yolov8/demos/det.png' height="300px"> |
| Pose | <img src='examples/yolov8/demos/pose.png' height="300px"> |

## Other YOLOv8 Solution Models

| Model | Weights | Result | Datasets |
| :---------------------: | :--------------------------: | :-------------------------------: | ------ |
| Face-Landmark Detection | [yolov8-face-dyn-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-face-dyn-f16.onnx) | <img src='examples/yolov8/demos/face.png' height="300px"> | |
| Head Detection | [yolov8-head-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-head-f16.onnx) | <img src='examples/yolov8/demos/head.png' height="300px"> | |
| Fall Detection | [yolov8-falldown-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-falldown-f16.onnx) |<img src='examples/yolov8/demos/falldown.png' height="300px"> | |
| Trash Detection | [yolov8-plastic-bag-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-plastic-bag-f16.onnx) | <img src='examples/yolov8/demos/trash.png' height="300px"> | |
| FastSAM | [FastSAM-s-dyn-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/FastSAM-s-dyn-f16.onnx) | | <img src='examples/yolov8/demos/fastsam.png' height="300px"> |
| FaceParsing | [face-parsing-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/face-parsing-dyn.onnx) | <img src='examples/yolov8/demos/face-parsing.png' height="300px"> | [CelebAMask-HQ](https://github.com/switchablenorms/CelebAMask-HQ/tree/master/face_parsing)<br />[[Processed YOLO labels]](https://github.com/jamjamjon/assets/releases/download/v0.0.1/CelebAMask-HQ-YOLO-Labels.zip)[[Python Script]](https://github.com/jamjamjon/assets/releases/download/v0.0.1/CelebAMask-HQ-YOLO-Labels.zip) |

0 comments on commit 873f2f4

Please sign in to comment.