[OpenCV] Fastest algorithm to find & follow a face
Hi,
I need to find the biggest face and then follow its position (in a video stream).
I looked into OpenCV 3's Git tree and the fastest algo I found was "Detection Based Tracking".
I'm worried that I missed similar algorithms so I am asking you: what is the fastest algorithm to find & follow a face?
Constraints: scale & rotation invariance is a must; OpenCL/GPU acceleration is a plus; lots of false-positives is OK.
9 comments · 100% upvoted · other discussions
The fastest technique is currently Microsoft's 3000 FPS face tracker. However, there is no publicly available implementation as far as I know. There is an implementation of the 1 millisecond technique from CVPR this year within the dlib package.
DeskJob 3 points · Sep 2014
It took a few weeks to implement the MS paper from scratch. It's pretty straight forward if you understand shape regressors although it needs improvement like the local trees associated for each landmark probably should use gradient boosting instead of being independent of each other. In general the facial features I get look a lot like their video, but if I include the facial outlines it's way jittery (notice their demo vid lacks them). My guess is their global linear approach is more sensitive to noisy landmarks like outlines.
Most people lack my super power of rapidly converting poorly written CVPR papers into implementations, so I'd go with the dlib package if I were you as it's generally the same idea with various improvements for speed.
Edit: Elaborated more details.
tom-md 1 points · Sep 2014
The PDF, for those too lazy to find it but with enough energy to read understand, implement, and open-source...
DeskJob 2 points · Sep 2014
In thinking about it more, these are facial aligner techniques which are great if you need to find landmarks on a person's face rapidly, but it's not what you're looking for.
They track an individual face really well if you reinitialize from the previous frame once you're detected the largest face, but once the face becomes occluded or is no longer forward facing the tracking is gone. They would be an excellent first step to a system that follows faces, but you'd still need a lot more work to reinitialize to that particular face.
davis685 3 points · Sep 2014
Sure, but it's trivial to make a high speed face tracker out of one so long as you have a decent single frame detector you can run every few frames. You could modify the face landmarking example program in dlib to do this with a few minutes of effort.
radioxid [OP] 1 points · Sep 2014
How would you go about doing the tracking?
I am new to dlib I am toying with it right now
davis685 1 points · Sep 2014
I would just check if the detection rectangles overlap from one frame to the next. At a reasonable frame rate a human face won't move very far. So if the boxes overlap then it's the same person.
Berecursive 2 points · Sep 2014
Absolutely, there is a distinct difference between face tracking, face detection and facial point localisation. Normally, facial tracking combines a combination of detection and localisation along with some sort of classifier that tries to gauge whether or not whatever you are currently tracking is correct (or at least some sort of threshold). I guess it depends on what you want. You could always use a very simple KLT tracker and hope that your chosen features aren't occluded out of view. IMHO, facial tracking is likely to payoff purely because you have prior knowledge of the tracked object (faces), so why not use an object specific model?