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

Error when passing Image path #1

Closed
vyraun opened this issue Sep 16, 2016 · 1 comment
Closed

Error when passing Image path #1

vyraun opened this issue Sep 16, 2016 · 1 comment

Comments

@vyraun
Copy link

vyraun commented Sep 16, 2016

Hi

When I tried the model by passing an image path I got:

Using Theano backend.
Traceback (most recent call last):
File "cam.py", line 62, in
visualize_class_activation_map(args.model_path, args.image_path, args.output_path)
File "cam.py", line 18, in visualize_class_activation_map
model = load_model(model_path)
File "/home/vyraun/anaconda2/lib/python2.7/site-packages/keras/models.py", line 121, in load_model
f = h5py.File(filepath, mode='r')
File "/home/vyraun/anaconda2/lib/python2.7/site-packages/h5py/_hl/files.py", line 267, in init
name = name.encode(sys.getfilesystemencoding())
AttributeError: 'NoneType' object has no attribute 'encode'

I guess I am not passing the parameter correctly.

@jacobgil
Copy link
Owner

jacobgil commented Sep 16, 2016

Hi,
A checkpoint with the model weights should be passed with --model_path.
To get a checkpoint you can either first train it yourself by passing --train,
or use the checkpoint I trained and now uploaded to google drive:
https://drive.google.com/open?id=0B1l5JSkBbENBdk95ZW1DOUhqQUE
Pass --model_path cam_checkpoint.hdf5
Will add it to the README.

@jacobgil jacobgil closed this as completed Nov 2, 2016
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