heigeo / cordova-plugin-tensorflow

On-device image recognition via TensorFlow/Inception. For Cordova/PhoneGap.
MIT License
56 stars 33 forks source link

Inception V3 not working #4

Open kaustubhn opened 7 years ago

kaustubhn commented 7 years ago

I am using this plugin in one of my apps built with ionic 2 for android. When i used the inception V1 model I get the prediction results. But as soon as I try to use the inception v3 model I get an error saying

"Op BatchNormWithGlobalNormalization is not available in GraphDef version 21. It has been removed in version 9. User tf.nn.batch_normalization()."

My guess it we need to update the .so files and the .jar file. I tried to do that but it didn't work, could anyone please guide me in the direction?

Any help is appreciated. Thanks in Advance.

Edit 1: When using mobile net model (self trained) getting error as- "Problem reading labels file!"

timbutler commented 7 years ago

Give this a go, you need to strip your existing model for mobile use: https://petewarden.com/2016/09/27/tensorflow-for-mobile-poets/

steventanwc commented 6 years ago

Hi Tim,

I have stripped the the model. Quantize the model

Still can't get it to work.

The error: Uncaught (in promise) -1

Were u able to make it work in v3?

davifelipems commented 6 years ago

I wrote a tutorial on my blog showing how to generate a model inception v3 for mobile . is in Portuguese but you can use google translator :) http://www.davifelipe.com.br/tensorflow-gerando-model-para-dispositivo-movel