In the United States, half of all food produce is thrown away each day, either due to perceived imperfections in quality, or being in the same supermarket batch as other produce that has begun to spoil. However, most of the produce that is thrown away is still perfectly good for human consumption, and once in landfills, discarded produce produces methane, a greenhouse gas more than 25 times more impactful to global warming than carbon dioxide.
In our project DeepFresh, we aim to help solve both these problems of food insecurity and climate change through the lens of automating supermarket food waste disposal. We use a PyTorch backend of transfer learning YOLOv5s on images preprocessed with OpenCV, in conjunction with a LibTorch/Swift/Objective-C front-end to perform dynamic segmentation of fresh and rotten fruit through a smartphone camera, enabling real-time automated detection of freshness across farms and supermarkets, preventing fresh produce from being wasted unnecessarily.