Face_rec is an application of what we call biometric filters, but what is more appropriately image/video filters in general.
It comes with a number of modular interchangeable filters that can be used for a simple facial recognizer. The filters can be compiled to be either statically or dynamically linked into a program very quickly and easily.
GUI:We have also included a GUI interface to these filters. It allows you, the user to reorder and rearrange the various filters and customize their various options.Doing this you can discover which settings work best for the particular application that you are using.After this, integrating it into a custom only takes a few lines of code.
Custom Filters: can also be integrated into the rest of the filters fairly simply by sub-classing Filter, see the automatically generated documentation under the docs by typing make doc.
Installing: Installing this is not that complicated, unfortunately we did not have time to write a configuration script for the program, hence any tuning of the application will have to be done by editing the make file, but it should be fairly straight forward to do so. The current iteration uses GTK+2.0 and ImageMagick but every filter is equipped with the ability to be compiled without these installed. If they are already installed and you are running on an x-86 machine just type
To compile the basic face_rec program
To generate the documentation
No make install as of yet, but we are working on ityou are running on another architecture then you need to recompile the libannie.a Annie is an artificial neural network that we use for two of the filters. It is open source and can be found at
Most versions should work but we compiled using version .5
To get Annie to work you need to download it and run make lib then copy the libannie.a into our lib directory. If it is a different version then version .5 you should also copy all of the .h files in Annie's include directory to include/annie.
If you do not have or do not wish to use Image Magick everything may be compiled without it. The code will default to using libjpeg.a. This will restrict the current version to only using jpeg images. In order to modify the make file to do this simply go into the make file and change the following lines
MAGECFLAGS = `Magickconfig --cxxflags --cppflags` #-DNO_MAGCIK
MAGELDFLAGS = `Magickconfig --ldflags --libs`
MAGECFLAGS = -DNO_MAGCIK
#IMAGELDFLAGS = `Magickconfig --ldflags --libs`
You also will need to place a version of libjpeg.a in the lib directory
If you don't wish to use the GUI, then the GUI face_rec that we have included will not compile. However each of the filters still will compile and can be compiled by directly entering their names as arguments to make.
Each filter has three flags
-DNO_GUI removes all references to GTK+2.0
-NO_MAGICK removes t's dependence on ImageMagick, but requires that libjpeg.a be linked in.
-DDYNAMIC_LINK includes two c functions into the build for each filter that allows them to be linked into .so files and loaded through them. One of the functions uses GTK+2.0 and returns an icon that represents the filter this is also removed by the -NO_GUI flag. The other is a function that returns a Filter * that points to that filter.
Filters: We have included several different filters a flesh tone locater, two different face locator's, a neural network and an Ada-Boost one, this is based off of the work done by Viola. We also have a voter, which combines possible faces together and filters them. We have two eye locators, one is statistical, and the other uses a neural network. Finally we have a face recognizer that uses eigen-faces to do its recognition. We have also included an output filter that shows the results of each stage graphically, when compiles with GTK+2.0 or prints out the results to std-out. There is also an input filter, which can initialize a frame of an image to be sent to all of the other filters. It can read video files and will send subsequent frames on each call to its filter_frame method, if compiled with Image Magick. Unfortunately the face_rec GUI is not threaded as have yet and hence even though it can run on a video file the results are not updated to the screen until the complete image/video has finished running. But video does work.
License: This code is released for academic use only, however we have no qualms about you using our code. Colorado State University, csu, does. The csu code is contained in the csu directory and the include/csu directory. It is used for the face recognizer. If you wish to either not use the recognizer or write your own then you can delete that code from the project and, modify the make file slightly, then you can use the rest how you would like. We distribute this code with no warranty what so ever written or implied use it at your own risk. We would however like to be given credit when our code is used.
PS sorry if the documentation isn't the greatest yet. We put this together for our senior project at the University of Utah. we hope to be able to go back and document it better but that is no reason not to release it