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

Deconvolution layer not supported, while converting caffemodel weight into keras. #36

Open
rajeev-cmi opened this issue Apr 8, 2017 · 3 comments

Comments

@rajeev-cmi
Copy link

HI, I am trying to load caffe_weights .caffemodel file into keras. But getting some errors...

Converting model...
CREATING MODEL
Traceback (most recent call last):
File "caffe2keras.py", line 43, in
main(args)
File "caffe2keras.py", line 32, in main
model = convert.caffe_to_keras(args.load_path+'/'+args.prototxt, args.load_path+'/'+args.caffemodel, debug=args.debug)
File "/home/rajeev/nabila/keras/keras/caffe/convert.py", line 43, in caffe_to_keras
debug)
File "/home/rajeev/nabila/keras/keras/caffe/convert.py", line 305, in create_model
raise RuntimeError('layer type', type_of_layer, 'used in this model is not currently supported')
RuntimeError: ('layer type', 'deconvolution', 'used in this model is not currently supported')

Is deconvulation layer is not supported till now??
Any help please.

Thanks in Advance.

@akshaychawla
Copy link

Hey Rajeev,

I've got the deconv layer working in a separate implementation and I'll be submitting a PR sometime in the next 3-4 days. I'm just ironing out some issues with input layers and the caffe crop layer conversion. So be sure to check back by the end of the week!

Regards
Akshay

@rajeev-cmi
Copy link
Author

Thanks for the quick reply Akshay.

@akshaychawla
Copy link

akshaychawla commented Apr 19, 2017

Okay quick update regarding this.. I had been working on a separate heavily modified implantation of Marc's repository so wasn't able to make any commits earlier. Now I've started integrating into the his original implementation. This is what I got-

  1. Create_model is able to handle deconv and the weird caffe crop layer.
  2. Input_dim was coming in as an empty tuple to I modified the implementation to take the input dimensions from the first data layer.
  3. I'm able to copy over weights.
  4. I'm able to convert a fully convolutional neutral network built for semantic segmentation (voc-fcn8s) from shelhammers repo and run an inference on it.
  5. The output is a little different from the standard caffe output. Still working on it :P
  6. EDIT. I'll add a sample output to this post in a while.
    Sorry for the delay guys :P

**EDIT: PROOF **

https://github.com/akshaychawla/keras/blob/master/keras/caffe/models/segmentation/mini_proof.png

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