Semmeldetector: Application of Machine Learning in Commercial Bakeries
Thomas H. Schmitt, Maximilian Bundscherer, Tobias Bocklet
TL;DR
This work tackles the challenge of detecting and counting diverse baked goods in commercial bakeries with a limited dataset. It combines Copy-Paste data synthesis, SAM-based annotation, and grayscale imagery to train a YOLOv8 detector, achieving a strong $AP_{50}$ on a held-out test set (up to $89.1\%$) using $1280$ px input resolution. Ablation studies demonstrate the value of synthetic data and grayscale processing for robustness, while highlighting remaining confusions among morphologically similar items. The approach is demonstrated as an end-to-end pipeline, including an iOS deployment, with practical implications for reducing unsold product waste and improving bakery production planning. The results suggest that carefully engineered data augmentation and model scaling can overcome data scarcity in specialized industrial domains, enabling real-world optimization in the baking industry.
Abstract
The Semmeldetector, is a machine learning application that utilizes object detection models to detect, classify and count baked goods in images. Our application allows commercial bakers to track unsold baked goods, which allows them to optimize production and increase resource efficiency. We compiled a dataset comprising 1151 images that distinguishes between 18 different types of baked goods to train our detection models. To facilitate model training, we used a Copy-Paste augmentation pipeline to expand our dataset. We trained the state-of-the-art object detection model YOLOv8 on our detection task. We tested the impact of different training data, model scale, and online image augmentation pipelines on model performance. Our overall best performing model, achieved an AP@0.5 of 89.1% on our test set. Based on our results, we conclude that machine learning can be a valuable tool even for unforeseen industries like bakeries, even with very limited datasets.
