This sample demonstrates gvatrack element and object tracking capabilities on example of person and vehicle tracking. Object tracking increases performance by running inference on object detection and classification models less frequently (not every frame).
The sample utilizes GStreamer command-line tool gst-launch-1.0
which can build and run GStreamer pipeline described in a string format. The string contains a list of GStreamer elements separated by exclamation mark !
, each element may have properties specified in the format property
=value
.
The gvadetect
element sets inference-interval
property to 10 frames in this sample, so inference on object detection model executed every 10th frame.
The gvatrack
element inserted into pipeline after gvadetect
to track all objects on remaining 9 frames until object detection executed again.
The gvaclassify
element sets reclassify-interval
property to 10, so inference on object classification model executed every 10th frames. gvaclassify
uses unique object ID assigned by gvatrack
to each object for copying classification results on remaining 9 frames from last frame inference was executed.
Overall this sample builds GStreamer pipeline of the following elements
filesrc
or urisourcebin
or v4l2src
for input from file/URL/web-cameradecodebin
for video decodingvideoconvert
for converting video frame into different color formatsfpsdisplaysink
for rendering output video into screen NOTE:
sync=false
property infpsdisplaysink
element disables real-time synchronization so pipeline runs as fast as possible
The sample uses by default the following pre-trained models from OpenVINO™ Toolkit Open Model Zoo
NOTE: Before running samples (including this one), run script
download_models.sh
once (the script located insamples
top folder) to download all models required for this and other samples.
The sample contains model_proc
subfolder with .json files for each model with description of model input/output formats and post-processing rules for classification models.
The sample takes four command-line parameters:
rtsp://
) or other streaming source (ex http://
) urisourcebin
element) so requires internet conection.The sample