Add YOLOPv2 & Face-Parsing model (#3)

* Add YOLOP and face parsing model
This commit is contained in:
Jamjamjon
2024-04-14 15:15:59 +08:00
committed by GitHub
parent ead175234c
commit 51b75e9a21
63 changed files with 1168 additions and 885 deletions

View File

@ -4,25 +4,10 @@
cargo run -r --example db
```
## Or you can manully
## ONNX Model
### 1. Donwload ONNX Model
[ppocr-v3-db-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/ppocr-v3-db-dyn.onnx)
[ppocr-v4-db-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/ppocr-v4-db-dyn.onnx)
### 2. Specify the ONNX model path in `main.rs`
```Rust
let options = Options::default()
.with_model("ONNX_PATH") // <= modify this
```
### 3. Run
```bash
cargo run -r --example db
```
- [ppocr-v3-db-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/ppocr-v3-db-dyn.onnx)
- [ppocr-v4-db-dyn](https://github.com/jamjamjon/assets/releases/download/v0.0.1/ppocr-v4-db-dyn.onnx)
### Speed test

View File

@ -22,9 +22,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// annotate
let annotator = Annotator::default()
.with_polygon_color([255u8, 0u8, 0u8])
.without_name(true)
.without_polygons(false)
.with_mask_alpha(0)
.without_bboxes(false)
.with_saveout("DB-Text-Detection");
annotator.annotate(&x, &y);