Which Republican Are You?

Last year at Washington, D.C.’s 17th Street Festival, I set up an exhibit that used facial recognition software to compare visitors to famous republicans.

Photographer John Johnson took a photo of each visitor. The system used Face.com to compare against a set of about 50 prominent republicans. A few seconds later, the lookalike appeared.

The system used an algorithm at Face.com to compare each face. My script grabbed the visitor’s photo, sent it to face.com for analysis, and displayed the results on a monitor a few seconds later. It was a public exhibition, but really just a web page, running full-screen, using MySQL to store the data.

The face.com API returns information about the location of the face in the photo, possible matches against the predetermined dataset, the predicted gender (and confidence level), the predicted amount of smiling or frowning, and whether the person is wearing glasses.

There are other systems for facial recognition and comparison (like Matlab and OpenCV for developers, or Picasa or iPhoto for consumers), but the face.com one made it easy for a PHP coder like me to put this together.

Sometimes it did pretty well:

Sometimes it paid more attention to facial structure than gender:

Sometimes the results were spot-on:

How does it do with drag queens?

 

Since we had an analysis of a couple hundred visitors, another monitor displayed groupings of those photos, screensaver-style.

 

Here are the day’s most prominent smilers, as measured by the system:

 

And the day’s biggest frowners:

 

The most masculine visitors:

 

And the most feminine (notice the little boy, top right):