These are the face-tools, a suite of tools for face detection and face
recognition.

1) Table of contents:
=====================
2) Installation
3) Prerequisites
4) Usage
5) Exporting
6) LICENSE

2) Installation
===============
Drop the executables (face_find face_learn face_sort face2fspot
check_dups) to somewhere in your $PATH, and the man-pages (*.1) to
someplace in your $MANPATH.

The executables are Python scripts packed with squeeze
(http://effbot.org/zone/squeeze.htm), so you need Python to run
those.  You will also need at least the following Python packages:

3) Prerequisites
================
python-opencv: The SWIG Python Interface which came with opencv before
               release 2.2, or the new python interface, and of course
               a matching opencv.  Note that different versions of
               OpenCV will find different faces (with 1.x giving
               better results), but all ought to work somewhat
               acceptable.
pca_module:    Get this from http://folk.uio.no/henninri/pca_module/
PIL:           The Python Imaging Library.  Get this from
               http://www.pythonware.com/products/pil/
numpy:         get this from http://numpy.scipy.org/
pylab:         get this from http://www.scipy.org/PyLab

The following works to install all needed prerequisites on Ubuntu 8.04
and Ubuntu 10.10 (and presumably all versions in between):

# install most dependencies
sudo apt-get install python-opencv opencv-doc libcv-dev python-imaging python-imaging-tk python-numpy python-matplotlib python-dev unrar wget
# change to /tmp directory
cd /tmp
# get pca_module...
wget http://folk.uio.no/henninri/pca_module/pca_module-1.1.02.rar
# ...and unpack it
unrar x pca_module-1.1.02.rar
# change into that directory
cd pca_module-1.1.02
# change old_numeric to false in line 18
$VISUAL setup.py
# if using any Python version other than 2.5, change line 11
$VISUAL src/numpy_version/nipals.c
# compile...
python setup.py build
# ...and install
sudo python setup.py install

4) Usage
========
a) Call "face_find -r" on the directory(s) containing all your images.
   Go away for a long time...
   Actually, if all your images are 10MP or bigger, you might want to
   try '-s 2' or, on even bigger images, '-s 4', which will find only
   faces that are at least 40x40 or 80x80 pixels square, respectively.
   This will be much faster and find much less crud, but also,
   unfortunately, might miss some (very few) faces.
b) Call "face_learn".  Go away some more.
c) Call "face_sort".  Try to weed out as many of your non-face images
   as possible.
d) Call "face_learn" again.
e) Call "face_sort" again, labelling the remaining face-images.

5) Exporting
============
Included you will find an exporter to F-Spot (face2fspot), which was
tested on database Versions 14 and 18, but ought to work for most
versions between 7 and 18.  You will also find an exporter API in
faceDB.py, on which you can base your own exporters.  If you do write
your own exporter, I would appreciate if you would be willing to have
this included in future versions; if you need an exporter but find you
are unable to roll your own, please don't hesitate to contact me at
<bugs@svenutcke.de>


6) LICENSE:
===========
You CAN use this
You CAN distribute this
You MUST NOT modify this (except for faceDB.py, but consider importing
                          it instead)

This is alpha code.  It works for me, but will probably fry your
harddisk.  use at your own risk.  You have been warned.  Do not blame
me.  But let me know what you think (good or bad):

             Sven Utcke <bugs@svenutcke.de>

