Skip to content

Information #6

@hajourra

Description

@hajourra

def parse_devkit_meta(devkit_path):
12 meta_mat = scipy.io.loadmat(devkit_path+'/meta.mat')
13 labels_dic = dict((m[0][1][0], m[0][0][0][0]-1) for m in meta_mat['synsets'] if m[0][0][0][0] >= 1 and m[0][0][0][0] <= 1000)
14 label_names_dic = dict((m[0][1][0], m[0][2][0]) for m in meta_mat['synsets'] if m[0][0][0][0] >= 1 and m[0][0][0][0] <= 1000)
15 label_names = [tup[1] for tup in sorted([(v,label_names_dic[k]) for k,v in labels_dic.items()], key=lambda x:x[0])]
16 fval_ground_truth = open(devkit_path+'/data/ILSVRC2012_validation_ground_truth.txt','r')
17 validation_ground_truth = [[int(line.strip()) - 1] for line in fval_ground_truth.readlines()]
18 fval_ground_truth.close()

please for which purpose we use this function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions