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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 175 KiB

View File

@ -3,7 +3,7 @@ use usls::{models::DepthAnything, Annotator, DataLoader, Options};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// visual
let options = Options::default()
.with_model("../models/depth-anything-s-dyn.onnx")
.with_model("depth-anything-s-dyn.onnx")?
.with_i00((1, 1, 8).into())
.with_i02((384, 512, 1024).into())
.with_i03((384, 512, 1024).into());
@ -16,7 +16,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let y = model.run(&x)?;
// annotate
let annotator = Annotator::default().with_saveout("Depth-Anything");
let annotator = Annotator::default()
.with_colormap("Turbo")
.with_saveout("Depth-Anything");
annotator.annotate(&x, &y);
Ok(())