Performance Evaluation of YOLOv8 for Egg Quality Classification Based on Shell Color and Texture
DOI:
https://doi.org/10.22303/csrid-.17.3.2025.326-339Keywords:
Computer vision, CNN, YOLO, Artificial intelligence technology, Egg qualityAbstract
Egg quality plays a vital role in the food industry, directly affecting shelf life, food safety, and consumer health. Conventional quality assessment methods, such as manual inspection and laboratory testing, are often time-consuming, labor-intensive, and prone to subjectivity, leading to inconsistent classification results. To address these challenges, this research proposes the development of an automated egg quality classification system based on computer vision and artificial intelligence. The system focuses on evaluating external egg characteristics—specifically shell color and texture—using a combination of Convolutional Neural Network (CNN) for feature extraction and the YOLO (You Only Look Once) algorithm for real-time object detection and classification. The development stages include dataset collection, image preprocessing (such as augmentation and segmentation), model training, and performance evaluation using accuracy, precision, recall, and F1-score. The goal is to achieve an accuracy rate above 90% in classifying eggs into quality categories. This study evaluates the performance of YOLOv8 for automatic egg quality classification based on shell color and texture. A dataset consisting of 1,200 egg images was collected from both production facilities and online sources, and labeled into three categories: Good, Fair, and Poor quality. The model was trained on Google Colab with GPU acceleration using a batch size of 16, learning rate of 0.001, and 50 epochs. Performance was assessed using mean Average Precision (mAP), precision, and recall, where the results achieved mAP of 0.87, average precision of 0.91, and recall of 0.89. The “Fair” class obtained lower accuracy (72%) due to high visual similarity with the “Good” class and dataset imbalance (250 images vs. 450 images for “Good”). Compared to previous studies that reported mAP ≈ 0.80 using YOLOv5, this research demonstrates improved performance and highlights YOLOv8 as a more competitive solution for industrial egg quality control. This work contributes a practical implementation pipeline and an analysis of visual factors influencing misclassification. Future developments include dataset expansion, advanced balancing techniques, and real-time industrial deployment testing.
References
Stadelman, W. J., Newkirk, D., & Newby, L. (2017). Egg science and technology. CRC Press.
Roberts, J. R. (2004). Facntors Affecting Egg Internal Quality and Egg Shell Quality in Laying Hens. Journal of Poultry Science, 161–177.
Guedes, L. L. M., Souza, C. M. M., Saccomani, A. P. de O., Filho, D. E. de F., Suckeveris, D., & de Faria, D. E. (2016). Internal quality of laying hens’ commercial eggs according to storage time, temperature, and packaging. Acta Scientiarum - Animal Sciences, 38(1), 87–90. https://doi.org/10.4025/actascianimsci.v38i1.28922
Nakavachara, V., Thongtai, C., Chalidabhongse, T., & Pharino, C. (2025). Ethical Appetite: Consumer Preferences and Price Premiums for Animal Welfare-Friendly Food Products.
MURTI, A. T., HARTONO, B. U. D. I., UTAMI, H. D., NUGROHO, T. W., PURWANTI, T. S., & PUTRITAMARA, J. A. (2025). Consumer Attitudes, Norms and Willingness to Pay: Exploring the Market Dynamics for Free-Range Eggs in East Java. Advances in Animal and Veterinary Sciences, 13(2), 239–252. https://doi.org/10.17582/journal.aavs/2025/13.2.239.252
Jin, Y. H., Lee, K. T., Lee, W. I., & Han, Y. K. (2011). Effects of Storage Temperature and Time on the Quality of Eggs from Laying Hens at Peak Production. 24, 279–284.
Silversides, F. G., & Budgell, K. (2004). The relationships among measures of egg albumen height, pH, and whipping volume. www.frigidaire.com/white_westinghouse.asp.
Omid, M., Soltani, M., Dehrouyeh, M. H., Mohtasebi, S. S., & Ahmadi, H. (2013). An expert egg grading system based on machine vision and artificial intelligence techniques. Journal of Food Engineering, 118(1), 70–77. https://doi.org/10.1016/j.jfoodeng.2013.03.019
Lim, W. S., Kang Lai, D. J., Lim, S. T., & Yeo, B. C. (2024). Vision-based Egg Grading System using Support Vector Machine. International Journal on Robotics, Automation and Sciences, 6(1), 13–19. https://doi.org/10.33093/ijoras.2024.6.1.3
Türkoğlu, M. (2021). Detection of Eggshell Defects using Convolutional Neural Networks. Turkish Journal of Agriculture - Food Science and Technology, 9(3), 559–567. https://doi.org/10.24925/turjaf.v9i3.559-567.4046
Nasiri, A., Omid, M., & Taheri-Garavand, A. (2020). An automatic sorting system for unwashed eggs using deep learning. Journal of Food Engineering, 283. https://doi.org/10.1016/j.jfoodeng.2020.110036
Redmon, J., & Farhadi, A. (2018). YOLOv3: An Incremental Improvement.
Bochkovskiy, A., Wang, C.-Y., & Liao, H.-Y. M. (2020). YOLOv4: Optimal Speed and Accuracy of Object Detection. http://arxiv.org/abs/2004.10934
Wang, C.-Y., & Liao, H.-Y. M. (2024). YOLOv1 to YOLOv10: The fastest and most accurate real-time object detection systems. https://doi.org/10.1561/116.20240058
Hamadani, H., Hamadani, A., Boje, P. H., Moyon, A., & Khan, A. A. (2025). Enhancing Egg Grading Precision through AI and Computer Vision-Powered Morphometric Analysis. https://doi.org/10.21203/rs.3.rs-6016705/v1
Nakaguchi, V. M., & Ahamed, T. (2022). Fast and Non-Destructive Quail Egg Freshness Assessment Using a Thermal Camera and Deep Learning-Based Air Cell Detection Algorithms for the Revalidation of the Expiration Date of Eggs. Sensors, 22(20). https://doi.org/10.3390/s22207703









