ESP32-CAM Face detection|Face Recognition

face

This tutorial is a quick getting started guide for the ESP32-CAM board. I have used ESP32-CAM board for face detection and video recognization using simple example code is given in arduino esp32 library.

it also features a microSD card slot that can be useful to store images taken with the camera or to store files to serve to clients.

The ESP32-CAM doesn’t come with a USB connector, so you need an FTDI programmer to upload code.

Next You need to add on ESP32 in your Arduino IDE.

  • Enter https://dl.espressif.com/dl/package_esp32_index.json into the “Additional Board Manager URLs” field as shown in the figure below. Then, click the “OK” button. if you already have esp8266 board separate the links using a comma.
  • Search for ESP32 and press install button for the “ ESP32 by Espressif Systems “

Before uploading the code You need to insert your Netework credentials as SSID and password. then make sure to select the correct camera module. In this case I have used AI-THINKER Model. so uncomment the other modules.

ESP32-CAM Upload Code

GPIO 0 needs to be connected to GND then you can able to upload the code to the ESP32-CAM board.

To upload the code, follow the next steps:

1) Go to Tools > Board and select AI-Thinker ESP32-CAM.

2) Go to Tools > Port and select the COM port the ESP32 is connected to.

3) Then, click the upload button to upload the code.

4) When you start to see these dots on the debugging window, press the ESP32-CAM on-board RST button.

After uploading the code disconnect GPIO 0 from GND. Open the Serial Monitor at a baud rate of 115200. Press the ESP32-CAM on-board Reset button.

The ESP32 IP address should be printed in the Serial Monitor.

Check here my previous post

When I was uploading code, I faced some errors with the wifi connection and USB cable. so to solve this issue I used Arduino to give 5v power supply to my ESP-32 CAM module because the USB cable didn’t provide enough voltage to my ESP32-CAM module.

Accessing the Video Streaming Server

Open your browser then past your ESP32-CAM Ip address in your search bar. Press the Start Streaming button to start video streaming.

You also have the option to take photos by clicking the Get Still button. Unfortunately, this example doesn’t save the photos, but you can modify it to use the on board microSD Card to store the captured photos.

First, you need to enroll a new face. It will make several attempts to save the face. After enrolling a new user, it should detect the face later on. After saving the face, when you show a new face it will show an intruder alert message on the video stream

Hope you have liked this post and don’t forget to share between who aspires to make these kinds of project

Originally published at https://www.blackkeyhole.com.

Instrumentation and Automation Technology (R)