source: foam/trunk/faceident/README @ 89

Revision 89, 2.8 KB checked in by dave, 10 years ago (diff)

renamed faceident as it's not so simple these days

Line 
1Simple Face Identification
2--------------------------
3
4A simple approach to face identification, built on top of OpenCV and given a
5YARP network interface.
6
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.
11
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
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:
17
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
21
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
26/faceident-ctrl "detect"                        Switch to detection mode
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
30/faceident-ctrl "idle"                          Switch to idle mode, mostly frees up cpu
31/faceident-ctrl "multiimages" 1/0               Turn on or off multiple images per face, experimental
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)
35
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
38multiple sessions.
39
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:
53/usr/local/share/opencv/haarcascades/haarcascade_frontalface_alt.xml
54
55Todo:
56* Try normalised cross correlation instead of image differencing
57* Expose image size via yarp
58
59Questions to:
60
61dave@fo.am
62
Note: See TracBrowser for help on using the repository browser.