Skip to content

Avinash10000/SARBnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The SARB

Note: We used Compostnet as our dataset.

We created a bin, known as the SARB(self automated recycling bin), using the raspberry pi, that sorts out different types of waste materials automatically. The person has to put the item in the bin and then it will land on a slab of wood inside the bin. The item will be detected at first by a PIR sensor attached to our Raspberry PI. This sends a notification to the Camera Module(v2), which scans the object and then uses an image recognition software known as tensorflow (coded into our raspberry pi 4b) to work out whether the item is recyclable or not. A motor attached to the raspberry pi is instructed to move a lever, which is connected to a pivot, towards the required side of the right bin. Then the slab of wood collapses to put the item in its respective bin. We aim to reduce the amount of waste sent to landfills and incinerators and conserve natural resources. As recycling saves energy it also reduces greenhouse gas emissions, which helps to tackle climate change. Our automated recycling bin could be a step in the right direction to solve climate change. The steps to replicating the code that we used are below.

Step 1: Getting the code

Clone the GitHub onto a raspberry pi, using 'git clone ' on the raspberry pi terminal.

Step 2: Run the code or Create your own dataset.

The datasets.md page has a link to the google drive here the train and test folders are. on your raspberry pi, download the folders onto the pi and then save them in the folder which has the cloned Github repository.

Step 3: Run SARBnet.ipynb with the right file paths.

all you have to do is run SARBnet.ipynb: images should be 64,64,3.

Step 4: Run SARBnet_2.ipynb (constants and requirements)

Download all required modules and specify the constants you need

Step 5: Run SARBnet_2.ipynb (Taking Picture and Running PIR Sensor/PiCamera/Servo Motor Code)

Run the code in the Taking Picture and Running PIR Sensor/PiCamera/Servo Motor Code. This code combines the PIR Sensor signal of a movement with the Camera Module V2, whcih takes a photo. then the photo is classified and depending on its classification, the servo motor will be instructed to move a certain direction. Also, make sure you have a copy of the trained model (linked to on 'train_model(h5).md') in the same folder as SARBnet_2.ipynb.

An Alternate Route that Will save you time.

if you do not want to train the CNN/ neural network at all, you can skip SARBnet_1.ipynb.

Model Summary and Loss/Val Loss Chart

loss_and_val_loss

Above is the train_loss and val_loss.

Below is the model_summary

This is the Model Summary

Predictions

These are the predictions that the SARBnet.ipynb code produced.

prediction_2 prediction_3 prediction_4 prediction_5 prediction_6 prediction_7

Useful Links:

The link to SARBnet,ipynb is: here The link to SARBnet_2.ipynb is: here

About

This is all the code for the SARB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •