Summary
Steps to correct custom replacement description in JavaScript Object Notation (JSON) file with respect to the node names of the model
Description
- Successfully converted a custom Faster R-CNN TensorFlow model into IR.
- Generated a new Faster R-CNN TensorFlow model by modifying the previous model.
- Converted that new model into IR.
- Received error:
Failed to match nodes from custom replacement description with id 'ObjectDetectionAPIProposalReplacement'
It means model and custom replacement description are incompatible.
Try to correct custom replacement description according to documentation with respect to model node names.
Resolution
- Dump the input graph of the model.
mo --input_model=<MODEL.PB> --tensorboard_logdir=<TENSORBOARD_LOGDIR> - Visualize the input graph of the model in TensorBoard.
- tensorboard --logdir=<TENSORBOARD_LOGDIR>
- Copy and paste the output URL in the browser.
- Check whether all the node names in the JSON file match with the node names of the model. These node names are stated under the "start_points" and "end_points" of the "id: ObjectDetectionAPIProposalReplacement" in the JSON file.
- Modify the node names in the JSON file.
- Convert the model into IR with the command:
mo --input_model=<MODEL.PB> --transformations_config=<MODIFIED.JSON> --tensorflow_object_detection_api_pipeline_config=<PIPELINE.CONFIG> --input_shape=<INPUT_SHAPE> --output=detection_scores,detection_boxes,num_detections --input=image_tensor --reverse_input_channels