source: level2/competencies/FaceIdent/README @ 234

Revision 203, 2.8 KB checked in by dave, 11 years ago (diff)

added ExpressionRecog?

RevLine 
[1]1Simple Face Identification
2--------------------------
3
[36]4A simple approach to face identification, built on top of OpenCV and given a
5YARP network interface.
[14]6
[36]7The program has two modes of operation. The first is calibration, where each
8user must show their face to the camera separately - press the number keys to
9assign each user with a different ID. You can see which face is mapped to
10which ID at the bottom of the window.
[14]11
[36]12The second mode of operation is face detection, where each visible detected
13face is given an ID based on it's closest match (within a given error
14threshold) with the faces recorded during calibration. The boxes drawn around
[84]15the faces display the closest matched image, the id and confidence value of the
16match. When in this mode the program sends the following YARP messages:
[1]17
[59]18Output port     Bottle contents                 Meaning
19/faceident          "user appeared" ID confidence   A user has entered the view of the camera
20/faceident          "user disappeared" ID           The user has left the camera view
[1]21
[59]22You can also drive the program via yarp with the following input messages:
23
24Input port      Bottle contents                 Meaning
25/faceident-ctrl "train" ID                      Train for this user
[62]26/faceident-ctrl "detect"                        Switch to detection mode
[59]27/faceident-ctrl "save" sessionname              Save the detected faces
28/faceident-ctrl "load" sessionname              Load previously detected faces
29/faceident-ctrl "clear"                         Clears all faces
[62]30/faceident-ctrl "idle"                          Switch to idle mode, mostly frees up cpu
[76]31/faceident-ctrl "multiimages" 1/0               Turn on or off multiple images per face, experimental
[84]32/faceident-ctrl "errorthresh" value             Set the error threshold (default 0.2)
33/faceident-ctrl "newimagethresh" value          Set the threshold greater than which new images are
34                                                stored in training (default 0.1)
[59]35
[84]36Faces are saved in png format along with a xml file to map them to id numbers. The sessionname
37will be prepended onto the filenames for the xml file and the image files, so you can save
[59]38multiple sessions.
39
[36]40Key                 Meaning
410-9 number keys     Calibrate a given id against a face in the scene
42d                   Start detect mode, which will send YARP messages
43c                   Clear all faces in the database
44
45Requires: OpenCV, YARP
46
47Written and tested on Linux, but it should work in Windows too. At the moment
48you'll probably have to run it with:
49
50simple-faceident -cascade=/path/to/haarcascade_frontalface_alt.xml
51
52In order to find OpenCV's data, on my machine it's in:
[1]53/usr/local/share/opencv/haarcascades/haarcascade_frontalface_alt.xml
54
55Todo:
56* Try normalised cross correlation instead of image differencing
[84]57* Expose image size via yarp
[1]58
59Questions to:
60
61dave@fo.am
62
Note: See TracBrowser for help on using the repository browser.