許多圖像處理的問題可能都要用到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,
}