Giter VIP home page Giter VIP logo

autopilot's Introduction

Edge Impulse Autopilot Demo

Model architecture

Model architecture

Collecting data

  1. Copy main.py and motors.py to the SD card (USB mount) of your OpenMV device.
  2. Reconnect your device with a serial terminal connected and wait for the Type <a> for autopilot, <m> for manual control message to appear. (N.B. It is not possible to use the OpenMV IDE serial terminal for this step because it does not allow keyboard input. Use (for example) Serial)
  3. Type m to select manual mode.
  4. Type o to start recording.
  5. Control the robot with the keyboard, use a to steer left, and s to steer right.
  6. Type p to stop recording.
  7. Grab the recorded .gif and .txt file from the OpenMV SD card (USB mount) and copy them to your local data storage directory (for example data in the autopilot directory)

Augmenting and uploading data

Use the following terminal commands to augment & upload all data stored in the train and test directories to the train & test dataset of your Edge Impulse project.

find data/train | grep .gif | xargs -I"{}" python3 process_data.py training {}
find data/test | grep .gif | xargs -I"{}" python3 process_data.py testing {}

Model training

  1. Add an Images input block, a Image DSP block and a Keras learn block to your projext.
  2. Set the input block image resolution for your project to 160 x 120 (width x height).
  3. Set the color depth for the DSP block to Grayscale.
  4. Generate the DSP features.
  5. Switch the Keras block to expert mode and paste in the code from train.py.
  6. Train the neural network.

Model deployment

  1. Go to the deployments tab in the Edge Impulse studio and select the 'OpenMV' deployment type and download the ZIP file.
  2. Open the ZIP file and copy the trained.tflite file to the OpenMV SD card (USB mount) storage.
  3. Power up the openMV without a USB data connection, it should then run the program in autopilot mode automatically. With a data connection active type a for autopilot mode when prompted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.