Face Recognition using Python & Zed 2 Camera
In this video, I will show you how to install the face recognition system with spoof detection using a stereo camera.
The system detects fraud attempts, such as when someone uses a photo for authentication. First, download and install Python 3.10 and the ZED SDK:
Download Python 3.10 - https://www.python.org/downloads
Download ZED SDK - https://www.stereolabs.com/en-sg/developers
Next, download the source code
The zip file contains three Python scripts and an installation guide.
Run the scripts in the following order:
1. face_capture.py
The face_capture.py script captures multiple images of a person's face using the ZED camera and saves them to a folder named after the person, to build a dataset for encoding.
2. encode_faces.py
The encode_faces.py script generates and saves unique face encodings from captured images, preparing them for recognition in the main program.
3. main.py
The main.py script performs real-time face recognition and spoof detection using the ZED camera by comparing captured faces with pre-encoded face data and checking depth information.
If everything is successful, a window will pop up for face recognition.
Feel free to tweak it to suit your needs!
Don't forget to Like and Subscribe to my YouTube channel @ToyTechMachines for more Python tutorials and project ideas.
Love what I'm doing? Show your support by buying me a coffee.