First Step of Face Recognition: Detect

The first stage of face recognition is detection of face in movies. Here are the steps:

  1. Find a video you like
  2. Use one of the online Youtube to mp4 converter sites to convert the video to a local mp4 file. You can google to find many free converters online
  3. I have developed a routine in Matlab that will crop out the faces appear in each video frame (or in every x number of frames, since you don’t really need to save so many faces that look very similar)

In the Computer Vision toolbox of Matlab, there is a thing called vision.CascadeObjectDetector. This uses the Viola-Jones algorithm to detect people’s faces, noses, eyes, mouth, or upper body. This Viola-Jones algorithm should be similar to the Haar Cascades Identifier available in OpenCV (http://docs.opencv.org/trunk/d7/d8b/tutorial_py_face_detection.html).

The routine can give me a lot of faces (note that the face needs to be full frontal, cannot be side view), but at the same time it also gives me some non-face images as well.

Here are some images collected:

In general, I believe it can basically collect the faces of all characters in a selected movie, but it will also give you some pictures that do not look like faces at all, and it doesn’t work too well with people with glasses.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s