By: Deepesh Singh, Vishnu Iyengar, Vinay Pritamani
This class has encouraged us to think about CO2e emissions and edge devices when applying AI to problems, and that has led us to the natural question: what is the minimum amount of compute, power, CO2e emissions, etc. to solve a given problem? We have learnt that the lower this is, the more accessible and environmentally friendly technology can be. Through this broad, general question, we wanted to find a real life problem to apply this to.
Determining whether a piece of waste is trash, compost, recycle, etc is a common problem which has been tackled by many different classification models over the past 10+ years. This is especially relevant in environmentally aware settings. However, models and the hardware that they run on can be expensive, and, if one were to do an LCA, one would likely find some level of carbon emissions that we are emitting in order to solve a problem to reduce carbon emissions or be more environmentally friendly. Because of this, our goal is to attempt to find the least amount (or some sort of lower bound) of compute power in order to maintain accuracy when solving this problem.
Prior work includes TrashNet (Thung & Yang, 2016) [1], a foundational framework and dataset of ~2,500 images across six categories whose native architecture consists of a straightforward Convolutional Neural Network (CNN) with three sequential convolutional layers, max-pooling layers, and fully connected dense layers. More recent efforts include WasteNet [2], an edge-optimized architecture designed for real-time classification on low-power devices, and GarbageNet [3], an advanced, award-winning framework that uses a weakly-supervised ResNet backbone, an attentive mixup mechanism, and latent space metric learning to seamlessly classify and add new waste categories without retraining. WasteDetection APIs (e.g., Imagga, custom Google Vision pipelines) offer cloud-based solutions but require connectivity and incur per-call costs. While knowledge distillation and model pruning literature explores efficiency (i.e. TinyML), few studies explicitly map the training set size × model size × accuracy space for a real-world sustainability task or frame the output as a minimum-viable-intelligence recommendation as our project does.
We used an open-source Kaggle dataset containing 12,000+ images of waste across 10 categories. The dataset was split into train, validation, and test sets, with the training pool itself swept across four sizes (20%, 40%, 60%, and 80% of the full dataset) to measure how model performance scales with available labeled data.
We selected ResNet-18 and ResNet-34 as our base architectures, both pre-trained on ImageNet and fine-tuned for our 10-class waste classification task. ResNet is the most widely adopted architecture for waste classification in the literature, and preliminary results showed both variants already achieved strong baseline accuracy on our dataset. Rather than exploring alternative architectures, we focused on understanding how training and hardware configurations affect the performance and efficiency of these two models specifically.
To capture power and resource consumption during training, we implemented a lightweight background monitoring thread that sampled GPU and CPU metrics at a fixed interval throughout each training run. GPU metrics were collected via pynvml, capturing instantaneous power draw (W), compute utilization (%), and memory usage (MB). CPU utilization and system RAM were collected via psutil. PyTorch's built-in torch.cuda.max_memory_allocated() was used alongside the poller to track peak GPU memory allocation with higher precision. Per-run summary statistics (min, avg, max for power and utilization, plus peak memory and total training duration) were written as additional columns to the main results CSV, while the full time-series of samples was written to a separate hardware metrics CSV for deeper analysis.
All training runs were executed on an A100 GPU, fine-tuning ResNet-18 and ResNet-34 across a full grid sweep of four epoch counts (1, 2, 4, 8), four training dataset sizes (20 - 80%), and evaluated at three inference image resolutions (256px, 128px, 64px - corresponding to scale factors of 1x, 0.5x, and 0.25x of the base image size). The inference scaling experiment was motivated by a practical edge deployment question: if the bottleneck for building a physical waste classification device is camera quality rather than storage or compute, how much accuracy can be traded away by using a lower-resolution camera? Each trained model was benchmarked at all three resolutions, and metrics including inference speed, test accuracy, and model size were logged per run.
ResNet-18 and ResNet-34 are more competitive than expected, with RN-18 actually achieving the best single-run accuracy in the new dataset at 94.82% (8 epochs, 80% train ratio) versus RN-34's best of 93.39%. At full 256px resolution, the average accuracy gap between the two models is less than half a percentage point (91.19% vs 91.57%), meaning the architectural difference matters far less than training configuration. Both models learn the bulk of their representations within the first 1–2 epochs while accuracy gains from epoch 4 to epoch 8 are typically under 1%, implying long training runs are a poor use of compute for this task as expected.
Image resolution has a more dramatic effect on accuracy than any training hyperparameter tested. Dropping from 256px to 128px costs roughly 13 percentage points of accuracy for both models, and dropping further to 64px reduces both to near-random performance (averaging ~41%), regardless of how many epochs were run or how much data was used. This means deployment decisions around input resolution are more consequential than choices about model size or training duration, and 64px should be considered unusable for this task.
As commonly noted in literature, more training data consistently improves accuracy at full resolution (i.e. RN-18 improves from 88.34% to 92.87% as the train ratio goes from 20% to 80%), but the marginal gain per additional 100 samples shrinks quickly, particularly at higher epoch counts. The resolution degradation gap (256px vs 128px) remains stubbornly constant across all train ratios, confirming that adding more data cannot compensate for resolution loss. The sweet spot across both models is 4 epochs with 60–80% of the data.
In line with expectations, GPU power draw is determined almost entirely by model architecture rather than dataset size or epoch count. RN-18 runs consistently at 111–233W average and RN-34 at 209–240W, with very little variation within each family regardless of how long or how much data was used. Training duration, by contrast, scales nearly linearly with epochs × dataset size, ranging from 7 seconds (RN-34, 1 epoch, 20% data) to 209 seconds (RN-34, 8 epochs, 80% data). Energy cost (watt-seconds) therefore scales the same way, and since accuracy gains plateau after epoch 4, runs beyond that point are paying increasingly high energy costs for diminishing returns.
Peak GPU memory is fixed within each model family regardless of training configuration. RN-18 holds steady at ~1,510 MB and RN-34 at ~1,921 MB across all epoch counts and dataset sizes. This shows that memory consumption is driven entirely by model weights and batch size, not by how much data is being trained on, which simplifies capacity planning.
At full 256px resolution, RN-34 is approximately 50% slower than RN-18 per image (0.65ms vs 0.43ms), a meaningful gap in a high-throughput recycling system. However, this gap nearly vanishes at 128px and below, where both models converge to under 0.1ms per image. Since 128px already incurs a ~13 point accuracy penalty, there is no resolution at which RN-34's inference cost is justified by a meaningfully better accuracy. RN-18 dominates on the speed-accuracy tradeoff at every resolution tested.
For a production garbage classification deployment, RN-18 at 4 epochs, 80% train ratio, and 256px input resolution is the optimal configuration. It achieves near-peak accuracy (93.19%), uses 21% less memory than RN-34, trains in under 70 seconds, consumes roughly a third of the energy of an 8-epoch run, and delivers faster inference. The only scenario where RN-34 is worth considering is if a future, larger dataset narrows RN-18's accuracy ceiling.
We created the following demo, which shows our pretrained models and how they perform on images from the test dataset. We pull 10 random images from the test dataset, one from each of the 10 classes. Having selected an image, one can optionally change the resolution of the image (to 0.5x or 0.25x) that will be fed into the model. The idea behind this is to gauge performance if we have a worse camera. Finally, we will performance inference on the image we chose and the resolution we set.
We order results first by which models got the prediction correct. Of the ones that got it correct, we then order by lowest train energy to highest train energy. Train energy was computed using Train Energy (J) = Train Duration (s) * Avg GPU Power (W). One can also see the amount of time that it took to perform inference on the image on the right. Finally, we can also see the class probability distribution to gauge the confidence that the model had on its prediction.
We can see that we don't need the model with the most amount of parameters or longest training time to make a correct prediction; for a simple task like this, a cheap model such as ResNet-18 trained on very few epochs suffices. Also, we can see a general trend that as the inference resolution decreases, the number of models that make a correct prediction decreases.
NOTE: While we would've loved to make this interactive demo available, we used a GPU cluster to perform inference and thus would be infeasible if we made this available 24/7 (would require permanently reserving GPUs).
By developing this framework and finding these results, we have built a methodology and results in order to make suggestions for the lowest amount of compute needed, and thus inform the minimum viable hardware necessary for building as lightweight of an edge device as possible in order to solve this image classification task. Specifically, we have found that the image size that one trains a model on is crucial for accuracy; while tradeoffs can be made on the model size (number of parameters), epochs, training set, etc., scaling down the inference image results in significantly worse accuracy. Thus, we can suggest that the camera on a lightweight edge device should match the image resolution of the training set. Through collecting compute metrics, this can be easily extrapolated towards finding carbon emissions and other LCA metrics. Additionally, this work offers a starting framework for finding minimum viable intelligence for any task, which makes it pliable to be adapted to other domains.
Future work would include exploring alternative smaller models with less layers (smaller than the 18 and 34 layers we explored) while still maintaining accuracy. Additionally, while we have made suggestions, transforming our final computed minimum compute needed into an actual, lightweight edge device would be the next natural step. Finally, this generalized framework for finding the Minimum Viable Intelligence can be applied to other problems.
[1] https://github.com/garythung/trashnet
[2] https://arxiv.org/abs/2006.05873
[3] http://ieeexplore.ieee.org/document/9435085
[4] https://stock.adobe.com/search?k=garbage+classification&asset_id=385815126
[5] https://sisu.ut.ee/waste/11-definition-and-classification-waste/
[6] https://www.kaggle.com/datasets/sumn2u/garbage-classification-v2