Face Recognition

Introduction

Use the Python Face Recognition Module.

Use graphics.py. For more information click HERE . (download, install, documentation, etc.)

Install python face-recognition Package

Note: I had to install CMake to successfully install the "face-recognition" module.
Try installing "face-recognition" first. CMake may already be installed.

pip install CMake

pip install face-recognition

Project #1

Locate/download a picture with several people facing the camera (family and friends?). Use the images for the project.

1. Create a graphics window with the image as the background
2. Locate the faces in the picture
3. Draw a rectangle around each face

Hint:

import face_recognition image = face_recognition.load_image_file('abc.png') locations = face_recognition.face_locations(image) Note: A face location defines a box (sides) around a face. (top,right,bottom,left) To draw a rectangle you must use window coordinates.

Project #2

Create a folder to contain several picture files. Each picture should contain a known person facing the camera. The file names should be the name of the person in the picture.

Write a program that will:

  1. read a picture of an unknown person
  2. process each picture in the folder
  3. display the name of the files that match the unknown person

Can you locate the unknown person in a picture containing several people?

Links

Python Face Recognition Tutorial (YouTube)

OpenCV Python Tutorial #1 - Introduction & Images (YouTube)

Learn How to Implement Face Recognition using OpenCV with Python!

What is the Best Facial Recognition Software to Use in 2022?

Also

Face Recognition With Python 3.10 Tutorial (Webcam) (YouTube)

How to install dlib library for Python in Windows 10