Close
0%
0%

TensorFlow Lite - Person Detection

When it detect a people, specific LED will light up to show this is a person.

Public Chat
Similar projects worth following
TensorFlow Lite is an open-source, product ready, cross platform deep learning framework that converts a pre-trained model in TensorFlow to a special format that can be optimised for speed or storage. In this example, it will captured image and process the image to determine if there is a person.

Ameba RTL8722DM_MINI is a low-power dual-band WLAN and Bluetooth Low Energy SoC by Realtek. The RTL8722DM_MINI also include memory for Wi-Fi protocol functions and application making it simple for anyone to develop various kind of IoT applications. At the same time it has a wide range of peripheral interfaces. With all these interfaces, it can connect to most of the electronics components like LEDs, temperature and humidity sensors, and so on.

More Resources:

If you need additional technical documents or the source code for this project. Please visit the official websites and join the Facebook group and forum.

  • 1 × RTL8722DM_MINI microcontroller
  • 3 × LED Fiber Optics / Emitters
  • 1 × ArduCAM camera

  • 1
    Setup

    First, connect the camera and LEDs to the RTL8722DM-MINI following the diagram below.

    Download the Ameba customized version of TensorFlow Lite for Microcontrollers library at https://github.com/ambiot/ambd_arduino/tree/master/Arduino_zip_libraries.
    Follow the instructions at https://www.arduino.cc/en/guide/libraries to install it.
    Ensure that the patch files found at https://github.com/ambiot/ambd_arduino/tree/master/Ameba_misc/ are also installed.
    You will also need to install the Ameba_ArduCAM library, found together with the TensorFlow Lite library.
    In the Arduino IDE library manager, install the JPEGDecoder library. This example has been tested with version 1.8.0 of the JPEGDecoder library.
    Once the library has installed, you will need to configure it to disable some optional components that are not compatible with the RTL8722DM. Open the following file:
    Arduino/libraries/JPEGDecoder/src/User_Config.h
    Make sure that both #define LOAD_SD_LIBRARY and #define LOAD_SDFAT_LIBRARY are commented out, as shown in this excerpt from the file:
    //#define LOAD_SD_LIBRARY // Default SD Card library
    //#define LOAD_SDFAT_LIBRARY // Use SdFat library instead, so SD Card SPI can be bit bashed

  • 2
    Programming

    Open the example, “Files” -> “Examples” -> “TensorFlowLite_Ameba” -> “person_detection”.

  • 3
    Final Result

    Upload the code and press the reset button on Ameba once the upload has finished.

    Once it is running, you should see the blue LED flashing once every few seconds, indicating that it has finished processing an image. The red LED will light up if it determines that there is no person in the previous image captured, and the green LED will light up if it determines that there is a person.
    The inference results are also output to the Arduino serial monitor, which appear as follows:

View all 3 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates