I downloaded the most popular Maskrcnn model on GitHub and succssfully trained it
But when I try to use openvino model_optimizer to optimize it, I encountered a lot of problems, did not solve.
Below is my optimization process:
1.save model and change from h5 to pb
The model(https://github.com/matterport/Mask_RCNN) based on Keras.
The Keras model weight means weight.H5 file. But openvino toolkit says intel open tf optimizer needs .pb or ckpt.
So i I extracted the keras model and change it to tf.pb.
Used this tool (https://github.com/amir-abdi/keras_to_tensorflow)
2.Model Optimizer to .xml and .bin
I have successfully run the intel official demo,a SSD+mobilenet from tensorflow zoo and a Yolov3,so i can Eliminate environmental issues.
So the first time I try only .pb without any other parameters.
Error for shapes
>python mo.py --input_model maskrcnn20190505.pb --input_shape (1,384,384,3)
So i print all input nodes of the source code
Correct my code:
>python mo.py --input_model maskrcnn20190505.pb --input input_anchors,input_image,input_image_meta --input_shape (1,36828,4),(1,384,384,3),(1,17)
So the headache of the error appeared.
The question #38
I didn't get any tips from question 38,and have no way to sovle it.
Excuse me Is it wrong with my steps in the process, or missing some necessary operations? Or the optimizer does not support the keras model only supports TensorFlow zoo?
Or other ways to achieve my task.
Humbly ask for help
For more complete information about compiler optimizations, see our Optimization Notice.