Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the file 'cache_groundtruth.mat' #2

Closed
Yao-DD opened this issue Aug 7, 2020 · 3 comments
Closed

How to get the file 'cache_groundtruth.mat' #2

Yao-DD opened this issue Aug 7, 2020 · 3 comments

Comments

@Yao-DD
Copy link

Yao-DD commented Aug 7, 2020

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?

@tzzcl
Copy link
Owner

tzzcl commented Aug 7, 2020

Hi, Sorry for the inconvenience.

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.

@tzzcl
Copy link
Owner

tzzcl commented Aug 7, 2020

Check the archive link I provided in README

@Yao-DD
Copy link
Author

Yao-DD commented Aug 7, 2020

Thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants