Machine Learning is Fun! Part 4: Modern Face Recognition with Deep Learning


https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78



https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbVk2U2JZUnRZVV9hejd0VmpDZVEtMzhkS0dLZ3xBQ3Jtc0tsSE5GMlVaVktTRC1QRmMxWWhHamhLX0h2Y0pGWWFJVnJnUGI1c1FjVkppbDZ3ZTNBX1dwT24tU0NYRTJ0dXFXeE5rRDdkaXRyYTNrU0VkajNYRlVGUzVfWUJrSGU3R19HMnZ0eUd2X3U1cjF5b3RCbw&q=https%3A%2F%2Fwww.computervision.zone%2Fcourses%2Fface-attendance%2F&v=sz25xxF_AVE


 This technology is called face recognition. Facebook’s algorithms are able to recognize your friends’ faces after they have been tagged only a few times. It’s pretty amazing technology — Facebook can recognize faces with 98% accuracy which is pretty much as good as humans can do!

One of these people is Will Farrell. The other is Chad Smith. I swear they are different people!

How to use Machine Learning on a Very Complicated Problem

  1. First, look at a picture and find all the faces in it
  2. Second, focus on each face and be able to understand that even if a face is turned in a weird direction or in bad lighting, it is still the same person.
  3. Third, be able to pick out unique features of the face that you can use to tell it apart from other people— like how big the eyes are, how long the face is, etc.
  4. Finally, compare the unique features of that face to all the people you already know to determine the person’s name.
How a basic pipeline for detecting faces might work

Face Recognition — Step by Step

Step 1: Finding all the Faces

Looking at just this one pixel and the pixels touching it, the image is getting darker towards the upper right.
The original image is turned into a HOG representation that captures the major features of the image regardless of image brightnesss.

Step 2: Posing and Projecting Faces

Humans can easily recognize that both images are of Will Ferrell, but computers would see these pictures as two completely different people.
The 68 landmarks we will locate on every face. This image was created by Brandon Amos of CMU who works on OpenFace.
PROTIP: You can also use this same technique to implement your own version of Snapchat’s real-time 3d face filters!

Step 3: Encoding Faces

Just like TV! So real! #science

The most reliable way to measure a face

  1. Load a training face image of a known person
  2. Load another picture of the same known person
  3. Load a picture of a totally different person

Encoding our face image

Step 4: Finding the person’s name from the encoding

Sweet, sweet training data!

Running this Yourself

  1. Encode a picture using the HOG algorithm to create a simplified version of the image. Using this simplified image, find the part of the image that most looks like a generic HOG encoding of a face.
  2. Figure out the pose of the face by finding the main landmarks in the face. Once we find those landmarks, use them to warp the image so that the eyes and mouth are centered.
  3. Pass the centered face image through a neural network that knows how to measure features of the face. Save those 128 measurements.
  4. Looking at all the faces we’ve measured in the past, see which person has the closest measurements to our face’s measurements. That’s our match!

Comments

Popular posts from this blog

OpenCV Video Capturing Error : CvCapture_MSMF::initStream Failed to set mediaType

Face Attendance

Official genuine JetBrains code pycharm Key