How to use VGGFace in Dataiku?

Solved!
Benoni
Level 3
How to use VGGFace in Dataiku?

So i've completed all the image classification deep learning tutorials at https://www.dataiku.com/learn/guide/. Now, i want to work with VGGface because my data are exclusively face pictures. However the Keras VGGFace repo only works with Keras 2.1.1. If i try to use the repo with an updated keras i'll get "ImportError: cannot import name '_obtain_input_shape'". Any work arounds for these kind of problems? 



 



Thanks in advance, 

0 Kudos
1 Solution
Liev
Dataiker Alumni

Hi Benoni, 



You can create an environment in DSS with the required version of Keras, in order for the dependencies to work.



Then, the snippet as per their documentation works inside a notebook or Python script setup on the environment.





I hope this helps!

View solution in original post

3 Replies
cperdigou
Dataiker Alumni

Hi there ๐Ÿ™‚



I think this SO thread can help, https://stackoverflow.com/questions/49113140/importerror-cannot-import-name-obtain-input-shape-from-keras, you can probably amend the code of the file "keras_vggface/models.py" of the library you are importing to solve your problem.

Liev
Dataiker Alumni

Hi Benoni, 



You can create an environment in DSS with the required version of Keras, in order for the dependencies to work.



Then, the snippet as per their documentation works inside a notebook or Python script setup on the environment.





I hope this helps!

Benoni
Level 3
Author
Thanks! I was trying with keras_vggface only and had keras related problems. Never thought of adding keras==2.1.1 there ๐Ÿ™‚
0 Kudos

Labels

?
Labels (2)
A banner prompting to get Dataiku