Samples
Overview
TACO是一个用于垃圾检测的图像数据集,包含从热带海滩到伦敦街头在不同环境下拍摄的垃圾的照片,共有1500张图像,4784个box2Db标注。其中垃圾大类可以分为28类,分别是
复制代码
1'Aluminium foil', 'Battery', 'Blister pack', 'Bottle', 'Bottle cap', 'Broken glass', 'Can', 'Carton', 'Cup', 'Food waste', 'Glass jar', 'Lid', 'Other plastic', 'Paper', 'Paper bag', 'Plastic bag & wrapper', 'Plastic container', 'Plastic glooves', 'Plastic utensils', 'Pop tab', 'Rope & strings', 'Scrap metal', 'Shoe', 'Squeezable tube', 'Straw', 'Styrofoam piece', 'Unlabeled litter', 'Cigarette'
子类可以分为60种,分别是
复制代码
1'Aluminium foil', 'Battery', 'Aluminium blister pack', 'Carded blister pack', 'Other plastic bottle', 'Clear plastic bottle', 'Glass bottle', 'Plastic bottle cap', 'Metal bottle cap', 'Broken glass', 'Food Can', 'Aerosol', 'Drink can', 'Toilet tube', 'Other carton', 'Egg carton', 'Drink carton', 'Corrugated carton', 'Meal carton', 'Pizza box', 'Paper cup', 'Disposable plastic cup', 'Foam cup', 'Glass cup', 'Other plastic cup', 'Food waste', 'Glass jar', 'Plastic lid', 'Metal lid', 'Other plastic', 'Magazine paper', 'Tissues', 'Wrapping paper', 'Normal paper', 'Paper bag', 'Plastified paper bag', 'Plastic film', 'Six pack rings', 'Garbage bag', 'Other plastic wrapper', 'Single-use carrier bag', 'Polypropylene bag', 'Crisp packet', 'Spread tub', 'Tupperware', 'Disposable food container', 'Foam food container', 'Other plastic container', 'Plastic glooves', 'Plastic utensils', 'Pop tab', 'Rope & strings', 'Scrap metal', 'Shoe', 'Squeezable tube', 'Plastic straw', 'Paper straw', 'Styrofoam piece', 'Unlabeled litter', 'Cigarette'
Data Explore
数据集分为15个batch文件夹,每一个文件夹内含有100左右的垃圾图像以及一个annotation.json文件,文件读取后是一个字典,其键如下
复制代码
1dict_keys(['info', 'images', 'annotations', 'scene_annotations', 'licenses', 'categories', 'scene_categories'])
数据初始化
修改annotation.json所在的file_path路径,即可获得图片的box2D标签字典,其键、值分别为图片id,图片标签(可能含有多个标签)。键值为列表格式,其元素格式为[xmin,ymin,w,h,category]
复制代码
1
2
3
4import json
with open(file_path, encoding='utf-8') as f:
line = f.readline()
all = json.loads(line)
# 获取图片对应的id
img_id = {}
for i in all["images"]:
if i["file_name"] not in img_id.keys():
img_id[i["file_name"]] = i["id"]
# 获取标签id对应的类别
category_id = {}
for i in all["categories"]:
if i["id"] not in category_id.keys():
category_id[i["id"]] = i["name"]
# 获取图片id对应的标签
labels_dict = {}
for i in all["annotations"]:
if i["image_id"] not in labels_dict.keys():
labels_dict[i["image_id"]] = []
bbox = i["bbox"]
cate_id = i["category_id"]
label = bbox + [category_id[cate_id]]
labels_dict[i["image_id"]].append(label)
Citation
If you use this dataset and API in a publication, please cite us using:
复制代码
1
2
3
4
5
6@article{taco2020, title={TACO: Trash Annotations in Context for Litter Detection}, author={Pedro F Proença and Pedro Simões}, journal={arXiv preprint arXiv:2003.06975}, year={2020} }
关注公众号,后台回复 taco 即可获得数据集
最后
以上就是害羞微笑最近收集整理的关于TACO数据集下载SamplesOverviewData ExploreCitation的全部内容,更多相关TACO数据集下载SamplesOverviewData内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复