Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces hybrid autolabelling support in test.py. The auto-labelling options are now:
python test.py --save-txt
: traditional auto-labellingpython 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 commandsRegardless 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.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhancing auto-labelling capabilities in YOLOv5 test script with hybrid label saving.
📊 Key Changes
save_hybrid
argument that allows for hybrid auto-labelling during testing.save_hybrid
flag.save_txt
usage modified to be dependent on bothsave_txt
andsave_hybrid
options.🎯 Purpose & Impact
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.save_txt
, users now have more flexibility in how they choose to save auto-labelled data.