Smart Lock With Face Recognition – Verification –

Various articles explain this topic.

Smart Lock With Face Recognition – The Function and Setup –
Smart Lock With Face Recognition – How to make –
Smart Lock With Face Recognition – Verification –

Concept of Face Recognition

Deep Merics Learning

In this time, library “face_recognition" doing face recognition adopts the method “Deep Metrics Learning". In Deep Metrics Learning, input image data is converted to vector. In that time, like below image, two of a kind are closely, ex. chihuahuas, but the others are far, ex. chihuahua and Shiba inu, vectorized. Of course, the same is true of humans and it can be applied to face recognition.

The content above is cited below site.

Face Recognition performance

Data

To measure performance of face recognition, 100 Japanese men’s face images and my face images are prepared.

Comparison of distance of face vectors

Below graph is similarity between my face image and 100 Japanese men images. Face images are converted to vectors by “Deep Metric Learning" and face similarities are measured by the vector’s distance.

The vertical axis is the vector’s distance and they represent face similarity. Horizontal axis is kind of used images. picture_of_me is my 100 face images and unknown_picture is 100 Japanese men images. The graph says my face images are higher similarity than my face and other people face images. Face distance values between my images and others images are always higher than 0.4, so it can be succeed to distinguish between my face and others to make face distance threshold 0.4.

If you prepare other’s 100 face images in unknown_picture folder, your 100 face images in picture_of_me folder and execute below program, you can get above result.

#necessary library
sudo pip install matplotlib
sudo pip install seaborn
sudo pip install pandas

#verification program
python3 plot_face_distance.py

Face Recognition speed

At last, face recognition speed is measured. the target is the converted time from input face image to vector. below result is the time that five images are converted. FPS is about 13, so it enough to face recognize.

#verification program
python3 benchmark.py
Sample0:
 - Face recognition time: 0.0753s (13.27 fps)

Sample1:
 - Face recognition time: 0.0734s (13.63 fps)

Sample2:
 - Face recognition time: 0.0733s (13.64 fps)

Sample3:
 - Face recognition time: 0.0730s (13.70 fps)

Sample4:
 - Face recognition time: 0.0732s (13.67 fps)

Conclusion

In this articles, I tried to implement face recognition and measure the performance.  I would be most happy if you could implement it!