Project 5 / Face Detection with a Sliding Window

In this project, we approached face recognition with a sliding window based recognizer. This involved 3 parts, creating training data, a classifier, and the sliding window based detector. The first portion of this was straightforward, taking and hogging training samples and a random assortment of image patches from other images.

The second stage was training a classifier, which was also quite simple, a basic linear svm was very straightforward. No surprises here.

The final part was the run detector. For this, I began with a basic implementation with no scale invariance. This was done by simply transitioning the image to hog-space and sliding a window over it. With 10000 negative samples, a 6 pixel cell size, and no rescaling, this was capable of gettign about 45% accuracy.

With the addition of scale invariance, via a downscaling of the test image size, the accuracy increases to over 80%, and with additionally a 3 pixel size and 10000 more negative samples, we arrived at the final accuracy of over 93%.

The HOG visualization very clearly looks like a face. You can see the outline and the shape of the eyes and mouth quite clearly.

The precision-recall curve looks very good.

Example of detection on the test set from the starter code.

There is a high false-negative rate because the cutoff I used was only -1. Originally I used -2 and this led to a huge number of false negatives, in some cases, a comically high number of false negatives, in some cases tiling the entire image with negative samples.