Nondestructive Identification of Eggshell Cracks Using Hyperspectral Imaging Combined with Attention-Enhanced 3D-CNN
Eggshell cracks are a critical factor affecting egg quality and food safety, with traditional detection methods often struggling to detect fine cracks, especially under multi-colored shells and complex backgrounds. To address this issue, we propose a non-destructive detection approach based on an enhanced three-dimensional convolutional neural network (3D-CNN), named 3D-CrackNet, integrated with hyperspectral imaging (HSI) for high-precision identification and localization of eggshell cracks. Operating within the 1000-2500 nm spectral range, the proposed framework employs spectral preprocessing and optimal band selection to improve discriminative feature representation. A residual learning module is incorporated to mitigate gradient degradation during deep joint spectral-spatial feature extraction, while a parameter-free SimAM attention mechanism adaptively enhances crack-related regions and suppresses background interference. This architecture enables the network to effectively capture both fine-grained spatial textures and contiguous spectral patterns associated with cracks. Experiments on a self-constructed dataset of 400 egg samples show that 3D-CrackNet achieves an F1-score of 75.49% and an Intersection over Union (IoU) of 60.62%, significantly outperforming conventional 1D-CNN and 2D-CNN models. These findings validate that 3D-CrackNet offers a robust, non-destructive, and efficient solution for accurately detecting and localizing subtle eggshell cracks, demonstrating strong potential for intelligent online egg quality grading and micro-defect monitoring in industrial applications.
Authors
- Jun Huang (ORCID: https://orcid.org/0000-0001-5893-4090)
- Chongkai Liu (ORCID: https://orcid.org/0009-0009-3121-3707)
- Ailing Zheng (ORCID: https://orcid.org/0000-0002-8200-3963)
- Huanjun Hu (ORCID: https://orcid.org/0009-0003-0912-8641)
- Hao Li (ORCID: https://orcid.org/0000-0003-2769-4842)
- Yong Ma (ORCID: https://orcid.org/0000-0003-1302-9956)
- You Wei Du
Institutions
- Wuhan Polytechnic University (CN)
- Wuhan University (CN)
Publication Details
- Journal
- Foods
- Published
- 2025-12-05
- DOI
- https://doi.org/10.3390/foods14244183
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 0.00