Skip to main content

Use Edge Impulse

Overview

Edge Impulse is a development platform for building, training, and deploying machine learning models directly on edge devices. With this platform, developers can easily create applications that run offline, in real time, and with low power consumption.

With Edge Impulse, you can:

  • Collect and label sensor data (eg. audio, vision, motion)
  • Train and deploy ML models on a range of hardware
  • Easily monitor performance

In this guide, we will walk through how to download Edge Impulse onto the RUBIK Pi and use it to download an Impulse, your own customized ML model.

Prerequisites

  1. Set up an Edge Impulse account
  2. Set up your RUBIK Pi with Wi-Fi and SSH enabled. Instructions for this set up can be found here.
  3. (Optional) Attach a camera to your RUBIK Pi device.

Install the Edge Impulse CLI

After powering on your RUBIK Pi and making sure it is accessible via SSH:

  1. SSH into the RUBIK Pi.
    Run the following command in your terminal, replacing ip_address with the actual IP address of your RUBIK Pi:
$ ssh ubuntu@<ip_address> 
  1. Download and run the setup script.
    To download the Edge Impulse Linux CLI, open the RUBIK Pi terminal and run the following command:
$ wget https://cdn.edgeimpulse.com/firmware/linux/setup-edge-impulse-qc-linux.sh
$ sh setup-edge-impulse-qc-linux.sh
$ source ~/.profile
  1. Connect to Edge Impulse. Run this command to link your RUBIK Pi to your Edge Impulse account:
$ edge-impulse-linux

You will be prompted for your username, email, and password you used to set up your Edge Impulse account, so be sure to have those details ready. If you want to reset the setup or swtich devices, use:

$ edge-impulse-linux --clean
  1. Create an Edge Impulse Project.
    Follow the Edge Impulse tutorial/walkthrough to create a simple object detection project. For an in-depth tutorial, follow the steps found here.

  2. Verify that your device is connected.
    To double check your device is connected to Edge Impulse, go to your Edge Impulse project and click Devices. You should see RUBIK Pi 3 listed as one of your devices. You will only see your device under devices if you have created an impulse in your project.

  3. Run your Impulse.
    To run an Impulse on your RUBIK Pi device, run the command:

$ edge-impulse-linux-runner

With this command, the model that you built will be downloaded and inference will start running, all being done locally on the RUBIK Pi. If you followed the steps to create an object detection project and have a camera connected to your RUBIK Pi device, then the runner will also provide a view of the camera that is attached to the RUBIK Pi.