Zero-Shot Eggshell Crack Detection Using Grounding DINO and FFT-Based Outer-to-Inner Ring Energy Ratio

This study presents a novel approach to eggshell crack detection by integrating zero-shot learning with advanced image analysis techniques. The proposed method utilizes a hybrid dataset composed of a custom hen egg collection—50 tray images containing 30 eggs each arranged in a 6×5 grid—and the Botta et al. duck egg dataset, comprising approximately 1,000 images of cracked and intact eggs. Using YOLOv8s and the Fast Segment Anything Model (FastSAM), we generate bounding boxes, annotate segmentation masks, and crop background-free images, resulting in a curated set of 1,500 hen egg images alongside the processed duck egg samples. To localize crack regions accurately, we employ Grounding DINO with Fine-Grained Prompting. To distinguish cracks from dirt and subtle surface irregularities, we introduce a novel frequency-domain feature: the FFT-based Outer-to-Inner (O/I) Ring Energy Ratio, which enhances the visibility of fine anomalies. Our zero-shot detection model achieves an average accuracy of 92.54% across 10-fold cross-validation on both datasets—without retraining—demonstrating strong generalization and eliminating the reliance on labeled training data. We benchmark our approach against supervised models (CNN, SVM, XGBoost, k-NN) and popular zero-shot and anomaly detection frameworks (CLIP, CLIPSeg, Florence-2, and SAA). For real-world validation, we implement our system on an egg-belt conveyor using a low-cost CCD microscope camera capturing 60 FPS video. The model processes one hen egg in tray images at 7.79 FPS in simulation and 0.44 FPS in real-time video testing, enabling inspection of approximately 1,794 eggs per hour per camera. The system’s scalability with multiple cameras enables adaptation to industrial egg-sorting speeds. The results demonstrate significant advancements in crack detection accuracy and throughput, highlighting the potential of combining frequency-based image analysis with zero-shot prompting for scalable, real-time quality control in the poultry industry. The full implementation and associated dataset are publicly available at: https://github.com/tomorn112/ZC-DINO-ER/.

Authors

Institutions

Publication Details

Journal
IEEE Access
Published
2025-01-01
DOI
https://doi.org/10.1109/access.2025.3571984
Primary Topic
Non-Destructive Testing Techniques
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Zero-Shot Eggshell Crack Detection Using Grounding DINO and FFT-Based Outer-to-Inner Ring Energy Ratio

Tuchsanai Ploysuwan, Tomorn Soontornnapar
IEEE Access
Non-Destructive Testing Techniques
article

Zero-Shot Eggshell Crack Detection Using Grounding DINO and FFT-Based Outer-to-Inner Ring Energy Ratio

Tuchsanai Ploysuwan, Tomorn Soontornnapar
article en

Abstract

This study presents a novel approach to eggshell crack detection by integrating zero-shot learning with advanced image analysis techniques. The proposed method utilizes a hybrid dataset composed of a custom hen egg collection—50 tray images containing 30 eggs each arranged in a 6×5 grid—and the Botta et al. duck egg dataset, comprising approximately 1,000 images of cracked and intact eggs. Using YOLOv8s and the Fast Segment Anything Model (FastSAM), we generate bounding boxes, annotate segmentation masks, and crop background-free images, resulting in a curated set of 1,500 hen egg images alongside the processed duck egg samples. To localize crack regions accurately, we employ Grounding DINO with Fine-Grained Prompting. To distinguish cracks from dirt and subtle surface irregularities, we introduce a novel frequency-domain feature: the FFT-based Outer-to-Inner (O/I) Ring Energy Ratio, which enhances the visibility of fine anomalies. Our zero-shot detection model achieves an average accuracy of 92.54% across 10-fold cross-validation on both datasets—without retraining—demonstrating strong generalization and eliminating the reliance on labeled training data. We benchmark our approach against supervised models (CNN, SVM, XGBoost, k-NN) and popular zero-shot and anomaly detection frameworks (CLIP, CLIPSeg, Florence-2, and SAA). For real-world validation, we implement our system on an egg-belt conveyor using a low-cost CCD microscope camera capturing 60 FPS video. The model processes one hen egg in tray images at 7.79 FPS in simulation and 0.44 FPS in real-time video testing, enabling inspection of approximately 1,794 eggs per hour per camera. The system’s scalability with multiple cameras enables adaptation to industrial egg-sorting speeds. The results demonstrate significant advancements in crack detection accuracy and throughput, highlighting the potential of combining frequency-based image analysis with zero-shot prompting for scalable, real-time quality control in the poultry industry. The full implementation and associated dataset are publicly available at: https://github.com/tomorn112/ZC-DINO-ER/.

IEEE AccessVol. 13
King Mongkut's Institute of Technology Ladkrabang (TH)
King Mongkut's Institute of Technology Ladkrabang
Affordable and clean energy
Openalex Percentile: Top 89%
Non-Destructive Testing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.