TensorFlow COCO

Common Objects in COntext(COCO)分为训练集(train),验证集(val)和测试集(test)

标注分3类,都以json格式保存

  1. object instances(目标实例)
  2. object keypoints(目标关键点)
  3. image captions(看图说话)

key的解释:

每个标注分类公共的key

“info”:{
“description”:描述,
“url”:“http://mscoco.org”,
“version”:版本
“year”:年份
“contributor”:贡献的人
“date_created”:创建时间
}

“images”:{
“license”:3,
“file_name”:图片的名称,
“coco_url”:网页url,
“height”:高度
“width”:宽度
“date_captured”:创建时间
“flickr_url”:
“id”:
},

“licenses”:{
“url”:连接
“id”:1,
“name”:名称
},

Object Instance类型的标注格式

整体的格式,‘info’,‘licenses’,'images’这三者通用,已经讲过.images的数量就是图片的数量,annotations的数量就是boundingbox的数量,categories是总分类数

{
    "info": info,
    "licenses": [license],
    "images": [image],
    "annotations": [annotation],
    "categories": [category]
}

annotations

annotation{
    "id": int,    
    "image_id": int,
    "category_id": int,
    "segmentation": RLE or [polygon],
    "area": float,
    "bbox": [x,y,width,height],
    "iscrowd": 0 or 1,
}

segmentation:单个对象(isrowd=0)使用polygons,多个对象(isrowd=1)使用RLE
单个对象(iscrowd=0)可能需要多个polygon比如对象被遮挡的部分

area:标注区域的面积

bbox:左上角坐标,高和宽

categories

{
    "id": int,
    "name": str,
    "supercategory": str,
}

id是对应了类别
name是类别的名字

Object Keypoint类型的标注格式

这个主要是对人进行识别,包含了人的姿势

整体

{
    "info": info,
    "licenses": [license],
    "images": [image],
    "annotations": [annotation],
    "categories": [category]
}

annotations

包含了Object Instance中annotation结构体的所有字段,再加上2个额外的字段。

categories字段

keypoints是一个长度为k的数组,包含了每个关键点的名字
skeleton定义了各个关键点之间的连接性

Image Caption

没有categories字段

{
    "info": info,
    "licenses": [license],
    "images": [image],
    "annotations": [annotation]
}

annotation

annotation{
    "id": int,
    "image_id": int,
    "caption": str
}

参考:
https://zhuanlan.zhihu.com/p/29393415

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值