label format
Closed this issue · 4 comments
❔Question
前辈您好,请问您的模型采用四个角点: x1 y1 x2 y1... y4 点与点之间,是用空格分隔吗?还是用逗号呢?
请问 x1 y1 代表第一个点,是有要求是左上角的点吗?是否有规定 是顺时针标注还是逆时针呢?
求出的每一个点,是否需要进行归一化处理呢?(其实我看到一些其他前辈们写的代码需要做归一化处理,我不是很理解这么做的意义在哪里呢)
Additional context
还有一个关于代码方面的问题:
在min_poly.py的第138-145行中,有:
max_shape = max(img.shape[1], img.shape[0])
# print("rect",rect)
c_x = ((i[0][0] + i[1][0]) / 2)
c_y = ((i[0][1] + i[1][1]) / 2)
w = abs((i[1][0] - i[0][0]))
h = abs((i[1][1] - i[0][1]))
points=[[c_x-w/2,c_y-h/2],[c_x+w/2,c_y-h/2],[c_x+w/2,c_y+h/2],[c_x-w/2,c_y+h/2]]
我不是很理解 w 和 h 的计算,为什么是要相减获得呢?因为我理解的是 w h 是标注文件中就已经给出了,为什么还要有这一步的求解过程呢?
我的疑惑有点多,还望前辈能够在百忙中抽空解惑,真的万分感谢前辈的指导!
👋 Hello @AllieLan, 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 Glenn Jocher at glenn.jocher@ultralytics.com.
Requirements
Python>=3.6.0 with all requirements.txt installed including PyTorch>=1.7. To get started:
$ git clone https://github.com/ultralytics/yolov5
$ cd yolov5
$ pip install -r requirements.txt
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):
- Google Colab and Kaggle notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
- Docker Image. See Docker Quickstart Guide
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.
❔Question
前辈您好,请问您的模型采用四个角点: x1 y1 x2 y1... y4 点与点之间,是用空格分隔吗?还是用逗号呢? 请问 x1 y1 代表第一个点,是有要求是左上角的点吗?是否有规定 是顺时针标注还是逆时针呢? 求出的每一个点,是否需要进行归一化处理呢?(其实我看到一些其他前辈们写的代码需要做归一化处理,我不是很理解这么做的意义在哪里呢)
Additional context
还有一个关于代码方面的问题: 在min_poly.py的第138-145行中,有: max_shape = max(img.shape[1], img.shape[0]) # print("rect",rect) c_x = ((i[0][0] + i[1][0]) / 2) c_y = ((i[0][1] + i[1][1]) / 2) w = abs((i[1][0] - i[0][0])) h = abs((i[1][1] - i[0][1])) points=[[c_x-w/2,c_y-h/2],[c_x+w/2,c_y-h/2],[c_x+w/2,c_y+h/2],[c_x-w/2,c_y+h/2]]
我不是很理解 w 和 h 的计算,为什么是要相减获得呢?因为我理解的是 w h 是标注文件中就已经给出了,为什么还要有这一步的求解过程呢?
我的疑惑有点多,还望前辈能够在百忙中抽空解惑,真的万分感谢前辈的指导!
1.是用空格分割的,
2.点的顺序按照左上,右上,右下,左下来的,
3.需要进行归一化处理,归一化的目的是为了训练加速收敛。
4.这里的w和h是计算target的w和h,目的是转换成四点坐标。
另外代码训练存在一点bug,目前我还没有排查到
cool! 坐等您的代码,加油!
👋 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:
- Wiki – https://github.com/ultralytics/yolov5/wiki
- Tutorials – https://github.com/ultralytics/yolov5#tutorials
- Docs – https://docs.ultralytics.com
Access additional Ultralytics ⚡ resources:
- Ultralytics HUB – https://ultralytics.com
- Vision API – https://ultralytics.com/yolov5
- About Us – https://ultralytics.com/about
- Join Our Team – https://ultralytics.com/work
- Contact Us – https://ultralytics.com/contact
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 ⭐!