/ESP32-CAM-ObjectDetection

This repository would show you how to make an object detection remote control camera with ESP32-CAM module

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

ESP32-CAM: remoted object detection camera

Demonstration

ESP32-CAM: Remote Control Object Detection Camera

Descrition

The ESP32-CAM would stream the images to PC via WebSocket packages, then the remote software in PC would receive the images and do the object detection with Tensorflow Lite(SSD Mobilenetv2) or Keras (YOLOv3).

Hardware setup

Components are used: ESP32-CAM module, RC Servo x2, 5V Battery.

Software setup

The software contains 2 parts

  1. ESP32-CAM firmware
  1. Remote control software (Can be run on Ubuntu or Windows PC)
  • ubuntu: Install virtualenv
sudo apt-get install python3-pip
sudo pip3 install virtualenv
cd ESP32CamObjectDetection/remote
virtualenv -p python3 <env_name>
source <env_name>/bin/activate
(<env_name>)$ pip install -r requirementVirtualenv.txt
  • windows 10: Not yet checked but it should be similar

Run remote control:

(<env_name>)$ cd remote
(<env_name>)$ python3 main.py

Note: If your computer does not have GPU, update setting.ini by changing GPU = 0, or you can change like this to run the code in CPU.

For use GPU, download the pretrained model here and place in the remote folder.

CNN models reference sources

SSD Mobilenetv2: https://github.com/tensorflow/models/tree/master/research/object_detection

Keras-Yolov3 https://github.com/qqwweee/keras-yolo3