coco和VOC数据集介绍和转换

转载:https://www.cnblogs.com/marsggbo/p/11152462.html

 

VOC下的一个标注:

[menglingxuan@BJ-IDC1-10-10-15-115 Annotations]$ cat 001004.xml 
<annotation>
	<folder>VOC2007</folder>
	<filename>001004.jpg</filename>
	<source>
		<database>The VOC2007 Database</database>
		<annotation>PASCAL VOC2007</annotation>
		<image>flickr</image>
		<flickrid>331357345</flickrid>
	</source>
	<owner>
		<flickrid>marksontok</flickrid>
		<name>Mark</name>
	</owner>
	<size>
		<width>500</width>
		<height>375</height>
		<depth>3</depth>
	</size>
	<segmented>0</segmented>
	<object>
		<name>bird</name>
		<pose>Unspecified</pose>
		<truncated>0</truncated>
		<difficult>0</difficult>
		<bndbox>
			<xmin>143</xmin>
			<ymin>152</ymin>
			<xmax>235</xmax>
			<ymax>197</ymax>
		</bndbox>
	</object>
</annotation>

对应的coco格式:

{"images": [{"file_name": "001004.jpg", "height": 375, "width": 500, "id": 1004}], "type": "instances", "annotations": [{"area": 4278, "iscrowd": 0, "image_id": 1004, "bbox": [142, 151, 93, 46], "category_id": 0, "id": 1, "ignore": 0, "segmentation": [[142, 151, 142, 197, 235, 197, 235, 151]]}], "categories": [{"supercategory": "none", "id": 0, "name": "bird"}]}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值