Access Control with Face Recognition

featured.jpg

Open a door when a face is recognised using the ESP32-CAM

This page contains code and other information for the the YouTube video found here: https://youtu.be/mu3-Sff0B9w

The code is a combination of the ESP32-CAM Face Recognition for Home Automation and ESP-WHO Face Recognition with WebSocket Communication tutorials.

As mentioned in the video, while this demonstration works well, the ESP32-CAM and associated IDF and Arduino libraries don’t match professional face based access control systems. It can be easily tricked and doesn’t check for ‘liveness’. It could be used as a secondary control system to open doors or activate systems for people that have already passed through another access control system.

If you want to see more tutorials like this such as doorbell camera then please say ‘thanks’ with a coffee below.

Here’s the current code used. You can download this with the other files you need here: https://robotzero.one/wp-content/uploads/2019/09/FaceDoorEntryESP32Cam.zip


14 Replies to “Access Control with Face Recognition”

  1. Jasou says:

    Hi !
    Thankk you for the code , but i have a problem with esp32 cam when i enter access control it freezes then crashes and i have to restart it to work again , can it be a problem of overheating or something else ? any idea to fix this ?

    1. WordBot says:

      Hi, I was sometimes seeing this. I’m not sure if it’s a bug in the Espressif libraries (I think someone else has reported this) or the camera is just overheating. It seemed random to me.

  2. Noppanun says:

    Hi !
    I’m thai and love this project,so plz tell me how to detect intruder in code i’m beginner.

    1. WordBot says:

      Hi, I’m not sure what you mean but check out the other tutorials on the site and maybe there’s something to help.

  3. Dimitris says:

    First of all congrats for this great work!
    I’m facing an issue on this project…Everything was running perfect until the last couple of days i was no longer able to stream from the esp-32 cam, as a result it couldn’t detect or recognize faces anymore. I updated the boards and libraries, i even tried it from different computer and browser but still the same. I still can browse into the web UI but it won’t stream any image from the left window. I tested my esp32-cam board on other projects and it’s fully functional. So, any thoughts what’s causing this issue? Thanks!

    1. WordBot says:

      Does the camerawebserver example work for you? If you load that up can see the video at http://your-ip-address:81/stream ? Might be the camera.

  4. Keith Mack says:

    Success, installed 12/1/2019! Did the partition table changes and installed the code from the zip file. Worked great, no issues!
    Tried to strip down the code for OTA but couldn’t get that to work, only had about 10 minutes to work on the OTA, I’ll try again later.
    Thanks very much for posting this and the YouTube video!

    1. WordBot says:

      Great! It’s always nice to hear when people have a project working.

  5. Eva says:

    Thanks for sharing this. I implemented it and tried compiling the code; but got the following error message:
    ‘ Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
    Error compiling for board ESP32 Wrover Module. ”
    Please, what should I do to solve this? If I change partition scheme to ”Huge App (3MB No OTA…), it compiles.

    1. WordBot says:

      Did you create a new partition following this tutorial – https://robotzero.one/esp32-face-door-entry/ ? It’s a big application but also needs the partition for storing faces.

  6. Preman Jeyabalan says:

    Hi, I’ve followed what you’ve done but when I copy the code in I get the following error:

    ‘struct mtmn_config_t’ has no member named ‘type’

    Any solutions to this?

    1. WordBot says:

      Hi, Probably the wrong ESP32 Hardware library is installed. Which version are you using?

  7. Preman Jeyabalan says:

    Hi, sorted that out, yup I was using the wrong hardware. Sorry to ask a question a little unrelated here, but if say i wanted to store the enrolled faces on a google firebase database, which function do I call that contains the blob information?

    I’m quite new to this and I haven’t found any help online.

    1. WordBot says:

      I’m not sure how you would save the face information somewhere different from the flash memory. I don’t know how well the recognition would work if it was testing against face data that wasn’t stored locally… it might be too slow.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

scroll to top