This demo showcases Object Detection with CenterNet. The task is to identify objects as axis-aligned boxes in an image. CenterNet models an object as a single point - the center point of its bounding box and uses keypoint estimation to find center points and regresses to object size. The same approach is used to estimate 3D bounding box and pose.
How It Works
On the start-up, the application reads command-line parameters and loads a network to the Inference Engine. Upon getting a frame from the OpenCV VideoCapture, it performs inference and displays the results.
Running the application with the
-h option yields the following usage message:
usage: object_detection_demo_centernet.py [-h] -m MODEL [-i INPUT [INPUT ...]]
[-d DEVICE] [--labels LABELS]
[-pt PROB_THRESHOLD] [--no_show]
-h, --help Show this help message and exit.
-m MODEL, --model MODEL
Required. Path to an .xml file with a trained model.
-i INPUT [INPUT ...], --input INPUT [INPUT ...]
path to video or image/images
-d DEVICE, --device DEVICE
Optional. Specify the target device to infer on; CPU,
GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will
look for a suitable plugin for device specified.
Default value is CPU
--labels LABELS Optional. Path to labels mapping file
-pt PROB_THRESHOLD, --prob_threshold PROB_THRESHOLD
Optional. Probability threshold for detections
--no_show Optional. Don't show output
-u UTILIZATION_MONITORS, --utilization_monitors UTILIZATION_MONITORS
Optional. List of monitors to show initially.
To run the demo, you can use public or pre-trained models. You can download the pre-trained models with the OpenVINO Model Downloader or from https://download.01.org/opencv/.
NOTE: Before running the demo with a trained model, make sure the model is converted to the Inference Engine format (*.xml + *.bin) using the Model Optimizer tool.
The demo uses OpenCV to display the resulting frame with detections (rendered as bounding boxes and labels, if provided) and reports performance in the following format: summary inference FPS.