The Faceinator

Detecting faces is hard!

Detecting a face with with a fully analog device is even harder-and to the best of our knowledge, not done before!

The Facinator, an analog face detector based on the Viola-Jones face detection algrithem

The Facinator, an analog face detector based on the Viola-Jones face detection algrithem

The Faceinator is a collaboration with Eran Weissenstern for the course "Sensor Technologies For interactive environments". Our plan was to build a fully analog face detector based on the Viola Jones face detection framework: ”Robust Real-Time Face Detection” International Journal of Computer Vision 57(2), 137–154, 2004.

The V&J algorithm looks for 4 feature types existing in all faces. The features are simple, so real-time face recognition is made possible. Two features (eyes region, nose region) are enough to detect 100% of faces (& ~50% false positives) and so we decided to keep our system simple and implement only 2 features with a 2X3 array of photodiodes

Am Example of the Viola-Jones Features B (resembling the eye region) and C (resembling the nose bridge, on my surprised face

Am Example of the Viola-Jones Features B (resembling the eye region) and C (resembling the nose bridge, on my surprised face

 
The good looking yet wrong implementation of the device

The good looking yet wrong implementation of the device

Each photodiode is treated as a pixel. “Black regions”, or areas where little light is present, are essentially pixels of low voltage. These will be subtracted from “white”  or high voltage regions using a subtracting differential amplifier to obtain a  specific voltage. This essentially gives a single number 0-255 which is the score of each Viola Jones feature.

Summing of the different “pixels” is done according to the Viola-Jones features B (resembling the eye region) and C (resembling the nose bridge), where each photodiode correspond to a summed area of pixels. This resulting voltage is compared to a preset reference voltage (using a comparator circuit) which had determined if an image has passed the first viola jones test, outputting high or low, based on the test outcome. 

An AND gate was used to check if both tests are satisfied. If so, the resulting voltage output will light up an LED to indicate that it has detected a face.

( note that there is a mistake in this design of the summing amplifier... this resulted in some very strange artifacts, but will be changed in future designs ) 

 

 

 

The system was made of three stackable layers, making components easy to replace and the design modular:

The sensing layer - responsible for generating the signal from an array of photodiodes.

The computation layer-responsible for do all the computing needed in order to sum and subtract the different voltages

The illumination layer (not shown here)-responsible for illuminating the target with IR light and creating a "high contrast" image (chosen due to the photodiode's sensitivity to this wavelength) 

 

Screen Shot 2018-05-21 at 12.45.01 AM.png

The Facinator is designed to be self-contained, but in order to see what the Faceinator “sees”, we designed its output ports to fit the Arduino’s analog ports.

We used Processing to see the features “seen” by the Faceinator, and the result of the computations. 

Some of the code and rather flimsy documentation of the project can be found here

Screen Shot 2018-05-21 at 12.45.47 AM.png

Some more pictures from the process:

 

And a few videos of the prototype at work