其他分享
首页 > 其他分享> > MS COCO数据集格式

MS COCO数据集格式

作者:互联网

COCO数据集现在有3种标注类型:

object instances(目标实例),

object keypoints(目标上的关键点),

和image captions(看图说话)

 

Object Instance 类型的标注格式

json文件格式:

{
    "info": info,
    "licenses": [license],
    "images": [image],
    "annotations": [annotation],
    "categories": [category]
}

 

展开json文件以一张图片举例:

{
	"info": 
	{
		"description": "COCO 2017 Dataset",
		"url": "http://cocodataset.org",
		"version": "1.0",
		"year": 2017,
		"contributor": "COCO Consortium",
		"date_created": "2017/09/01"
	},
	"licenses": 
	[
		{
			"url": "http://creativecommons.org/licenses/by-nc-sa/2.0/",
			"id": 1,
			"name": "Attribution-NonCommercial-ShareAlike License"
		},
		{
			"url": "http://creativecommons.org/licenses/by-nc/2.0/",
			"id": 2,
			"name": "Attribution-NonCommercial License"
		},
		{
			"url": "http://creativecommons.org/licenses/by-nc-nd/2.0/",
			"id": 3,
			"name": "Attribution-NonCommercial-NoDerivs License"
		},
		{
			"url": "http://creativecommons.org/licenses/by/2.0/",
			"id": 4,
			"name": "Attribution License"
		},
		{
			"url": "http://creativecommons.org/licenses/by-sa/2.0/",
			"id": 5,
			"name": "Attribution-ShareAlike License"
		},
		{
			"url": "http://creativecommons.org/licenses/by-nd/2.0/",
			"id": 6,
			"name": "Attribution-NoDerivs License"
		},
		{
			"url": "http://flickr.com/commons/usage/",
			"id": 7,
			"name": "No known copyright restrictions"
		},
		{
			"url": "http://www.usa.gov/copyright.shtml",
			"id": 8,
			"name": "United States Government Work"
		}
	],

	"images": 
	[
		{
			"license": 4,
			"file_name": "000000000285.jpg",
			"coco_url": "http://images.cocodataset.org/val2017/000000000285.jpg",
			"height": 640,
			"width": 586,
			"date_captured": "2013-11-18 13:09:47",
			"flickr_url": "http://farm8.staticflickr.com/7434/9138147604_c6225224b8_z.jpg",
			"id": 285
		}
	],

	"annotations":
	[
		{
			"segmentation": [[37.31,373.02,57.4,216.61,67.44,159.21,77.49,113.29,91.84,86.03,123.41,84.59,162.15,96.07,215.25,86.03,261.17,70.24,285.56,68.81,337.22,68.81,411.84,93.2,454.89,107.55,496.5,255.35,513.72,262.53,552.47,292.66,586.0,324.23,586.0,381.63,586.0,449.08,586.0,453.38,578.3,616.97,518.03,621.27,444.84,624.14,340.09,625.58,136.32,625.58,1.43,632.75,7.17,555.26,5.74,414.64]],"area": 275709.8110500001,
				"iscrowd": 0,
				"image_id": 285,
				"bbox": [1.43,68.81,584.57,563.94],
				"category_id": 23,
				"id": 587562
			}
	],
	
	"categories": 
	[
		{
			"supercategory": "person",
			"id": 1,
			"name": "person"
		},
		{
			"supercategory": "vehicle",
			"id": 2,
			"name": "bicycle"
		},
		{
			"supercategory": "vehicle",
			"id": 3,
			"name": "car"
		},
		{"supercategory": "vehicle","id": 4,"name": "motorcycle"},{"supercategory": "vehicle","id": 5,"name": "airplane"},{"supercategory": "vehicle","id": 6,"name": "bus"},{"supercategory": "vehicle","id": 7,"name": "train"},{"supercategory": "vehicle","id": 8,"name": "truck"},{"supercategory": "vehicle","id": 9,"name": "boat"},{"supercategory": "outdoor","id": 10,"name": "traffic light"},{"supercategory": "outdoor","id": 11,"name": "fire hydrant"},{"supercategory": "outdoor","id": 13,"name": "stop sign"},{"supercategory": "outdoor","id": 14,"name": "parking meter"},{"supercategory": "outdoor","id": 15,"name": "bench"},{"supercategory": "animal","id": 16,"name": "bird"},{"supercategory": "animal","id": 17,"name": "cat"},{"supercategory": "animal","id": 18,"name": "dog"},{"supercategory": "animal","id": 19,"name": "horse"},{"supercategory": "animal","id": 20,"name": "sheep"},{"supercategory": "animal","id": 21,"name": "cow"},{"supercategory": "animal","id": 22,"name": "elephant"},{"supercategory": "animal","id": 23,"name": "bear"},{"supercategory": "animal","id": 24,"name": "zebra"},{"supercategory": "animal","id": 25,"name": "giraffe"},{"supercategory": "accessory","id": 27,"name": "backpack"},{"supercategory": "accessory","id": 28,"name": "umbrella"},{"supercategory": "accessory","id": 31,"name": "handbag"},{"supercategory": "accessory","id": 32,"name": "tie"},{"supercategory": "accessory","id": 33,"name": "suitcase"},{"supercategory": "sports","id": 34,"name": "frisbee"},{"supercategory": "sports","id": 35,"name": "skis"},{"supercategory": "sports","id": 36,"name": "snowboard"},{"supercategory": "sports","id": 37,"name": "sports ball"},{"supercategory": "sports","id": 38,"name": "kite"},{"supercategory": "sports","id": 39,"name": "baseball bat"},{"supercategory": "sports","id": 40,"name": "baseball glove"},{"supercategory": "sports","id": 41,"name": "skateboard"},{"supercategory": "sports","id": 42,"name": "surfboard"},{"supercategory": "sports","id": 43,"name": "tennis racket"},{"supercategory": "kitchen","id": 44,"name": "bottle"},{"supercategory": "kitchen","id": 46,"name": "wine glass"},{"supercategory": "kitchen","id": 47,"name": "cup"},{"supercategory": "kitchen","id": 48,"name": "fork"},{"supercategory": "kitchen","id": 49,"name": "knife"},{"supercategory": "kitchen","id": 50,"name": "spoon"},{"supercategory": "kitchen","id": 51,"name": "bowl"},{"supercategory": "food","id": 52,"name": "banana"},{"supercategory": "food","id": 53,"name": "apple"},{"supercategory": "food","id": 54,"name": "sandwich"},{"supercategory": "food","id": 55,"name": "orange"},{"supercategory": "food","id": 56,"name": "broccoli"},{"supercategory": "food","id": 57,"name": "carrot"},{"supercategory": "food","id": 58,"name": "hot dog"},{"supercategory": "food","id": 59,"name": "pizza"},{"supercategory": "food","id": 60,"name": "donut"},{"supercategory": "food","id": 61,"name": "cake"},{"supercategory": "furniture","id": 62,"name": "chair"},{"supercategory": "furniture","id": 63,"name": "couch"},{"supercategory": "furniture","id": 64,"name": "potted plant"},{"supercategory": "furniture","id": 65,"name": "bed"},{"supercategory": "furniture","id": 67,"name": "dining table"},{"supercategory": "furniture","id": 70,"name": "toilet"},{"supercategory": "electronic","id": 72,"name": "tv"},{"supercategory": "electronic","id": 73,"name": "laptop"},{"supercategory": "electronic","id": 74,"name": "mouse"},{"supercategory": "electronic","id": 75,"name": "remote"},{"supercategory": "electronic","id": 76,"name": "keyboard"},{"supercategory": "electronic","id": 77,"name": "cell phone"},{"supercategory": "appliance","id": 78,"name": "microwave"},{"supercategory": "appliance","id": 79,"name": "oven"},{"supercategory": "appliance","id": 80,"name": "toaster"},{"supercategory": "appliance","id": 81,"name": "sink"},{"supercategory": "appliance","id": 82,"name": "refrigerator"},{"supercategory": "indoor","id": 84,"name": "book"},{"supercategory": "indoor","id": 85,"name": "clock"},{"supercategory": "indoor","id": 86,"name": "vase"},{"supercategory": "indoor","id": 87,"name": "scissors"},{"supercategory": "indoor","id": 88,"name": "teddy bear"},{"supercategory": "indoor","id": 89,"name": "hair drier"},
		{
			"supercategory": "indoor",
			"id": 90,
			"name": "toothbrush"
		}
	]
}

 

参考:https://zhuanlan.zhihu.com/p/29393415 COCO数据集的标注格式  MSCOCO数据标注详解  MicroSoft COCO数据集  目标检测数据集MSCOCO简介

 

 

标签:http,name,supercategory,sports,url,MS,COCO,格式,id
来源: https://www.cnblogs.com/yangwithtao/p/11026512.html