coco数据集下载需要
COCO - Common Objects in Context
以instances_val2017.json为例,有的博客说还有一个关键索引type,但是我没找到
这俩货没啥可说的,数据信息和版权吧,个人用不着
images里是一个列表,单独拿出来一个如下
{"license": 4,"file_name": "000000397133.jpg","coco_url": "http://images.cocodataset.org/val2017/000000397133.jpg","height": 427,"width": 640,"date_captured": "2013-11-14 17:02:52","flickr_url": "http://farm7.staticflickr.com/6116/6255196340_da26cf2c9e_z.jpg","id": 397133}
其中需要关注的信息是
图像名:"file_name": "000000397133.jpg"
图像在网络中的位置:"coco_url": "http://images.cocodataset.org/val2017/000000397133.jpg"
图像高度:"height": 427
图像宽度:"width": 640
图像ID:"id": 397133
annotations里也是一个列表,单独拿出来一个如下
{"segmentation": [[510.66,423.01,511.72,420.03,510.45......]],"area": 702.1057499999998,"iscrowd": 0,"image_id": 289343,"bbox": [473.07,395.93,38.65,28.67],"category_id": 18,"id": 1768}
语义分割:"segmentation": [[510.66,423.01,511.72,420.03,510.45......] 这个是围绕目标一圈的点
区域面积:"area": 702.1057499999998 ??这个位置需要确认一下,应该是目标的面积
是否是人群:"iscrowd": 0
图像ID:"image_id": 289343 这个对应images里的id
检测框:"bbox":[473.07,395.93,38.65,28.67] 左上点xy+wh
类别ID:"category_id": 18 在数据集中的第几个类别,默认0类别是background
标签ID:"id": 1768 就是第几个标签,这个id不是对应在第几张图中的id,而是在整个数据集中标签第几个id
也是个列表,这个有些没啥说的
{"supercategory": "animal","id": 18,"name": "dog"}
类别父类:"supercategory": "animal" 这个没怎么用到过,但是还挺好的,比如说我想分动物和人、车,就可以用这个父类
类别id: "id": 18 dog这个类别在类别列表中的id,对应上面的"category_id"
类别名:"name": "dog"
class_name = [ '__background__', 'person', 'bicycle', 'car', 'motorcycle', 'airplane','bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush']
self._valid_ids = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90]
原始数据集ID就是不连续的,不知道因为啥
Dataset之COCO数据集:COCO数据集的简介、下载、使用方法之详细攻略_一个处女座的程序猿的博客-CSDN博客_coco数据集
index:0 id:1 name:person supercategory:person index:1 id:2 name:bicycle supercategory:vehicle index:2 id:3 name:car supercategory:vehicle index:3 id:4 name:motorcycle supercategory:vehicle index:4 id:5 name:airplane supercategory:vehicle index:5 id:6 name:bus supercategory:vehicle index:6 id:7 name:train supercategory:vehicle index:7 id:8 name:truck supercategory:vehicle index:8 id:9 name:boat supercategory:vehicle index:9 id:10 name:traffic light supercategory:outdoor index:10 id:11 name:fire hydrant supercategory:outdoor index:11 id:13 name:stop sign supercategory:outdoor index:12 id:14 name:parking meter supercategory:outdoor index:13 id:15 name:bench supercategory:outdoor index:14 id:16 name:bird supercategory:animal index:15 id:17 name:cat supercategory:animal index:16 id:18 name:dog supercategory:animal index:17 id:19 name:horse supercategory:animal index:18 id:20 name:sheep supercategory:animal index:19 id:21 name:cow supercategory:animal index:20 id:22 name:elephant supercategory:animal index:21 id:23 name:bear supercategory:animal index:22 id:24 name:zebra supercategory:animal index:23 id:25 name:giraffe supercategory:animal index:24 id:27 name:backpack supercategory:accessory index:25 id:28 name:umbrella supercategory:accessory index:26 id:31 name:handbag supercategory:accessory index:27 id:32 name:tie supercategory:accessory index:28 id:33 name:suitcase supercategory:accessory index:29 id:34 name:frisbee supercategory:sports index:30 id:35 name:skis supercategory:sports index:31 id:36 name:snowboard supercategory:sports index:32 id:37 name:sports ball supercategory:sports index:33 id:38 name:kite supercategory:sports index:34 id:39 name:baseball bat supercategory:sports index:35 id:40 name:baseball glove supercategory:sports index:36 id:41 name:skateboard supercategory:sports index:37 id:42 name:surfboard supercategory:sports index:38 id:43 name:tennis racket supercategory:sports index:39 id:44 name:bottle supercategory:kitchen index:40 id:46 name:wine glass supercategory:kitchen index:41 id:47 name:cup supercategory:kitchen index:42 id:48 name:fork supercategory:kitchen index:43 id:49 name:knife supercategory:kitchen index:44 id:50 name:spoon supercategory:kitchen index:45 id:51 name:bowl supercategory:kitchen index:46 id:52 name:banana supercategory:food index:47 id:53 name:apple supercategory:food index:48 id:54 name:sandwich supercategory:food index:49 id:55 name:orange supercategory:food index:50 id:56 name:broccoli supercategory:food index:51 id:57 name:carrot supercategory:food index:52 id:58 name:hot dog supercategory:food index:53 id:59 name:pizza supercategory:food index:54 id:60 name:donut supercategory:food index:55 id:61 name:cake supercategory:food index:56 id:62 name:chair supercategory:furniture index:57 id:63 name:couch supercategory:furniture index:58 id:64 name:potted plant supercategory:furniture index:59 id:65 name:bed supercategory:furniture index:60 id:67 name:dining table supercategory:furniture index:61 id:70 name:toilet supercategory:furniture index:62 id:72 name:tv supercategory:electronic index:63 id:73 name:laptop supercategory:electronic index:64 id:74 name:mouse supercategory:electronic index:65 id:75 name:remote supercategory:electronic index:66 id:76 name:keyboard supercategory:electronic index:67 id:77 name:cell phone supercategory:electronic index:68 id:78 name:microwave supercategory:appliance index:69 id:79 name:oven supercategory:appliance index:70 id:80 name:toaster supercategory:appliance index:71 id:81 name:sink supercategory:appliance index:72 id:82 name:refrigerator supercategory:appliance index:73 id:84 name:book supercategory:indoor index:74 id:85 name:clock supercategory:indoor index:75 id:86 name:vase supercategory:indoor index:76 id:87 name:scissors supercategory:indoor index:77 id:88 name:teddy bear supercategory:indoor index:78 id:89 name:hair drier supercategory:indoor index:79 id:90 name:toothbrush supercategory:indoor