Python Face Recognition library

There are many different face recognition libraries, but face_recognition is quite accurate & Easy to use. This article introduces how to install and use the face_recognition lib on Windows. The name of this lib does not have a brand name that is named with a generic keyword, so I will abbreviate it as FR.

This article only focuses on using the lib, but the build lib will be written in another post.

1. Overview

This is an open source project written in Python, using Dlib for facial recognition. However, currently installing with the command on the lib homepage is faulty, so I will provide another way to install it.

The problem is that dlib and the latest FR version are not compatible with each other. Therefore, it is necessary to specify the appropriate version to install.

2. Settings

This article uses Python 3.6.5 amd64  to test (Windows x86-64 executable installer).

You copy the content below and save it as a requirement.txt file

Pillow==5.2.0 #md5=b7330a5b2d46420343fbed5df69e6a3f

Then type the command below to install the packages specified in the requirements.txt file
pip3 install -r requirements.txt

Waiting for the packages to be installed.

3. Test the source code

You can download the example files from the github repo for testing: /ageitgey/face_recognition/tree/master/examples

In it, there are easy-to-understand example files available:
– find the difference between 2 faces, the smaller the number, the more similar
– find facial features
– load Obama and Biden images, then take another photo of Mr. Obama to compare

4. Download the source code