miya schneider (mmschnei)
This project was completed for CSCI1430: Computational Vision, taught by James Hays at Brown University. This goal of this project was to create a face detection system using a sliding window model and one of two classifiers: linear (based on the work by Dalal and Triggs in 2005) or non-linear (based on the work by Viola and Jones in 2001). Aspects of the detector that I implemented are described further below.
The purpose of mining for hard negatives was improve the accuracy of the classifier by learning what crops to avoid (the classifier learns to avoid more false positives). To implement this, for each image in a set of non-face scenes, I sampled false positives (up to 10 per image), until 1000 false positives were gathered. I then fed these to my classifier.
I chose to use a HOG descriptor (histogram of oriented gradients) for the feature representation. I experimented with the binning schema, using the default settings initially. I experimented with bin sizes and decided on 16 histogram bins and 16 HOG windows per bound box, for a total feature dimensionality of 256. With a lower dimensionality, the accuracy was not as high, and with a higher dimensionality, the accuracy was higher at the expense of run-time.
Much of the time I spent on this project I devoted to modifying parameters in order to obtain the best results (within a reasonable amount of time).
With my final suite of parameters (detailed above), I ran tests with both the linear and non-linear classifiers. The accuracy of both tests are summarized below. The non-linear classifier clearly out-performed the linear classifier, but took more time, as was expected.
Prior to implementing hard negatives, I ran the code using random negatives and found that the baseline was somewhere between 20 and 30 percent accuracy. From the tables below, it is clear that the use of hard negatives made a significant improvement on the accuracy.
accuracy | true positives | false positives | true negatives | false negatives | |
---|---|---|---|---|---|
linear | 0.621 | 0.477 | 0.004 | 0.496 | 0.022 |
non-linear | 0.690 | 0.492 | 0.002 | 0.498 | 0.007 |