One-shot learning is an object categorization problem in computer vision. Whereas most machine learning based object categorization algorithms require training on hundreds or thousands of images and very large datasets, one-shot learning aims to learn information about object categories from one, or only a few, training images
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
One shot learning
1. One Shot Learning && Deep learning
Vuong Ho Ngoc
University of InformationTechnology
Contact: hongocvuong1998@gmail.com
2. Contents
Understand deep learning and data
CNN Architecutre
The problem in reality of deep learning
Result Face recognition use deep learning method
What is one-shot learning?
Why do we need one-shot learning?
Siamese neural network
Compare the two feature X1 and X2
Some model embedding face to feature vector
Result method One shot learning from Paper
Demo face recognition use One shot learning
References
3. Understand deep learning and data
- Nowadays State of the art computer vision algorithms
use deep learning. Standard deep learning
classification required huge amount of dataset to
predict with good accuracy
- Problem: If we don't have enough data for learning.
Deep learning not really effective
5. The problem in reality of deep learning
Dataset for a class
Face recognition system in an organisation
A. Deep learning method
In order to do with normal deep learning method, model has to be trained on huge
no. of labelled images of the employees and needs to be trained on large no. of
epochs.
This method may not be suitable because every time new employee comes in
model needs to be trained.
B. One shot learning
Another approach is model is
trained on fewer images of the
employees, but it can be used for
newer employees without retraining
the model. This way of approach is
called one shot learning.
6. Result Face recognition use deep learning method
Model: VGG19
Number of class: 10 class (people)
Number data each class: 400 – 500 image/class
Training on GPU: Tesla K80 (Google colab)
Time training: ~ 5 hour
7. One Shot Learning
One-shot learning is an object categorization problem in
computer vision. Whereas most machine learning based object
categorization algorithms require training on hundreds or
thousands of images and very large datasets, one-shot
learning aims to learn information about object categories from
one, or only a few, training images
The idea here is that we need to learn an object class
from only a few data and that’s what One-shot
learning algorithm is
8. Siamese neural network
Siamese neural network has the objective to find how similar two comparable things
are (e.g. signature verification, face recognition..). This network has two identical
subnetworks, which both have the same parameters and weights
Source: C4W4L03 Siamese Network. Credit to Andrew Ng
9. Siamese neural network
This network has got two identical
fully connected CNNs with same
weights and accepting two different
images.
Normal CNN using softmax to get the
classification, but here the output of
fully connected layer is regarded as
128 dimensional encoding of the input
image.
First network output the encoding of
the first input image and second
network output the encoding of its
input image.
Finally, we can say these encodings are the good representation of these input images
10. Compare the two feature X1 and X2
To compare the two images x1 and x2, we compute the distance d between their
encoding (feature) f(x1) and f(x2). If it is less than a threshold (a hyperparameter), it
means that the two pictures are the same person, if not, they are two different
persons.
11. Some model embedding face to feature vector
1. Return vector at Fully Connevted Layer
This method don’t use softmax. After trained, we have parameter. We give to input
Image of face, model will return a feature vector
Can we using model trained on architecture like AlexNet, LeNet, VGG16, VGG19, ResNet .
12. Some model embedding face to feature vector
2. FaceNet
FaceNet is introduced in 2015 by
Google researchers. It transforms
the face into 128D Euclidian space
similar to word embedding. Once
the FaceNet model having been
trained with triplet loss for different
classes of faces to capture the
similarities and differences between
them, the 128 dimensional
embedding returned by the FaceNet
model can be used to clusters faces
effectively
13. Result method One shot learning from Paper
This result implementation of the face recognizer described in the paper "FaceNet: A
Unified Embedding for Face Recognition and Clustering". The project also uses ideas
from the paper "Deep Face Recognition" from the Visual Geometry Group at Oxford
Training data:
The CASIA-WebFace dataset has been used for training. This training set consists of total
of 453 453 images over 10 575 identities after face detection. Some performance
improvement has been seen if the dataset has been filtered before training. Some more
information about how this was done will come later. The best performing model has
been trained on the VGGFace2 dataset consisting of ~3.3M faces and ~9000 class
Result on dataset
15. References
[1]: 15:32 GMT +7, 04 April 2019 One shot learning explained using FaceNet
https://medium.com/intro-to-artificial-intelligence/one-shot-learning-explained-using-
facenet-dff5ad52bd38
[2]: 16:52 GMT +7, 07 April 2019 One-Shot Learning: Face Recognition using Siamese
Neural Network
https://towardsdatascience.com/one-shot-learning-face-recognition-using-siamese-
neural-network-a13dcf739e
[3]: 20:49 GMT +7, 07 April 2019 One shot learning – Andrew Ng:
https://www.coursera.org/lecture/convolutional-neural-networks/one-shot-learning-
gjckG
[4]: 7:43 GMT +7, 11 April 2019 Matching Networks for One Shot Learning :
https://arxiv.org/pdf/1606.04080.pdf
[5]: 21:45 GMT +7, 15 April 2019 FaceNet: A Unified Embedding for Face Recognition
and Clustering
https://arxiv.org/pdf/1503.03832.pdf