對COCO數據集的簡單理解

許多圖像處理的問題可能都要用到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,
}
發佈了28 篇原創文章 · 獲贊 22 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章