-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
Training stop when load_image throw error #165
Comments
Hello @Matanelc, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments. 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 model or data training question, please note that Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
For more information please visit https://www.ultralytics.com. |
I also have the same error, even though none of my images are nonetype nor my labels are empty. |
@Matanelc I'm not sure why I have to explain this to you, but 0 size images will obviously not work correctly. There is no bug. |
I know that in darknet the training script just ignores bad annotations and bad images. Thus a training script should be robust and handle these errors instead of making the training fail after a long time of running. It was also a problem here: and about the response above |
@doronAtuar facilitating silent errors is never best practices. https://zen-of-python.info/errors-should-never-pass-silently.html |
Step to reproduce
1.start train
2.have "0" size image.
or
1.start train
2. have missing label for images
in those cases the train is stoped with error :
data = [self.dataset[idx] for idx in possibly_batched_index] File "/app/workspace/utils/datasets.py", line 451, in __getitem__ img, labels = load_mosaic(self, index) File "/app/workspace/utils/datasets.py", line 574, in load_mosaic img, _, (h, w) = load_image(self, index) File "/app/workspace/utils/datasets.py", line 536, in load_image assert img is not None, 'Image Not Found ' + path AssertionError: Image Not Found /app/workspace/data/BBFashion/images/5e4118b37ddc9d75987fa7f3.jpg
why the image is not just getting "skipped" ?
The text was updated successfully, but these errors were encountered: