/Lobe2Microbit

Simple proof of concept webpage that loads models trained with Lobe and sends detected labels to Microbit

Primary LanguageJavaScriptThe UnlicenseUnlicense

Lobe to MicroBit

Dead simple example of integration between the image recongition software Lobe and Microbit.

It's a webpage that loads a model produced by Lobe and sends recognised labels to a serial interface, which can be plugged to a Microbit or any other device (even an Arduino).

Why?

Why not?

The idea is to test possible applications of Machine Learning with embedded devices, such as Microbit and Arduino.

How?

  1. Train a model with Lobe.
  2. Export your model as a Tensorflow.JS example.
  3. Copy the content of the folder that you have just exported into the model folder.
  4. Serve the webpage with a local web server, such as the Live sever for VSCode or any other really.
  5. Prepare code for Microbit (or other board) so that it can parse text from the serial line with a format like the following: label,confidence\n (each "event" is sent as a separate line). If you work with Microbit, you can use this example code which shows a different icon (🍌 or 🍎) depending on the label it receives ("banana" or "apple"). Change it according to your labels and idea.
  6. Open the webpage in Chrome, give it access to your camera, connect it to Microbit and have fun.
  7. You can change the rate at which events are sent to Microbit and put a threshold under which labels are not sent.

Who?

Developed by Dario Salvi, with the help of Jens Pedersen, for the Master in Interaction Design of Malmo University.