From the course: Deep Learning: Face Recognition

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Coding a face encoder

Coding a face encoder - Python Tutorial

From the course: Deep Learning: Face Recognition

Start my 1-month free trial

Coding a face encoder

- [Instructor] Let's write the code to generate face encoding for an image. Open up face_endcoding.py. On the first line, let's import the face recognition library that we'll be using. So we'll type import_face_recognition. Next we need to load an image file to work with. Look over at the list of files on the left. I've included the sample image called person.jpg. Let's open it up and take a look. This is an image of a random person. But you can also try this out with your own pictures. But notice how the image only has one person in it and they're facing the camera. The system is looking for people roughly facing forward and with their facial features visible. The system won't work if the person is turned completely sideways or it's not possible to make out their facial features. Alright, let's close this and go back to the code. Next, we need to load the image into memory. We can do that with the load image file function. So we'll say face_recognition.load_image_file and we'll pass…

Contents