-
-
Item check on a phone: the model names the device, says to keep it out of the bins, and explains how to drop it off.
-
When the model is unsure, it asks one question a person can answer instead of guessing.
-
X-ray line: twelve test X-rays scanned; devices with a battery are pulled for removal, with a running tally.
-
Two batteries found inside a remote control, so the device is pulled for battery removal before shredding.
-
A night light with an empty battery compartment and no battery passes on to the shredder.
-
Measured on 91 devices the models never saw: 294 of 304 X-rays with a battery flagged, 80% of devices named.
Track: Theme track, Rethinking Waste.
The waste problem and how we would measure success
Batteries inside thrown-away devices, lithium-ion above all, get crushed in garbage trucks and torn open in e-waste shredders, and they start fires. The US EPA asks people to keep batteries and the devices that contain them out of household trash and recycling bins and take them to separate collection points, but the batteries are often hidden inside toys, toothbrushes, phones and remotes. CellSpot works at both ends. Before the bin, a resident photographs an item and learns that it has a battery and where it should go; when the model is unsure, it asks one question instead of guessing. At an e-waste plant, an X-ray of each device shows whether a battery is still inside, so the device is pulled for removal before shredding. We measured both on 91 devices the models never saw: the X-ray detector flagged 294 of the 304 X-rays with a battery and missed 10, and the photo check named the device in 65 of 91 photos and asked the question on the rest. In a pilot, success would mean fewer batteries reaching trucks and shredders, measured by battery items found in bin audits before and after, and by batteries found after shredding per tonne.
Try it
- Live site: https://hyunsikparker.github.io/cellspot/ (runs in the browser; nothing is uploaded).
- Item check: take or choose a photo, or tap a test photo.
- X-ray line: press Scan all test X-rays, or open one of the twelve test X-rays.
- Results: the measured numbers on devices the models never saw.
Inspiration
Garbage trucks and recycling plants keep catching fire, and a common cause is a battery hidden inside something that looked like ordinary trash: a toy, an electric toothbrush, a remote. The US EPA asks people to keep batteries and the devices that contain them out of household trash and recycling bins, but you have to know the battery is there.
What it does
- Item check (phone). Photograph an item. The model names the device and, since every device type it knows has a battery, says to keep it out of the trash and recycling bins and to take it to a battery or electronics drop-off, with the EPA's advice on taping or bagging loose batteries. When it is unsure, it asks one question: does it charge, light up, make a sound or have a screen?
- X-ray line (e-waste plant). The detector marks batteries and empty battery compartments on each X-ray and decides whether to pull the device for battery removal before shredding, with a running tally.
- Results. The numbers measured on devices the models never saw, including what the models get wrong.
How we built it
XBAT+ 1.0 from the University of Limerick (CC BY 4.0) has webcam photos and X-rays of the same 421 battery-containing devices, split by device into 330 for training and 91 for testing. We fine-tuned a MobileNetV3-Large classifier on the photos (15 device types) and a Faster R-CNN MobileNetV3-FPN detector on the X-rays (the 15 device types plus Battery and NoBattery, an empty battery compartment) in PyTorch on a laptop GPU. The classifier's learning rate, input size and class balancing were chosen by 5-fold cross-validation on the training devices; the detector's score threshold was chosen on validation devices for at least 90% precision. Both models are exported to ONNX and run in the browser with onnxruntime-web on a static GitHub Pages site, so photos and X-rays never leave the device.
Results on devices the models never saw
- X-ray: 294 of 304 X-rays with a battery flagged (97%), 10 missed, 26 of 178 without a battery flagged; battery AP50 0.82.
- Photos: 80% of devices named correctly, 90% right in the top two. With the app's rule (name the device at 60% confidence or more, otherwise ask), it named 65 of 91, 8 of them with a wrong name but the right advice, and asked on 26.
Challenges we ran into
- The dataset ships labels without class names. We recovered the order from the images and the per-class counts, and checked that the splits share no device.
- Exporting Faster R-CNN to ONNX failed at run time when traced on a blank image; tracing on a real X-ray fixed it.
- Int8 quantization would shrink the detector from 76 MB to 20 MB but missed more batteries, so the site loads the full model once.
- Catching unfamiliar items: checks on how far a photo's embedding sits from the training photos let 60-91% of X-ray images through, so the app keeps its confidence threshold and asks the question.
Accomplishments that we're proud of
- Both checks run on a phone or laptop with no server and no upload.
- Every number on the site comes from devices the models never saw, and the site shows its misses next to its hits.
What we learned
- Seven of the photo model's 18 test errors named one of the two device types it saw most, phones and remotes. Every wrong name still gave the right advice, so asking when unsure mattered more than squeezing out accuracy.
- A small validation set could not separate training settings; cross-validation by device could.
What's next for CellSpot
- Photos taken on phones and X-rays from other scanners, to check how the numbers carry over.
- A drop-off finder by location, and a facility mode that reads images straight from a scanner.
Log in or sign up for Devpost to join the conversation.