Blog Post

Add Sight to Your ESP32

TinyML, Computer VisionUse Edge Impulse to run image classification and more on the ESP32.

David Schwarz

September 8, 2021

    The ESP32, known for its low price, powerful wireless capabilities, and energy efficiency, is widely used in affordable IoT solutions. What many don’t know is that using the Arduino framework and Edge Impulse, this tiny processor can run powerful machine learning algorithms with only a few lines of added code.

    Here at Edge Impulse, we’ve used the ESP32 with multiple different camera modules to run image recognition ML models on-device. These models are capable of a variety of complex tasks - detecting if a person is in frame, evaluating crop growth, or even estimating the weight of an object, all just from a photo!

    With our free platform for embedded machine learning, you can run any of these projects on the ESP32, or create your own by following our Adding Sight to Your Sensors tutorial. The model can be deployed as an open-source Arduino library with everything you need to run your trained impulse, and this library can be added to an existing ESP32 Arduino project with a single click.

    Interested in trying this out yourself? All you’ll need to get started is an ESP32 dev kit and one of the following camera modules:

    • Arducam Mini 2MP Plus - This compact camera module is popular in the maker community for its low price and easy integration with the Arduino framework. With an ESP32 dev kit and the Arducam module, we’ve deployed person detection algorithms to identify if a human is in frame. To test this out, head to the GitHub repository below for the setup instructions and source code.
    • ESP32-CAM - This uses the same sensor as the Arducam, but includes first party drivers to directly interface the sensor with the ESP32-CAM board.  The ESP32-CAM + Edge Impulse demo identifies different plant species and is complete with a web interface, camera preview, and on-chip image resizing. Check out the code on GitHub or follow one of the ESP32-CAM walkthroughs linked below.

    What’s more is that these examples can run any trained image classification model just by replacing the Edge Impulse library. This works without any changes to the ESP32 firmware itself, meaning you can rapidly prototype and test your machine learning algorithms in the real world. 

    Finally, Edge Impulse also supports processing any type of sensor data on the ESP32, not just images! A minimal code example for running any standalone edge impulse model on the ESP32 can be found here. From this starting point, you can add any Arduino compatible sensor drivers, and use our data forwarder to collect training data.


    Are you interested in bringing machine learning intelligence to your devices? We're happy to help.

    Subscribe to our newsletter