bendangnuksung/mrcnn_serving_ready

KeyError: "The name 'input_image:0' refers to a Tensor which does not exist. The operation, 'input_image', does not exist in the graph."?

Closed this issue · 6 comments

However I run your code in CPU mode. but it gives the following error:

KeyError: "The name 'input_image:0' refers to a Tensor which does not exist. The operation, 'input_image', does not exist in the graph."

Would you help me please?

Thanks

The tensor input_image should be in the Graph, are you loading the right model? and have you tried loading the same config class which you used for training?

Hi, thanks for sharing this serving_ready @bendangnuksung

I can create and load the frozen graph now.

After I loaded the graph, I can get_tensor_by_name('input_image:0'), but what about the outputs?

I can see in your main.py, the output contains output_detection and output_mask, does output_detection contain bounding_box{rois: [N, (y1, x1, y2, x2)]}, class_ids and scores?

@bendangnuksung @i-chaochen
problem is solved. The tensor name was not same as .pb file. thanks

problem is solved. The tensor name was not same as .pb file. thanks

so where do you know the tensor name from the frozen graph?

During creating the freeze_graph, just print model.inputs and model.outputs. In my case, the name was
input_image_7. Thanks

How did you get the output for the model.inputs? I tried printing them but nothing appeared.