Skip to content

Coco visualiser

coco_assistant.coco_visualiser

get_imgid_dict(ann)

Returns a dictionary with img ids as keys and img filenames as values

Source code in coco_assistant/coco_visualiser.py
118
119
120
121
122
def get_imgid_dict(ann):
    """
    Returns a dictionary with img ids as keys and img filenames as values
    """
    return {item[1]["file_name"]: item[0] for item in ann.imgs.items()}