Welcome back to the OpenVINO Channel
Let's run another cool demo.
In this demo you can see not only people detection, which is done frame by frame,
But also tracking and counting of these people across frames
This is not a real product, just a sample, But looking at the code will give you a good idea on how to get started.
And the usages are endless,
counting and tracking are fundamental capabilities for almost any application.
For this demo, I will use a simple video taken in a mall.
It's a free video downloaded from "Pexels Videos"
We will use one model for the detection of the people
And you will see the detected people in blue rectangles
frame after frame
We will use another model for the re-identification.
Basically, each of the detected persons will be compared to the person detected at the previous frames
A tracked, detected person will be marked by a red rectangle
And finally, We draw the tracking route of each of these people..
And this is what you see when you run the demo... all of them together.
Now , let's activate OpenVINO environment.
I will open a new directory And build the OpenVINO samples here
CMAKE. (/opt/intel/computer_vision_sdk/inference_engine/samples/)
And I will make only the sample I need,
pedestrian tracker demo (make pedestrian_tracker_demo)
Now I have my own version of this sample.. I can make changes and "Make" again..
Let's define the Intel models path
(export models=/opt/intel/computer_vision_sdk/deployment_tools/intel_models)
Running the sample is easy.. You can copy all the text from the transcript
-i is the input file could be a video or a set of images..
-m_det need to direct to the person detection model
-m_reid need to direct to the re-identification model
And it is working
There are few more parameters to play with.
run with -h or read the README file for the full explanation.
Go to the samples directory and look for it..
What is happening here is that at the beginning we are looking for people in each frame
This is done using the detection model
each person that is detected is marked with a Blue rectangle
On the next frame, and you can skip frames... if you use the -delay option..
The bounding box of this person is being used for re-identification.
If it's very easy, it's done using simple computer-vision techniques
If not, we are using the re-identification model
If detected and tracked again, this person is getting an ID.
this specific person with the yellow shirt is 25.. And you can see the trajectory of his movement..
If you'd like to get more information on the models we are using
Just navigate to the right directory
You can see here the 2 IR versions.. FP32 and FP16
Open the description folder, the HTML file to see the full details.
If you'd like to dig into the code, it's available
Navigate to the directory.. The main.cpp code is here.
And under SRC you can see how we implement the detector and the tracker..
Feel free to create your own version per need.
We saw how to run the pedestrian tracker demo..
A good example for a combination of detection, counting and tracking
Subscribe to our channel and we'll send you more videos like this one..
Thank you.