许多图像处理的问题可能都要用到COCO数据集,了解COCO数据集的标注格式有助于我们后续的学习。
这篇文章解释的很清楚:
参考文章:MSCOCO数据标注详解
说到底,就是去看json文件,对json文件进行简单分类查看,会发现——基本的JSON结构体类型有以下5种:
{
"info": info, # dict
"licenses": [license], # list ,内部是dict
"images": [image], # list ,内部是dict
"annotations": [annotation], # list ,内部是dict
"categories": # list ,内部是dict
}
具体结构为:
info{
"year": int,
"version": str,
"description": str,
"contributor": str,
"url": str,
"date_created": datetime,
}
license{
"id": int,
"name": str,
"url": str,
}
image{
"id": int,
"width": int,
"height": int,
"file_name": str,
"license": int,
"flickr_url": str,
"coco_url": str,
"date_captured": datetime,
}
annotation{
"id": int,
"image_id": int,
"category_id": int,
"segmentation": RLE or [polygon],
"area": float,
"bbox": [x,y,width,height],
"iscrowd": 0 or 1,
}
categories{
"id": int,
"name": str,
"supercategory": str,
}