Before we start making the waste collector, we have to make a Machine Learning model for identifying the type of waste – paper or e-waste.
We will do this using Teachable Machines that allows a fast, easy way to create machine learning models for your projects.
Teachable Machine only works on Laptop. So you will have to make the model on your laptop for this activity.
Collecting Data for ML Model
Follow the steps to collect the data for our Machine Learning model:
- Go to Teachable Machines: https://teachablemachine.withgoogle.com/
- Click Get Started and select Image Project. You will get the ML training layout:
- Rename the first class name as Paper.
- Select Webcam and collect samples (Move the paper around to collect a variety of images). You need to show the waste in front of the camera of your laptop/webcam.
If you want to train the model using a smartphone’s camera then you need to download the DroidCam. Install the DroidCam application on your mobile phone from here.
And install the DroidCam Windows Client on your Laptop from here
and make the necessary changes.
- Next, rename class 2 as E-Waste and collect data using a battery:
- Next, add another class and rename it to Background. Take data without paper or battery.
With this, you have the data for your ML model.
Training the Model
Now we have to train the model. Click on the Train Model buttons to start.
Testing the Model
Once it is trained, we can see how well it is working in the preview tab. Select the appropriate webcam and start:
Exporting the Model