def get_imgid_dict(ann):
    """
    Returns a dictionary with img ids as keys and img filenames as values
    """
    id_fn_dict = {}
    for item in ann.imgs.items():
        id_fn_dict[item[1]['file_name']] = item[0]
    return id_fn_dict