gpt4 book ai didi

training-data - 如何将 PASCAL VOC 转换为 YOLO

转载 作者:行者123 更新时间:2023-12-05 00:55:26 27 4
gpt4 key购买 nike

我试图开发一些在格式之间转换注释的方法,但很难找到信息,但我有:

这个是PASCAL VOC

<width>800</width>
<height>450</height>
<depth>3</depth>
<bndbox>
<xmin>474</xmin>
<ymin>2</ymin>
<xmax>726</xmax> <!-- shape_width = 252 -->
<ymax>449</ymax> <!-- shape_height = 447 -->
</bndbox>

转换为 YOLO 暗网

2 0.750000 0.501111 0.315000 0.993333

注意初始2这是一个类别

最佳答案

我和我的同学创建了一个名为 PyLabel 的 python 包来帮助其他人完成这项任务和其他标记任务。

这是从 voc 转换为 coco 的基本代码:

!pip install pylabel
from pylabel import importer
dataset = importer.ImportVOC(path=path_to_annotations)
dataset.exporter.ExportToYoloV5()

您可以在此处找到示例笔记本和源代码 https://github.com/pylabel-project/pylabel

关于training-data - 如何将 PASCAL VOC 转换为 YOLO,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64581692/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com