About the Project
The system; collects face data using a webcam, processes it with OpenCV, and applies a facial recognition algorithm. If the face is verified as belonging to an authorized person, the door lock is triggered via a servo motor through the Raspberry Pi. The user interface allows adding new faces and controlling the system.
System Components
- Hardware: Raspberry Pi 5 (8 GB RAM), Camera, Servo Motor
- Software: Python, OpenCV
System Architecture
-
Hardware:
Raspberry Pi; We used Raspberry Pi 5 with 8GB RAM and a 64-bit quad-core Arm Cortex-A76 processor running at 2.4 GHz as the microprocessor software model.
-
Servo Motor:
We used the SG90 RC Mini Servo Motor. SG90 is an ideal servo motor for your small mechanisms. It is fully compatible with remote control receivers of all brands, and you can use the mini servo motor in your RC vehicles. Additionally, you can easily use the SG90 servo motor in your robot projects with PWM signals that you can take from many microcontrollers.
-
Camera:
Cyber USB Webcam is an excellent choice for small and portable projects. It connects easily to microcontrollers like Raspberry Pi via USB 2.0 and provides fast data transfer. It offers 720p HD resolution, ensuring clear and high-quality images. Its fixed focus feature is ideal for use in face recognition systems, security cameras, or video conferencing projects.
-
Software:
The face recognition-based door lock system consists of three main modules. The first module is the data collection phase. In this phase, face photos are taken from the camera and saved with the username. Face detection is performed using the Haar Cascade algorithm. The second module is the model training phase. Here, the collected face photos are used to create a face recognition model using the LBPH (Local Binary Pattern Histograms) algorithm. The third module is the main system. In this phase, face recognition is performed using the images taken from the camera, and if the verification is successful, the door is opened with the help of a servo motor. To enhance the system's security, measures such as recognition threshold and sequential recognition checks have also been added. The face recognition process is carried out using the OpenCV library, model training is performed with the LBPH algorithm, and the door opening process is achieved with a GPIO-controlled servo motor.
Installation Guide
1. Prepare the Raspberry Pi device.
2. Install and start the facial recognition software.
3. Connect the servo motors to the door lock.