有时候我们拿到一个数据集发现是xml文件格式如下:
<?xml version="1.0" ?>
<doc>
<path>C:\Users\Administrator\Desktop\test\000000000074.jpg</path>
<outputs>
<object>
<item>
<name>dog</name>
<bndbox>
<xmin>64</xmin>
<ymin>271</ymin>
<xmax>361</xmax>
<ymax>385</ymax>
</bndbox>
</item>
</object>
</outputs>
<time_labeled>1692452783787</time_labeled>
<labeled>true</labeled>
<size>
<width>640</width>
<height>426</height>
<depth>3</depth>
</size>
</doc>
或者是下面json格式
{"path":"C:\\Users\\Administrator\\Desktop\\test\\000000000042.jpg","outputs":{"object":[{"name":"dog","bndbox":{"xmin":228,"ymin":32,"xmax":576,"ymax":286}}]},"time_labeled":1692452770011,"labeled":true,"size":{"width":640,"height":478,"depth":3}}
很显然xml文件格式不是VOC格式,真正VOC格式类似下面
<annotation>
<folder>VOC</folder>
<filename>000000000074.jpg</filename>
<path>C:\Users\Administrator\Desktop\test\000000000074.jpg</path>
<source>
<database>FIRC</database>
</source>
<size>
<width>640</width>
<height>426</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>dog</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>64</xmin>
<ymin>271</ymin>
<xmax>361</xmax>
<ymax>385</ymax>
</bndbox>
</object>
</annotation>
大家都知道VOC或者yolo格式是目标检测最常用数据集格式,标注精灵助手格式显然不能直接用于训练,必须转换到VOC格式或者yolo格式才行。因为开发了一个小工具支持到VOC或者yolo格式转换,首先我们打开软件
将标注xml文件或者json文件拖拽到列表点击开始即可自动转换。详情参考视频教程讲解: