Skip to content

A NodeMCU-ML based project which performs extensive waste classification by leveraging ResNet50's precision and ESP8266's extensibility.

Notifications You must be signed in to change notification settings

Srinath-13/NodeMCU-ML-Waste-Classifier

Repository files navigation

NodeMCU-ML-Waste-Classifier

Wastebot's goal is to develop an in-house tool that would assist people in sorting their trash before throwing it away. Using a Convolutional Neural Network (ResNet50), the proposed work aimed to create an image classifier that identifies the object and detects the type of waste material, and classifies it to six different classes, paper, cardboard, glass, plastic, trash, and metal. The ESP32 CAM captures the image of the garbage, and the machine learning model classifies it into one of the six categories, which are grouped into recyclable (paper, cardboard) and non-recyclable (plastic, glass, metal, trash). Once the trash has been classified, it is put into the appropriate portions of the bin, and the model uses ESP8266 and a servo motor to operate this.

Requirements

Hardware

● ESP32 ● ESP8266 ● FTDI Board ● Ultrasonic Sensor ● Servo Motor ● Jump Wires

Software

● Python ● Tensorflow ● PHP ● Flask ● Colab ● Kaggle ● Arduino IDE ● VSCode

Prototype

Walkthrough

The below sequence of images depicts the process of waste segregation. The ultrasonic sensor first correctly determines whether or not an object is present within a proximity of 5 cm to 15 cm. The ESP32 camera module is prompted to capture a picture of the identified object as soon as its presence is recognised. The captured image is then sent as a stream of bytes to the PHP server, where it is then sent to the Flask server, where the data is classified by the pre-trained ML model. Paper, cardboard, and rubbish are classified as recyclable waste, however the other waste types are not. Once the classification has been completed, the matching signal—high for recyclable materials and low for non recyclable—is delivered back to the PHP server, which then relays the findings to the ESP32. This signal is subsequently transmitted to the ESP8266, which activates the attached servo motor. The servo motor turns to the right when the signal is high, which indicates recyclable waste, and to the left when the signal is low, which indicates non-recyclable waste, pushing the rubbish to the left partition. The proper outcomes are acquired for various forms of garbage thanks to the efficient operation of this process

User opens the bin
User places the object on the flap
Output detected by Ultrasonic Sensor
Image Captured by ESP32 CAM
Image transmitted to PHP Server
Prediction Result (From Flask ML Server via PHP Server)
Flap rotation to segregate the waste
Flap reset to Normal

About

A NodeMCU-ML based project which performs extensive waste classification by leveraging ResNet50's precision and ESP8266's extensibility.

Topics

Resources

Stars

Watchers

Forks