Face Recognition
Last updated
Was this helpful?
Last updated
Was this helpful?
I built this AI facial recognition model and made a facial recognition APP for the SECON conference. I presented a project at the SECON conference. Let’s talk about the motivation behind the idea. I always try to find a new way to innovate the way we authenticate identities. Since biometrics are unique to every one of us, why not use biometrics as an authentication method. That’s the reason I came up with this facial recognition idea to help authenticate users’ identities. On the other hand, I am really passionate about machine learning, deep learning, and Artificial intelligence (AI). I would love to play around with the latest image recognition algorithms to build this model to get a deeper understanding of some deep learning algorithms.
I did a short market search to know that couple of competitors have already offered face recognition as a secondary authentication method. I have tried the products. The results of those Apps weren’t consistent. It sometimes can identify users and other times it can’t recognize users. For example, when the light in the room changes, those products can’t identify users very well. The time when I was doing research, Apple hasn’t announced iPhone X face recognition function yet. iPhone X does a great job of face recognition. For that project, I decided to bring one major feature for the minimum viable product (MVP) for the App. That one feature is to recognize users’ faces in all kinds of conditions with a much better accuracy rate than competitors’ products.
The architecture flow for the project is
Modify open source project - Face-Recognition to train and recognize users faces and build the model
Use Flask to wrap the model into a Restful API - face recognition API.
Dockerize the project.
Deploy the project to Heroku
Build an IOS app that calls face recognition API to authenticate users through face recognition.
Why doe this model outperforms other algorithms? Two key factors: Convolutional neural network and face recognition algorithm. Normal image recognition algorithms can’t recognize patterns well. After a thousand times of training, they can identify one image. If you change the position of some objects in the image to a different position, those algorithms can’t recognize it and you have to train them thousand times again with the same image which just has the object in a slightly different position. This is very inefficient and slow. How can we do better? The answer is to make the machine think like a human and see as a human. Our eyes and brains are the best objects of recognition machines. We can recognize patterns so well and so fast. A convolutional neural network is built on how we see the world. This algorithm learns the pattern of the images. It predicts and recognizes the image patterns according to the training it has. This is kind of a reverse engineering way of doing image recognition. It hugely improves the speed and quality of image recognition.
This is how the convolutional neural network algorithm works.
It breaks the image into overlapping image tiles.
It feeds every image tile into a small neural network
It then saves the results from every tile into a new array
Downsampling
Finally, it makes a prediction
Another algorithm that helps speed and quality a lot is the face recognition library. This is how it works.
It looks at a picture and finds all the faces in it.
It focuses on every face and be able to understand that even if a face is turned in a bad direction or is not good lighting, it is still the same person.
It then picks out unique features of the face that you use to tell it apart from other people such as how long the face is, how big the nose is.
Finally, it compares the unique features of that face to all the people you already know to determine the person’s name.
This is how the final product works
launch the App
Click Scan to scan your face
Face recognition engine running in the backend
If it recognizes you, it logs you in, or otherwise, it rejects you.
You can check out the project at my GitHub repo here.
If you want to learn more about it, let's catch up! Send me a message or shoot me an email at