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
gvadetect element sets
inference-interval property to 10 frames in this sample, so inference on object detection model executed every 10th frame.
gvatrack element inserted into pipeline after
gvadetect to track all objects on remaining 9 frames until object detection executed again.
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
v4l2srcfor input from file/URL/web-camera
decodebinfor video decoding
videoconvertfor converting video frame into different color formats
fpsdisplaysinkfor rendering output video into screen
fpsdisplaysinkelement 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.shonce (the script located in
samplestop 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 three command-line parameters:
rtsp://) or other streaming source (ex