Project 5 / Face Detection with a Sliding Window

For this project the task was to create a program that could take in training data and detect objects based on that training data in new images. For this assignment in particular the goal was to find faces/heads.

To do this two sets of data were turned into sets of hisograms of gradients. These datasets were groups of images that matched the desired feature set and randomized "false" images that were then fed into a svm classifier that could be used to detect the object in future images.

To use this svm on a new image groups of pixels were taken from an image and given a confidence rating that it was in fact the object being looked for. Sliding a window over the image is the common way to think of what is happening for this process. Also for this assignment multiple sizes of pixels needed to be checked since faces could be large or small, mostly depending on whether they were in the foreground or background of an image. To do this simply the window sliding was done on multiple resized versions of the same image.

The parameters that could be tweaked were the lambda value for svm, though the default value in the skeleton code seemed to work the best after limited testing, and the cutoff of confidence for what defined a face. The results below where found with this cutoff being -0.1

Face template HoG visualization for the starter code. This is completely random, but it should actually look like a face once you train a reasonable classifier.

And now a couple of ones generated by my code:

Precision Recall curve for the starter code.

The precision curves coresponding to the HoG visualizations above:

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

Here are some results on the Argentina team with my code:

Here are some more results but on the class test set, with -0.1, 1 and 1.5 confidence thresholds: