O
ne consequence of our efforts to build better,
more sustainable systems is having to learn
new rules for sorting thousands of objects into
trash, recycling, compost, hazardous waste, and
more. We are inevitably bound to make mistakes
and put things in the wrong bins.
Fortunately, as makers, we have the power to
build tools that make things easier. Enter: the
Raspberry Pi Trash Classifier (Figure
A
)!
For this system, I trained a model using Lobe,
a free, no-code app for building custom image
classification models, then exported the model
in TF Lite and deployed it on a Raspberry Pi 4 via
Python. When activated, its Pi camera will take a
photo, do inferencing on the image, and indicate
the resulting trash category with an LED.
I built this project to show and teach others
how to prototype a beginner-friendly custom
classifier using machine learning (ML) on an edge
device, like the Pi. This article will focus on ML
and Lobe so you can build your own ML models.
The full project write-up for the Trash Classifier
can be found at Adafruit: learn.adafruit.com/lobe-
trash-classifier-machine-learning. Additional
resources are available on the Github repo:
github.com/microsoft/TrashClassifier.
WHY ML?
An accurate trash classifier must recognize
objects at different angles, lighting, and states
of crumpled-ness, and also recognize patterns
across objects and materials. Its not feasible to
TIME REQUIRED:
60–90 Minutes
DIFFICULTY:
Beginner++
COST:
$70
MATERIALS
» Raspberry Pi 4 Model B, 2GB RAM
» Raspberry Pi Camera Board v2, 8 megapixels
» Raspberry Pi Power Supply, 5.1V 3A with USB-C
» SD or microSD memory card, 8GB SDHC
» Breadboard, half-size
» Pushbutton, on-off
» LEDs, 5mm (5)
» Resistors, 220
Ω
(6)
IF YOU CHOOSE TO SOLDER:
» JST connector (1) female end only
» M-to-F jumper wires (2)
» F-to-F jumper wires (10)
» Heat-shrink tubing
» Perma-Proto breadboard PCB, half-size
Adafruit #571
ENCLOSURE
» Project case, cardboard, wood, or plastic box,
approximately 6"×5"×4"
» Plastic square, clear, 0.5"×0.5" (2cm×2cm)
You can make it from a plastic food container lid.
» Velcro, adhesive-backed
SOFTWARE (PC-SIDE)
» Lobe free download from lobe.ai
» WinSCP or other SSH file transfer method
like CyberDuck for Mac
» Terminal
» Remote Desktop Connection or RealVNC
Also check out the new Microsoft Machine
Learning Kit for Lobe — it has hardware, including
a Raspberry Pi 4, for deploying ML models in the
physical world. adafruit.com/product/4963
TOOLS
» Wire cutters
» Soldering iron
» Helping hands (optional)
» Precision knife e.g. X-Acto knife
» Cutting mat
» Hot glue gun or other non-conductive glue —
epoxy works great but is permanent
JEN FOX is an engineer, maker, and educator.
After dabbling in dark matter, she settled into
engineering and inventing to solve problems
related to climate change and social justice. She
works full time at Microsoft as a senior product
manager for maker-related things and runs her
company, FoxBot Industries, on the side.
45
makezine.com
A
M77_044-47_SS_Trash_F1.indd 45M77_044-47_SS_Trash_F1.indd 45 4/11/21 1:11 PM4/11/21 1:11 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.72.224