YOLOv8-Based Estimation of Estrus in Sows Through Reproductive Organ Swelling Analysis Using a Single Camera
Abstract
:1. Introduction
2. Background
3. Method Overview
3.1. Vulva Segmentation
3.2. Keypoints Detection
3.3. Euclidean Distances Calculation
3.4. Calibrating the Camera Using Monocular Depth Estimation
- is the width in pixels;
- is the length in pixels;
- is the perimeter in pixels;
- is the distance from the camera based on the width;
- is the distance from the camera based on the length;
- is the distance from the camera based on the perimeter;
- W is the real vulva width;
- L is the real vulva length;
- P is the real vulva perimeter;
- f is the focal length;
- w is the physical width;
- l is the physical length;
- p is the physical perimeter.
3.5. Function Discovery
3.6. Classification Based on K-Nearest Neighbors (KNNs)
4. Results and Evaluation
4.1. Mean Squared Error (MSE) Analysis
- Keypoint 1 to Keypoint 3 (vertical distance):
- –
- Average error: The average error in the distances between Keypoint 1 and Keypoint 3 was 7.81 pixels. This value represents the mean discrepancy between the predicted and actual distances.
- –
- Mean Squared Error (MSE): The MSE for the distances between Keypoint 1 and Keypoint 3 was 142.70 pixels2. This metric measures the average of the squares of the errors, providing an indication of the magnitude of the error.
- –
- Root Mean Squared Error (RMSE): The RMSE for Keypoint 1 to Keypoint 3 was 11.95 pixels. The RMSE is the square root of the MSE and offers a direct measure of the average magnitude of the error in the same units as the original data.
- Keypoint 2 to Keypoint 4 (horizontal distance):
- –
- Average error: The average error in the distances between Keypoint 2 and Keypoint 4 was 5.43 pixels. This value indicates the mean discrepancy between predicted and actual distances.
- –
- Mean Squared Error (MSE): The MSE for the distances between Keypoint 2 and Keypoint 4 was 62.73 pixels2. This metric reflects the average of the squared differences between the predicted and actual values.
- –
- Root Mean Squared Error (RMSE): The RMSE for Keypoint 2 to Keypoint 4 was 7.92 pixels. As with the previous pair, the RMSE provides a measure of the average magnitude of the error, expressed in the same units as the distance.
4.2. Quantitative Analysis and Performance Comparison
4.3. Estrus–Not-Estrus Classification Model Evaluation
5. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Singh, B.; Mal, G.; Gautam, S.K.; Mukesh, M. Advances in Animal Biotechnology; Springer: Berlin/Heidelberg, Germany, 2019. [Google Scholar]
- Belstra, I.M.V. International Corporation, Flowers North Carolina State University, Todd See North Carolina State University, Singleton Purdue University Detection of Estrus or Heat. Pork Information Gateway, Type: Factsheets. 31 July 2007, PIG 08-01-01. Available online: https://porkgateway.org/resource/estrus-or-heat-detection/ (accessed on 15 September 2024).
- Ford, S.; Reynolds, L.; Magness, R. Blood flow to the uterine and ovarian vascular beds of gilts during the estrous cycle or early pregnancy. Biol. Reprod. 1982, 27, 878–885. [Google Scholar] [CrossRef] [PubMed]
- Scolari, S.C.; Clark, S.G.; Knox, R.V.; Tamassia, M.A. Vulvar skin temperature changes significantly during estrus in swine as determined by digital infrared thermography. J. Swine Health Prod. 2011, 19, 151–155. [Google Scholar] [CrossRef] [PubMed]
- Yeste, M.; Estrada, E.; Pinart, E.; Bonet, S.; Miró, J.; Rodríguez-Gil, J.E. The improving effect of reduced glutathione on boar sperm cryotolerance is related with the intrinsic ejaculate freezability. Cryobiology 2014, 68, 251–261. [Google Scholar] [CrossRef] [PubMed]
- Kraeling, R.R.; Webel, S.K. Current strategies for reproductive management of gilts and sows in North America. J. Anim. Sci. Biotechnol. 2015, 6, 3. [Google Scholar] [CrossRef] [PubMed]
- De la Cruz-Vigo, P.; Rodriguez-Boñal, A.; Rodriguez-Bonilla, A.; Córdova-Izquierdo, A.; Pérez Garnelo, S.S.; Gómez-Fidalgo, E.; Martín-Lluch, M.; Sánchez-Sánchez, R. Morphometric changes on the vulva from proestrus to oestrus of nulliparous and multiparous HYPERPROLIFIC sows. Reprod. Domest. Anim. 2022, 57, 94–97. [Google Scholar] [CrossRef] [PubMed]
- Yue, X.; Qi, K.; Na, X.; Zhang, Y.; Liu, Y.; Liu, C. Improved YOLOv8-Seg network for instance segmentation of healthy and diseased tomato plants in the growth stage. Agriculture 2023, 13, 1643. [Google Scholar] [CrossRef]
- Terven, J.; Córdova-Esparza, D.M.; Romero-González, J.A. A comprehensive review of yolo architectures in computer vision: From yolov1 to yolov8 and yolo-nas. Mach. Learn. Knowl. Extr. 2023, 5, 1680–1716. [Google Scholar] [CrossRef]
- Almadani, I.; Ramos, B.; Abuhussein, M.; Robinson, A.L. Advanced Swine Management: Infrared Imaging for Precise Localization of Reproductive Organs in Livestock Monitoring. Digital 2024, 4, 446–460. [Google Scholar] [CrossRef]
- Barbole, D.K.; Jadhav, P.M.; Patil, S. A review on fruit detection and segmentation techniques in agricultural field. In Second International Conference on Image Processing and Capsule Networks: ICIPCN 2021 2; Springer: Berlin/Heidelberg, Germany, 2022; pp. 269–288. [Google Scholar]
- Qiao, Y.; Truman, M.; Sukkarieh, S. Cattle segmentation and contour extraction based on Mask R-CNN for precision livestock farming. Comput. Electron. Agric. 2019, 165, 104958. [Google Scholar] [CrossRef]
- Feng, D.; Harakeh, A.; Waslander, S.L.; Dietmayer, K. A review and comparative study on probabilistic object detection in autonomous driving. IEEE Trans. Intell. Transp. Syst. 2021, 23, 9961–9980. [Google Scholar] [CrossRef]
- Latif, J.; Xiao, C.; Imran, A.; Tu, S. Medical imaging using machine learning and deep learning algorithms: A review. In Proceedings of the 2019 2nd International Conference on Computing, Mathematics and Engineering Technologies (iCoMET), Sukkur, Pakistan, 30–31 January 2019; pp. 1–5. [Google Scholar]
- Almadani, M.; Elhayek, A.; Malik, J.; Stricker, D. Graph-Based Hand-Object Meshes and Poses Reconstruction with Multi-Modal Input. IEEE Access 2021, 9, 136438–136447. [Google Scholar] [CrossRef]
- Almadani, M.; Waheed, U.b.; Masood, M.; Chen, Y. Dictionary Learning with Convolutional Structure for Seismic Data Denoising and Interpolation. Geophysics 2021, 86, 1–102. [Google Scholar] [CrossRef]
- Chauhan, R.; Ghanshala, K.K.; Joshi, R. Convolutional neural network (CNN) for image detection and recognition. In Proceedings of the 2018 First International Conference on Secure Cyber Computing and Communication (ICSCCC), Jalandhar, India, 15–17 December 2018; pp. 278–282. [Google Scholar]
- Havugimana, F.; Moinudin, K.A.; Yeasin, M. Deep learning framework for modeling cognitive load from small and noisy eeg data. IEEE Trans. Cogn. Dev. Syst. 2023, 16, 1006–1015. [Google Scholar] [CrossRef]
- Muhammed, S.; Upadhya, J.; Poudel, S.; Hasan, M.; Donthula, K.; Vargas, J.; Ranganathan, J.; Poudel, K. Improved Classification of Alzheimer’s Disease with Convolutional Neural Networks. In Proceedings of the 2023 IEEE Signal Processing in Medicine and Biology Symposium (SPMB), Philadelphia, PA, USA, 2 December 2023; pp. 1–7. [Google Scholar]
- Hasan, M.N.; Hamdan, S.; Poudel, S.; Vargas, J.; Poudel, K. Prediction of length-of-stay at intensive care unit (icu) using machine learning based on mimic-iii database. In Proceedings of the 2023 IEEE Conference on Artificial Intelligence (CAI), Santa Clara, CA, USA, 5–6 June 2023; pp. 321–323. [Google Scholar]
- Ahmed, M.K.; Yeasin, M. MU-Net: Modified U-Net for Precise Localization and Segmentation of Lumber-Spine Regions from Sagittal Views. TechRxiv 2024, 7. [Google Scholar] [CrossRef]
- Abuhussein, M.; Almadani, I.; Robinson, A.L.; Younis, M. Enhancing Obscured Regions in Thermal Imaging: A Novel GAN-Based Approach for Efficient Occlusion Inpainting. J 2024, 7, 218–235. [Google Scholar] [CrossRef]
- Almadani, I.; Abuhussein, M.; Robinson, A.L. Sow localization in thermal images using gabor filters. In Proceedings of the Future of Information and Communication Conference, San Francisco, CA, USA, 3–4 March 2022; Springer: Berlin/Heidelberg, Germany, 2022; pp. 617–627. [Google Scholar]
- Ahmed, M.K. Measurement and Evaluation of Deep Learning Based 3D Reconstruction; The University of Memphis: Memphis, TN, USA, 2023. [Google Scholar]
- Ahmed, M.K. Converting OpenStreetMap (OSM) Data to Functional Road Networks for Downstream Applications. arXiv 2022, arXiv:2211.12996. [Google Scholar]
- Sharifuzzaman, M.; Mun, H.S.; Ampode, K.M.B.; Lagua, E.B.; Park, H.R.; Kim, Y.H.; Hasan, M.K.; Yang, C.J. Technological Tools and Artificial Intelligence in Estrus Detection of Sows—A Comprehensive Review. Animals 2024, 14, 471. [Google Scholar] [CrossRef] [PubMed]
- Xu, Z.; Sullivan, R.; Zhou, J.; Bromfield, C.; Lim, T.T.; Safranski, T.J.; Yan, Z. Detecting sow vulva size change around estrus using machine vision technology. Smart Agric. Technol. 2023, 3, 100090. [Google Scholar] [CrossRef]
- Labrecque, J.; Rivest, J. A real-time sow behavior analysis system to predict an optimal timing for insemination. In Proceedings of the 10th International Livestock Environment Symposium (ILES X), Omaha, NE, USA, 25–27 September 2018; American Society of Agricultural and Biological Engineers: St. Joseph, MI, USA, 2018; p. 1. [Google Scholar]
- Zheng, H.; Zhang, H.; Song, S.; Wang, Y.; Liu, T. Automatic detection of sow estrus using a lightweight real-time detector and thermal images. Int. J. Agric. Biol. Eng. 2023, 16, 194–207. [Google Scholar] [CrossRef]
- Young, B.; Dewey, C.E.; Friendship, R.M. Management factors associated with farrowing rate in commercial sow herds in Ontario. Can. Vet. J. 2010, 51, 185. [Google Scholar] [PubMed]
Metric | Keypoint 1 to Keypoint 3 | Keypoint 2 to Keypoint 4 |
---|---|---|
Average error | 7.81 pixels | 5.43 pixels |
Mean Squared Error (MSE) | 142.70 pixels2 | 62.73 pixels2 |
Root Mean Squared Error (RMSE) | 11.95 pixels | 7.92 pixels |
Metric | U-Net | YOLOv8 |
---|---|---|
Intersection over Union (IoU) | 0.586 | 0.725 |
Mean Average Precision at 50% overlap (mAP50) | 0.652 | 0.804 |
Mean Average Precision at 50–95% overlap (mAP50-95) | 0.489 | 0.678 |
Metric | Value |
---|---|
Accuracy | 95.2% |
Precision | 96.0% |
Recall | 94.5% |
F1-score | 95.2% |
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. |
© 2024 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
Almadani, I.; Abuhussein, M.; Robinson, A.L. YOLOv8-Based Estimation of Estrus in Sows Through Reproductive Organ Swelling Analysis Using a Single Camera. Digital 2024, 4, 898-913. https://doi.org/10.3390/digital4040044
Almadani I, Abuhussein M, Robinson AL. YOLOv8-Based Estimation of Estrus in Sows Through Reproductive Organ Swelling Analysis Using a Single Camera. Digital. 2024; 4(4):898-913. https://doi.org/10.3390/digital4040044
Chicago/Turabian StyleAlmadani, Iyad, Mohammed Abuhussein, and Aaron L. Robinson. 2024. "YOLOv8-Based Estimation of Estrus in Sows Through Reproductive Organ Swelling Analysis Using a Single Camera" Digital 4, no. 4: 898-913. https://doi.org/10.3390/digital4040044
APA StyleAlmadani, I., Abuhussein, M., & Robinson, A. L. (2024). YOLOv8-Based Estimation of Estrus in Sows Through Reproductive Organ Swelling Analysis Using a Single Camera. Digital, 4(4), 898-913. https://doi.org/10.3390/digital4040044