Next Article in Journal
Spatiotemporal Patterns of Reptile and Amphibian Road Fatalities in a Natura 2000 Area: A 12-Year Monitoring of the Lake Karla Mediterranean Wetland
Next Article in Special Issue
Two-Dimensional Shear-Wave Elastography of the Thyroid in Clinically Healthy Dogs in Different Age Groups
Previous Article in Journal
Immunophysiological State of Dogs According to the Immunoregulatory Index of Their Blood and Spleens
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A New Method to Detect Buffalo Mastitis Using Udder Ultrasonography Based on Deep Learning Network

1
National Center for International Research on Animal Genetics, Breeding and Reproduction (NCIRAGBR), Ministry of Science and Technology of the People’s Republic of China, Huazhong Agricultural University, Wuhan 430070, China
2
Key Laboratory of Animal Genetics, Breeding and Reproduction, Ministry of Education, College of Animal Science and Technology, Huazhong Agricultural University, Wuhan 430070, China
3
College of Veterinary Medicine, Hunan Agricultural University, Changsha 410128, China
*
Author to whom correspondence should be addressed.
Animals 2024, 14(5), 707; https://doi.org/10.3390/ani14050707
Submission received: 17 December 2023 / Revised: 28 January 2024 / Accepted: 5 February 2024 / Published: 23 February 2024
(This article belongs to the Special Issue Imaging Techniques and Radiation Therapy in Veterinary Medicine)

Abstract

:

Simple Summary

In this study, deep learning combined with udder ultrasonography of buffalo was used for the detection of mastitis for the first time, with the aim of establishing an accurate, rapid, and inexpensive method to detect buffalo mastitis instead of routine laboratory examination. This method provides a basis for mastitis detection in buffaloes mostly raised by small farmers and has the opportunity to be used in a variety of dairy animals in the future.

Abstract

Mastitis is one of the most predominant diseases with a negative impact on ranch products worldwide. It reduces milk production, damages milk quality, increases treatment costs, and even leads to the premature elimination of animals. In addition, failure to take effective measures in time will lead to widespread disease. The key to reducing the losses caused by mastitis lies in the early detection of the disease. The application of deep learning with powerful feature extraction capability in the medical field is receiving increasing attention. The main purpose of this study was to establish a deep learning network for buffalo quarter-level mastitis detection based on 3054 ultrasound images of udders from 271 buffaloes. Two data sets were generated with thresholds of somatic cell count (SCC) set as 2 × 105 cells/mL and 4 × 105 cells/mL, respectively. The udders with SCCs less than the threshold value were defined as healthy udders, and otherwise as mastitis-stricken udders. A total of 3054 udder ultrasound images were randomly divided into a training set (70%), a validation set (15%), and a test set (15%). We used the EfficientNet_b3 model with powerful learning capabilities in combination with the convolutional block attention module (CBAM) to train the mastitis detection model. To solve the problem of sample category imbalance, the PolyLoss module was used as the loss function. The training set and validation set were used to develop the mastitis detection model, and the test set was used to evaluate the network’s performance. The results showed that, when the SCC threshold was 2 × 105 cells/mL, our established network exhibited an accuracy of 70.02%, a specificity of 77.93%, a sensitivity of 63.11%, and an area under the receiver operating characteristics curve (AUC) of 0.77 on the test set. The classification effect of the model was better when the SCC threshold was 4 × 105 cells/mL than when the SCC threshold was 2 × 105 cells/mL. Therefore, when SCC ≥ 4 × 105 cells/mL was defined as mastitis, our established deep neural network was determined as the most suitable model for farm on-site mastitis detection, and this network model exhibited an accuracy of 75.93%, a specificity of 80.23%, a sensitivity of 70.35%, and AUC 0.83 on the test set. This study established a 1/4 level mastitis detection model which provides a theoretical basis for mastitis detection in buffaloes mostly raised by small farmers lacking mastitis diagnostic conditions in developing countries.

1. Introduction

The buffalo is a domestic animal with strong adaptability, superior production performance, good heat tolerance, and high roughage utilization efficiency [1]. Compared to cow’s milk, buffalo milk is rich in fat, lactose, protein (especially casein), and minerals (such as magnesium, calcium, and inorganic phosphate) [2]. In addition, buffalo milk production has a significant impact on global milk production [3]. The buffalo industry plays a vital role in economic development, rural livelihood, and poverty alleviation, and it can also meet the population’s rapidly growing demand for animal protein to some degree [4]. Despite the valuable contributions of buffaloes to agriculture and human well-being, the buffalo industry faces emerging challenges [5].
In veterinary medicine, mastitis is considered as one of the most common and economically important diseases that adversely affects lactating dairy herds worldwide [6]. With the growing popularity of buffalo milk and its dairy products, a higher buffalo milk yield is pursued, which has resulted in a gradual increase in the incidence of mastitis in buffaloes. However, there is a lack of relevant research on buffalo mastitis. Mastitis usually results in inflammation of one or more quarters of the mammary glands, which often affects not only a single animal, but also the entire herd, or at least multiple individuals within a herd [7]. Rapid, accurate, and economical mastitis diagnosis methods are very important in order to reduce the losses caused by mastitis. Traditional mastitis detection methods include somatic cell count (SCC), inflammation indication, detection of biomarkers related to disease onset, and identification of pathogenic microorganisms, but these methods have limitations [8]. Somatic cell count is a useful indicator for detecting mastitis, but it is a long and time-consuming procedure, and the dairy industry needs fast, sensitive, specific, and reliable detection methods [9].
Udder ultrasound detection is an easy-to-operate, non-invasive technique that allows for the visualization and health assessment of teats, teat canal, gland cisterns, and mammary gland parenchyma, which contributes to decision making about culling or treating diseased animals [10]. Mastitis caused by an udder infection with staphylococcus aureus and the corresponding pathological changes in the udder can be visualized by ultrasound [11]. Due to the complexity of medical images, the scarcity of medical experts, the subjectivity of diagnosis, and other factors, it is very difficult to determine udder health status through ultrasound images. The rapid advancement of advanced computing and imaging technologies has led to the emergence of a novel research domain known as computer-aided diagnosis systems, which are utilized across diverse biomedical applications [12]. Among them, the emergence of deep learning provides accurate, convenient, and efficient solutions for medical image-based diagnosis.
Over the past decade, machine learning and deep learning have become sub-fields of artificial intelligence, exhibiting excellent performance in healthcare industry applications since they can reduce costs while increasing efficiency [13]. It may take clinicians 30–60 min to evaluate all animal information and make a herd mastitis diagnosis, but it may take machine learning algorithm only a few seconds to complete the same tasks, and this increases the detection rate and gives clinicians more time to focus on implementing mastitis control strategies [14]. Deep neural networks have several obvious advantages, since they can learn high-level abstract features directly from raw images or data. In addition, deep neural networks can directly output individual prediction labels for each input image to classify the targets of interest [15]. In recent years, mastitis deep learning detection networks based on milking parameters or various physiological manifestations of animals have become a new tool with promising applications [16,17,18].
Water buffalo holds significant economic importance, particularly for small-scale producers in developing countries [19]. The backward economy and breeding technology have led to a serious lack of conditions and technologies for detecting mastitis, making it impossible to ensure the accuracy and timeliness of mastitis detection, thus causing huge economic losses and hindering the development of the buffalo dairy industry. The scientific intelligent detection method of mastitis established by employing deep learning networks to extract ultrasonic imaging features of healthy and mastitis-stricken udders is urgently needed for the development of the buffalo industry, which currently uses backward breeding technology. To the best of our knowledge, to date, there has been no deep learning model for mastitis detection based on ultrasound images of the udder. This study provides a methodological basis for on-site quarter-level mastitis detection on buffalo farms and promotes the healthy development of the buffalo dairy industry.

2. Methods and Materials

2.1. Data

The data were collected on the buffalo farms of Hubei Jinniu Animal Husbandry Co., Ltd. and Guangxi Buffalo Research Institute in China from 2020 to 2022. The buffalo udder ultrasound imaging was performed by a trained researcher using a portable ultrasound device equipped with a 3–7.5 MHz linear array transducer (WED-3000-v, equipped with LNA/6.5 MHz rectal probe, Shenzhen Well; D Medical Electronics Co., Ltd., Guangdong, China), with the frequency set at 5–7.5 MHz. The procedures to obtain udder ultrasound images were as follows. If hair was present in the area where the ultrasound probe was positioned on the udder and could potentially interfere with the effectiveness of ultrasound measurements, it was removed. Ultrasound gel was applied to the probe to enhance contact with the animal’s udder skin. To ensure diversity of the ultrasound images, we conducted scans under different conditions. The collection of identical udder quarter ultrasound images occurred at various time points (before and after milking in the morning or afternoon) and on different scanning planes (coronal and sagittal planes). Additionally, measurements of the same udder were spaced 1–4 months apart to obtain ultrasound images of the same udder quarters at different lactation stages and with different health statuses.
The resolution of the image generated by ultrasound scanning was 800 × 553 pixels, and the gray value range was 0–255. All images were stored in BMP format in a USB flash drive through the B-ultrasound machine and transmitted to the computer for image processing. The milk samples of 1/4 udders were collected and placed in a 50 mL sterile vial containing preservatives. The milk samples were sent to the Hubei Center of Dairy Herd Improvement for SCC detection with a milk composition detector (CombiFoss FT+ FOSS Analytical, Hillerød, Denmark).

2.2. Establishment of a Deep Learning Network

2.2.1. Data Set Composition

The SCC cutoff value for mastitis definition may be different in different regions, and 2 × 105 cells/mL SCC is the most commonly used cutoff value for dairy cows [20]. In most developed dairy industries, such as the countries in European Union, define the SCC cutoff value of buffalo milk as 4 × 105 cells/mL [21]. In this study, two data sets were generated with SCC threshold set as 2 × 105 cells/mL or 4 × 105 cells/mL, respectively. The udders with SCC ≥ the set threshold were defined as mastitis-stricken udders, and those with SCC < the threshold as healthy udders. The compositions of the two data sets are shown in Table 1.

2.2.2. Establishment of a Mastitis Detection Network Based on Udder Ultrasound Images

The EfficientNets [22], as a network series, use a simple and efficient composite coefficient to achieve unified scaling of all dimensions of depth, width, and resolution. The EfficientNet_b7 model achieves state-of-the-art accuracy of 84.4% top-1/97.1% top-5 on ImageNet while outperforming the previous best ConvNet by reducing the size by 8.4 times and increasing the speed by 6.1 times. The convolutional block attention module (CBAM) was proposed by Woo et al. [23], including channel and spatial attention modules, which are independent and complementary in their focuses. The channel attention module focuses on what is meaningful in the input image, unlike channel attention, spatial attention attends to where the informative parts are located. PolyLoss is a simple framework that designs the loss function as a linear combination of polynomial functions, and this framework is inspired by the Taylor expansion of cross-entropy loss (1) and focal loss (2). PolyLoss outperformed cross-entropy loss and focal loss on tasks such as 2D image classification, target detection, and instance segmentation. In addition, PolyLoss has been proven to be beneficial for solving the imbalance of sample categories to a certain extent [24].
L C E = log P t = j = 1 1 / j 1 p t j = 1 P t + 1 / 2 1 p t 2
L F L = 1 P t γ log P t = j = 1 1 / j 1 p t j + γ = 1 P t 1 + γ   + 1 / 2 1 p t 2 + γ
where P t is the predicted probability of the target ground-truth class by the model.
To avoid the interference of invalid pixels, after preprocessing, the ultrasound images of the udder were intercepted from the images with the complex information background (Figure 1). The two data sets were randomly divided into a 70% training set (2140 images), a 15% validation set (457 images), and a 15% test set (457 images), respectively. The training set and validation set were used for network development, and the test set was used for network performance evaluation. In order to prevent overfitting caused by excessive model parameters, and to avoid a model with an insufficient simple learning ability, we used the EfficientNet_b3 network and added one CBAMs before its last fully connected layer for mastitis detection model training. Polyloss was used as the loss function during the training process. In order to improve the generalization ability of the model, we used random horizontal flip, random vertical flip, random rotation, and others for data enhancement during each training session. The epoch was set as 100, the batch size as 32, and the starting learning rate as 0.0001. The cosine function was used to adjust the learning rate during the training process.

2.3. Model Performance Evaluation

To evaluate the mastitis detection performance of the network, we examined five commonly used classification model performance evaluation indicators, including accuracy (3), sensitivity (4), specificity (5), F1-score (6), and the area under the receiver operating characteristic curve (AUC), by comparing the model prediction results and the SCC detection results. These indicators were calculated according to the following formulas.
Accuracy = TP + TN TP + FP + TN + FN
Sensitivity = TP TP + FN
Specificity = TN TN + FP
F 1 Score = 2 TP 2 TP + FP + FN
where true positive (TP) refers to the number of mastitis samples classified correctly; true negative (TN) indicates the number of healthy samples classified correctly; false positive (FP) represents the number of healthy samples falsely classified as mastitis; and false negative (FN) refers to the number of mastitis samples falsely classified as healthy.

3. Results and Discussion

Early detection of mastitis can prevent further deterioration of udder health, minimize tissue damage, and improve treatment effectiveness [17]. In this study, a total of 3054 udder ultrasound images were obtained, involving 271 buffaloes. The EfficientNet_b3 network was used as the baseline, and we established a network by combining CBAM and PolyLoss for mastitis detection model training. The performances of these networks are shown in Table 2. When SCC ≥ 2 × 105 cells/mL was defined as mastitis, our established model exhibited an accuracy of 70.02%, a specificity of 77.93%, a sensitivity of 63.11%, and an F1-score of 69.21% on the test set, whereas when SCC ≥ 4 × 105 cells/mL was defined as mastitis, the overall classification performance of the model was better, with an accuracy of 75.93%, a specificity of 80.23%, a sensitivity of 70.35%, and an F1-score of 71.79%.
Clinical diagnosis of diseased dairy cows heavily relies on professional veterinarians, whether in large-scale or small-scale farming operations. However, in certain regions, the lack of highly skilled veterinarians compromises the accuracy and timeliness of diagnoses, resulting in substantial economic losses. Moreover, even experienced veterinarians may misdiagnose similar symptoms due to a lack of comprehensive knowledge or experience [25]. Computer-aided diagnostic systems in medicine can utilize diagnostic rules to simulate human experts’ systems of making diagnostic decisions. Additionally, these systems possess feedback mechanisms through which they can infer new knowledge from diverse data, thereby improving their diagnostic performance over time [26].
An accurate, automated mastitis diagnostic tool holds great potential to assist non-specialist clinical veterinarians in quickly making a herd-level diagnosis and taking appropriate measures in a timely manner to control a disease which has extreme adverse effects animal health, welfare, productivity, and antimicrobial drug application [14]. The applicability of a detection method for conventional diagnosis depends on several factors, including cost, sensitivity, specificity, time to produce results, and the feasibility of large-scale milk sampling [27]. Common mastitis detection methods such as pathogen identification causing intramammary infections, milk conductivity testing, and biomarker assessment may excel in specificity, sensitivity, and other performance aspects compared to our network. However, most of them suffer from drawbacks such as high cost, time consumption, and the difficulty of on-farm implementation in cattle fields. The management conditions in animal husbandry vary greatly. Therefore, the detection techniques for mastitis should be diversified to meet the needs of animals raised under different breeding management conditions.
To date, multiple cow mastitis detection models have been established through machine learning, but to our knowledge, a deep learning detection network for buffalo mastitis has not been reported yet. In the report by Ebrahimi et al. [16], various prediction systems were applied to a large milking parameters set to obtain the best mastitis prediction model. The results showed that deep learning and gradient-boosted trees were superior to other models. The deep learning cow mastitis diagnostic model based on infrared thermal imaging technology has been reported in many studies [18,28]. However, using this detection technology to determine udder health is susceptible to external factors, leading to inaccurate detection of mastitis [18]. Furthermore, a mastitis detection network has been established based on matrix-assisted laser desorption/ionization time-of-flight mass spectrometry [29], sensors [30], cytometric fingerprinting [31], and other technologies. In several studies, deep learning-based mastitis detection exhibited an accuracy of above 80% [16,32], but the equipment or big data required for mastitis detection are highly likely to be unavailable to buffalo farms. Additionally, most of these technologies cannot detect mastitis at the 1/4 level. Detecting mastitis at the quarter level is advantageous for formulating more rational animal management, treatment, and prognosis plans.
The human visual system can quickly and accurately find prominent areas in complex scenes. Inspired by this phenomenon, the attention mechanism was introduced into computer vision. The attention mechanism has become an effective method to select important information in order to obtain superior results [33], and it has achieved great success in multiple visual tasks such as object detection, image classification, video understanding, semantic segmentation, image generation, multimodal tasks, 3D vision, and self-supervised learning [34]. The traditional attention mechanism based on convolutional neural networks pays more attention to the information in the channel domain and ignores the information in the spatial domain. The convolutional block attention module will adaptively infer the attention map along the two independent dimensions of channel and space, which is superior to the attention mechanism that only focuses on channel information. CBAM has been widely used in medical images and shows excellent model performance [35,36]; thus, we decided to add CBAM to the training network to enhance the model’s ability to learn mastitis features.
The larger the AUC, the better the performance of the model in diagnosing mastitis. An AUC of 0.7–0.8 was defined as good, 0.8–0.9 as very good, and 0.9–1.0 as excellent [37]. Figure 2 (SCC threshold = 2 × 105 cells/mL) and Figure 3 (SCC threshold = 4 × 105 cells/mL) show the receiver operating characteristic curve (ROC) of the mastitis detection network used in this study. When SCC ≥ 2 × 105 cells/mL was defined as mastitis, the AUC value of the mastitis detection network was 0.77, and when SCC ≥ 4 × 105 cells/mL was defined as mastitis, the AUC value was 0.83. Judging from the AUC value, the detection performance of the model we established was a good model (at SCC threshold = 2 × 105 cells/mL) and a very good model (at SCC threshold = 4 × 105 cells/mL), respectively, indicating that the network is more capable of distinguishing between mastitis udders and healthy udders when SCC ≥ 4 × 105 cells/mL is defined as mastitis.
The classification performance of model was visualized through a confusion matrix. When SCC ≥ 2 × 105 cells/mL was defined as mastitis, the network misclassified 90 mastitis samples (a total of 244 mastitis samples) into the healthy category and misclassified 47 healthy samples (a total of 213 healthy samples) into the mastitis category (Figure 4). When SCC ≥ 4 × 105 cells/mL was defined as mastitis, the network misclassified 59 mastitis samples (a total of 199 mastitis samples) into the healthy category, but only misclassified 51 healthy samples (a total of 258 healthy samples) into the mastitis category (Figure 5). Both networks were more capable of identifying healthy udders than mastitis udders. However, the network’s classification was more accurate in identifying both mastitis-stricken and healthy udders at a SCC threshold = 4 × 105 cells/mL than at a SCC threshold = 2 × 105 cells/mL. After comprehensive evaluation, the deep neural network with SCC ≥ 4 × 105 cells/mL defined as mastitis was determined as the most suitable for on-site buffalo mastitis detection in cattle farms.
Ultrasonography can present parameters such as mammary cistern and teat area, which can be used for assessing the udder health of lactating cows, and can reveal parenchymal damages such as mastitis, edema, hematoma, abscess, atrophy, and mammary fibrosis based on different echogenicities of various structures [38]. Ultrasound scanning of the mammary parenchyma at hour 72 after Staphylococcus infection showed a large range of hyperechoic areas, the lactiferous ducts became quite narrow, and the anechoic blood vessels could not be displayed [11]. Zhang et al. [39] used computer-assisted technology to quantify the texture of udder ultrasound images and found that there was a positive correlation between the pixel standard deviation of udder ultrasound texture and the SCC level, indicating that, as the mastitis became increasingly severe, the pathological manifestations corresponding to the ultrasound texture became more obvious. The report by Abdullah et al. [40] found that, as mastitis intensifies, the average numerical pixel values and pixel heterogeneity of the udder parenchyma echotexture increased. This explains our results that the detection performance of the model using SCC ≥ 4 × 105 cells/mL as the threshold to classify mastitis was better than the model using SCC ≥ 2 × 105 cells/mL.
Different cattle farms around the world choose different mastitis detection methods due to differences in geography, income, and herd size. Inexpensive detection technologies are especially important for buffalo farms in smallholder economies in developing countries. Ultrasound machines are the most ubiquitous reproductive tools in cattle farm management. The easy acquisition of udder ultrasound images (due to the simple measurement method and popularization of ultrasound equipment) and the powerful feature extraction capabilities of deep learning networks make it feasible to establish a buffalo mastitis detection method based on deep learning and udder ultrasonography, which will meet the urgent needs of cattle farms with backward breeding conditions. In this study, the optimal accuracy rate of the model in detecting mastitis was 75.93%, and our model could accurately locate the area where mastitis occurred at the 1/4 level, providing a basis for the formulation of subsequent treatment schemes and production management decisions.

4. Conclusions

This study used 4 × 105 cells/mL and 2 × 105 cells/mL SCC as thresholds, respectively, to train the 1/4 level buffalo mastitis detection network. The results showed that the network showed the optimal performance in terms of mastitis detection when SCC ≥ 4 × 105 cells/mL was defined as mastitis. Compared with laboratory mastitis detection methods, which require expensive precision instruments and professional operators, the method established in this study was relatively less accurate, but it is still of great value to buffalo farms with relatively backward breeding technology. In the future, there is an opportunity to further expand the sample size of this study on cows or other dairy animals, which is very promising to improve the accuracy of the deep learning network for mastitis detection.

Author Contributions

Conceptualization, X.Z. and L.Y.; formal analysis, L.Y.; funding acquisition, L.Y.; investigation, X.Z., Y.L., Y.Z., Z.Y., W.Z. and P.N.; methodology, X.Z. and L.Y.; project administration, L.Y.; software, X.Z. and Z.Y.; supervision, L.Y.; writing—original draft, X.Z. and L.Y.; writing—review and editing, X.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Key R&D Program of China (No. 2022YFD1301001).

Institutional Review Board Statement

All the experimental procedures in this study were approved by the Ethics Committee of Huazhong Agricultural University (Ethics number: HZAUBU-2020-0001).

Informed Consent Statement

Written informed consent was obtained from the owners for the inclusion of their animals in this study.

Data Availability Statement

The data provided in this study can be requested from the corresponding author under reasonable circumstances. The data are not publicly available due to the privacy and confidentiality agreements as well as other restrictions.

Conflicts of Interest

The authors declare no conflict of interest. The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

References

  1. Rehman, S.U.; Hassan, F.-U.; Luo, X.; Li, Z.; Liu, Q. Whole-genome sequencing and characterization of buffalo genetic resources: Recent advances and future challenges. Animals 2021, 11, 904. [Google Scholar] [CrossRef]
  2. Ahmad, S.; Gaucher, I.; Rousseau, F.; Beaucher, E.; Piot, M.; Grongnet, J.F.; Gaucheron, F. Effects of acidification on physico-chemical characteristics of buffalo milk: A comparison with cow’s milk. Food Chem. 2008, 106, 11–17. [Google Scholar] [CrossRef]
  3. Mejares, C.T.; Huppertz, T.; Chandrapala, J. Thermal processing of buffalo milk—A review. Int. Dairy J. 2022, 129, 105311. [Google Scholar] [CrossRef]
  4. Naveena, B.; Kiran, M. Buffalo meat quality, composition, and processing characteristics: Contribution to the global economy and nutritional security. Anim. Front. 2014, 4, 18–24. [Google Scholar] [CrossRef]
  5. El Debaky, H.A.; Kutchy, N.A.; Ul-Husna, A.; Indriastuti, R.; Akhter, S.; Purwantara, B.; Memili, E. Potential of water buffalo in world agriculture: Challenges and opportunities. Appl. Anim. Sci. 2019, 35, 255–268. [Google Scholar] [CrossRef]
  6. El-Ashker, M.; Gwida, M.; Tomaso, H.; Monecke, S.; Ehricht, R.; El-Gohary, F.; Hotzel, H. Staphylococci in cattle and buffaloes with mastitis in Dakahlia Governorate, Egypt. J. Dairy Sci. 2015, 98, 7450–7459. [Google Scholar] [CrossRef] [PubMed]
  7. Fagiolo, A.; Lai, O. Mastitis in buffalo. Ital. J. Anim. Sci. 2007, 6 (Suppl. 2), 200–206. [Google Scholar] [CrossRef]
  8. 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] [PubMed]
  9. Panchal, I.; Sawhney, I.; Sharma, A.; Dang, A. Classification of healthy and mastitis Murrah buffaloes by application of neural network models using yield and milk quality parameters. Comput. Electron. Agric. 2016, 127, 242–248. [Google Scholar] [CrossRef]
  10. EZ Kotb, E.; El-Fattah, A.; Ola, A.; Azab, A.M.; Leil, A.Z. Ultrasonography, histopathological udder alterations and bacteriological investigations for diagnosis of mastitic goats. J. Appl. Vet. Sci. 2020, 5, 77–86. [Google Scholar] [CrossRef]
  11. Fasulkov, I.; Karadaev, M.; Vasilev, N.; Simeonov, R.; Urumova, V.; Mladenova, E. Ultrasound and histopathological investigations of experimentally induced Staphylococcus aureus mastitis in goats. Small Rumin. Res. 2015, 129, 114–120. [Google Scholar] [CrossRef]
  12. Mansour, R.F. Deep-learning-based automatic computer-aided diagnosis system for diabetic retinopathy. Biomed. Eng. Lett. 2018, 8, 41–57. [Google Scholar] [CrossRef] [PubMed]
  13. Chugh, G.; Kumar, S.; Singh, N. Survey on machine learning and deep learning applications in breast cancer diagnosis. Cogn. Comput. 2021, 13, 1451–1470. [Google Scholar] [CrossRef]
  14. Hyde, R.M.; Down, P.M.; Bradley, A.J.; Breen, J.E.; Hudson, C.; Leach, K.A.; Green, M.J. Automated prediction of mastitis infection patterns in dairy herds using machine learning. Sci. Rep. 2020, 10, 4289. [Google Scholar] [CrossRef] [PubMed]
  15. Liu, S.; Wang, Y.; Yang, X.; Lei, B.; Liu, L.; Li, S.X.; Ni, D.; Wang, T. Deep learning in medical ultrasound analysis: A review. Engineering 2019, 5, 261–275. [Google Scholar] [CrossRef]
  16. Ebrahimi, M.; Mohammadi-Dehcheshmeh, M.; Ebrahimie, E.; Petrovski, K.R. Comprehensive analysis of machine learning models for prediction of sub-clinical mastitis: Deep Learning and Gradient-Boosted Trees outperform other models. Comput. Biol. Med. 2019, 114, 103456. [Google Scholar] [CrossRef] [PubMed]
  17. 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]
  18. 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]
  19. Minervino, A.H.H.; Zava, M.; Vecchio, D.; Borghese, A. Bubalus bubalis: A short story. Front. Vet. Sci. 2020, 7, 570413. [Google Scholar] [CrossRef]
  20. Neculai-Valeanu, A.-S.; Ariton, A.-M. Udder health monitoring for prevention of bovine mastitis and improvement of milk quality. Bioengineering 2022, 9, 608. [Google Scholar] [CrossRef]
  21. Kasai, S.; Prasad, A.; Kumagai, R.; Takanohashi, K. Scanning electrochemical microscopy-somatic cell count as a method for diagnosis of bovine mastitis. Biology 2022, 11, 549. [Google Scholar] [CrossRef] [PubMed]
  22. Tan, M.; Le, Q. Efficientnet: Rethinking model scaling for convolutional neural networks. Proc. Mach. Learn. Res. 2019, 97, 6105–6114. [Google Scholar]
  23. Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
  24. Leng, Z.; Tan, M.; Liu, C.; Cubuk, E.D.; Shi, X.; Cheng, S.; Anguelov, D. Polyloss: A polynomial expansion perspective of classification loss functions. arXiv 2022, arXiv:2204.12511. [Google Scholar]
  25. Wang, H.; Shen, W.; Zhang, Y.; Gao, M.; Zhang, Q.; Xiaohui, A.; Du, H.; Qiu, B. Diagnosis of dairy cow diseases by knowledge-driven deep learning based on the text reports of illness state. Comput. Electron. Agric. 2023, 205, 107564. [Google Scholar] [CrossRef]
  26. Yanase, J.; Triantaphyllou, E. A systematic survey of computer-aided diagnosis in medicine: Past and present developments. Expert Syst. Appl. 2019, 138, 112821. [Google Scholar] [CrossRef]
  27. Duarte, C.M.; Freitas, P.P.; Bexiga, R. Technological advances in bovine mastitis diagnosis: An overview. J. Vet. Diagn. Investig. 2015, 27, 665–672. [Google Scholar] [CrossRef]
  28. 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. [Google Scholar] [CrossRef]
  29. Thompson, J.; Nunn, S.L.E.; Sarkar, S.; Clayton, B. Diagnostic Screening of Bovine Mastitis Using MALDI-TOF MS Direct-Spotting of Milk and Machine Learning. Vet. Sci. 2023, 10, 101. [Google Scholar] [CrossRef]
  30. Abdul Ghafoor, N.; Sitkowska, B. MasPA: A machine learning application to predict risk of mastitis in cattle from AMS sensor data. AgriEngineering 2021, 3, 575–583. [Google Scholar] [CrossRef]
  31. Dhoble, A.S.; Ryan, K.T.; Lahiri, P.; Chen, M.; Pang, X.; Cardoso, F.C.; Bhalerao, K.D. Cytometric fingerprinting and machine learning (CFML): A novel label-free, objective method for routine mastitis screening. Comput. Electron. Agric. 2019, 162, 505–513. [Google Scholar] [CrossRef]
  32. 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]
  33. Liu, G.; Guo, J. Bidirectional LSTM with attention mechanism and convolutional layer for text classification. Neurocomputing 2019, 337, 325–338. [Google Scholar] [CrossRef]
  34. Guo, M.-H.; Xu, T.-X.; Liu, J.-J.; Liu, Z.-N.; Jiang, P.-T.; Mu, T.-J.; Zhang, S.-H.; Martin, R.R.; Cheng, M.-M.; Hu, S.-M. Attention mechanisms in computer vision: A survey. Comput. Vis. Media 2022, 8, 331–368. [Google Scholar] [CrossRef]
  35. Fang, Y.; Huang, H.; Yang, W.; Xu, X.; Jiang, W.; Lai, X. Nonlocal convolutional block attention module VNet for gliomas automatic segmentation. Int. J. Imaging Syst. Technol. 2022, 32, 528–543. [Google Scholar] [CrossRef]
  36. Farag, M.M.; Fouad, M.; Abdel-Hamid, A.T. Automatic severity classification of diabetic retinopathy based on densenet and convolutional block attention module. IEEE Access 2022, 10, 38299–38308. [Google Scholar] [CrossRef]
  37. Šimundić, A.-M. Measures of diagnostic accuracy: Basic definitions. EJIFCC 2009, 19, 203. [Google Scholar] [PubMed]
  38. Dos Santos, S.K.; Oliveira, M.G.; Noriler, E.P.; Vrisman, D.P.; Borges, L.P.B.; Santos, V.J.C.; Coutinho, L.N.; Teixeira, P.P.M. Mammary gland ultrasound evaluation of Jersey cattle breed. Acta Sci. Vet. 2016, 44, 5. [Google Scholar] [CrossRef]
  39. Zhang, X.; Ahmad, M.J.; An, Z.; Niu, K.; Wang, W.; Nie, P.; Gao, S.; Yang, L. Relationship between somatic cell counts and mammary gland parenchyma ultrasonography in buffaloes. Front. Vet. Sci. 2022, 9, 842105. [Google Scholar] [CrossRef] [PubMed]
  40. Abdullah, O.M.; Aslam, S.; Khan, M.A.; Mushtaq, H.; Hassan, M.; Ijaz, M. Healthy, sub-clinical, and clinical mastitis in Holstein-Friesian cattle: A comparative echotextural and electrical conductivity study. S. Afr. J. Anim. Sci. 2023, 53, 221–230. [Google Scholar]
Figure 1. Preprocessing of udder ultrasound images. Note: The Chinese information in the udder ultrasound image pertains to the parameter settings during the process of capturing this photograph.
Figure 1. Preprocessing of udder ultrasound images. Note: The Chinese information in the udder ultrasound image pertains to the parameter settings during the process of capturing this photograph.
Animals 14 00707 g001
Figure 2. ROC curve of EfficientNet_b3 + CBAM + PolyLoss network framework for mastitis detection when SCC ≥ 2 × 105 cells/mL was defined as mastitis. Note: SCC = somatic cell count; AUC = the area under the receiver operating characteristics curve.
Figure 2. ROC curve of EfficientNet_b3 + CBAM + PolyLoss network framework for mastitis detection when SCC ≥ 2 × 105 cells/mL was defined as mastitis. Note: SCC = somatic cell count; AUC = the area under the receiver operating characteristics curve.
Animals 14 00707 g002
Figure 3. ROC curve of EfficientNet_b3 + CBAM + PolyLoss network framework for mastitis detection when SCC ≥ 4 × 105 cells/mL was defined as mastitis. Note: SCC = somatic cell count; AUC = the area under the receiver operating characteristics curve.
Figure 3. ROC curve of EfficientNet_b3 + CBAM + PolyLoss network framework for mastitis detection when SCC ≥ 4 × 105 cells/mL was defined as mastitis. Note: SCC = somatic cell count; AUC = the area under the receiver operating characteristics curve.
Animals 14 00707 g003
Figure 4. Confusion matrix of deep neural network for classifying buffalo udder ultrasound images on the test set when a somatic cell count ≥ 2 × 105 cells/mL was defined as mastitis.
Figure 4. Confusion matrix of deep neural network for classifying buffalo udder ultrasound images on the test set when a somatic cell count ≥ 2 × 105 cells/mL was defined as mastitis.
Animals 14 00707 g004
Figure 5. Confusion matrix of deep neural network for classifying buffalo udder ultrasound images on the test set when a somatic cell count ≥ 4 × 105 cells/mL was defined as mastitis.
Figure 5. Confusion matrix of deep neural network for classifying buffalo udder ultrasound images on the test set when a somatic cell count ≥ 4 × 105 cells/mL was defined as mastitis.
Animals 14 00707 g005
Table 1. Number of udder ultrasound images in the two data sets of the mastitis group and the healthy group.
Table 1. Number of udder ultrasound images in the two data sets of the mastitis group and the healthy group.
Data Set.SCC ThresholdHealthy Group (n)Mastitis Group (n)
12 × 105 cells/mL14241630
24 × 105 cells/mL17221332
Note: SCC = somatic cell count.
Table 2. Classification performance of EfficientNet_b3 + CBAM + PolyLoss network framework in buffalo mastitis detection with somatic cell count thresholds of 2 × 105 cells/mL and 4 × 105 cells/mL, respectively.
Table 2. Classification performance of EfficientNet_b3 + CBAM + PolyLoss network framework in buffalo mastitis detection with somatic cell count thresholds of 2 × 105 cells/mL and 4 × 105 cells/mL, respectively.
SCC ThresholdAccuracy (%)Specificity (%)Sensitivity (%)F1-Score (%)
2 × 105 cells/mL70.0277.9363.1169.21
4 × 105 cells/mL75.9380.2370.3571.79
Note: SCC = somatic cell count; CBAM = convolutional block attention module.
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.

Share and Cite

MDPI and ACS Style

Zhang, X.; Li, Y.; Zhang, Y.; Yao, Z.; Zou, W.; Nie, P.; Yang, L. A New Method to Detect Buffalo Mastitis Using Udder Ultrasonography Based on Deep Learning Network. Animals 2024, 14, 707. https://doi.org/10.3390/ani14050707

AMA Style

Zhang X, Li Y, Zhang Y, Yao Z, Zou W, Nie P, Yang L. A New Method to Detect Buffalo Mastitis Using Udder Ultrasonography Based on Deep Learning Network. Animals. 2024; 14(5):707. https://doi.org/10.3390/ani14050707

Chicago/Turabian Style

Zhang, Xinxin, Yuan Li, Yiping Zhang, Zhiqiu Yao, Wenna Zou, Pei Nie, and Liguo Yang. 2024. "A New Method to Detect Buffalo Mastitis Using Udder Ultrasonography Based on Deep Learning Network" Animals 14, no. 5: 707. https://doi.org/10.3390/ani14050707

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop