Real-Time Detection of Rotten Eggs on Android Devices Using Deep Learning and Computer Vision Setiyaki Aruma Nandi*, Citra Mayzahra Putri, Keiza Alfera Hummairo Assyura, Lusi Natalia Nababan, Yusuf Hendrawan
Department of Biosystem Engineering, Faculty of Agricultural Technology, University of Brawijaya
Jalan Veteran No. 12-16, Malang 65145, Indonesia
*Email: setiyaki13nandi[at]gmail.com
Abstract
Eggs are an essential source of animal protein widely consumed across various sectors, yet their perishable nature and limited shelf life make them vulnerable to quality deterioration. Traditional freshness detection methods such as water immersion, candling, or cracking are often inconsistent, impractical for large-scale use, and may cause unnecessary food waste. This study presents the development of Android-based application utilizing the YOLOv12 object detection model to assess egg freshness in real-time without damaging the shell. The dataset, consisting of fresh and rotten egg images captured using a smartphone camera, underwent preprocessing, manual labeling, and augmentation via Roboflow. The YOLOv12n model was trained in Google Colab, achieving a mean Average Precision at IoU 0.50 (mAP50) of 0.991, precision of 0.944, and recall of 1.0. Deployment was carried out by converting the trained PyTorch model to TensorFlow Lite and integrating it into an Android application developed in Kotlin. Field testing demonstrated high detection accuracy, although minor false positives occurred due to limited dataset diversity, indicating a need for expanded and more varied training data. Compared with conventional methods, the proposed system is more practical, cost-effective, and capable of real-time analysis. This application has the potential to reduce food waste, improve food safety, and support sustainable egg distribution and consumption practices.
Keywords: Computer Vision- Deep Learning- Eggs Freshness- YOLOv12
Topic: Smart technology for sustainable agro-industry