Closed Robotatron closed 1 year ago
@Robotatron I could run the val.py by making the following change
xywh = (xyxy2xywh(torch.tensor(xyxy).view(1, 4)) / gn).view(-1).tolist() -> xywh = torch.tensor(xyxy).view(-1).numpy()
This just allows the code to run but is not a fix. the coordinates in the txt files are like: 0.465576 68.375 431.75 129.5 462.25 0.916016 1 0.0207062 0.295898 -0.079895 0.636719 -0.351318 0.0551758 0.17981 -0.511719 0.0827637 0.245605 0.175171 0.0436096 0.242432 0.111511 0.188965 0.272461 -0.714844 0.308594 -0.159668 0.0290222 -0.126099 -0.0547791 0.0430908 0.328857 0.127686 0.0599976 0.324463 0.184692 -0.0628052 0.127197 -0.570801
This just allows the code to run but is not a fix.
If it runs with the desired output, why is not a fix in your opinion? I assume the class label is given correctly as well, so that we have a full prediction here - a label + the mask/polygon
The numbers look strange...negative coordinates!
π 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 β!
@mehran66 you're right, those negative coordinates do look unusual. It's possible that there might be an issue with the current implementation. I recommend checking if this behavior is occurring in the latest release, and if so, you may want to raise it as an issue to our YOLOv5 GitHub repository. We appreciate your help in improving the YOLOv5 experience for everyone.
Search before asking
YOLOv5 Component
No response
Bug
--save-txt flag errors out with
segment/predict.py
Was this flag ever supported for segmentation or is it a bug? If it was never supported, do you plan to add support of this flag similar to object detection?Environment
YOLOv5 π v7.0-53-g65071da Python-3.8.15 torch-1.10.1 CUDA:0 (Tesla V100-SXM2-16GB, 16160MiB)
Minimal Reproducible Example
python segment/predict.py (...) --save-txt
Additional
No response
Are you willing to submit a PR?