bendangnuksung / mrcnn_serving_ready

🛠 Mask R-CNN Keras to Tensorflow and TFX models + Serving models using TFX GRPC & RESTAPI
https://github.com/matterport/Mask_RCNN
MIT License
103 stars 35 forks source link

What should the inputs and outputs of the SavedModel SignatureDef look like? #23

Open cpoptic opened 5 years ago

cpoptic commented 5 years ago

It is unclear precisely what the SavedModel inputs and outputs should look like for the Mask RCNN model, once frozen and exported in a Servable format.

What should the inputs and outputs of the SavedModel SignatureDef look like?

I'm seeing these 3 input tensors and these two output tensors. Is this correct?

The given SavedModel SignatureDef contains the following input(s): inputs['input_anchors'] tensor_info: dtype: DT_FLOAT shape: (-1, -1, 4) name: input_anchors:0 inputs['input_image'] tensor_info: dtype: DT_FLOAT shape: (-1, -1, -1, 3) name: input_image:0 inputs['input_image_meta'] tensor_info: dtype: DT_FLOAT shape: (-1, 33) name: input_image_meta:0 The given SavedModel SignatureDef contains the following output(s): outputs['mrcnn_detection/Reshape_1'] tensor_info: dtype: DT_INT64 shape: (-1) name: mrcnn_detection/Reshape_1:0 outputs['mrcnn_mask/Reshape_1'] tensor_info: dtype: DT_FLOAT shape: (-1, 100, 28, 28, 21) name: mrcnn_mask/Reshape_1:0 Method name is: tensorflow/serving/predict

chrigui94 commented 4 years ago

Hi @cpoptic , did you understand it? , I have the same problem I am implementing the mrcnn frozen model in c# application, but it requires these 3 inputs but I have only the input_image tensor.. how can I get the other 2 variables?

bendangnuksung commented 4 years ago

Please check inferencing/saved_model_inference.py on how the inferencing is done on saved_model.