本文主要是介绍关于coco目标检测数据集格式,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
coco目标检测数据集标注目标信息采用的是数据格式是json,其内容本质是一种字典结构,字典堆栈和列表信息内容维护。
coco里面的id和类名字对应:总共80类,但id号到90!
coco_id_name_map={1: 'person', 2: 'bicycle', 3: 'car', 4: 'motorcycle', 5: 'airplane',6: 'bus', 7: 'train', 8: 'truck', 9: 'boat', 10: 'traffic light',11: 'fire hydrant', 13: 'stop sign', 14: 'parking meter', 15: 'bench',16: 'bird', 17: 'cat', 18: 'dog', 19: 'horse', 20: 'sheep', 21: 'cow',22: 'elephant', 23: 'bear', 24: 'zebra', 25: 'giraffe', 27: 'backpack',28: 'umbrella', 31: 'handbag', 32: 'tie', 33: 'suitcase', 34: 'frisbee',35: 'skis', 36: 'snowboard', 37: 'sports ball', 38: 'kite', 39: 'baseball bat',40: 'baseball glove', 41: 'skateboard', 42: 'surfboard', 43: 'tennis racket',44: 'bottle', 46: 'wine glass', 47: 'cup', 48: 'fork', 49: 'knife', 50: 'spoon',51: 'bowl', 52: 'banana', 53: 'apple', 54: 'sandwich', 55: 'orange',56: 'broccoli', 57: 'carrot', 58: 'hot dog', 59: 'pizza', 60: 'donut',61: 'cake', 62: 'chair', 63: 'couch', 64: 'potted plant', 65: 'bed', 67: 'dining table',70: 'toilet', 72: 'tv', 73: 'laptop', 74: 'mouse', 75: 'remote', 76: 'keyboard',77: 'cell phone', 78: 'microwave', 79: 'oven', 80: 'toaster', 81: 'sink',82: 'refrigerator', 84: 'book', 85: 'clock', 86: 'vase', 87: 'scissors',88: 'teddy bear', 89: 'hair drier', 90: 'toothbrush'}
打开json文件:
with open(json_path,'r') as load_f:load_dict = json.load(load_f)
里面协议是这样的,annotations下面是每一个box的标注信息,包括分割的,当前框使用目标框,image_id,categogy_id。
因此要想获得整个数据集信息,必须遍历整个box信息,将其进行统计分配。
这篇关于关于coco目标检测数据集格式的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!