Accelerate model pre-processing and post-processing (#23)

* 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
This commit is contained in:
Jamjamjon
2024-06-30 15:19:34 +08:00
committed by GitHub
parent 5f6b814090
commit a5141a53be
33 changed files with 822 additions and 528 deletions

View File

@ -25,6 +25,8 @@ A Rust library integrated with **ONNXRuntime**, providing a collection of **Comp
|<img src='examples/yolop/demo.png' height="180px">| <img src='examples/face-parsing/demo.png' height="180px"> | <img src='examples/db/demo.png' height="180px"> |
- 2024/06/30: **Accelerate model pre-processing and post-processing using SIMD**. YOLOv8-seg post-processing (~120ms => ~20ms), Depth-Anything post-processing (~23ms => ~2ms).
## Supported Models
@ -100,7 +102,7 @@ check **[ort guide](https://ort.pyke.io/setup/linking)**
#### 1. Add `usls` as a dependency to your project's `Cargo.toml`
```shell
cargo add --git https://github.com/jamjamjon/usls
usls = { git = "https://github.com/jamjamjon/usls", rev = "xxx"}
```
#### 2. Set `Options` and build model