UC Berkeley team project, January to May 2026
Automated waste sorting with computer vision
A two-stream sorter for recyclables and general waste. An infrared break-beam sensor triggers image capture, a ResNet50 convolutional neural network fine-tuned from ImageNet weights classifies the item, and a servo-actuated tilting platform deposits it by gravity into the matching bin. Designed, built, and trained by a 14-person interdisciplinary team in one semester; the unit is now in daily use.
- Peak classification confidence
- 95%
- Training images
- 10,000+
- Enclosure (in)
- 15×30×20
- Team members
- 14
Sorting sequence
Every item passes through the same five-stage sequence: deposit, detection, image capture, inference, and actuation. Select an example item to step through it.
- 1
Deposit
The item lands on a single-axis hinged platform inside the intake chamber.
- 2
Detection
The item interrupts an infrared break-beam at the intake, sending a trigger signal to the Raspberry Pi.
- 3
Image capture
A lid-mounted Pi camera acquires a single frame of the item on the platform.
- 4
Inference
The frame is sent to a FastAPI inference server running the ResNet50 model, which returns a predicted class and its softmax confidence.
Pick an item above.
-
5
Actuation
RecyclingRecyclable, confidence above thresholdTrashGeneral waste, or confidence below threshold
The decision rule is deliberately asymmetric. Any prediction below the confidence threshold defaults to general waste, because a false positive (trash sent to recycling) contaminates the recycling stream, while a false negative only loses one recyclable item. The threshold trades recall on the recyclable class for higher precision.
Hardware
Sorting combines active actuation with passive, gravity-driven transport: the servos set the platform's inclination, and gravity moves the item.

Mechanical design
Waste enters through the top intake and comes to rest on a platform hinged about a single axis. Once a classification is returned, the Raspberry Pi drives two 25 kg·cm servos mounted at the platform base with a PWM signal, rotating the platform to a preset angle toward the target bin. The item then slides off under gravity. Using gravity for transport keeps the mechanism to one degree of freedom and two actuators.
The enclosure was modeled parametrically in SolidWorks. We defined the outer enclosure and bin layout first, then integrated the intake chamber and pivoting platform, and iterated on clearances until the platform could rotate fully in both directions without interference.
Components
- ControllerRaspberry Pi
- SensingIR break-beam sensor, Pi camera
- Actuation2 × 25 kg·cm servos on PWM
- PowerUSB power bank
- EnclosurePolycarbonate intake, painted wood frame, 15 × 30 × 20 in

Electronics
A single Raspberry Pi handles sensing, communication, and control. The camera module connects through the CSI ribbon port and is mounted in the lid above the intake. The IR break-beam sensor and both servos connect to GPIO, with each servo receiving power, ground, and a PWM control line.
Component placement follows the item's path through the system: the sensor at the point of entry, the camera directly above the resting position, and the actuators beneath the platform.
Classification model
Binary image classification (recyclable vs. general waste) by transfer learning from an ImageNet-pretrained ResNet.
Architecture and training
The deployed classifier is a ResNet50 convolutional neural network trained on 10,000+ labeled images from a public Kaggle dataset. Initializing from ImageNet weights lets the network reuse general visual features (edges, textures, shapes), which converges faster and generalizes better on a dataset of this size than training from random initialization.
Before the final model, we trained a lighter ResNet-18 baseline with the same pipeline to validate the approach. It reached 95.2% validation accuracy after 8 epochs, as shown in the accuracy curve.
Preprocessing and augmentation
Images were resized to 224 × 224 pixels and normalized to the ImageNet channel means and standard deviations, matching the statistics of the pretrained weights. Random horizontal flips, rotations, and color jitter were applied during training to reduce sensitivity to orientation and lighting. Training used the Adam optimizer with cross-entropy loss.
Deployment
Inference runs on a FastAPI server (Uvicorn). The Raspberry Pi posts each captured frame to the server, receives the predicted class and confidence, applies the threshold rule, and issues the corresponding servo command.


Odor control and material selection
The chemical engineering subsystem: sanitation and odor management inside a closed container, and material choices for a moist, mixed-waste environment.

Disinfectant
The cleaning solution is 70% (v/v) isopropyl alcohol, diluted from 91% stock. Aqueous alcohol at this concentration is a more effective disinfectant than higher concentrations: water slows evaporation, extending contact time, and is required for the alcohol to penetrate cell walls and denature proteins. We compared several dilutions to balance material cost against cleaning efficacy.
Scent
The first formulation dissolved fragrance in the alcohol carrier. Because the carrier is highly volatile, the fragrance evaporated with it and odor masking did not persist. We switched to an oil-based fragrance, whose lower vapor pressure gives a slower, sustained release inside the enclosed bin.
Materials
The intake chamber is polycarbonate, chosen for its resistance to moisture from wet waste and its optical transparency, which gives the camera a clear view of the platform. Structural members and bins are wood, which is far easier to machine and modify than polycarbonate and suited rapid iteration during prototyping.
Development
From initial CAD concept to a working, tested unit.

Initial CAD concept 
Enclosure assembly 
Build planning 
Model training 
Disinfectant formulation 
Camera and sensor integration
Videos
Demo
Second demo
Assembly timelapse
Team
Fourteen UC Berkeley students across chemical, mechanical, and civil engineering, EECS, and data science.

Aiden ReyesEECS, 2029
Angel RamirezEECS, 2029
Boyi HuMechanical Engineering, 2029
Deetya SrivatsavayaMechanical Engineering, 2029
Genevieve MoralesChemical Engineering, 2029
Jerry ZhangData Science + Statistics, 2028
Johnson ToChemical Engineering, 2029
Lana MoraledaChemical Engineering, 2029
Megan ZhangData Science, 2029
Michael NguyenData Science, 2029
Natasha NirmalData Science, 2028
Nick DengEECS, 2029
Victor NolascoCivil Engineering, 2029
Wyndham WooData Science, 2029