Coder Social home page Coder Social logo

smellslikeml / droop_detection Goto Github PK

View Code? Open in Web Editor NEW
23.0 3.0 1.0 18.81 MB

Conserve water with image classification for plant droop detection deployed on the Arduino platform.

Home Page: https://smellslike.ml/posts/tf-microcontroller-challenge-droopthereitis/

C 19.51% C++ 30.30% Jupyter Notebook 50.18%
tensorflow image-classification tinyml arduino edge-ai

droop_detection's Introduction

Droop Detection

Read the blog

droop-demo

Project "Droop, there it is" aims to reduce water consumption by triggering irrigation events only when drought stress is identified. A battery-powered Arduino Nano 33 BLE sense running an image classifier to identify plant "droopiness" can be deployed in fields without power to signal nearby irrigation equipment.

This tinyML use case features Knowledge Distillation to reduce a powerful image classifier for deployment on limited capacity devices.

Materials

Installation

Install tensorflow version 2.4.0 to train and deploy this example.

pip install tensorflow==2.4.0

You'll also need the model conversion utility tool xxd. On Linux (Debian) systems, this can be installed via:

sudo apt-get update && sudo apt-get -qq install xxd

Finally, make sure you install the Arduino IDE.

Under Tools > Manage Libraries..., search for tensorflow and make sure to install "Version 2.4.0-ALPHA" and match the python installation. Install ArduCam dependencies using these instructions.

Usage

To train and prepare your own model, run the droop_detection.ipynb notebook and update the model file found in arduino/droop_detection/

Connect the ArduCAM to the Arduino as follows:

Arducam pin name Arduino pin name
CS D7 (unlabelled, immediately to the right of D6)
MOSI D11
MISO D12
SCK D13
GND GND (either pin marked GND is fine)
VCC 3.3 V
SDA A4
SCL A5

In the Arduino IDE, load the arduino/droop_detection/ example, connect your Arduino, and compile and upload!

In this example, we use a green flash to indicate droop, red for no droop, and blue to signal taking an inference step.

You can easily adapt this example to classify any set of labels! Simply make sure to update label names, label indices, and input parameters appropriately.

References

droop_detection's People

Contributors

smellslikeml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.