I used Haar cascade to detect faces on camera.
It gives back coordinates of rectangles where face is detected.
I saved the data along with time stamp in below manner:
Now i want to get some pattern through which i can come to know how many people watched the advertisement for what duration.
Please suggest how can i get some pattern of these trailing faces coordinates.
Looks like a great start!
You can use a motion tracking solution such as this one: https://github.com/bendidi/Tracking-with-darkflow with a few customizations to output how many people and for how long where watching the advertisement.
We have trained some teams of data scientists for this exact use case at textvox.ai.
What does the time stamp say? when the face was detected on camera? if so
do you have data on when the face got undetected from the time it got detected? this might give you the duration the face was in camera.
With this maybe you can assume the duration means that they watched the adds