Git Product home page Git Product logo

litter_detection's Introduction

A Litter Heatmap

This project uses a machine learning model to detect trash in images captured by a camera connected to a Raspberry Pi 4. The model was prepared using Edge Impulse and has an accuracy of 85% and is deployed using a TFLite interpreter. When trash is detected, the location is sent to a Firebase account and displayed on a Heatmap using react-leaflet.js, which uses OpenStreetMap.The project also includes code for capturing an image using OpenCV and a Raspberry Pi camera, sending data to Firebase, and displaying trash location on a heatmap using React Leaflet and OpenStreetMap.

Requirements

  • Raspberry Pi 4
  • Camera
  • GPS module
  • OpenCV
  • TensorFlow Lite
  • Firebase

Getting Started

To get started with this project, you will need the following:

  • A Raspberry Pi 4 with camera and GPS modules
  • The final_pred2.py file in this repository
  • A Firebase account
  • The TensorFlow Lite model file my_model.tflite
  • Edge Impulse account for model preparation and dataset creation
  • Install all node modules necessary to run the website

To prepare the machine learning model and dataset, follow this link to Edge Impulse.This is where I have written the code for machine learning model preparation.

Setup

  1. Attach the camera and GPS module to the Raspberry Pi 4.
  2. Install OpenCV, TensorFlow Lite, and Firebase on the Raspberry Pi 4.
  3. Clone the repository.
  4. Make sure final_pred2.py and my_model.tflite are in the same directory.
  5. Run the final_pred2.py file.

Running the Code

To run the code, make sure the Raspberry Pi is connected to the camera and GPS modules.

References

litter_detection's People

Contributors

satyaswarup11 avatar

Watchers

 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.