DEV Community

Divyanshu Shekhar
Divyanshu Shekhar

Posted on

Face Recognition System Python

Face Recognition System in Python is a biometric technology capable of recognizing and verifying an image or video of an individual.

Facial recognition allows one to identify the system administrator.

Today, this biometric system plays a very important role in the protection of smartphones and consumers.

Let’s Code face Recognition System in Python!

Face Recognition Python Algorithm

Steps to follow to make a Facial Recognition System. You can also make this system for Hardware like Raspberry pi / Arduino projects.

1.Import the needed packages.

import face_recognition

from PIL import Image, ImageDraw, ImageFont
Enter fullscreen mode Exit fullscreen mode

2. Load image of the person

Load the image of the person on which you want to try facial recognition.

image_of_person = face_recognition.load_image_file(β€˜./img/face_models/person.jpg’)
Enter fullscreen mode Exit fullscreen mode

3. Store Face Encoding

This Process stores the facial features of the person.

person_face_encoding = face_recognition.face_encodings(image_of_person)[0]
Enter fullscreen mode Exit fullscreen mode

Read the whole post on Face Recognition Python.

Top comments (2)

Collapse
 
jonrandy profile image
Jon Randy πŸŽ–οΈ • Edited

Let’s Code face Recognition System in Python!

I wouldn't really call importing a face recognition library and making a few calls to it "coding" a face recognition system

Collapse
 
divshekhar profile image
Divyanshu Shekhar

Just for beginners.