Enhance Annotator with mask-cutout functionality (#101)

Co-authored-by: jamjamjon <zhangjian@zhuofansoft.com>
This commit is contained in:
Jamjamjon
2025-05-23 17:41:24 +08:00
committed by GitHub
parent ea89b914eb
commit 86533d9c41
6 changed files with 70 additions and 36 deletions

View File

@ -43,7 +43,8 @@ fn main() -> anyhow::Result<()> {
let ys = model.forward(&xs)?;
// annotate
let annotator = Annotator::default();
let annotator =
Annotator::default().with_mask_style(usls::Style::mask().with_mask_cutout(true));
for (x, y) in xs.iter().zip(ys.iter()) {
annotator.annotate(x, y)?.save(format!(
"{}.jpg",