Dairy Cow Mastitis Detection by Thermal Infrared Images Based on CLE-UNet
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. Dataset
2.1.1. Experimental Device
2.1.2. Dataset Descriptions
2.2. Experimental Setup
2.3. CLE-UNet Network Model
2.3.1. Backbone
2.3.2. Attention Mechanism
2.3.3. A New Centroid Loss Function
2.3.4. Ellipticization Processing
2.4. Model Evaluation Indicators
2.4.1. Image Segmentation Effect Evaluation Indicators
2.4.2. Temperature Acquisition and Diagnostic Criteria for Cow Mastitis
2.4.3. Evaluation Indicators of Dairy Cow Mastitis
3. Results and Discussion
3.1. The Segmentation of Key Parts of Dairy Cows Based on CLE-UNet Model
3.2. Performance Comparison among Different Segmentation Models
3.3. Evaluation of the Dairy Cow Mastitis Recognition Result
3.3.1. Result of the Dairy Cow Mastitis Recognition of CLE-UNet Model
3.3.2. Comparison of the Effectiveness of Related Detection Methods for Dairy Cow Mastitis
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- United States Department of Agriculture (USDA). Livestock and Poultry: World Markets and Trade [Data Set]. USDA Foreign Agricultural Service. Available online: https://apps.fas.usda.gov/psdonline/app/index.html#/app/advQuery (accessed on 2 May 2023).
- Kim, H.; Min, Y.; Choi, B. Real-time temperature monitoring for the early detection of mastitis in dairy cattle: Methods and case researches. Comput. Electron. Agric. 2019, 162, 119–125. [Google Scholar] [CrossRef]
- Asfaw, M.; Negash, A. Review on impact of bovine mastitis in dairy production. Adv. Biol. Res. 2017, 11, 126–131. [Google Scholar]
- Sathiyabarathi, M.; Jeyakumar, S.; Manimaran, A.; Pushpadass, H.A.; Sivaram, M.; Ramesha, K.; Das, D.; Kataktalware, M.A.; Jayaprakash, G.; Patbandha, T.K. Investigation of body and udder skin surface temperature differentials as an early indicator of mastitis in Holstein Friesian crossbred cows using digital infrared thermography technique. Vet. World 2016, 9, 1386. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Schaefer, A.; Cook, N.; Tessaro, S.; Deregt, D.; Desroches, G.; Dubeski, P.; Tong, A.; Godson, D. Early detection and prediction of infection using infrared thermography. Can. J. Anim. Sci. 2004, 84, 73–80. [Google Scholar] [CrossRef] [Green Version]
- Viguier, C.; Arora, S.; Gilmartin, N.; Welbeck, K.; O’Kennedy, R. Mastitis detection: Current trends and future perspectives. Trends Biotechnol. 2009, 27, 486–493. [Google Scholar] [CrossRef]
- Pamparienė, I.; Veikutis, V.; Oberauskas, V.; Žymantienė, J.; Želvytė, R.; Stankevičius, A.; Marčiulionytė, D.; Palevičius, P. Thermography based inflammation monitoring of udder state in dairy cows: Sensitivity and diagnostic priorities comparing with routine California mastitis test. J. Vibroengineering 2016, 18, 511–521. [Google Scholar]
- Berry, R.; Kennedy, A.; Scott, S.; Kyle, B.; Schaefer, A. Daily variation in the udder surface temperature of dairy cows measured by infrared thermography: Potential for mastitis detection. Can. J. Anim. Sci. 2003, 83, 687–693. [Google Scholar] [CrossRef]
- Polat, B.; Colak, A.; Cengiz, M.; Yanmaz, L.; Oral, H.; Bastan, A.; Kaya, S.; Hayirli, A. Sensitivity and specificity of infrared thermography in detection of subclinical mastitis in dairy cows. J. Dairy Sci. 2010, 93, 3525–3532. [Google Scholar] [CrossRef] [Green Version]
- Zaninelli, M.; Redaelli, V.; Luzi, F.; Bronzo, V.; Mitchell, M.; Dell’Orto, V.; Bontempo, V.; Cattaneo, D.; Savoini, G. First evaluation of infrared thermography as a tool for the monitoring of udder health status in farms of dairy cows. Sensors 2018, 18, 862. [Google Scholar] [CrossRef] [Green Version]
- George, W.; Godfrey, R.; Ketring, R.; Vinson, M.; Willard, S. Relationship among eye and muzzle temperatures measured using digital infrared thermal imaging and vaginal and rectal temperatures in hair sheep and cattle. J. Anim. Sci. 2014, 92, 4949–4955. [Google Scholar] [CrossRef]
- Bartolomé, E.; Sánchez, M.; Molina, A.; Schaefer, A.; Cervantes, I.; Valera, M. Using eye temperature and heart rate for stress assessment in young horses competing in jumping competitions and its possible influence on sport performance. Animal 2013, 7, 2044–2053. [Google Scholar] [CrossRef] [PubMed]
- Sathiyabarathi, M.; Jeyakumar, S.; Manimaran, A.; Pushpadass, H.A.; Kumaresan, A.; Lathwal, S.; Sivaram, M.; Das, D.; Ramesha, K.; Jayaprakash, G. Infrared thermography to monitor body and udder skin surface temperature differences in relation to subclinical and clinical mastitis condition in Karan Fries (Bos taurus × Bos indicus) crossbred cows. Indian J. Anim. Sci. 2018, 88, 694–699. [Google Scholar] [CrossRef]
- Metzner, M.; Sauter-Louis, C.; Seemueller, A.; Petzl, W.; Zerbe, H. Infrared thermography of the udder after experimentally induced Escherichia coli mastitis in cows. Vet. J. 2015, 204, 360–362. [Google Scholar] [CrossRef] [PubMed]
- Zhang, X.; Kang, X.; Ma, L.; Liu, G. Automatic Detection Method of Dairy Cow Mastitis Based on Thermal Infrared Image. Trans. Chin. Soc. Agric. Mach. 2019, 50, 248–255. [Google Scholar]
- Wang, X.; Girshick, R.; Gupta, A.; He, K. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7794–7803. [Google Scholar]
- Voulodimos, A.; Doulamis, N.; Doulamis, A.; Protopapadakis, E. Deep learning for computer vision: A brief review. Comput. Intell. Neurosci. 2018, 2018, 7068349. [Google Scholar] [CrossRef]
- Yao, X.; Wang, X.; Wang, S.-H.; Zhang, Y.-D. A comprehensive survey on convolutional neural network in medical image analysis. Multimed. Tools Appl. 2020, 41361–41405. [Google Scholar] [CrossRef]
- Pouyanfar, S.; Sadiq, S.; Yan, Y.; Tian, H.; Tao, Y.; Reyes, M.P.; Shyu, M.-L.; Chen, S.-C.; Iyengar, S.S. A survey on deep learning: Algorithms, techniques, and applications. ACM Comput. Surv. (CSUR) 2018, 51, 1–36. [Google Scholar] [CrossRef]
- Wang, Y.; Kang, X.; Li, M.; Zhang, X.; Liu, G. Automatic Detection Method of Dairy Cow Mastitis Based on Improved YOLO v3-ting. Trans. Chin. Soc. Agric. Mach. 2021, 52, 276–283. [Google Scholar]
- Xudong, Z.; Xi, K.; Ningning, F.; Gang, L. Automatic recognition of dairy cow mastitis from thermal images by a deep learning detector. Comput. Electron. Agric. 2020, 178, 105754. [Google Scholar] [CrossRef]
- Wang, Y.; Kang, X.; He, Z.; Feng, Y.; Liu, G. Accurate detection of dairy cow mastitis with deep learning technology: A new and comprehensive detection method based on infrared thermal images. Animal 2022, 16, 100646. [Google Scholar] [CrossRef]
- Ronneberger, O.; Fischer, P.; Brox, T. U-net: Convolutional networks for biomedical image segmentation. In Proceedings of the Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference, Munich, Germany, 5–9 October 2015; pp. 234–241. [Google Scholar]
- Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient channel attention for deep convolutional neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 11534–11542. [Google Scholar]
- Cuthbertson, H.; Tarr, G.; González, L.A. Methodology for data processing and analysis techniques of infrared video thermography used to measure cattle temperature in real time. Comput. Electron. Agric. 2019, 167, 105019. [Google Scholar] [CrossRef]
- Berman, M.; Triki, A.R.; Blaschko, M.B. The lovász-softmax loss: A tractable surrogate for the optimization of the intersection-over-union measure in neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4413–4421. [Google Scholar]
- Zhuang, X.; Zhang, T. Detection of sick broilers by digital image processing and deep learning. Biosyst. Eng. 2019, 179, 106–116. [Google Scholar] [CrossRef]
- Chen, L.-C.; Papandreou, G.; Kokkinos, I.; Murphy, K.; Yuille, A.L. Semantic image segmentation with deep convolutional nets and fully connected crfs. arXiv 2014, arXiv:1412.7062. [Google Scholar]
- Badrinarayanan, V.; Kendall, A.; Cipolla, R. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 2481–2495. [Google Scholar] [CrossRef] [PubMed]
- Zhao, H.; Shi, J.; Qi, X.; Wang, X.; Jia, J. Pyramid scene parsing network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2881–2890. [Google Scholar]
- Zhou, Z.; Rahman Siddiquee, M.M.; Tajbakhsh, N.; Liang, J. Unet++: A nested u-net architecture for medical image segmentation. In Proceedings of the Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support: 4th International Workshop, DLMIA 2018, and 8th International Workshop, ML-CDS 2018, Held in Conjunction with MICCAI 2018, Granada, Spain, 20 September 2018; pp. 3–11. [Google Scholar]
Category No. | Label | Description |
---|---|---|
0 | background | Background |
1 | cowEye | Cow eyes |
2 | cowUdder | Cow udder |
Configuration | Parameter |
---|---|
CPU | Intel (R) Core (TM) i9-10900K CPU |
GPU | NVIDIA GTX3060 |
Development environment | Python 3.8.11 |
Operating system | Ubuntu 18.04 |
Operating framework | PyTorch 1.9.0 |
Accelerate environment | CUDA 11.4 + CUDNN 8.11 |
Method | ① | ② | ③ | Background_IoU (%) | Eye_IoU (%) | Udder_IoU (%) | MIoU (%) |
---|---|---|---|---|---|---|---|
UNet | - | - | - | 96.63 | 73.89 | 79.16 | 83.23 |
UNet-1 | √ | - | - | 96.81 | 75.57 | 80.72 | 84.37 |
UNet-2 | √ | √ | - | 97.45 | 77.92 | 81.35 | 85.57 |
CLE-UNet | √ | √ | √ | 97.70 | 86.59 | 83.66 | 89.32 |
Algorithm | Background_IoU (%) | Eye_IoU (%) | Udder_IoU (%) | MioU (%) | Time per Frame (s) |
---|---|---|---|---|---|
DeepLab v3+ | 97.46 | 74.44 | 81.26 | 84.39 | 0.087 |
SegNet | 95.02 | 73.67 | 79.24 | 82.64 | 0.025 |
PSPNet | 95.99 | 71.88 | 80.07 | 82.65 | 0.044 |
UNet | 96.63 | 73.89 | 79.16 | 83.23 | 0.032 |
UNet++ | 96.82 | 74.38 | 78.06 | 83.09 | 0.052 |
CLE-UNet | 97.70 | 86.59 | 83.66 | 89.32 | 0.049 |
Cow | RFID | Left or Right | Algorithm Detected Results | Somatic Cell Count Results |
---|---|---|---|---|
1 | 19,235 | Right | Mastitis (1) | Mastitis (1) |
2 | 18,165 | Left | Mastitis (1) | Mastitis (1) |
3 | 19,173 | Left | Mastitis (1) | Mastitis (1) |
4 | 8110 | Right | Mastitis (1) | Mastitis (1) |
5 | 19,039 | Left | Mastitis (1) | Mastitis (1) |
6 | 18,088 | Left | Mastitis (1) | Mastitis (1) |
7 | 18,026 | Left | Mastitis (1) | Mastitis (1) |
8 | 15,214 | Right | Mastitis (1) | Mastitis (1) |
9 | 19,016 | Left | Mastitis (1) | Mastitis (1) |
10 | 8138 | Right | Mastitis (1) | Mastitis (1) |
11 | 8048 | Right | Mastitis (1) | Mastitis (1) |
12 | 8123 | Right | Normal (0) | Mastitis (1) |
13 | 17,106 | Left | Mastitis (1) | Mastitis (1) |
14 | 7205 | Right | Mastitis (1) | Mastitis (1) |
15 | 19,152 | Right | Mastitis (1) | Mastitis (1) |
16 | 19,124 | Right | Normal (0) | Normal (0) |
17 | 18,183 | Left | Normal (0) | Normal (0) |
18 | 19,121 | Left | Normal (0) | Normal (0) |
19 | 8055 | Right | Mastitis (1) | Normal (0) |
20 | 7129 | Right | Normal (0) | Normal (0) |
21 | 19191 | Right | Normal (0) | Normal (0) |
22 | 19,141 | Left | Normal (0) | Normal (0) |
23 | 7212 | Left | Mastitis (1) | Normal (0) |
24 | 1073 | Right | Normal (0) | Normal (0) |
25 | 18,293 | Right | Normal (0) | Normal (0) |
26 | 19,082 | Left | Normal (0) | Normal (0) |
27 | 17,106 | Right | Normal (0) | Normal (0) |
28 | 7199 | Left | Mastitis (1) | Normal (0) |
29 | 15,018 | Left | Normal (0) | Normal (0) |
30 | 19,070 | Right | Normal (0) | Normal (0) |
Detection Method | Image Resolution | Sensitivity (%) | Specificity (%) | F1 (%) | Accuracy (%) |
---|---|---|---|---|---|
YOLO V3-tiny [20] | 640 × 480 | 69.23 | 66.67 | 78.26 | 77.30 |
EFMYOLOv3 [21] | 640 × 480 | 75.00 | 76.47 | 82.76 | 83.33 |
CLE-UNet | 320 × 240 | 82.35 | 80.00 | 87.50 | 86.67 |
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
Zhang, Q.; Yang, Y.; Liu, G.; Ning, Y.; Li, J. Dairy Cow Mastitis Detection by Thermal Infrared Images Based on CLE-UNet. Animals 2023, 13, 2211. https://doi.org/10.3390/ani13132211
Zhang Q, Yang Y, Liu G, Ning Y, Li J. Dairy Cow Mastitis Detection by Thermal Infrared Images Based on CLE-UNet. Animals. 2023; 13(13):2211. https://doi.org/10.3390/ani13132211
Chicago/Turabian StyleZhang, Qian, Ying Yang, Gang Liu, Yuanlin Ning, and Jianquan Li. 2023. "Dairy Cow Mastitis Detection by Thermal Infrared Images Based on CLE-UNet" Animals 13, no. 13: 2211. https://doi.org/10.3390/ani13132211
APA StyleZhang, Q., Yang, Y., Liu, G., Ning, Y., & Li, J. (2023). Dairy Cow Mastitis Detection by Thermal Infrared Images Based on CLE-UNet. Animals, 13(13), 2211. https://doi.org/10.3390/ani13132211