Revolutionizing Egg Quality Control: Advanced Prompt-based Models for Automated Detection of Broken Eggs Without the Need for Training - Soontornnapar, Tomorn; Praneenatthavee, Natdhanai; Ploysuwan, Tuchsanai (My University, 2025)
This paper proposes an end-to-end pipeline to detect broken eggs in a holder without extensive training, employing a two-step image segmentation and processing approach using saliency scores, all without relying on a large amount of labeled data. The process begins by inputting an egg image with text prompts into Grounding DINO, which returns an egg bounding box. This is followed by the segment anything model (SAM), which extracts the egg’s segmented region. The segmented region is then divided into two crucial components for detection: a binary mask image and a background-removed egg image. The innovation in our method lies in using the saliency score of the estimated anomaly region by employing image processing techniques to effectively distinguish between intact and broken eggs. To validate our approach, we compare it to well-known models such as SVM, XGBoost, and YOLOv8, and we also conduct zero-shot experiments with CLIPSeg, Florence-2, and SAA. In our experimental setup, we utilize 50 egg holder images, each containing both intact and broken eggs. We carefully cropped and processed 30 eggs (arranged in a 6×5 grid) from each holder, resulting in a comprehensive testing dataset totaling 1,500 images. Our results demonstrate the robustness of our method, achieving an impressive 99.56% accuracy in detecting both intact and broken eggs. This breakthrough promises significant advancements in the field of broken egg detection, with broad applications across diverse industries, including food safety, quality control, and automated packaging systems.
Keywords: Broken egg detection; Grounding DINO; image processing; machine learning; saliency score; SAM