-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
Corrupt JPEG data: 130816 extraneous bytes before marker 0xdb #9178
Comments
@realgump hi, thank you for your feature suggestion on how to improve YOLOv5 🚀! The fastest and easiest way to incorporate your ideas into the official codebase is to submit a Pull Request (PR) implementing your idea, and if applicable providing before and after profiling/inference/training results to help us understand the improvement your feature provides. This allows us to directly see the changes in the code and to understand how they affect workflows and performance. Please see our ✅ Contributing Guide to get started. |
👋 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 ⭐! |
We read each JPEG image in the specified folder using OpenCV and overwrite it by re-saving with a quality setting of 95. This re-encoding process fixes any corruption issues by standardizing the image data format.
This solution fixed my problem after long time of debugging. |
@halqadasi thank you for sharing your solution! Re-encoding images using OpenCV is indeed an effective method to resolve JPEG corruption issues, as it standardizes the format and removes extraneous data. This approach is especially helpful when working with OpenCV for image processing. Your contribution could assist other users facing similar problems—thank you for supporting the YOLO community! |
Search before asking
YOLOv5 Component
No response
Bug
When training, there is some error occurs:
Corrupt JPEG data: 130816 extraneous bytes before marker 0xdb
.Environment
No response
Minimal Reproducible Example
No response
Additional
There has been a commit to fix that in #4548. However, the errors are raised by opencv-python while the auto-fix is writen by pillow. I found my jpg images pass the pillow verification but still cannot be read by opencv-python, the verify code does nothing but increases time consumption and raise lots of unneccessary warnings. Why not use both opencv-python or pillow in the auto-fix period and the training period?
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: