Artificial Intelligence helping us taking care of our planet.



How often have you tried to recycle your garbage but you didn't know what was recyclable and what wasn't?

In this new project, we are going to use Artifial Intelligence to help you recognise what garbage is recyclable or not. Thanks to Ml5.js and MobileNet, this computer is going to be able to recognise a picture of garbage, compare it to images stocked in the database, and say if weither or no it is recycable.

Our project is based on a few differents aspects. We are going to be using Ml5.js, MobileNet and p5.js. Mj5.js is a library with access to examples of codes and machine learning algorythms. MobileNet will allow us to recognise images. Many images can be detected, and AI will be able to store those images and recognize an other image. Thanks to comparaison between images, the user will be able to take a picture of some garbage and will be told if it's recycable or not.


MobileNet

We are going to create our own image classification. It involves organising data into categrories. In our project, we want to organise our data in an recycable or non recycable category. We are going to use MobileNet, that classifies images with labels from the ImageNet database.

Watch the videos below to understand more about Image classification with MobileNet.

Thanks to ml5.js, we have a access to a library that provides access to machine learning algorithms. We are today interested in the ImageClassifier, as you can see in the image below.



Creating our own model

We are going to need to fill up our model with different images of garbage. Our AI needs to be able to differentiate recyclable and non recycable types of garbage.It can be done using pre-labeled datasets.


Exemples of labeled images.

Recyclable garbage

Non recycable garbage


Using ML5 and P5

We are going to need to set up P5.js and MobileNet. Here is an example of code found on ml5.

Click on this link to see the code.


To conclude

We now know how to create an app, that is going to be helpful for our environnement. By taking pictures of their garbage, people will know what bin to put them in. The computer is going to be able to recognise it.