-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Corrupted images error #3095
Comments
👋 Hello @Happinesseuh, 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. |
Might indirectly help #3095 by providing better visibility on source of corruption.
Might indirectly help #3095 by providing better visibility on source of corruption.
@Happinesseuh good news 😃! This issue may be improved ✅ in PR #3103. This won't solve your corrupted image problem but it should allow you to better understand the cause of the problem by logging to screen the cause, which seems not to be logging to screen with the default older print() statement in your case. Lines 491 to 493 in 25f8ab8
To receive this update you can:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
@Happinesseuh I ran into this issue today, and it turned out to be a round off error after the labels were read and converted into Numpy arrays. Since I am working with "dense" small objects, the coordinates matched for the first 11 out of 17 digits so once converted to float32, the numbers were rounded to be the same 5 digit coords hence the corrupted/duplicate images error for me. So you could also look at your labels to see if that's potentially what happened in your case. |
Might indirectly help ultralytics#3095 by providing better visibility on source of corruption.
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐! |
Might indirectly help ultralytics#3095 by providing better visibility on source of corruption. (cherry picked from commit abfcf9e)
Good afternoon, I am attempting to train using the bird dataset , where I hand labeled the first 34 species using the labelImg tool. I am also getting the 'ignoring corrupt image/label', though the files exist. I am running this yaml, you can see in my fork with data/labels included. I am running the latest branch today with the following command: |
In doing some debugging it looks like it was having a hard time finding the files within the train.txt and test.txt, as I had just stated the file names. However it needed reference to the local directory added in front './' to make it './filename.jpg' in case this helps anyone else. This issue is resolved. Cheers! |
this is my error when I try to train Yolov5s using my custom dataset and the yaml I created. |
@YejinKimHanyang your images have problems. Please review your dataset for corrupted images prior to training. |
maybe your images and labels‘ folder do not exist. |
It is a formatting issue by the data side. #3103 just prints the error. Debugging like this can help you find the error:
|
Thank you! I solved it! My dataset was the problem. It got corrupted while I was changing it to COCO data format. |
Might indirectly help ultralytics#3095 by providing better visibility on source of corruption.
@nihanaltaytas 👋 hi, thanks for letting us know about this possible problem with YOLOv5 🚀. VisDrone automatically downloads and starts training without any issues for me in my test just now, I am not able to reproduce any problems with it. We've created a few short guidelines below to help users provide what we need in order to start 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! 😃 |
@anushkjd this issue can occur when there is a mismatch between the number of classes specified in the YAML file and the actual number of classes in your dataset. Make sure that you have correctly defined the number of classes in the "nc" field of the YAML file. If the number of classes is correct, please ensure that your dataset annotations and images are properly formatted and aligned. Double-check that the file paths in the annotations match the actual image locations. Additionally, verify that all images and annotations are valid and can be opened and parsed correctly. If the problem persists, please consider providing a minimal, reproducible example along with your code and dataset to help us further investigate the issue. Thank you for your understanding, and we will do our best to assist you with this problem. |
I tried to train custom data, but when i launch the train i have this issue :
We can see that the images are corrupted, but is the good format (jpg) and the good path to the folder.
How can I solve it ?
The text was updated successfully, but these errors were encountered: