Skip to content

Hybrid auto-labelling support #1646

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

Merged
merged 1 commit into from
Dec 9, 2020
Merged

Hybrid auto-labelling support #1646

merged 1 commit into from
Dec 9, 2020

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Dec 9, 2020

This PR introduces hybrid autolabelling support in test.py. The auto-labelling options are now:

  • python test.py --save-txt: traditional auto-labelling
  • python test.py --save-hybrid: save hybrid autolabels, combining existing labels with new predictions before NMS (existing predictions given confidence=1.0 before NMS.
  • python test.py --save-conf: add confidences to any of the above commands

Regardless of any of the above settings, be aware that auto-labelling works best at very high confidence thresholds, i.e. 0.90 confidence, whereas mAP computation relies on very low confidence threshold, i.e. 0.001, to properly evaluate the area under the PR curve. The two activities are thus essentially mutually exclusive, there is no reason I know of to combine the two into a single test run.

Screen Shot 2020-12-08 at 6 14 27 PM

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhancing auto-labelling capabilities in YOLOv5 test script with hybrid label saving.

📊 Key Changes

  • Added a save_hybrid argument that allows for hybrid auto-labelling during testing.
  • Modified how labels for auto-labelling are created based on the new save_hybrid flag.
  • save_txt usage modified to be dependent on both save_txt and save_hybrid options.

🎯 Purpose & Impact

  • 🎨 The save_hybrid option introduces a new way to auto-label by combining both labels and predictions, which may improve label accuracy and assist in retraining models.
  • 💾 By adjusting the use of save_txt, users now have more flexibility in how they choose to save auto-labelled data.
  • 🔧 Users will experience enhanced testing capabilities, allowing for more efficient model analysis and dataset improvement.

@glenn-jocher glenn-jocher linked an issue Dec 9, 2020 that may be closed by this pull request
@glenn-jocher glenn-jocher merged commit 86f4247 into master Dec 9, 2020
@glenn-jocher glenn-jocher deleted the hybrid branch December 9, 2020 02:15
@glenn-jocher glenn-jocher self-assigned this Dec 9, 2020
burglarhobbit pushed a commit to burglarhobbit/yolov5 that referenced this pull request Jan 1, 2021
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 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.

Flag --save-txt returns higher mAP scores
1 participant