Skip to content

Commit edc3a88

Browse files
authored
0.0.5 (#24)
* Using Rayon to accelarate YOLO post-processing * Refactor YOLO with outputs format * Optimize `conf * clss` for yolov5 v6 v7 * Add depth-anything-v2 * Update README.md * Update CHANGELOG.md
1 parent 25d9088 commit edc3a88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1564
-1204
lines changed

CHANGELOG.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,46 @@
1+
## v0.0.5 - 2024-07-12
2+
3+
### Changed
4+
5+
- Accelerated `YOLO`'s post-processing using `Rayon`. Now, `YOLOv8-seg` takes only around **~8ms (~20ms in the previous version)**, depending on your machine. Note that this repo's implementation of `YOLOv8-Segment` saves not only the masks but also their contour points. The official `YOLOv8` Python version only saves the masks, making it appear much faster.
6+
- Merged all `YOLOv8-related` solution models into YOLO examples.
7+
- Consolidated all `YOLO-series` model examples into the YOLO example.
8+
- Refactored the `YOLO` struct to unify all `YOLO versions` and `YOLO tasks`. It now supports user-defined YOLO models with different `Preds Tensor Formats`.
9+
- Introduced a new `Nms` trait, combining `apply_bboxes_nms()` and `apply_mbrs_nms()` into `apply_nms()`.
10+
11+
### Added
12+
13+
- Added support for `YOLOv6` and `YOLOv7`.
14+
- Updated documentation for `y.rs`.
15+
- Updated documentation for `bbox.rs`.
16+
- Updated the `README.md`.
17+
- Added `with_yolo_preds()` to `Options`.
18+
- Added support for `Depth-Anything-v2`.
19+
- Added `RTDETR` to the `YOLOVersion` struct.
20+
21+
### Removed
22+
23+
- Merged the following models' examples into the YOLOv8 example: `yolov8-face`, `yolov8-falldown`, `yolov8-head`, `yolov8-trash`, `fastsam`, and `face-parsing`.
24+
- Removed `anchors_first`, `conf_independent`, and their related methods from `Options`.
25+
26+
127
## v0.0.4 - 2024-06-30
228

329
### Added
430

5-
- Add X struct to handle input and preprocessing
31+
- Add X struct to handle input and preprocessing
632
- Add Ops struct to manage common operations
733
- 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).
834

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

37+
- Mark `Ops::descale_mask()` as deprecated.
1238

13-
### Fixed
39+
### Fixed
1440

1541
### Changed
1642

17-
### Removed
43+
### Removed
1844

1945
### Refactored
2046

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "usls"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
edition = "2021"
55
description = "A Rust library integrated with ONNXRuntime, providing a collection of ML models."
66
repository = "https://github.com/jamjamjon/usls"
@@ -11,7 +11,7 @@ exclude = ["assets/*", "examples/*"]
1111

1212
[dependencies]
1313
clap = { version = "4.2.4", features = ["derive"] }
14-
ndarray = { version = "0.15.6" }
14+
ndarray = { version = "0.15.6", features = ["rayon"] }
1515
ort = { version = "2.0.0-rc.2", default-features = false, features = [
1616
"load-dynamic",
1717
"copy-dylibs",

README.md

Lines changed: 49 additions & 96 deletions
Large diffs are not rendered by default.

assets/falldown.jpg

-67.7 KB
Binary file not shown.

assets/trash.jpg

-273 KB
Binary file not shown.

examples/depth-anything/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cargo run -r --example depth-anything
99
- [depth-anything-s-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/depth-anything-s-dyn.onnx)
1010
- [depth-anything-b-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/depth-anything-b-dyn.onnx)
1111
- [depth-anything-l-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/depth-anything-l-dyn.onnx)
12+
- [depth-anything-v2-s](https://github.com/jamjamjon/assets/releases/download/v0.0.1/depth-anything-v2-s.onnx)
1213

1314

1415
## Results

examples/depth-anything/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use usls::{models::DepthAnything, Annotator, DataLoader, Options};
22

33
fn main() -> Result<(), Box<dyn std::error::Error>> {
4-
// visual
4+
// options
55
let options = Options::default()
6-
.with_model("depth-anything-s-dyn.onnx")?
6+
// .with_model("depth-anything-s-dyn.onnx")?
7+
.with_model("depth-anything-v2-s.onnx")?
78
.with_i00((1, 1, 8).into())
89
.with_i02((384, 512, 1024).into())
910
.with_i03((384, 512, 1024).into());

examples/face-parsing/README.md

Lines changed: 0 additions & 93 deletions
This file was deleted.

examples/face-parsing/main.rs

Lines changed: 0 additions & 32 deletions
This file was deleted.

examples/fastsam/README.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)