DeepFace
and deep learning for face recognition
“The computer is incredibly fast, accurate, and stupid. Man
is unbelievably slow, inaccurate, and brilliant. The marriage
of the two is a challenge and opportunity beyond
imagination.”
Stuart G. Walesh
ARTIFICIAL NEURAL NETWORK
Wikipedia definition:
Neural networks are a computational approach, which is
based on a large collection of neural units, loosely modeling
the way a biological brain solves problems with large
clusters of biological neurons connected by axons.
In simpler terms, Neural Networks try to emulate the way of
thinking of Humans to solve very complex problem.
Main components
The main components of neural networks are the NEURONS
Biological Neuron Artificial Neuron
Input 1 Input 2
output
Advantages of Neural Networks
The main advantages of neural networks are
● Adaptive learning: a neural network can teach itself how to solve problems
● Parallelization: they can run many computation in parallel
● Human-like AI: the neural networks try to mimic the human way of processing
data
● Pattern recognition: they can find pattern inside unstructured data
Disadvantages of Neural Networks
But there are also some disadvantages:
● Training: the neural network needs a training to operate, and this is not a trivial
task, and may take a very long time
● Optimization: today CPU’s are not optimized to solve the tasks needed in a
neural network
● Computational power: big neural networks need a large amount of
computational power
● Over and Under fitting: the network can provide wrong answer under some
circumstances
Structure
Each connection has a weight and each neuron has an offset.
OFFSET
= 0.2
OFFSET
= 0.1
OFFSET
= 0.4
W1 = 0.5
W2 = 0.3
f(W1,W2,OFFSET)
These parameters are tweaked during the training.
There are various f() function available
Structure
The various Neurons are connected between them to form a Network.
Each layer can send information to the neurons of the following layers.
Input layer
Hidden layers
Output layer
What are Neural Networks good at?
There are many fields where the
neural networks can be used, a task
where they outperform almost all
others algorithms is the Classification.
?
?
?
Image classification is easier with a
Neural Network because it’s more similar
to the Human brain.
Training
The training phase change the parameter of the Neural Network neurons in order to
have the right output response when a specific input is provided.
To do this we need a large set of labeled data.
The idea behind training is:
● We provide an input of which we already know the right answer
● If the Network give the wrong result, we change slightly the parameters who
influence the output in a way that a “more correct” answer is then provided
● We repeat this training procedure multiple times
Facebook DeepFace
DeepFace is a facial recognition system:
● It identifies human faces in digital images
● Trained with 4M facebook images
● The system is 97% accurate (human level accuracy)
● Developed by Facebook AI Research
Face Recognition Pipeline
DeepFace algorithm is a pipeline composed of 4 stages:
1. Detect the face in the image
2. Align the detected face
3. Represent facial images through a large deep neural network
4. Classify the image comparing a feature vector (classifier)
Step1 - Face Detection
Face Detection identifies human faces in
digital image.
● The detected face is cropped and
used as input for the alignment
step.
● DeepFace algorithm uses already
developed Face Detection
algorithm.
Step 2 - Face Alignment - 2D Alignment
2D Alignment
1. Detect 6 “fiducial points” to scale,
rotate and translate the image.
2. The fiducial points are detected
using SVR (Support Vector
Regressor).
Step 2 - Face Alignment - 3D Alignment
3D Alignment
1. Detect 67 “fiducial points” (using
SVR).
2. Compare them with a fixed 3D model
of a generic face.
3. Reconstruct the 3D model of the
detected face.
4. Generate the 3D-aligned version of
the crop.
5. The final image is given to the DNN.
Step 3 - Representation
● C1, M2, C3 → Convolutional networks: extract low level features
● L4, L5, L6 → Locally connected networks: extract high level features
● F7, F8 → Fully connected networks: capture correlation between features discovered in distant parts of
the face image
Step 4 - Classification
DeepFace
descriptor
vector
DeepFace
descriptor
vector
● Cosine Angle
● Weighted distance
● Siamese Network
Conclusions
Experiments results:
● YTF Dataset
○ YoutubeFace Database collects
3,425 YouTube videos of 1,595
subjects.
○ 91.4% accuracy
● LFW Dataset
○ Labeled Faces in the Wild
consists of 13,323 web photos of
5,749 celebrities.
○ 97.35% accuracy

Facebook Deep face

  • 1.
    DeepFace and deep learningfor face recognition
  • 2.
    “The computer isincredibly fast, accurate, and stupid. Man is unbelievably slow, inaccurate, and brilliant. The marriage of the two is a challenge and opportunity beyond imagination.” Stuart G. Walesh
  • 3.
    ARTIFICIAL NEURAL NETWORK Wikipediadefinition: Neural networks are a computational approach, which is based on a large collection of neural units, loosely modeling the way a biological brain solves problems with large clusters of biological neurons connected by axons. In simpler terms, Neural Networks try to emulate the way of thinking of Humans to solve very complex problem.
  • 4.
    Main components The maincomponents of neural networks are the NEURONS Biological Neuron Artificial Neuron Input 1 Input 2 output
  • 5.
    Advantages of NeuralNetworks The main advantages of neural networks are ● Adaptive learning: a neural network can teach itself how to solve problems ● Parallelization: they can run many computation in parallel ● Human-like AI: the neural networks try to mimic the human way of processing data ● Pattern recognition: they can find pattern inside unstructured data
  • 6.
    Disadvantages of NeuralNetworks But there are also some disadvantages: ● Training: the neural network needs a training to operate, and this is not a trivial task, and may take a very long time ● Optimization: today CPU’s are not optimized to solve the tasks needed in a neural network ● Computational power: big neural networks need a large amount of computational power ● Over and Under fitting: the network can provide wrong answer under some circumstances
  • 7.
    Structure Each connection hasa weight and each neuron has an offset. OFFSET = 0.2 OFFSET = 0.1 OFFSET = 0.4 W1 = 0.5 W2 = 0.3 f(W1,W2,OFFSET) These parameters are tweaked during the training. There are various f() function available
  • 8.
    Structure The various Neuronsare connected between them to form a Network. Each layer can send information to the neurons of the following layers. Input layer Hidden layers Output layer
  • 9.
    What are NeuralNetworks good at? There are many fields where the neural networks can be used, a task where they outperform almost all others algorithms is the Classification. ? ? ? Image classification is easier with a Neural Network because it’s more similar to the Human brain.
  • 10.
    Training The training phasechange the parameter of the Neural Network neurons in order to have the right output response when a specific input is provided. To do this we need a large set of labeled data. The idea behind training is: ● We provide an input of which we already know the right answer ● If the Network give the wrong result, we change slightly the parameters who influence the output in a way that a “more correct” answer is then provided ● We repeat this training procedure multiple times
  • 11.
    Facebook DeepFace DeepFace isa facial recognition system: ● It identifies human faces in digital images ● Trained with 4M facebook images ● The system is 97% accurate (human level accuracy) ● Developed by Facebook AI Research
  • 12.
    Face Recognition Pipeline DeepFacealgorithm is a pipeline composed of 4 stages: 1. Detect the face in the image 2. Align the detected face 3. Represent facial images through a large deep neural network 4. Classify the image comparing a feature vector (classifier)
  • 13.
    Step1 - FaceDetection Face Detection identifies human faces in digital image. ● The detected face is cropped and used as input for the alignment step. ● DeepFace algorithm uses already developed Face Detection algorithm.
  • 14.
    Step 2 -Face Alignment - 2D Alignment 2D Alignment 1. Detect 6 “fiducial points” to scale, rotate and translate the image. 2. The fiducial points are detected using SVR (Support Vector Regressor).
  • 15.
    Step 2 -Face Alignment - 3D Alignment 3D Alignment 1. Detect 67 “fiducial points” (using SVR). 2. Compare them with a fixed 3D model of a generic face. 3. Reconstruct the 3D model of the detected face. 4. Generate the 3D-aligned version of the crop. 5. The final image is given to the DNN.
  • 16.
    Step 3 -Representation ● C1, M2, C3 → Convolutional networks: extract low level features ● L4, L5, L6 → Locally connected networks: extract high level features ● F7, F8 → Fully connected networks: capture correlation between features discovered in distant parts of the face image
  • 17.
    Step 4 -Classification DeepFace descriptor vector DeepFace descriptor vector ● Cosine Angle ● Weighted distance ● Siamese Network
  • 18.
    Conclusions Experiments results: ● YTFDataset ○ YoutubeFace Database collects 3,425 YouTube videos of 1,595 subjects. ○ 91.4% accuracy ● LFW Dataset ○ Labeled Faces in the Wild consists of 13,323 web photos of 5,749 celebrities. ○ 97.35% accuracy