我要附加的第一个文件是来自LabelImg
的图像注释。有没有办法附加两个XML文件?我需要附加这些文件,将它们转换为CSV文件,用于交叉验证以进行对象检测
<annotation>
<folder>business center</folder>
<filename>bcenter (1).PNG</filename>
<path>D:\RealTimeObjectDetection\Tensorflow\workspace\images\business center\bcenter (1).PNG</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>1815</width>
<height>861</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>business_center</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>488</xmin>
<ymin>148</ymin>
<xmax>980</xmax>
<ymax>533</ymax>
</bndbox>
</object>
</annotation>
第二档
<annotation>
<folder>business center</folder>
<filename>bcenter (2).PNG</filename>
<path>D:\RealTimeObjectDetection\Tensorflow\workspace\images\business center\bcenter (2).PNG</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>1851</width>
<height>887</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>business_center</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>805</xmin>
<ymin>126</ymin>
<xmax>1173</xmax>
<ymax>513</ymax>
</bndbox>
</object>
</annotation>
输出文件
<annotation>
<folder>business center</folder>
<filename>bcenter (1).PNG</filename>
<path>D:\RealTimeObjectDetection\Tensorflow\workspace\images\business center\bcenter (1).PNG</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>1815</width>
<height>861</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>business_center</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>488</xmin>
<ymin>148</ymin>
<xmax>980</xmax>
<ymax>533</ymax>
</bndbox>
</object>
</annotation>
<annotation>
<folder>business center</folder>
<filename>bcenter (2).PNG</filename>
<path>D:\RealTimeObjectDetection\Tensorflow\workspace\images\business center\bcenter (2).PNG</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>1851</width>
<height>887</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>business_center</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>805</xmin>
<ymin>126</ymin>
<xmax>1173</xmax>
<ymax>513</ymax>
</bndbox>
</object>
</annotation>
是否有一个软件或代码可以使流程自动化?我有大约1405个文件
见下文(1.xml和2.xml是从问题中选取的示例)
想法是加载这两个文件并将它们嵌套在一个公共根目录下
输出
相关问题 更多 >
编程相关推荐