screenshot | download | report/manual (to appear)


FaceDetect is a matlab script for detecting faces in passport images. The idea is that if you need a simple way to detect the faces (in terms of eye locations), you can first run facedetect and then browse through the results to manually correct the mistakes (by making a note of which images has failed and then correcting them with your preferred image browser). If you have a set of passport images (or other kinds of face images) in /data/faces/ and you want the results in /data/detectedfaces/ (and both directories exist and have the proper permissions of course) this is accomplished by the following command sequence:
$ wget http://www.hig.no/~erikh/projects/facedetect/facedetect-0.1.tgz
$ tar zxvf facedetect-0.1.tgz
$ cd facedetect
$ matlab -nojvm
>> facedetect('/data/faces/','/data/detectedfaces/')
Scanning image ...
>> browseface('/data/detectedfaces/',2)
NOTE: I highly recommend resizing input images to no more than 150 by 150 pixels before applying facedetect since its very slow... (can take a few minutes for each image)

Feel free to use this code how you like, let me know if its useful for you.


First release, not sure if I will continue work on this.

Some possible improvements

  • Complete merging heuristics etc
  • Include slight rotations
  • After detection, append an additional eye search at each eye location
  • Attempt a cluster of templates instead of a single template
  • Use a PPCA detector instead
  • Include parameter for visualizing the process (--verbose :)
    (actually did this, here is a sample video I made and a video showing some of the variability in faces)
  • Add parameter 'passport' or 'general' ('singleface' or 'multiface')
  • Measure results on xm2vts for single face and MIT/CMU for multiface

Back to homepage