You are on page 1of 1

Face detection :

Face detection was done using Haar Cascaded filters. It is a machine learning based approach where a cascade
function is trained with a set of input data. OpenCV already contains many pre-trained classifiers for face, eyes,
smiles, etc.. Need to download the trained classifier XML file.

The image detection works only grey scale images, so it is important to convert all images to grey scale.
Similarly, we can detect faces in videos. As you know videos are basically made up of frames, which are still
images. 

Haar Filters :
It is based on the approach where a cascade function is trained from a lot of positive and negative images. It is then
used to detect objects in other images. The algorithm needs a lot of positive images (images of faces) and negative
images (images without faces) to train the classifier. Filters act like convolution kernels and are used to extract the
features.
The algorithm trains a bunch of classifiers and assigns them weights bases on error rates. The final classifier is a
weighted sum of the all the classifiers.

Cascade of Classifiers :

Instead of applying all the features on a window, features are grouped into different stages and these stages are
applied sequentially. If a window fails at a certain stage – we will discard the subsequent stages.

Face detection in videos:

Using an infinite loop – we can extract image frames from the video and apply face detection on those frames.
Though it sounds like a makeshift solution but most of people approach it like this and it works fine..

The only difference here is that we use an infinite loop to loop through each frame in the video. 

Clustering of images:
I used a very primitive way of supervised learning – where I took images of known people and tried to train a
multilayer CNN for classification on labeled data (using cross entropy loss for multi class classification) but due to
lack of resources (hardware) I was not able to accomplish it. The process, due to some unknown, reason got
terminated in the middle. I need to look into better unsupervised learning methods.

You might also like