Skip to content

This is intended for streaming FOMO(object detection model) trained using Edge impulse results from Esp32-S3 to webserver

Notifications You must be signed in to change notification settings

San279/object-detect-FOMO-stream-Esp32

Repository files navigation

object-detect-FOMO-stream-Esp32

ฉบับไทย

This project was intended for streaming FOMO object detection model by Edge Impulse inference results from Esp32 to webserver. The Hardware that was used were provided by Wireless Solution Asia. To use this script users must obtain a model from Edge Impulse

- I've provided simple guide to train your own model please visit train-FOMO-object-detect-esp32.


alt text


What you'll need

  • Arduino IDE, preferably the latest ones, but older versions will still do the job.
  • NodeJS provide access points for inference results.
  • ESP32-S3 is preferable but older version will do just fine.
  • OV2640 camera or any OV series.

Project files descriptions

  1. FOMO_object_detect_stream.ino - Containes Arduino codes for streaming camera images to the webserver and posting inference results to NodeJS.
  2. index.html - Contains HTML elements for streaming and inferencing.
  3. index.js - Javascript functions for HTML element for streaming and inferencing.
  4. api.js - NodeJS access point for processing inference results for index.js.
  5. styles.css - makes webserver looks more lively.

How to install and run the project

  1. Download the zip file and extract it to Arduino directory

    alt text



  2. Go to the installation directory and install javascript dependencies. Run the api.js script, NodeJS is required for this process.

  • For users with an IDE, linux, or Mac navigate to the directory and enter "npm install" follow by "node api.js".

    alt text


  • For Window users, navigate to the directory then select the file path and type cmd. New terminal window will be opened in the folder directory.

    alt text alt text
  • Enter "npm install" follow by "node api.js"

    alt text



  1. Open FOMO_object_detect_stream.ino and enter WIFI SSID, PASSWORD, and the IPV4 address obtained from your PC.

    alt text


  • To find IPV4 For Window users, open cmd and enter "ipconfig".

    alt text

  • To find IPV4 For Linux users, open terminal and enter hostname -I

    alt text





  1. Add zip folder of the model obtained from Edge Impulse to Arduino IDE.

    alt text

    alt text



  2. Under tools change your Board to "ESP32S3 Dev Module" and PSRAM to "OPI PSRAM".

    alt text



  3. Upload the code to your ESP32S3. This process may take up to 30 minutes, once completed copy the IP address from the serial monitor to use it for the next process.

    alt text



  4. Go to directory and open index.html, it should open the default browser and ask for IP Addres. Paste the Ip address obtain from Arduino IDE in process 7.

    alt text



  5. Done!! the inference results from Esp32 should be shown in the webserver.
    alt text





Webserver features

  • User can switch languages on the top right corner of the web.
  • Adjustable Camera Settings, try to match camera settings with training datasets, to see more details about each setting please visit https://heyrick.eu/blog/index.php?diary=20210418&keitai=0.
  • User can hide the setting console by clicking on the icon above.

    alt text


  • Adjustable Resolutions.

    alt_text


  • Capture button will start capturing images of detected objects.
  • Set Instances to limit the amount of images captured.
  • Once capture button is clicked a timer will start to count number of seconds it took to capture all images.

    alt_text


  • Download button located on the top left will zip all captured images into a single file and download. The downloaded images will not have labels.
  • Clear buttons located on the top right will delete all captured images.
  • User can aslo delete each image individually.

    alt_text



Credit

Thanks to WIRELESS SOLUTION ASIA CO.,LTD for providing AIOT board to support this project. Also thanks to RandomNerdTutorials for providing essential codes for streaming Esp32 camera to webserver. Scripted used for Esp32 FOMO object detection inferencing were from Edge Impulse.

About

This is intended for streaming FOMO(object detection model) trained using Edge impulse results from Esp32-S3 to webserver

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published