A Computer Vision-Based Automatic System for Egg Grading and Defect Detection
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. Egg Collection
2.2. Egg Samples Acquisition System
2.3. Egg Data Processing
2.4. Egg Sorting Method
2.4.1. Large-Kernel Depth-Wide Convolution Approach
2.4.2. Soft Labels
2.5. Egg Weight Prediction Method
2.6. Computer Vision System
2.7. Performance Evaluation
3. Results
3.1. CNN Model Comparison
Results of Classification of Egg Sorting
3.2. Regression Results
3.3. Results of Weighting Eggs
4. Discussions
4.1. Discussion of Egg Classification Accuracy
4.2. Discussion of Egg Weight Prediction Accuracy
4.3. Discussion of Jointly Performing Egg-Sorting and Weighting Functions
4.4. Future Studies
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Nematinia, E.; Abdanan Mehdizadeh, S. Assessment of Egg Freshness by Prediction of Haugh Unit and Albumen PH Using an Artificial Neural Network. Food Meas. 2018, 12, 1449–1459. [Google Scholar] [CrossRef]
- Patel, V.C.; McClendon, R.W.; Goodrum, J.W. Crack Detection in Eggs Using Computer Vision and Neural Networks. AI Appl. 1994, 8, 21–31. [Google Scholar]
- Patel, V.C.; Mcclendon, R.W.; Goodrum, J.W. Color Computer Vision and Artificial Neural Networks for the Detection of Defects in Poultry Eggs. In Artificial Intelligence for Biology and Agriculture; Panigrahi, S., Ting, K.C., Eds.; Springer: Dordrecht, The Netherlands, 1998; pp. 163–176. ISBN 978-94-011-5048-4. [Google Scholar]
- Omid, M.; Soltani, M.; Dehrouyeh, M.H.; Mohtasebi, S.S.; Ahmadi, H. An Expert Egg Grading System Based on Machine Vision and Artificial Intelligence Techniques. J. Food Eng. 2013, 118, 70–77. [Google Scholar] [CrossRef]
- Turkoglu, M. Defective Egg Detection Based on Deep Features and Bidirectional Long-Short-Term-Memory. Comput. Electron. Agric. 2021, 185, 106152. [Google Scholar] [CrossRef]
- Bist, R.B.; Subedi, S.; Chai, L.; Yang, X. Ammonia Emissions, Impacts, and Mitigation Strategies for Poultry Production: A Critical Review. J. Environ. Manag. 2023, 328, 116919. [Google Scholar] [CrossRef]
- Sanlier, N.; Üstün, D. Egg Consumption and Health Effects: A Narrative Review. J. Food Sci. 2021, 86, 4250–4261. [Google Scholar] [CrossRef]
- Javadikia, P.; Dehrouyeh, M.H.; Naderloo, L.; Rabbani, H.; Lorestani, A.N. Measuring the Weight of Egg with Image Processing and ANFIS Model. In Proceedings of the Swarm, Evolutionary, and Memetic Computing, Andhra Pradesh, India, 19–21 December 2011; Panigrahi, B.K., Suganthan, P.N., Das, S., Satapathy, S.C., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; pp. 407–416. [Google Scholar]
- Thipakorn, J.; Waranusast, R.; Riyamongkol, P. Egg Weight Prediction and Egg Size Classification Using Image Processing and Machine Learning. In Proceedings of the 2017 14th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), Phuket, Thailand, 27–30 June 2017; pp. 477–480. [Google Scholar]
- Asadi, V.; Raoufat, M.H. Egg Weight Estimation by Machine Vision and Neural Network Techniques (a Case Study Fresh Egg). Int. J. Nat. Eng. Sci. 2010, 4, 1–4. [Google Scholar]
- Dong, S.; Wang, P.; Abbas, K. A Survey on Deep Learning and Its Applications. Comput. Sci. Rev. 2021, 40, 100379. [Google Scholar] [CrossRef]
- Apostolidis, E.; Adamantidou, E.; Metsai, A.I.; Mezaris, V.; Patras, I. Video Summarization Using Deep Neural Networks: A Survey. Proc. IEEE 2021, 109, 1838–1863. [Google Scholar] [CrossRef]
- Berkhoff, J.; Alvarado-Gilis, C.; Pablo Keim, J.; Antonio Alcalde, J.; Vargas-Bello-Perez, E.; Gandarillas, M. Consumer Preferences and Sensory Characteristics of Eggs from Family Farms. Poult. Sci. 2020, 99, 6239–6246. [Google Scholar] [CrossRef]
- Hansstein, F. Profiling the Egg Consumer: Attitudes, Perceptions and Behaviours. In Improving the Safety and Quality of Eggs and Egg Products, Vol 1: Egg Chemistry, Production and Consumption; Nys, Y., Bain, M., VanImmerseel, F., Eds.; Woodhead Publ Ltd.: Cambridge, UK, 2011; pp. 39–61. ISBN 978-0-85709-391-2. [Google Scholar]
- Chai, L.; Zhao, Y.; Xin, H.; Richardson, B. Heat Treatment for Disinfecting Egg Transport Tools. Appl. Eng. Agric. 2022, 38, 343–350. [Google Scholar] [CrossRef]
- Lusk, J.L. Consumer Preferences for Cage-Free Eggs and Impacts of Retailer Pledges. Agribusiness 2019, 35, 129–148. [Google Scholar] [CrossRef]
- Lyu, C.; Zhang, W.; Huang, H.; Zhou, Y.; Wang, Y.; Liu, Y.; Zhang, S.; Chen, K. RTMDet: An Empirical Study of Designing Real-Time Object Detectors. arXiv 2022, arXiv:2212.07784. [Google Scholar]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Green Version]
- Subedi, S.; Bist, R.; Yang, X.; Chai, L. Tracking Floor Eggs with Machine Vision in Cage-Free Hen Houses. Poult. Sci. 2023, 102, 102637. [Google Scholar] [CrossRef] [PubMed]
- Zhang, Y.; Li, M.; Ma, X.; Wu, X.; Wang, Y. High-Precision Wheat Head Detection Model Based on One-Stage Network and GAN Model. Front. Plant Sci. 2022, 13, 787852. [Google Scholar] [CrossRef]
- Nazari, Z.; Kang, D.; Asharif, M.R.; Sung, Y.; Ogawa, S. A New Hierarchical Clustering Algorithm. In Proceedings of the 2015 International Conference on Intelligent Informatics and Biomedical Sciences (ICIIBMS), Okinawa, Japan, 28–30 November 2015; IEEE: New York, NY, USA, 2015; pp. 148–152. [Google Scholar]
- Zhang, D.; Zhou, F. Self-Supervised Image Denoising for Real-World Images With Context-Aware Transformer. IEEE Access 2023, 11, 14340–14349. [Google Scholar] [CrossRef]
- Ma, X.; Karimpour, A.; Wu, Y.-J. Statistical Evaluation of Data Requirement for Ramp Metering Performance Assessment. Transp. Res. Part A Policy Pract. 2020, 141, 248–261. [Google Scholar] [CrossRef]
- Wang, F.; Zhu, L.; Li, J.; Chen, H.; Zhang, H. Unsupervised Soft-Label Feature Selection. Knowl.-Based Syst. 2021, 219, 106847. [Google Scholar] [CrossRef]
- Wang, W.; Wang, Z.; Wang, M.; Li, H.; Wang, Z. Importance Filtered Soft Label-Based Deep Adaptation Network. Knowl.-Based Syst. 2023, 265, 110397. [Google Scholar] [CrossRef]
- Riley, P.C.; Deshpande, S.V.; Ince, B.S.; Hauck, B.C.; O’Donnell, K.P.; Dereje, R.; Harden, C.S.; McHugh, V.M.; Wade, M.M. Random Forest and Long Short-Term Memory Based Machine Learning Models for Classification of Ion Mobility Spectrometry Spectra. In Proceedings of the Chemical, Biological, Radiological, Nuclear, and Explosives (CBRNE) Sensing XXII, Online, 12–16 April 2021; Volume 11749, pp. 179–187. [Google Scholar]
- Khan, M.Y.; Qayoom, A.; Nizami, M.; Siddiqui, M.S.; Wasi, S.; Syed, K.-U.-R.R. Automated Prediction of Good Dictionary EXamples (GDEX): A Comprehensive Experiment with Distant Supervision, Machine Learning, and Word Embedding-Based Deep Learning Techniques. Complexity 2021, 2021, 2553199. [Google Scholar] [CrossRef]
- Chieregato, M.; Frangiamore, F.; Morassi, M.; Baresi, C.; Nici, S.; Bassetti, C.; Bnà, C.; Galelli, M. A Hybrid Machine Learning/Deep Learning COVID-19 Severity Predictive Model from CT Images and Clinical Data. Sci. Rep. 2022, 12, 4329. [Google Scholar] [CrossRef] [PubMed]
- Wu, H.; Zhu, Z.; Du, X. System Reliability Analysis with Autocorrelated Kriging Predictions. J. Mech. Des. 2020, 142, 101702. [Google Scholar] [CrossRef]
- Yang, X.; Chai, L.; Bist, R.B.; Subedi, S.; Wu, Z. A Deep Learning Model for Detecting Cage-Free Hens on the Litter Floor. Animals 2022, 12, 1983. [Google Scholar] [CrossRef] [PubMed]
- Subedi, S.; Bist, R.; Yang, X.; Chai, L. Tracking Pecking Behaviors and Damages of Cage-Free Laying Hens with Machine Vision Technologies. Comput. Electron. Agric. 2023, 204, 107545. [Google Scholar] [CrossRef]
- Jeyakumar, P.; Tharanitaran, N.M.; Malar, E.; Muthuchidambaranathan, P. Beamforming Design with Fully Connected Analog Beamformer Using Deep Learning. Int. J. Commun. Syst. 2022, 35, e5109. [Google Scholar] [CrossRef]
- Li, J.; Sun, H.; Li, J. Beyond Confusion Matrix: Learning from Multiple Annotators with Awareness of Instance Features. Mach. Learn. 2023, 112, 1053–1075. [Google Scholar] [CrossRef]
- Bist, R.B.; Subedi, S.; Chai, L.; Regmi, P.; Ritz, C.W.; Kim, W.K.; Yang, X. Effects of Perching on Poultry Welfare and Production: A Review. Poultry 2023, 2, 134–157. [Google Scholar] [CrossRef]
- Khabisi, M.; Salahi, A.; Mousavi, S. The Influence of Egg Shell Crack Types on Hatchability and Chick Quality. Turk. J. Vet. Anim. Sci. 2012, 36, 289–295. [Google Scholar] [CrossRef]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations From Deep Networks via Gradient-Based Localization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar]
- Gogo, J.A.; Atitwa, B.E.; Gitonga, C.N.; Mugo, D.M. Modelling Conditions of Storing Quality Commercial Eggs. Heliyon 2021, 7, e07868. [Google Scholar] [CrossRef]
- Kim, T.H.; Kim, J.H.; Kim, J.Y.; Oh, S.E. Egg Freshness Prediction Model Using Real-Time Cold Chain Storage Condition Based on Transfer Learning. Foods 2022, 11, 3082. [Google Scholar] [CrossRef] [PubMed]
- Li, W.; Qian, X.; Ji, J. Noise-Tolerant Deep Learning for Histopathological Image Segmentation. In Proceedings of the 2017 24th IEEE International Conference on Image Processing (ICIP), Beijing, China, 17–20 September 2017; IEEE: New York, NY, USA, 2017; pp. 3075–3079. [Google Scholar]
- Radlak, K.; Malinski, L.; Smolka, B. Deep Learning for Impulsive Noise Removal in Color Digital Images. In Proceedings of the Real-Time Image Processing and Deep Learning 2019, Baltimore, MD, USA, 15–16 April 2019; Kehtarnavaz, N., Carlsohn, M.F., Eds.; Spie-Int Soc Optical Engineering: Bellingham, UK, 2019; Volume 10996, p. UNSP 1099608. [Google Scholar]
- Bist, R.B.; Yang, X.; Subedi, S.; Chai, L. Mislaying Behavior Detection in Cage-Free Hens with Deep Learning Technologies. Poult. Sci. 2023, 102, 102729. [Google Scholar] [CrossRef]
- Priyadumkol, J.; Kittichaikarn, C.; Thainimit, S. Crack Detection on Unwashed Eggs Using Image Processing. J. Food Eng. 2017, 209, 76–82. [Google Scholar] [CrossRef]
- Wu, L.; Wang, Q.; Jie, D.; Wang, S.; Zhu, Z.; Xiong, L. Detection of Crack Eggs by Image Processing and Soft-Margin Support Vector Machine. J. Comput. Methods Sci. Eng. 2018, 18, 21–31. [Google Scholar] [CrossRef]
- Guanjun, B.; Mimi, J.; Yi, X.; Shibo, C.; Qinghua, Y. Cracked Egg Recognition Based on Machine Vision. Comput. Electron. Agric. 2019, 158, 159–166. [Google Scholar] [CrossRef]
- Nasiri, A.; Omid, M.; Taheri-Garavand, A. An Automatic Sorting System for Unwashed Eggs Using Deep Learning. J. Food Eng. 2020, 283, 110036. [Google Scholar] [CrossRef]
- Cen, Y.; Ying, Y.; Rao, X. Egg Weight Detection on Machine Vision System. Proc. SPIE–Int. Soc. Opt. Eng. 2006, 6381, 337–346. [Google Scholar] [CrossRef]
- Alikhanov, D.; Penchev, S.; Georgieva, T.; Moldajanov, A.; Shynybaj, Z.; Daskalov, P. Indirect Method for Egg Weight Measurement Using Image Processing. Int. J. Emerg. Technol. Adv. Eng. 2015, 5, 30–34. [Google Scholar]
- Akkoyun, F.; Ozcelik, A.; Arpaci, I.; Erçetin, A.; Gucluer, S. A Multi-Flow Production Line for Sorting of Eggs Using Image Processing. Sensors 2023, 23, 117. [Google Scholar] [CrossRef]
- Wen, F.; Qin, M.; Gratz, P.; Reddy, N. Software Hint-Driven Data Management for Hybrid Memory in Mobile Systems. ACM Trans. Embed. Comput. Syst. 2022, 21, 1–8. [Google Scholar] [CrossRef]
- Yang, X.; Dai, H.; Wu, Z.; Bist, R.; Subedi, S.; Sun, J.; Lu, G.; Li, C.; Liu, T.; Chai, L. SAM for Poultry Science. arXiv 2023, arXiv:2305.10254. [Google Scholar]
Parts | Details |
---|---|
Camera | Canon EOS 4000D (Tokyo, Japan) |
Tripod | BOSCH BT 150 (Gerlingen, Germany) |
Egg base | ESS—8010 (Wasco, CA, USA) |
Computer | Apple MacBook Pro (M1, 2020) (Cupertino, CA, USA) |
Digital scale | Mettler Toledo MS104TS/00 (Greifensee, Switzerland) |
Model | Accuracy (%) | mAP@0.75 (%) | mAP@0.95 (%) | Params (M) | FLOPS(G) | Training Loss |
---|---|---|---|---|---|---|
RTMDet-s | 67.8 | 55.8 | 52.3 | 8.89 | 14.8 | 0.30 |
RTMDet-m | 75.6 | 62.6 | 60.1 | 24.71 | 39.27 | 0.23 |
RtMDet-l | 86.1 | 72.1 | 64.8 | 52.3 | 80.23 | 0.21 |
RtMDet-x | 94.8 | 79.2 | 69.1 | 94.86 | 141.67 | 0.12 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Yang, X.; Bist, R.B.; Subedi, S.; Chai, L. A Computer Vision-Based Automatic System for Egg Grading and Defect Detection. Animals 2023, 13, 2354. https://doi.org/10.3390/ani13142354
Yang X, Bist RB, Subedi S, Chai L. A Computer Vision-Based Automatic System for Egg Grading and Defect Detection. Animals. 2023; 13(14):2354. https://doi.org/10.3390/ani13142354
Chicago/Turabian StyleYang, Xiao, Ramesh Bahadur Bist, Sachin Subedi, and Lilong Chai. 2023. "A Computer Vision-Based Automatic System for Egg Grading and Defect Detection" Animals 13, no. 14: 2354. https://doi.org/10.3390/ani13142354
APA StyleYang, X., Bist, R. B., Subedi, S., & Chai, L. (2023). A Computer Vision-Based Automatic System for Egg Grading and Defect Detection. Animals, 13(14), 2354. https://doi.org/10.3390/ani13142354