Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jul 29, 2022

Help resolve confusion around zero-metrics val.py results when no labels are found in #8753

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved result handling for edge cases in validation script.

📊 Key Changes

  • Added a check to handle cases where there are no targets (nt.sum() == 0) during validation.

🎯 Purpose & Impact

  • 🛠️ Purpose: The change prevents potential division by zero errors or misleading results when there are no ground truth objects (targets) to compare against.
  • 💻 User Impact: Users will experience more robust performance when validating datasets that might have images with no annotations. This can be particularly helpful when working with sparsely labeled datasets or when encountering edge cases during model validation.

Help resolve confusion around zero-metrics val.py results when no labels are found in #8753
@glenn-jocher glenn-jocher linked an issue Jul 29, 2022 that may be closed by this pull request
1 task
@glenn-jocher glenn-jocher merged commit e309a85 into master Jul 29, 2022
@glenn-jocher glenn-jocher deleted the warn/no_labels branch July 29, 2022 12:45
glenn-jocher added a commit that referenced this pull request Jul 31, 2022
Resolves #8791

Bug first introduced in #8782
glenn-jocher added a commit that referenced this pull request Jul 31, 2022
Resolves #8791

Bug first introduced in #8782
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
Help resolve confusion around zero-metrics val.py results when no labels are found in ultralytics#8753
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mAP is always 0 and there is an error running export.py

1 participant