FACE DETECTOR

In this project, I worked on a face detector that has 2 core classes: A classifier and a detector.
The classifier trains a set of images (positive and negative) by extracting their HOG (Histogram of Oriented Gradients) features and using a support vector machine (SVM). The detector takes a test image and detects faces in that image in multiple scales (pyramid images), then applies non-maximum suppression to remove overlapping detections.

The classifier was trained using both positive (human faces) and negative images (anything else). For testing the detector, I used images of celebrity faces. It was able to consistently detect the faces (it draws a rectangle around the detected area).

In some cases, the detector fails to detect a face; typically when the face is tilted at an angle or partially covered by hands. It also fails when the image is blurry.

I also tested the face detector on negative images, such as animal faces (mostly cats and apes). It did not recognize them as valid faces, which is the desirable outcome since I only trained the classifier on human faces.

The detector worked best with front faces of adults. Baby faces were not detected most of the time.
The face detector was able to detect human faces with an F1-measure of 0.875.