This sample demonstrates how to do inference of object detection networks using Synchronous Inference Request API.
Models with 1 input and 1 or 2 outputs are supported.
In the last case names of output blobs must be "boxes" and "labels".
The following Inference Engine Python API is used in the application:
|Custom Extension Kernels||IECore.add_extension, IECore.set_config||Load extension library and config to the device|
Basic Inference Engine API is covered by Hello Classification Python* Sample.
|Validated Models||mobilenet-ssd, face-detection-0206|
|Model Format||Inference Engine Intermediate Representation (.xml + .bin), ONNX (.onnx)|
|Other language realization||C++, C|
On startup, the sample application reads command-line parameters, prepares input data, loads a specified model and image to the Inference Engine plugin, performs synchronous inference, and processes output data.
As a result, the program creates an output image, logging each step in a standard output stream.
You can see the explicit description of each sample step at Integration Steps section of "Integrate the Inference Engine with Your Application" guide.
Run the application with the
-h option to see the usage message:
To run the sample, you need specify a model and image:
- By default, Inference Engine samples and demos expect input with BGR channels order. If you trained your model to work with RGB order, you need to manually rearrange the default channels order in the sample or demo application or reconvert your model using the Model Optimizer tool with
--reverse_input_channelsargument specified. For more information about the argument, refer to When to Reverse Input Channels section of Converting a Model Using General Conversion Parameters.
- Before running the sample with a trained model, make sure the model is converted to the Inference Engine format (*.xml + *.bin) using the Model Optimizer tool.
- The sample accepts models in ONNX format (.onnx) that do not require preprocessing.
mobilenet-ssdmodel on a
GPU, for example:
The sample application logs each step in a standard output stream and creates an output image, drawing bounding boxes for inference results with an over 50% confidence.