Closed Happinesseuh closed 3 years ago
π 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.
Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7
. To install run:
$ pip install -r requirements.txt
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If 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.
@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. https://github.com/ultralytics/yolov5/blob/25f8ab835ef82a5664f6434934c7f40088117f65/utils/datasets.py#L491-L493
To receive this update you can:
git pull
from within your yolov5/
directorygit clone https://github.com/ultralytics/yolov5
againmodel = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)
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.
π 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 β!
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: python train.py --img 416 --batch 12 --epochs 50 --data ./myData/birds.yaml --weights ./myData/weights/yolov5x.pt Here is a screenshot. I'd appreciate any feedback. Thanks! !
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. the warning signs that were printed before the error said "ignoring corrupt image/label: could not convert string to float:'0.7736...'". Then I get the above ValueError message. Could I know what my problem is?
@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:
[~/dataset.py]
cache_path
match the real files content.np.load(cache_path, allow_pickle=True).item()
actually works, if not then change the way data is being stored: wrong format etc.@YejinKimHanyang your images have problems. Please review your dataset for corrupted images prior to training.
Thank you! I solved it! My dataset was the problem. It got corrupted while I was changing it to COCO data format.
I have this similar problem.
@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.
When 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:
git pull
or git clone
a new copy to ensure your problem has not already been solved in master.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! π
i have this problem
@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 ?