Need some advice for face recognition project

hi
im new to with deep learning and computer vision
i want to build my final year project with pytorch , for face recognition in real time !
both detecting and recognition using neural network !
i need some advice from advanced developers who done similar projects?!
i have read alot , blog posts , youtube videos but i still confused , i have my own dataset
and i have a basic understanding of neural network
thanks for advice

Hey,

For face recognition what you’re trying to create is a Siamese Network.
This is a good example of using Siamese Network using FastAI.

But first, what is a Siamese Network?
The challenge of face recognition is that in a realistic setting you have a single picture of a person and you can’t be expecting a whole host of pictures of any new person you want to add to the database.
So This problem can’t be solved via a simple classification objective.

So, how do you solve this problem?
Assuming you have a single picture for each person in your database.
Now if a person comes infront of the camera you want to know if this picture matches any picture in the database.
Thus, the setup becomes: you have to photos (one in your database and one picture that was taken via the camera) and you want to know if the two pictures are of the same person.

Ok. How do you proceed from here?

You take two pictures and pass them through a CNN. As the output you get two vectors representing each picture.
In the implementation above you take the difference between the two vectors and pass it to a linear layer which simply gives a single output of the probability.

There are other ways of defining the loss function though. But this is a decent fist step.

4 Likes

thanks , much appreciate …