Add support for restricting detection classes (#45)

* Add support for restricting detection classes in `Options`
This commit is contained in:
Jamjamjon
2024-10-05 17:49:08 +08:00
committed by GitHub
parent 0102c15687
commit 1d596383de
4 changed files with 40 additions and 2 deletions

View File

@ -160,6 +160,8 @@ fn main() -> Result<()> {
// .with_names(&COCO_CLASS_NAMES_80)
// .with_names2(&COCO_KEYPOINTS_17)
.with_find_contours(!args.no_contours) // find contours or not
.exclude_classes(&[0])
// .retain_classes(&[0, 5])
.with_profile(args.profile);
// build model