COCO(Common Objects in Context)數據集是一種廣泛使用的計算機視覺數據集,由微軟公司和康奈爾大學共同開發。它包含超過30萬張圖像,其中每張圖像都標注了80個種類的常見物體,每個物體有標注框和關鍵點信息。
COCO數據集的注釋信息使用JSON格式存儲。下面是一個示例:
{ "info": { "year": 2017, "version": "1.0", "description": "COCO 2017 Dataset", "contributor": "Microsoft COCO team", "url": "http://cocodataset.org", "date_created": "2017-09-01T13:55:28+00:00" }, "licenses": [ { "id": 1, "name": "Attribution-NonCommercial-ShareAlike License", "url": "http://creativecommons.org/licenses/by-nc-sa/2.0/" } ], "images": [ { "id": 2017, "width": 640, "height": 480, "file_name": "000000000017.jpg", "license": 1, "flickr_url": "http://farm4.staticflickr.com/3153/2970773875_164f0c0b83_z.jpg", "coco_url": "http://images.cocodataset.org/val2017/000000000017.jpg", "date_captured": "2013-11-14 11:18:45", "flickr_640_url": "http://farm4.staticflickr.com/3153/2970773875_164f0c0b83_n.jpg" } ], "annotations": [ { "id": 96, "image_id": 2017, "category_id": 1, "bbox": [255.75, 235.91, 92.23, 191.87], "segmentation": [[510.41, 375.49, 510.41, ...]], "area": 17626.47, "iscrowd": 0 } ], "categories": [ { "id": 1, "name": "person", "supercategory": "person" } ] }
JSON對象由大括號包圍,其中包含四個頂級字段:"info"、"licenses"、"images"和"annotations"。其中,"info"字段包含與數據集相關的信息,如年份,版本等;"licenses"字段包含數據集使用的許可證信息;"images"字段包含圖像的信息,如圖像ID、寬度、高度、文件名等;"annotations"字段包含注釋信息,如注釋ID、圖像ID、標注框、標注掩膜、物體類別等;"categories"字段包含物體類別信息,如類別ID、類別名稱和超類別。