A Transfer Learning Framework for Automated Egg Damage Classification Using Pretrained EfficientNet

Authors

  • Suyahman Suyahman Universitas Sugeng Hartono
  • Ardy Wicaksono Universitas Sugeng Hartono
  • Irvan Setiadi Kartawiria Universitas Sugeng Hartono
  • Kukuh Madyaningrana Universitas Sugeng Hartono

DOI:

https://doi.org/10.29207/resti.v10i5.7673

Keywords:

computer vision, EfficientNet, egg damage classification, food quality inspection, transfer learning

Abstract

Egg damage detection is important for maintaining food safety and operational efficiency in poultry production. Manual inspection is often inconsistent and difficult to scale, creating a need for accurate and computationally efficient automated methods. This study aims to develop and evaluate a transfer learning framework for automated egg damage classification using pretrained EfficientNet-B0. Three configurations were compared, namely Frozen Backbone Standard CE, Full Fine-Tuning Standard CE, and Full Fine-Tuning Weighted CE. The dataset was divided using a stratified 70:15:15 split, and the models were trained with AdamW, differential learning rates, early stopping, and image augmentation. Performance was assessed using accuracy, balanced accuracy, macro precision, macro recall, macro F1-score, weighted F1-score, confusion matrices, inference time, and Gradient-weighted Class Activation Mapping. The results show that Full Fine-Tuning Standard CE achieved the best overall performance, with an accuracy of 0.9917, balanced accuracy of 0.9947, macro F1-score of 0.9876, and weighted F1-score of 0.9917. The model correctly classified all non-damaged eggs and misclassified only one damaged egg, while maintaining an inference time of 29.53 ms per image. Weighted cross-entropy did not improve overall performance and increased false-negative predictions. Grad-CAM analysis showed that the model generally focused on relevant shell defects, although several errors were associated with background and contextual features. These findings demonstrate that full fine-tuning of pretrained EfficientNet-B0 provides an accurate, efficient, and interpretable solution for automated egg damage classification.

Downloads

Download data is not yet available.

References

[1] S. Molnár and L. Szőllősi, “Sustainability and Quality Aspects of Different Table Egg Production Systems: A Literature Review,” Sustainability, vol. 12, no. 19, p. 7884, Sep. 2020, doi: 10.3390/su12197884

[2] F. S. Nassar and A. O. Abbas, “Crisis and risk management in poultry production: Preparing future leaders for sustainability and food security,” Poultry Science, vol. 104, no. 12, p. 105903, Dec. 2025, doi: 10.1016/j.psj.2025.105903

[3] M. S. Istiak and A. Khaliduzzaman, “Poultry and Egg Production: An Overview,” in Informatics in Poultry Production, A. Khaliduzzaman, Ed., Singapore: Springer Nature Singapore, 2022, pp. 3–12. doi: 10.1007/978-981-19-2556-6_1

[4] F. S. Nassar, “Strategic role of poultry production sciences in shaping the future of global food security and strengthen sustainability,” Poultry Science, vol. 105, no. 5, p. 106617, May 2026, doi: 10.1016/j.psj.2026.106617

[5] A. Damena, A. Mikru, M. Adane, and B. Dobo, “Microbial Profile and Safety of Chicken Eggs from a Poultry Farm and Small-Scale Vendors in Hawassa, Southern Ethiopia,” Journal of Food Quality, vol. 2022, pp. 1–16, May 2022, doi: 10.1155/2022/7483253

[6] Y. Madhumala and V. S. Soraganvi, “Microbiology of Food Spoilage,” in Frontiers in Food Biotechnology, J. S. Yaradoddi, B. S. Meti, S. B. Mudgulkar, and D. Agsar, Eds., Singapore: Springer Nature Singapore, 2024, pp. 67–80. doi: 10.1007/978-981-97-3261-6_5

[7] P. Yu, C. Shen, J. Cheng, X. Yin, C. Liu, and Z. Yu, “Advances in Nondestructive Technologies for External Eggshell Quality Evaluation,” Sensors, vol. 25, no. 18, p. 5796, Sep. 2025, doi: 10.3390/s25185796

[8] M. W. Ahmed, S. J. Hossainy, A. Khaliduzzaman, J. L. Emmert, and M. Kamruzzaman, “Non‐destructive optical sensing technologies for advancing the egg industry toward Industry 4.0: A review,” Comp Rev Food Sci Food Safe, vol. 22, no. 6, pp. 4378–4403, Nov. 2023, doi: 10.1111/1541-4337.13227

[9] X. Yang, R. B. Bist, S. Subedi, and L. Chai, “A Computer Vision-Based Automatic System for Egg Grading and Defect Detection,” Animals, vol. 13, no. 14, p. 2354, Jul. 2023, doi: 10.3390/ani13142354

[10] Z. Wu, H. Zhang, and C. Fang, “Research on machine vision online monitoring system for egg production and quality in cage environment,” Poultry Science, vol. 104, no. 1, p. 104552, Jan. 2025, doi: 10.1016/j.psj.2024.104552

[11] H. Ding, H. Hou, L. Wang, X. Cui, W. Yu, and D. I. Wilson, “Application of Convolutional Neural Networks and Recurrent Neural Networks in Food Safety,” Foods, vol. 14, no. 2, p. 247, Jan. 2025, doi: 10.3390/foods14020247

[12] X. Wang et al., “Enhancing optical non-destructive methods for food quality and safety assessments with machine learning techniques: A survey,” Journal of Agriculture and Food Research, vol. 19, p. 101734, Mar. 2025, doi: 10.1016/j.jafr.2025.101734

[13] C. Wang et al., “Application of Convolutional Neural Network-Based Detection Methods in Fresh Fruit Production: A Comprehensive Review,” Front. Plant Sci., vol. 13, p. 868745, May 2022, doi: 10.3389/fpls.2022.868745

[14] S. Xu, H. Wang, X. Liang, and H. Lu, “Research Progress on Methods for Improving the Stability of Non-Destructive Testing of Agricultural Product Quality,” Foods, vol. 13, no. 23, p. 3917, Dec. 2024, doi: 10.3390/foods13233917

[15] B. Botta, S. S. R. Gattam, and A. K. Datta, “Eggshell crack detection using deep convolutional neural networks,” Journal of Food Engineering, vol. 315, p. 110798, Feb. 2022, doi: 10.1016/j.jfoodeng.2021.110798

[16] R. G. Caballero, J. R. Gucor, R. D. P. Talledo, J. J. M. Montemayor, and M. M. Maulana, “Crack Detection on Duck Eggs Using CNN,” Procedia Computer Science, vol. 257, pp. 631–636, 2025, doi: 10.1016/j.procs.2025.03.081

[17] Y. Cheng, Y. Huang, J. Zhang, X. Zhang, Q. Wang, and W. Fan, “Robust Detection of Cracked Eggs Using a Multi-Domain Training Method for Practical Egg Production,” Foods, vol. 13, no. 15, p. 2313, Jul. 2024, doi: 10.3390/foods13152313

[18] Md. A. Talukder, Md. A. Layek, M. Kazi, Md. A. Uddin, and S. Aryal, “Empowering COVID-19 detection: Optimizing performance through fine-tuned EfficientNet deep learning architecture,” Computers in Biology and Medicine, vol. 168, p. 107789, Jan. 2024, doi: 10.1016/j.compbiomed.2023.107789

[19] J. Gupta, S. Pathak, and G. Kumar, “Deep Learning (CNN) and Transfer Learning: A Review,” J. Phys.: Conf. Ser., vol. 2273, no. 1, p. 012029, May 2022, doi: 10.1088/1742-6596/2273/1/012029

[20] A. Shamila Ebenezer, S. Deepa Kanmani, M. Sivakumar, and S. Jeba Priya, “Effect of image transformation on EfficientNet model for COVID-19 CT image classification,” Materials Today: Proceedings, vol. 51, pp. 2512–2519, 2022, doi: 10.1016/j.matpr.2021.12.121

[21] A. Rafay and W. Hussain, “EfficientSkinDis: An EfficientNet-based classification model for a large manually curated dataset of 31 skin diseases,” Biomedical Signal Processing and Control, vol. 85, p. 104869, Aug. 2023, doi: 10.1016/j.bspc.2023.104869

[22] Mst. A. Orin, A. H. Shakil, M. Rahman, and Z. I. A. Khalib, “Preprocessing-enhanced EfficientNetB7-based Computer-aided Diagnosis (CAD) Framework for Skin Lesion Classification,” in 2025 IEEE 7th International Conference on Sustainable Technologies For Industry 5.0 (STI), Dhaka, Bangladesh: IEEE, Dec. 2025, pp. 1–6. doi: 10.1109/STI69347.2025.11367584

[23] M. Salvi, F. Branciforti, F. Molinari, and K. M. Meiburger, “Generative models for color normalization in digital pathology and dermatology: Advancing the learning paradigm,” Expert Systems with Applications, vol. 245, p. 123105, Jul. 2024, doi: 10.1016/j.eswa.2023.123105

[24] R. Chaganti, V. Ravi, and T. D. Pham, “Image-based malware representation approach with EfficientNet convolutional neural networks for effective malware classification,” Journal of Information Security and Applications, vol. 69, p. 103306, Sep. 2022, doi: 10.1016/j.jisa.2022.103306

[25] M. Behzadpour, B. L. Ortiz, E. Azizi, and K. Wu, “Breast Tumor Classification Using EfficientNet Deep Learning Model,” 2024, arXiv. doi: 10.48550/ARXIV.2411.17870

[26] T. A. Cengel, B. Gencturk, E. T. Yasin, M. B. Yildiz, I. Cinar, and M. Koklu, “Automating egg damage detection for improved quality control in the food industry using deep learning,” Journal of Food Science, vol. 90, no. 1, p. e17553, Jan. 2025, doi: 10.1111/1750-3841.17553

[27] Suyahman, O. Saut Parulian, D. Prasetyo, and M. Anwar Fauzi, “Traditional Batik Pattern Recognition with MobileNetV2 and Sampling-Based Hyperparameter Optimization,” Jurnal Ilmu Komputer dan Informasi, vol. 19, no. 1, pp. 53–61, Mar. 2026, doi: 10.21609/jiki.v19i1.1597

[28] S. Suyahman and A. Hapsari, “VGG-Based Feature Extraction for Classifying Traditional Batik Motifs Using Machine Learning Models,” Preservation, Digital Technology & Culture, vol. 54, no. 3, pp. 215–222, Oct. 2025, doi: 10.1515/pdtc-2025-0009

[29] A. S. Rathor et al., “Deep convolutional network for plant monitoring in precision agriculture,” Sustainable Computing: Informatics and Systems, vol. 50, p. 101302, Jun. 2026, doi: 10.1016/j.suscom.2026.101302

Downloads

Published

2026-10-16

Issue

Section

Computer Vision and Pattern Recognition

How to Cite

Suyahman, S., Wicaksono, A., Kartawiria, I. S. ., & Madyaningrana, K. . (2026). A Transfer Learning Framework for Automated Egg Damage Classification Using Pretrained EfficientNet. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 10(5), 1504-1513. https://doi.org/10.29207/resti.v10i5.7673