Filter Classes #3310
Answered
by
glenn-jocher
MetehanYasar11
asked this question in
Q&A
Filter Classes
#3310
-
Hi, I am trying to filter specified classes on my custom yolov5l model. I changed the non_max_suppression's classes value but it does not work... How can I insert multiple classes into non_max_suppression function for filtering? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
glenn-jocher
May 24, 2021
Replies: 1 comment
-
@MetehanYasar11 see PyTorch Hub Tutorial for information on inference settings: Inference SettingsInference settings such as confidence threshold, NMS IoU threshold, and classes filter are model attributes, and can be modified by: model.conf = 0.25 # confidence threshold (0-1)
model.iou = 0.45 # NMS IoU threshold (0-1)
model.classes = None # (optional list) filter by class, i.e. = [0, 15, 16] for persons, cats and dogs
results = model(imgs, size=320) # custom inference size YOLOv5 Tutorials
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MetehanYasar11
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@MetehanYasar11 see PyTorch Hub Tutorial for information on inference settings:
Inference Settings
Inference settings such as confidence threshold, NMS IoU threshold, and classes filter are model attributes, and can be modified by:
YOLOv5 Tutorials