Abstract:In practical egg defect detection for industrial production, the diversity of defect categories, difficulty in obtaining defective samples, and time-consuming labeling processes significantly limit the application of deep learning methods in large-scale egg production lines. To address these challenges, an unsupervised anomaly detection model, SimpleNet – DA – SE, was proposed for defective egg identification. The proposed approach employed SimpleNet as the foundational unsupervised framework and selected EfficientNet as the optimal pre-trained feature extractor through comparative analysis of visualization heatmaps. Multi-scale information fusion was implemented to accurately extract edge detail features of eggs. To enhance the model's effectiveness in identifying multiple defect categories, a dynamic Gaussian noise perturbation strategy was introduced to construct a precise unsupervised anomaly boundary generator. Additionally, an attention mechanism was embedded into the original network to strengthen the model??s focus on egg defect information and improve discriminator performance. Experimental results demonstrated that the improved defective egg anomaly detection model SimpleNet – DA – SE, trained exclusively on normal egg samples, achieved an image-level area under the ROC curve (I-AUROC) of 94.96% , pixel-level area under the ROC curve (P-AUROC) of 85.38% , with accuracy, recall, and F1-score of 91.58% , 92.14% , and 94.16% , respectively. Finally, the model was deployed on edge devices for egg defect detection trials. Post-deployment experimental results showed an image detection accuracy of 90.6% with an average detection time of 0.176 s per image. Real-time camera detection achieved 89.4% accuracy with model detection time of 0.195 s per image, meeting the requirements for practical production line applications.