Add MODNet model (#11)

* Add MODNet for portrait matting

* Minor fixes

* Move assets to home directory

* Add colormap

* ci

* Update README.md
This commit is contained in:
Jamjamjon
2024-04-30 15:26:53 +08:00
committed by GitHub
parent 9697f4d5b0
commit 371a08011f
46 changed files with 3425 additions and 808 deletions

View File

@ -10,7 +10,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.with_min_width(5.0)
.with_min_height(12.0)
// .with_trt(0)
.with_model("../models/ppocr-v4-db-dyn.onnx");
.with_model("ppocr-v4-db-dyn.onnx")?;
let mut model = DB::new(&options)?;
@ -26,8 +26,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// annotate
let annotator = Annotator::default()
.without_bboxes(true)
.with_masks_alpha(60)
.with_polygon_color([255, 105, 180, 255])
.with_polygons_alpha(60)
.with_contours_color([255, 105, 180, 255])
.without_mbrs(true)
.with_saveout("DB");
annotator.annotate(&x, &y);