You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There need to load 'cache_groundtruth.mat' in the file 'loader/imagenet_loader.py ':
def load_val_bbox(label_dict,all_imgs,gt_location):
........
gt_label = sio.loadmat(os.path.join(gt_location,'cache_groundtruth.mat'))
locs = [(x[0].split('/')[-1],x[0],x[1]) for x in all_imgs]
locs.sort()
final_bbox_dict = {}
for i in range(len(locs)):
#gt_label['rec'][:,1][0][0][0], if multilabel then get length, for final eval
final_bbox_dict[locs[i][1]] = gt_label['rec'][:,i][0][0][0][0][1][0]
return final_bbox_dict
But I can not find this file in annotations of Imagenet. How to get it?
The text was updated successfully, but these errors were encountered:
Actually, the cache_groundtruth.mat is from the CAM baseline.
I've just uploaded a zip file called ImageNet_gt.zip, which includes the cache_groundtruth.mat and the txt file which needs to be used in our code. By the way, you can directly remove the code to read txt files.
There need to load 'cache_groundtruth.mat' in the file 'loader/imagenet_loader.py ':
def load_val_bbox(label_dict,all_imgs,gt_location):
........
gt_label = sio.loadmat(os.path.join(gt_location,'cache_groundtruth.mat'))
locs = [(x[0].split('/')[-1],x[0],x[1]) for x in all_imgs]
locs.sort()
final_bbox_dict = {}
for i in range(len(locs)):
#gt_label['rec'][:,1][0][0][0], if multilabel then get length, for final eval
final_bbox_dict[locs[i][1]] = gt_label['rec'][:,i][0][0][0][0][1][0]
return final_bbox_dict
But I can not find this file in annotations of Imagenet. How to get it?
The text was updated successfully, but these errors were encountered: