-
-
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
There seems to be a bug in the Mosaic data augmentation? #1020
Comments
Hello @yuefanhao, 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 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. |
@yuefanhao |
But it will create wrong label shift when I visualized the mosaic image with my own datasets, have you visualized the mosaic image? |
I used yolov5 to train my own data set and found no abnormalities. But when I studied mosaic code, I found this error by reasoning, but it didn't affect the image. |
ok, I understand that, thank you. |
@gengyanlei @yuefanhao thanks for the bug report! Can you show an image of the mislabelled instances? Would you like to submit a PR for this change? |
@gengyanlei @yuefanhao I'm removing the TODO label and closing this issue, as this has been resolved in PR #1021 submitted by @yuefanhao and merged a few weeks ago. Thank you for your contributions! |
I visualized the Mosaic data augmentation and found that some of the labels wrong shifted after the data augmentation. After debugging, I find there seems to be a problem with this line of the load_mosaic function:
x1b, y1b, x2b, y2b = w - (x2a - x1a), 0, max(xc, w), min(y2a - y1a, h)
the line 664 of dataset.py, I want to ask if this line should be changed:
x1b, y1b, x2b, y2b = w - (x2a - x1a), 0, w, min(y2a - y1a, h)
because in the bottom left patch of mosaic image, the xmax point of source image shouldn't be changed.
Hope you can reply me soon, thank you.
The text was updated successfully, but these errors were encountered: