CSE327 HW2 : Face Detector


Part 1

For my second project in CSE 327 Image Processing, I build a face detector. I did this by adapting MatLab code provided by Prof Alex Berg.

The algorithm I used for the detector is to delegate to an SVM. SVM stands for Support Vector Machine. A Support Vector Machine is a 2 class linear(originally) classifier.

We have 299 face examples. We have 1500 non face examples. 625 dimensional feature vectors were extracted from said images.

The SVM is trained. The SVM is validated with examples that were held back from the training.

The accuracy was fair to begin with. I tried to adjusting parameters of the SVN to see if I could change the accuracy.

I started with an RBF (Radial Basis Function), which is a non linear classifier. The error rate was about 1 in 5. So, it's pretty high.

I ended with a Linear Classifier, which has an error rate of about 1 in 70. So, it's more than 10 times better.

Both classifiers turn out to be very conservative with a Type I Error rate of 0. Their sole contribution of error is due to there Type II error (False Negatives).

Part 2

For Part 2, I am to make it find faces anywhere in the picture by using a sliding window.

With the help of Professor Berg, I learned that my interpretation of the better linear classifier was nonsense. It didn't take much to figure out that by adjusting the RBF parameter for g to 0.2 it worked well.

Nevertheless, getting the sliding window to detect any of the people proved challenging. I changed the center dot to a 4-corner dot so I could see what was happening.

While this helped, it didn't help enough. The training data was inadequate. With time running out I forced it to work. I used face pictures from the target to make it happen.

Then the detector had no choice but to find the image.

Part 3

For Part 3, I have to make everything work. Detect all the faces in the image.

Continuing with my theme I added faces from the target image. Strangely enough this worked but only to a point.

I was only ever able to get the detector to fire on 3 images at once. I did this many tens of times with no improvement. I added extra pictures from the target to improve without luck.

It doesn't seem to want to learn to recognize the boy. His face is tilted. I think it assumes it's to hard to label a tilted face as a face. So, it says he's not.

It occured to me that maybe by uncheating I could get the detector to be more robust. I added images of strangers from the original face database. Voila. It can detect all the faces at once.