emgutf icon indicating copy to clipboard operation
emgutf copied to clipboard

inceptionGraph.Recognize(imageTensor) error!

Open edward- opened this issue 6 years ago • 3 comments

I dont understand this issue, because the example is good.

float[] probability = inceptionGraph.Recognize(imageTensor);

Object reference not set to an instance of an object. Uncontrolled exception of type 'System.NullReferenceException' in Emgu.TF.Models.dll

Someone that help me!

edward- avatar Jul 24 '18 22:07 edward-

I have the same problem.!! and I couldn't find the reason..!! I'm using EMGU TF - Windesktop_x64 1.8.0.203 version, to implement tensorFlow examples, however I got the same exception message..!!

nassrAlsaeedi avatar Aug 10 '18 20:08 nassrAlsaeedi

It could happens if Tensorflow is not able to load your trained model in the older release such as 1.8.0.

In the 1.13.1 release we have improved the error message to tell you tensorflow is not able to load the model.

emgucv avatar May 23 '19 21:05 emgucv

I am seeing this same issue. I think this is an issue InceptionGraph.init(...). I am using my own model, and for some reason it will randomly force you to download a model (even though I already have a model on my PC).

.init() accepts a URL as an argument to download a model from the internet. I am using my own model, so I set the URL to null. For some reason, there is a hard-coded URL in TF.Models.init() that is used in the case of a "null" argument being passed. This overwrites the model files I have trained, but does not download. I believe the link is bad.

Whenever I see this issue, I've noticed that the console logs contain "downloading link from ..." and the bin/debug/context_graph.pb has a size of 0 kb.

superdan0812 avatar Jun 24 '19 14:06 superdan0812