Monday, December 05, 2011

An accidental face detector

Disclaimer #1: I don't specialize in faces.  When it comes to learning, I like my objectives to be convex.  When it comes to hacking on vision systems, I like to tackle entry-level object categories.

Fun fact #1: Faces are probably the easiest objects in the world for a machine to localize/detect/recognize.

Note #1: I supplied the images, my algorithm supplied the red boxes.

Note #2: Sorry to all my friends who failed to get detected by my accidental face detector! (see below)

So I was hackplaying with some of my PhD thesis code over Thanksgiving, and I accidentally made a face detector.  oops!  I immediately ran to my screenshot capture tool and ran my code on my Mac desktop while browsing Google Images and Facebook.  It seems to work pretty well on real faces as well as sketches/paintings of faces (see below)!  I even caught two Berkeleyites (an Alyosha and a Jianbo), but you gotta find them for yourself.  The detector is definitely tuned to frontal faces, but runs pretty fast and produces few false positives.  Not too shabby for some midnight hackerdom.

Yes, I'm doing dense multiscale sliding windows here.  Yes, I'm HoGGing the hell outta these images. Yes, I'm using a single frontal-face tuned template.  And yes, I only used faces of myself to train this accidental face detector.

Note: If I've used one of your pictures without permission, and you would like a link back to your home on the interwebs, please leave a comment indicating the image and link to original.


  1. Accidents happen!

    The face detector depicted above never got to see any non-Tomasz faces, so learned focused on separating me from non-face background patters in the office and home environment.

    If I had given the system additional non-Tomasz faces as negative data, perhaps the detector would have been more fine-tuned to my own face and would only detect me. Currently, the highest scoring detections aren't always my own face.

  2. Hi Tomasz,

    I see with the use of HOG (also in PFF's part-based parsing), the detection result's rectangle is always bigger than the actual object.

    Btw, that is one cool accident :D, i can't wait to see your detector works on single face (e.g. yours only). probably searching in a historical collection of image and see if it can detect a person in various ages.