COCO數據集是當前最常用的圖像識別和目標檢測數據集之一,其中包括各種不同的對象類別和圖像場景。COCO數據集的JSON格式文件是對每個圖像進行標注的基本格式,可用于分析和訓練模型。
{ "info": { "description": "my dataset", "url": "mydataset.org", "version": "0.1", "year": 2021, "contributor": "me", "date_created": "2021/01/01" }, "licenses": [ { "url": "http://creativecommons.org/licenses/by-nc-sa/2.0/", "id": 1, "name": "Attribution-NonCommercial-ShareAlike License" } ], "images": [ { "license": 1, "file_name": "000001.jpg", "height": 480, "width": 640, "id": 1 }, ... ], "categories": [ { "supercategory": "vehicle", "id": 1, "name": "car" }, ... ], "annotations": [ { "segmentation": [ [ 43.0, 214.0, ... ] ], "area": 1072.0, "iscrowd": 0, "image_id": 1, "bbox": [ 43.0, 167.0, 95.0, 63.0 ], "category_id": 18, "id": 1 }, ... ] }
上面的JSON示例顯示了COCO數據集文件的主要屬性,包括每個圖像的id、圖像的寬度和高度、目標的類別和id、目標的bbox和segmentation、數據集的許可協議等。