The goal of this project is to train a classifier to detect faces in an image. To accomplish this goal we use a "sliding window" model that trains a SVM on SIFT features extracted from labeled image crops. The classifier uses a cascading architecture that retrains on hard negatives to decrease the false positive rate.
There are several different parameters that can be tweaked in this assignment:
Preliminary tests show that use of the HoG descriptor leads to significant performance gains over the SIFT descriptor. (Using only hard negatives HoG gave a 7% increase over the SIFT baseline.) Unfortunately MATLAB ran out of memory when I used the HoG descriptor with the lowest settings, so I'll be referring to SIFT results for the rest of this writeup.
Once I tweaked the non-linear classifier correctly, it consistently outperformed the linear classifier. However, the non-linear classifier took longer to run. I had to change the values of sigma and lambda to get the non-linear classifier to work properly; previously it decreased accuracy.
I eventually settled on training the classifier on hard negatives for three iterations. After three iterations there were minimal performance gains but the algorithm took significantly longer to run.
SIFT features, linear, no hard negatives, step size = 4, initial_scale = 1.5, start_scale=3
HOG features, linear, no hard negatives, step size = 2, initial_scale = 1.2, start_scale=2
SIFT features, linear, no hard negatives, step size = 2, initial_scale = 1.2, start_scale=2
SIFT features, linear, hard negatives, step size = 2, initial_scale = 1.2, start_scale=2
SIFT features, non-linear, hard negatives, step size = 2, initial_scale = 1.2, start_scale=2
(best result)
I received significant help on this project from a few classmates. Paul Sastrasinh gave me advice about how to fix my hard negatives and let me use the HoG descriptor he made. Nathan Malkin showed me how to use the get_img_feats function to speed up the pipeline. Finally, Tala Huhe suggested that I visualize the SVM kernel to determine the correct constants.