-
-
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
Retina mask is shifted #11908
Comments
👋 Hello @stephencheung16, 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 a minimum reproducible example to help us debug it. If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results. RequirementsPython>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started: git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install 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, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit. Introducing YOLOv8 🚀We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 🚀! Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects. Check out our YOLOv8 Docs for details and get started with: pip install ultralytics |
@stephencheung16 hi there! Thank you for bringing this issue to our attention. I understand that the retina mask is shifted when using the To better assist you, could you please confirm if you have followed the steps in the YOLOv5 tutorial correctly, specifically the instructions for setting up the environment and installing the requirements? Additionally, it would be helpful if you could provide the following information:
Please ensure that you are using the latest version of YOLOv5 and its dependencies. If the issue persists, please provide a minimum reproducible example that we can use to debug the problem. Thank you for your collaboration, and we look forward to resolving this issue with you. |
Hi Glenn, I follow the steps in the Roboflow tutorial 'How to Train YOLOv5 Instance Segmentation on a Custom Dataset' for setting up the environment and installing the requirements In Kaggle, the Python version is 3.10.12. Pytorch version is 2.0.0. YOLOv5 is v7.0-196-gacdf73b. I did not modify any of the YOLOv5 codebase or custom configurations. The 'minimum reproducible example' is attached above, in my first message. Both code and test image are attached. Just modify the path to the test image. The code can be run. There are only 12 lines. Please try the 'minimum reproducible example'. Thanks. |
Hi @stephencheung16! Thank you for providing the details and the minimum reproducible example. I apologize for any confusion caused. I understand that you followed the steps in the Roboflow tutorial for setting up the environment and installing the requirements. I also see that you are using Python version 3.10.12, PyTorch version 2.0.0, and YOLOv5 version v7.0-196-gacdf73b. I will try the minimum reproducible example you provided with the test image you attached. I will investigate the issue and get back to you with a solution or further information as soon as possible. Thank you for your patience, and I appreciate your cooperation in resolving this issue. Best regards, |
Hi @glenn-jocher, By making the skis thinner, the shift is more obvious. Would you please help? Thanks. |
Hi @stephencheung16, Thank you for providing the details and additional images. I understand that when using the To investigate and address this issue, I will analyze the provided test image and run additional tests with the I appreciate your patience, and I will get back to you with further information or a solution as soon as possible. Thank you for your understanding. Best regards, |
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help. For additional resources and information, please see the links below:
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 YOLO 🚀 and Vision AI ⭐ |
Interesting, now is 2024 and I use yolov8.1-seg to do instance segmentation inference, the visualization masks will be shifted to bottom-right with retina_masks True and imgsz not 640. I mean the masks won't be shifted when imgsz=640, with retina_masks on or not. |
Hi there! Thank you for sharing your findings with YOLOv8.1-seg regarding the mask shifting issue related to the A potential workaround could be to ensure all image inputs are resized to 640 pixels before running segmentation, as this size seems to prevent the shifting issue. You might also check for any discrepancies in the resizing or coordinate transformation logic in the code if adjusting Your input is valuable, and we'll look into this for potential improvements in future updates! 🌟 |
Search before asking
YOLOv5 Component
No response
Bug
Install Yolov5 & Roboflow. Download weight of pre-trained Yolov5x segmentation model.
![p1](https://private-user-images.githubusercontent.com/23723498/256183916-3b7120a7-cbbf-45ac-900a-7d6d4ca4ca88.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA4NTUyMjcsIm5iZiI6MTcyMDg1NDkyNywicGF0aCI6Ii8yMzcyMzQ5OC8yNTYxODM5MTYtM2I3MTIwYTctY2JiZi00NWFjLTkwMGEtN2Q2ZDRjYTRjYTg4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEzVDA3MTUyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiMjcwNjVmM2EwZTUwMDk3MDM2ZWViMGNlZGUzMDk0ZDRkZmJmMTczODQ4NGFlODgwNTE4YThjNGFmYmYwMTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.nU_vxVbXS09BeyvXM5Ie1ZgaRO5Vj7TkVSep-c2sTXo)
Run prediction on skis with --retina-masks option. Retina mask is shifted to bottom-right.
![p2](https://private-user-images.githubusercontent.com/23723498/256189884-5f1fc663-74e2-494e-a249-7d3f5ce42667.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA4NTUyMjcsIm5iZiI6MTcyMDg1NDkyNywicGF0aCI6Ii8yMzcyMzQ5OC8yNTYxODk4ODQtNWYxZmM2NjMtNzRlMi00OTRlLWEyNDktN2QzZjVjZTQyNjY3LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEzVDA3MTUyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3NjZlYWRlNWEzNjkwMGZlYjhjMjViZGE5MTQ1YWE1Y2I2N2E5ODVhM2FkMWI2NTRhMjI3MWNkNWIzODNmMDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vwjGrLOokCGkMN2PUj61K_HjUk3DeAWz_PUflMXOwpU)
Run prediction on skis without --retina-masks option. The mask is not shifted.
![p3](https://private-user-images.githubusercontent.com/23723498/256189937-94d65b4a-9083-43d9-b575-7eda9fb4ad1b.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA4NTUyMjcsIm5iZiI6MTcyMDg1NDkyNywicGF0aCI6Ii8yMzcyMzQ5OC8yNTYxODk5MzctOTRkNjViNGEtOTA4My00M2Q5LWI1NzUtN2VkYTlmYjRhZDFiLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEzVDA3MTUyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyZjI4YzFhOWJlMDBhODVhYjQ3OTdhMTNmYzE0YmMzYzE2OTlkMDFiZTM3MTZlOWI4YjkyMTEwN2Q4OGIwMGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yfmvhRgMhQwpRe3ISQ9Kz6VPcejazAWbS63U8CGQ4Ec)
Would you please help?
Environment
Minimal Reproducible Example
Install Yolov5
!git clone https://github.com/ultralytics/yolov5 # clone
%cd yolov5
%pip install -qr requirements.txt # install
import torch
import utils
display = utils.notebook_init() # checks
Test if retina mask is shifted on skis
image_path = '/kaggle/input/test-images/skis_600x396.jpg'
!python segment/predict.py --img 320 --weights yolov5x-seg.pt --source {image_path}
--save-txt --save-conf --device cpu
--retina-masks
display.Image(filename=f'runs/predict-seg/exp/skis_600x396.jpg', width=600)
Test if mask is shifted if --retina-mask option is deleted
image_path = '/kaggle/input/test-images/skis_600x396.jpg'
!python segment/predict.py --img 320 --weights yolov5x-seg.pt --source {image_path}
--save-txt --save-conf --device cpu
display.Image(filename=f'runs/predict-seg/exp2/skis_600x396.jpg', width=600)
The test image
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: