mirror of
https://github.com/mii443/usls.git
synced 2025-12-03 02:58:22 +00:00
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:
@@ -3,7 +3,7 @@ use usls::{models::YOLOPv2, Annotator, DataLoader, Options};
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// build model
|
||||
let options = Options::default()
|
||||
.with_model("../models/yolopv2-dyn-480x800.onnx")
|
||||
.with_model("yolopv2-dyn-480x800.onnx")?
|
||||
.with_i00((1, 1, 8).into())
|
||||
.with_confs(&[0.3]);
|
||||
let mut model = YOLOPv2::new(&options)?;
|
||||
@@ -16,7 +16,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
// annotate
|
||||
let annotator = Annotator::default()
|
||||
.with_masks_name(true)
|
||||
.with_polygons_name(true)
|
||||
.with_saveout("YOLOPv2");
|
||||
annotator.annotate(&x, &y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user