Converting a TensorFlow RetinaNet Model

This tutorial explains how to convert a RetinaNet model to the Intermediate Representation (IR).

Public RetinaNet model does not contain pretrained TensorFlow weights. To convert this model to the TensorFlow format, follow the Reproduce Keras to TensorFlow Conversion tutorial.

After converting the model to TensorFlow format, run the Model Optimizer command below:

mo --input "input_1[1,1333,1333,3]" --input_model retinanet_resnet50_coco_best_v2.1.0.pb --transformations_config front/tf/retinanet.json

Where transformations_config command-line parameter specifies the configuration json file containing model conversion hints for the Model Optimizer. The json file contains some parameters that need to be changed if you train the model yourself. It also contains information on how to match endpoints to replace the subgraph nodes. After the model is converted to the OpenVINO IR format, the output nodes will be replaced with DetectionOutput layer.