Thursday, October 25, 2007

BSD-licensed Face Recognition Software

Curious as I am, I just tried to find some free software face recognition source code around the web. Among the two projects I found (one being very crude, unmaintained old C++ code), the Machine Perception Toolbox was the most interesting and advanced library, licensed under a BSD-style license.

On Debian, you have to install the "bjam" package, modify the "boost-build/user-config.jam" file (put "using darwin;" in comments and comment-out "using gcc;"). Then, cd into "Apps/unix/mpisearch" and simply run "bjam" (it's a make-like thingamoob). The resulting binary can be found in "bin/gcc/debug/optimization-speed/mpisearch", and you can simply call it with an image file as argument which will be processed and the result displayed on your X server. You might have to install the Magick++ development packages if compilation fails and fix some namespace problems in the C++ code (quite obvious after Googling for the error message).

The source code for the "mpisearch" is in "Apps/unix/mpisearch/main.cc", and it's very easy to understand, so you can modify the code to fit your needs (e.g. make it output the coordinates of the "face" rectangles and then parse the command's output in your scripts, etc..). Maybe that would be an interesting feature to add to photo websites :)

No comments: