Face recognition gate

Published on . Written by

Face Recognition with Gate control
With advancements in science and technology coming at a break-neck pace, almost all fields of life have been impacted. More than ever before, there is a steep rise in the demand for smart devices, as people all over the world are switching to such intelligent devices to make their lives easier.

Read more..
Connectivity and smart devices have helped us make our lives easier and more accessible. One such technology that finds rampant use in our day-to-day life is face recognition. In this article, we will be taking a look at how to leverage this technology to create a unique project.


Skyfi Labs Projects
Project Description

Face detection becomes challenging because it has to take into consideration several unstable characteristics, such as a new pair of glasses, or a new hairstyle or maybe even the presence of a beard. All these ever-changing factors impact detection effectiveness. Moreover, different lighting types and angles also make a difference, making it difficult to create a full-proof interface. Not only can face recognition system be used to open your phone, but it can also be used as an integral component of home security systems, for controlling the opening and closing of gates. In this project, we will build a face recognition system, that allows you to unlock the gate automatically.

Project Implementation

1. The project requires four main parts:

  • Data accumulation
  • Face Detection
  • Training algorithm
  • Facial Recognition
2. Firstly, the solenoid lock must be connected to the Raspberry Pi interface.

3. Connect the output and ground of the relay module to the battery and ground of the Pi, respectively.

4. The signal pin of the relay module must go to the GPIO 26 pin of the Raspberry Pi.

5. To the free end of the module, connect the DC source negative terminal and negative of the locking system.

6. DC positive goes to the common module terminal.

7. The other end of the common should go to the positive of the locking mechanism.

8. To gather data required to train the interface, use an OpenCV classifier to pick out 30 odd faces.

9. Use predefined classifiers available on GitHub to start building the system.

10. Initialize the camera object and set the resolution and frame rate as required.

11. Use PiRGBArray() to read frames from the video-camera as NumPy arrays that are compatible with OpenCV.

12. Then, use the capture_continuous function to read continuous frames from the camera module.

13. After obtaining the frame, access the raw NumPy array and convert it to grayscale.

14. Now, call the classifier function to detect faces.

15. The next important step is training your classifier function.

16. After the training is complete, load the classifier and the trained data.

17. The program will then extract the face region from the grayscale image and use a recognizer to recognize the face.

18. Once a match is confirmed, a signal is sent to the locking mechanism and the door opens.

Concepts Used

  • Video Capturing/Grabbing
  • Sensor technology
  • Face Recognition algorithms
  • Feature extraction/reduction/segmentation and recognition
  • Raspberry Pi Programming
  • OpenCV experience
  • Python Programming
  • Basic electronics
Kit required to develop Face recognition gate:
Technologies you will learn by working on Face recognition gate:


Any Questions?


Subscribe for more project ideas