FaceRecognizer debug & enhance

Ok pushed a test I can reproduce when needed. Goal is to debug and enhance FaceRecognizer filter.

First report  :

Inside this test there are 4 faces. 3 of those faces are correctly parsed by cascade classifiers.

2 faces was trained ( Ryan + Rachel )



Script : https://github.com/MyRobotLab/pyrobotlab/blob/develop/home/moz4r/Test/Fa...

#file : home/moz4r/Test/FaceRecognizer.py edit raw
opencv = Runtime.start("opencv","OpenCV")

Python = Runtime.start("Python","Python")

Python.subscribe("opencv", "publishRecognizedFace")
def onRecognizedFace(name):


#### LKOpticalTrack ####################
# experiment with Lucas Kanade optical flow/tracking
# adds the filter and one tracking point

2 problems :

1 clear face is not parsed ( nok-test2.jpg ).

1 face ( OK-test1.jpg is reconized as Ryan a previous trainded face. This guy is not ryan ( tested with other faces too, it seem something is forced when the classifier detect a no trained face.

Ideas ?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kwatters's picture

nice video!

Moz4r, fantastic video!  You've got it basically all working.  There are some keys to how the current face recognition works.

1. as you know, you need at least 2 faces trained before it will recognize anyone.

2. it will always guess the face based on who it knows.  It does not have a concept of an unknown person.

3. face recognition only occurs when both the eyes , mouth , and a face is detected.  This is pretty strict, we could relax this.

So, it's not that face recognition is broken, it's just that , I think , we want it to work better :)

The original implementation that we did (with scruffybob's help) is very strict and doesn't attempt to make a face recognition prediction until it's very very confident that it's seen a face.  This is a decision that favors "precision" over "recall".  

the idea is that it will only predict a face being recognized in a very conservative manor, we can relax this requirement and in a way, I think that's probably a good idea....  maybe we could require a very strict match for training, and a looser match for recognition... 

That's one issue that you're probably seeing, the second issue is there is no concept of an unknown face with the current face recognition algorithm and I think that problem needs a bit more thought...