emgucv / emgutf

Emgu TF is a cross platform .Net wrapper for the Google Tensorflow library. Allows Tensorflow functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython.
https://www.emgu.com/wiki/index.php/Emgu_TF
Other
214 stars 43 forks source link

inceptionGraph.Recognize(imageTensor) error! #18

Open edward- opened 6 years ago

edward- commented 6 years ago

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!

nassrAlsaeedi commented 6 years ago

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..!!

emgucv commented 5 years ago

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.

superdan0812 commented 5 years ago

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.