You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the YOLOv5 issues and discussions and found no similar questions.
Question
I'm working on adding polygon support to Roboflow annotations so folks can benefit from your copy-paste augmentation when training their custom datasets.
👋 Hello @yeldarby, 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 screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.
@yeldarby oh hey good question! Yes, segmentation labels benefit from access to copy-paste augmentation, but also from smarter box cropping during 'normal' (scale, rotate, translate) augmentation, solving the issue below in #2151.
You can see an example of segmentation labels vs box labels here:
About how to handle a triangle, I didn't account for triangle shapes originally as I thought each segment would have at least 4 vertices. The logic implementing this is here, which will assume any row with > 8 columns to be a segment annotation instead of a box annotation. I think this should be reducible to > 6 though, which would then be able to accomodate triangle segments. I'll create a PR to test for any side effects of the change.
@yeldarby good news 😃! Your original issue may now be fixed ✅ in PR #6938. This PR allows for 3-point segment labels containing 7 columns: (class xy1 xy2 xy3). Tests show no ill effects on normal and segment COCO128 training.
To receive this update:
Git – git pull from within your yolov5/ directory or git clone https://github.com/ultralytics/yolov5 again
PyTorch Hub – Force-reload model = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)
Docker – sudo docker pull ultralytics/yolov5:latest to update your image
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀!
Activity
github-actions commentedon Mar 10, 2022
👋 Hello @yeldarby, 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 screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
For business inquiries or professional support requests please visit https://ultralytics.com or email support@ultralytics.com.
Requirements
Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:
Environments
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
Status
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.
glenn-jocher commentedon Mar 10, 2022
@yeldarby oh hey good question! Yes, segmentation labels benefit from access to copy-paste augmentation, but also from smarter box cropping during 'normal' (scale, rotate, translate) augmentation, solving the issue below in #2151.
You can see an example of segmentation labels vs box labels here:
About how to handle a triangle, I didn't account for triangle shapes originally as I thought each segment would have at least 4 vertices. The logic implementing this is here, which will assume any row with > 8 columns to be a segment annotation instead of a box annotation. I think this should be reducible to > 6 though, which would then be able to accomodate triangle segments. I'll create a PR to test for any side effects of the change.
yolov5/utils/datasets.py
Lines 907 to 913 in 055e72a
Allow 3-point segments
yeldarby commentedon Mar 10, 2022
Awesome! I'll allow 3-vertex exports to YOLOv5 format on our end & revisit+revert if it turns out there are side-effects and that PR can't be merged.
Allow 3-point segments (#6938)
glenn-jocher commentedon Mar 10, 2022
@yeldarby good news 😃! Your original issue may now be fixed ✅ in PR #6938. This PR allows for 3-point segment labels containing 7 columns: (class xy1 xy2 xy3). Tests show no ill effects on normal and segment COCO128 training.
To receive this update:
git pullfrom within youryolov5/directory orgit clone https://github.com/ultralytics/yolov5againmodel = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)sudo docker pull ultralytics/yolov5:latestto update your imageThank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀!
Steinwang commentedon Apr 2, 2022
Hello,I'm using YOLOv5 for a detection and segmentation network, may I ask how you get segment in pbar? I'm in trouble with it,Thanks
glenn-jocher commentedon Apr 2, 2022
@Steinwang what's pbar?
Update Neuralmagic-YoloV5 integration to v6.1 (#29)
Allow 3-point segments (ultralytics#6938)
Allow 3-point segments (#6938)
Allow 3-point segments (#6938)