Welcome back to the OpenVINO channel​
In video 48 we introduced the Deep Learning-streamer..​
The DL streamer is a component of the OpenVINO toolkit​
It allow you to easily build full video-analytic pipelines in multiple ways..​
Get an input video file or a camera or RTSP feed​
Decode, prepare for inference
Run detection, classification, ​
Overlay the results, and so on..​
Each of this pipeline stages is executed on every frame,
so we are executing the inference which is a pretty heavy operation on all the frames​
But the objects, are not moving that fast…​
And it is pretty obvious that this is the same taxi in all these frames​
So If I could detect that taxi on frame 0, and track it using less
expensive operations on the next frames, I can save many inference operations..​
In general,​
Many operations do not need every frame detection.​
For example if you are performing smile detection, it is obvious that a smile
takes much more than a few milliseconds.. ​ So no need to detect smile on every frame..​
​So in this example., I can run inference detection on every 5 frames for example,
and in between I can just track the objects
Taking this pipeline for example
The decode stage is streaming frames one after the other​
gvaDetect on every frame​
And gvaClassify on every frame
So many operations, done on every frame ​
One after the other​
But I can skip detections using inference-interval..
Here I’m running inference only on every 6th frame​
And I can skipp classification, here I classify only every 4th frame..​
And I can compensate using the gvaTrack.. By tracking between frames.​
Basically, gvaTrack will track every object detected, until it will get a
new set of objects..​ Let’s see it working​
As always, initialize OpenVINO​ and go to the DL-streamer sample directory​
You have to run the download-models script ​
Let’s got to the vehicle and pedestrians tracking sample..​
Let’s look inside​
You can see here that the detection interval are set to 10 by default​
So inference every 10th frame​
Here is the actual Gstreamer pipeline​
And you can see here the gvaTrack, the tracking between the detection and the classification​
And I’m going to remove these 2 lines..​ So yes, we will start with no tracking !!!​
Let’s run the sample with parameter 1. meaning inference every frame ​
And you can see good detection. On all the vehicles..​
Moving to 10​ Inference on every 10th frame, ​
And to 30,​
And you can see that only once a second I’m getting results..​
Now let’s get the tracking back​ And re-run the sample
with inference only on 30th frame..​
And you can see that the tracking is completing the detection between the frames..​
Pretty cool,​ We have just seen
how with the DL-streamer tracking we can reduce significantly
the amount of required inferences, ​ Without compromising on the final
application results..​ enjoy it​
Thank you​