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

Heat maps not getting saved in their corresponding locations #3

Closed
graylevel255 opened this issue Feb 20, 2020 · 3 comments
Closed

Comments

@graylevel255
Copy link

After training the model, the scoremaps folders are empty! Can you suggest me what might I be missing ?

@coallaoh
Copy link
Collaborator

Thank you for your interest in this work!

If you run the main.py code, the heatmaps are not saved. They are directly evaluated on the fly (in memory). This happens at

def compute_and_evaluate_cams(self):
.

If you wish to save the heatmaps, save the cam_normalized array in

self.evaluator.accumulate(cam_normalized, image_id)

@graylevel255
Copy link
Author

graylevel255 commented Feb 21, 2020

Thank you for your help.
However when I run the evaluation code as
python evaluation.py --scoremap_root=train_log/CUB_vgg16_CAM/scoremaps/val/ --metadata_root=metadata/CUB/val/ --mask_root=dataset/ --dataset_name=CUB --split=val --cam_curve_interval=0.01 , I get the following error :
FileNotFoundError: [Errno 2] No such file or directory: 'train_log/CUB_vgg16_CAM/scoremaps/val/001.Black_footed_Albatross/30107316117.jpg.npy'
So does that mean scoremaps need to be saved before running this script ?

@coallaoh
Copy link
Collaborator

Yes. The standalone evaluation code assumes saved scoremaps. The train+eval code does not save the scoremaps by default and evaluates them in memory.

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