Autofix duplicate label handling#5210
Merged
glenn-jocher merged 5 commits intomasterfrom Oct 15, 2021
Merged
Conversation
PR changes duplicate label handling from report error and ignore image-label pair to report warning and autofix image-label pair. This should fix this common issue for users and allow everyone to get started and get a model trained faster and easier than before.
Member
Author
|
Example error/warning handling with improved introspection for problematic labels: train: Scanning '../datasets/coco128/labels/train2017' images and labels...128 found, 0 missing, 2 empty, 4 corrupted: 100%|██████████| 128/128 [00:01<00:00, 68.05it/s]
train: WARNING: ../datasets/coco128/images/train2017/000000000064.jpg: 3 duplicate labels removed
train: WARNING: ../datasets/coco128/images/train2017/000000000089.jpg: ignoring corrupt image/label: negative label values [ -0.042141]
train: WARNING: ../datasets/coco128/images/train2017/000000000144.jpg: ignoring corrupt image/label: non-normalized or out of bounds coordinates [ 1.537]
train: WARNING: ../datasets/coco128/images/train2017/000000000328.jpg: ignoring corrupt image/label: negative label values [ -0.91823]
train: WARNING: ../datasets/coco128/images/train2017/000000000419.jpg: ignoring corrupt image/label: non-normalized or out of bounds coordinates [ 1.8188]
train: New cache created: ../datasets/coco128/labels/train2017.cacheMost importantly, images with duplicate labels are no longer ignored :) |
Merged
BjarneKuehl
pushed a commit
to fhkiel-mlaip/yolov5
that referenced
this pull request
Aug 26, 2022
* Autofix duplicate labels PR changes duplicate label handling from report error and ignore image-label pair to report warning and autofix image-label pair. This should fix this common issue for users and allow everyone to get started and get a model trained faster and easier than before. * sign fix * Cleanup * Increment cache version * all to any fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Improved duplicate label handling from report error and ignore image-label pair to report warning and autofix image-label pair. Also improves problematic label introspection with more detailed error reporting.
This should fix this common issue for users and allow everyone to get started and get a model trained faster and easier than before. Example application is Objects365 autodownload #5194, which reports numerous duplicate labels in dataset:
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Updates to image and label verification plus cache version increment in YOLOv5 dataset handling.
📊 Key Changes
.cacheversion from0.5to0.6for dataset labels.🎯 Purpose & Impact
.cacheversion increment ensures users employ the latest caching mechanism, potentially enhancing performance or compatibility.