-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-class NMS #2162
Comments
👋 Hello @PareshKamble, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com. RequirementsPython 3.8 or later with all requirements.txt dependencies installed, including $ pip install -r requirements.txt EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
@PareshKamble you are referring to single-label NMS, not single-class NMS. Multi-label NMS is enabled by default as it increases mAP. You can disable it by setting this line to False: Line 356 in ace3e02
You can enable agnostic NMS here, to apply NMS across all classes rather than per class: Line 340 in ace3e02
|
Thank you @glenn-jocher |
BTW agnostic NMS can be used like this: Line 159 in ace3e02
|
@glenn-jocher We have been having issues with non_max_suppression multi class trying to constrain nms to a group of classes. It seems like there is a bug in the non_max_suppression and we have been trying to hunt it down with only partial success. I've been trying to get a full test case that exposes the issue One useful thing here is using pickle to serialize the full pre nms data to help run minimal test cases. We just have not come up with enough concrete data for a issue report. |
@iceisfun yes if you can spot a reproducible issue please let us know. There are two main settings in NMS, agnostic (default False) and multi-label (default True). Agnostic runs NMS on all boxes togethor rather than per class, multi-class can assign multiple classes of detection per box. You can modify these two settings below.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, Thanks |
I am also facing the issues with nms - |
@abhiagwl4262 👋 hi, thanks for letting us know about this possible problem with YOLOv5 🚀. We've created a few short guidelines below to help users provide what we need in order to get started investigating a possible problem. How to create a Minimal, Reproducible ExampleWhen asking a question, people will be better able to provide help if you provide code that they can easily understand and use to reproduce the problem. This is referred to by community members as creating a minimum reproducible example. Your code that reproduces the problem should be:
For Ultralytics to provide assistance your code should also be:
If you believe your problem meets all the above criteria, please close this issue and raise a new one using the 🐛 Bug Report template with a minimum reproducible example to help us better understand and diagnose your problem. Thank you! 😃 |
Where can i disable the multi label please? in which script? |
🚀 Feature
Can we have multi-class NMS so that we can assign only one class per object?
Motivation
While detecting more than one classes, most of the times, one object is detected as class A as well as class B with same or almost similar bounding box values. Ideally, one object should be labelled as only one class. Due to similar inter-class features, such multiple labelling occur.
The text was updated successfully, but these errors were encountered: