go-tensorflow-image-recognition icon indicating copy to clipboard operation
go-tensorflow-image-recognition copied to clipboard

Support for own trained models?

Open schlagelk opened this issue 7 years ago • 5 comments

First - I love this project and thanks for sharing it.

When using my own model trained by following the tutorial here for example, I get an empty response when attempting to recognize an image - curl: (52) Empty reply from server . Any support for custom trained models?

schlagelk avatar Dec 08 '17 03:12 schlagelk

I wasn't thinking about other TF models when I built this, because of the way tensors are set up from images. But if you're getting "empty reply from server", an error could be thrown somewhere else.

tinrab avatar Dec 08 '17 07:12 tinrab

@tinrab could you please clarify what type of model is loaded from https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip and how it was saved?

I'm interested in extending example to a custom model (not really related to shown image classification example) and would like to understand what should be saved/loaded from tensorflow model. For instance, running example from https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/4_Utils/save_restore_model.py I see that it creates few files

model.ckpt.data-00000-of-00001
model.ckpt.index
model.ckpt.meta

while in your example we have

imagenet_comp_graph_label_strings.txt
tensorflow_inception_graph.pb

So, if I'll read these two examples together I want to understand what is what. Does model.ckpt.data-00000-of-00001 correspond to tensorflow_inception_graph.pb? What pb extension stands for? What about model.ckpt.index and model.ckpt.meta files which is not present in your example.

vkuznet avatar Jan 15 '18 15:01 vkuznet

I found details about my question over here: https://stackoverflow.com/questions/38947658/tensorflow-saving-into-loading-a-graph-from-a-file#38950073 Feel free to disregard.

vkuznet avatar Jan 15 '18 19:01 vkuznet

WHen I am generating a .pb file for a custom model, it generates a variables folder as well. How to load that with http input ?

cbhanu avatar Aug 29 '18 22:08 cbhanu

Hello @tinrab , can we use model from this example https://github.com/googlecodelabs/tensorflow-for-poets-2

I have try but error.

nil-Operation. If the Output was created with a Scope object, see Scope.Err() for details

Let me know, what model must we use for. Thanks

Jayuda avatar Jan 07 '19 09:01 Jayuda