-
-
Notifications
You must be signed in to change notification settings - Fork 16k
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
Some issues regarding the function of save-txt in segmentation prediction task. #12863
Comments
👋 Hello @CHR1122, 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.8.0 with all requirements.txt installed including PyTorch>=1.8. 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 |
@CHR1122 hello! It seems like you're encountering an issue with the This behavior is actually expected as the To achieve this, you could modify the segment where segmentation masks are processed and save the full mask points instead of converting them to bounding boxes or simplified segments. This will involve working directly with the mask tensors output by the model and saving the desired detailed mask data in a format that meets your needs. Keep in mind that any modifications or usage of the Ultralytics models and codes should comply with our licensing terms. For any commercial or proprietary application, an Ultralytics Enterprise License is required. This also applies to any form of internal company usage unless you plan to open-source your project under AGPL-3.0. If you have further inquiries or need assistance regarding our licensing, please consult the documentation or reach out for support. Your understanding and cooperation with our policy ensure the continued development and improvement of the YOLOv5 models and software. Thanks for being part of the YOLOv5 community! |
Thank you for your answer. I will try to implement a custom method to solve this problem and comply with the relevant licenses of YOLOv5. |
@CHR1122 Excellent decision! 😊 Should you have any more questions or require further assistance as you develop your custom method, don't hesitate to reach out. Remember, the documentation is a great resource for guidance. Happy coding, and best of luck with your project! Remember, compliance with the YOLOv5 licensing ensures that we can all continue to benefit from and contribute to this amazing community. Keep up the great work! |
Search before asking
Question
When I was predicting about the segmentation task, I opened -- save-txt, but it didn't work as I expected, and the result is as follows:
Inference results
![true](https://private-user-images.githubusercontent.com/57213928/318316876-970a1036-0c79-446a-b4d3-6e3eee3b53bc.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMxMjE1MTksIm5iZiI6MTcyMzEyMTIxOSwicGF0aCI6Ii81NzIxMzkyOC8zMTgzMTY4NzYtOTcwYTEwMzYtMGM3OS00NDZhLWI0ZDMtNmUzZWVlM2I1M2JjLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA4VDEyNDY1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBmYWViOTdmMzJjYmFkOTgwYzJkN2M5ZGY3NmUxNjkyM2U1M2ZkMjEwMDExNzJlMmE2NmVmNTM3NTlkYzEyNTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RCf9RHQP1W0qTdoiVkzQ6uID159yy8BZFAKhqHor2to)
Saved txt
saved_seg_label.txt
Add outlines to the org image based on the txt file. But it did not save all the points of the mask, each instance target only saves a portion of the mask's outline points.
![added_outline](https://private-user-images.githubusercontent.com/57213928/318317041-8bb7d32f-709d-4aae-8b1b-0df1d502f38c.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMxMjE1MTksIm5iZiI6MTcyMzEyMTIxOSwicGF0aCI6Ii81NzIxMzkyOC8zMTgzMTcwNDEtOGJiN2QzMmYtNzA5ZC00YWFlLThiMWItMGRmMWQ1MDJmMzhjLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA4VDEyNDY1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVmNThhYjNkOGEyMTAxYjA2NWM2ZTk3ZjJmZTBlMmNlMGU1ZTMzOTI2MjlhMTExNjEzMGVhNTZiN2FhN2EwNTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qpB2L8hSLfvTvZ5iIuoG9tlFUWkNP-ED6OSuQMBzUMQ)
Inference commands used
python segment/predict.py --weights runs/bare_soil_uncover-seg/v0.0.001/weights/best.pt --source test_sources/images/baresoil/test.jpg --save-txt --classes 0
Code of add outlines
Additional
No response
The text was updated successfully, but these errors were encountered: