Converting an ONNX Faster R-CNN Model¶
The instructions below are applicable only to the Faster R-CNN model converted to the ONNX file format from the maskrcnn-benchmark model :
Download the pretrained model file from onnx/models :
Generate the Intermediate Representation of the model, by changing your current working directory to the Model Optimizer installation directory, and running Model Optimizer with the following parameters:
mo \ --input_model FasterRCNN-10.onnx \ --input_shape [1,3,800,800] \ --input 0:2 \ --mean_values [102.9801,115.9465,122.7717] \ --transformations_config front/onnx/faster_rcnn.json
Be aware that the height and width specified with the
input_shape command line parameter could be different. For more information about supported input image dimensions and required pre- and post-processing steps, refer to the Faster R-CNN article.
Interpret the outputs of the generated IR: class indices, probabilities and box coordinates. Below are the outputs from the “DetectionOutput” layer: