Skip to content

Commit

Permalink
Using Rayon to accelarate YOLO post-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
jamjamjon committed Jul 4, 2024
1 parent 25d9088 commit ffa8ec5
Show file tree
Hide file tree
Showing 32 changed files with 418 additions and 668 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

### Added

- Add X struct to handle input and preprocessing
- Add X struct to handle input and preprocessing
- Add Ops struct to manage common operations
- Use SIMD (fast_image_resize) to accelerate model pre-processing and post-processing.YOLOv8-seg post-processing (~120ms => ~20ms), Depth-Anything post-processing (~23ms => ~2ms).

### Deprecated
- Mark `Ops::descale_mask()` as deprecated.

- Mark `Ops::descale_mask()` as deprecated.

### Fixed
### Fixed

### Changed

### Removed
### Removed

### Refactored

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "usls"
version = "0.0.4"
version = "0.0.5"
edition = "2021"
description = "A Rust library integrated with ONNXRuntime, providing a collection of ML models."
repository = "https://github.com/jamjamjon/usls"
Expand All @@ -11,7 +11,7 @@ exclude = ["assets/*", "examples/*"]

[dependencies]
clap = { version = "4.2.4", features = ["derive"] }
ndarray = { version = "0.15.6" }
ndarray = { version = "0.15.6", features = ["rayon"] }
ort = { version = "2.0.0-rc.2", default-features = false, features = [
"load-dynamic",
"copy-dylibs",
Expand Down
104 changes: 37 additions & 67 deletions README.md

Large diffs are not rendered by default.

93 changes: 0 additions & 93 deletions examples/face-parsing/README.md

This file was deleted.

32 changes: 0 additions & 32 deletions examples/face-parsing/main.rs

This file was deleted.

23 changes: 0 additions & 23 deletions examples/fastsam/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions examples/fastsam/main.rs

This file was deleted.

13 changes: 0 additions & 13 deletions examples/yolov8-face/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions examples/yolov8-face/main.rs

This file was deleted.

14 changes: 0 additions & 14 deletions examples/yolov8-falldown/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions examples/yolov8-falldown/main.rs

This file was deleted.

14 changes: 0 additions & 14 deletions examples/yolov8-head/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions examples/yolov8-head/main.rs

This file was deleted.

16 changes: 0 additions & 16 deletions examples/yolov8-trash/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions examples/yolov8-trash/main.rs

This file was deleted.

28 changes: 21 additions & 7 deletions examples/yolov8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,24 @@ yolo export model=yolov8m-obb.pt format=onnx simplify

## Result

| Task | Annotated image |
| :-------------------: | --------------------- |
| Obb | ![img](./demo-obb.png) |
| Instance Segmentation | ![img](./demo-seg.png) |
| Classification | ![img](./demo-cls.png) |
| Detection | ![img](./demo-det.png) |
| Pose | ![img](./demo-pose.png) |
| Task | Annotated image |
| :-------------------: | ----------------------------------------------------------- |
| Obb | |
| Instance Segmentation | `<img src='examples/yolov8/demo-seg.png' width="800px">` |
| Classification | `<img src='examples/yolov8/demo-cls.png' width="800px">` |
| Detection | `<img src='examples/yolov8/demo-det.png' width="800px">` |
| Pose | `<img src='examples/yolov8/demo-pose.png' width="800px">` |

## 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-face/demo.png' width="220px" height="180px">` | |
| Head Detection | [yolov8-head-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-head-f16.onnx) | `<img src='examples/yolov8-head/demo.png' width="220px" height="180px">` | |
| Fall Detection | [yolov8-falldown-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/yolov8-falldown-f16.onnx) | `<img src='examples/yolov8-falldown/demo.png' width="220px" height="180px">` | |
| 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-trash/demo.png' width="250px" height="180px">` | |
| FastSAM | [FastSAM-s-dyn-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/FastSAM-s-dyn-f16.onnx) | | |
| FaceParsing | [face-parsing-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/face-parsing-dyn.onnx)<br />[face-parsing-dyn-f16](https://github.com/jamjamjon/assets/releases/download/v0.0.1/face-parsing-dyn-f16.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) |
| | | | |
| | | | |
| | | | |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit ffa8ec5

Please sign in to comment.