Skip to content

A project based on Raspberry Pi, designed to allow the door to be opened using face recognition.

Notifications You must be signed in to change notification settings

Jozwiaczek/smart-door

Repository files navigation

Smart-Doors v1.0

Smart door opening via Raspberry Pi using face recognition.

enter image description here

Overview:

This project provides software and hardware installation instructions for smart doors. The software is designed to run on a Raspberry Pi, which is an inexpensive ARM-based computer.

Requirements:

Hardware Setup:

enter image description here

Step 1:

Documentation of hardware settings in preparation...

Using the breadboard to connect the pins:

  1. Green led = 5
  2. Red led = 4
  3. Yellow led = 26
  4. Buzzer = 17
  5. pinBtn = 13
  6. LockDoor = 6
  7. Sensor of opening door = 19
  8. LCD Screen:
    1. D7 = 18
    2. RS = 27
    3. E = 22
    4. D6 = 23
    5. D5 = 24
    6. D4 = 25

Software Installation:

  1. Install Rasbian onto your Raspberry Pi

  2. Activate VNC on Raspberry Pi to operate the device remotely via a computer, not via HDMI [Recommend RealVNC]

  3. Activate the camera on Raspberry Pi in raspi-config [More info]

  4. Install OpenCv 3 [Tutorial].

    Remember to select Python 3 when configuring your virtual environment

  5. I recommends run the command "source" each time you open up a new terminal to ensure your system variables have been set up correctly.
    source ~/.profile

  6. Next, let's enter on virtual environment: workon cv

    Remember to always work on this project in a virtual environment, otherwise the program will not work without OpenCv

  7. Add camera drivers bcm2835-v4l2 to the last line by opening file sudo nano /etc/modules file

  8. Install PIL library pip install pillow

  9. Install module to control Raspberry Pi GPIO channels pip install RPi.GPIO

  10. Install progress bar library pip install progress

  11. Now you can enjoy with that project :)

How to use Smart Doors:

1. Face Management

  1. Run file 1_face_management.py. This program allows you to manage a list of users based on which faces are recognized.

  2. To perform an action, you must enter the listing number. The menu displays: enter image description here

    • Add user: You enter the nickname of the user, the number of samples you want to give him, and then take pictures of the face.
    • Add sample for user: This will add the specified number of photos to an existing user.
    • Delete user: This can remove a specific user from your list.
    • Show list of users: This shows id, nicknames and the number of samples for each user
    • Run trainer: Every time you want your changes (adding a user, adding samples or deleting a user) to be taken into account when recognizing faces, you must use a trainer.
    • Quit program

    After each, adding a user or samples or removing a user, the program asks if you want to use a trainer. If you plan to do several activities, I recommend that you leave it at the very end, because with a large number of samples it takes a while.

  3. To be able to run FaceRecognizer at all you have to add at least one user and run trainer. I recommend that you add at least 200/300 samples for proper operation.

2. Face Recognizer

  1. Run 2_face_recognition.py and enjoy the magic of the smart door
  2. The program in the terminal will show a list of available users who can open the door.
  3. From now on you can open your door with your face :)

Planned improvements

  • Add voice control
  • Door control using HomeKit (Especially it's about controlling the application over the phone)
  • Controlling the system from outside the home.

Contact and Questions

If you have any doubts or questions, write to my e-mail: kubencki@gmail.com

About

A project based on Raspberry Pi, designed to allow the door to be opened using face recognition.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages