1
|
Neupane R, Aryal A, Haeussermann A, Hartung E, Pinedo P, Paudyal S. Evaluating machine learning algorithms to predict lameness in dairy cattle. PLoS One 2024; 19:e0301167. [PMID: 39024328 PMCID: PMC11257334 DOI: 10.1371/journal.pone.0301167] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [MESH Headings] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Received: 03/11/2024] [Accepted: 07/05/2024] [Indexed: 07/20/2024] Open
Abstract
Dairy cattle lameness represents one of the common concerns in intensive and commercial dairy farms. Lameness is characterized by gait-related behavioral changes in cows and multiple approaches are being utilized to associate these changes with lameness conditions including data from accelerometers, and other precision technologies. The objective was to evaluate the use of machine learning algorithms for the identification of lameness conditions in dairy cattle. In this study, 310 multiparous Holstein dairy cows from a herd in Northern Colorado were affixed with a leg-based accelerometer (Icerobotics® Inc, Edinburg, Scotland) to obtain the lying time (min/d), daily steps count (n/d), and daily change (n/d). Subsequently, study cows were monitored for 4 months and cows submitted for claw trimming (CT) were differentiated as receiving corrective claw trimming (CCT) or as being diagnosed with a lameness disorder and consequent therapeutic claw trimming (TCT) by a certified hoof trimmer. Cows not submitted to CT were considered healthy controls. A median filter was applied to smoothen the data by reducing inherent variability. Three different machine learning (ML) models were defined to fit each algorithm which included the conventional features (containing daily lying, daily steps, and daily change derived from the accelerometer), slope features (containing features extracted from each variable in Conventional feature), or all features (3 simple features and 3 slope features). Random forest (RF), Naive Bayes (NB), Logistic Regression (LR), and Time series (ROCKET) were used as ML predictive approaches. For the classification of cows requiring CCT and TCT, ROCKET classifier performed better with accuracy (> 90%), ROC-AUC (> 74%), and F1 score (> 0.61) as compared to other algorithms. Slope features derived in this study increased the efficiency of algorithms as the better-performing models included All features explored. However, further classification of diseases into infectious and non-infectious events was not effective because none of the algorithms presented satisfactory model accuracy parameters. For the classification of observed cow locomotion scores into severely lame and moderately lame conditions, the ROCKET classifier demonstrated satisfactory accuracy (> 0.85), ROC-AUC (> 0.68), and F1 scores (> 0.44). We conclude that ML models using accelerometer data are helpful in the identification of lameness in cows but need further research to increase the granularity and accuracy of classification.
Collapse
Affiliation(s)
- Rajesh Neupane
- Department of Animal Science, Texas A&M University, College Station, Texas, United States of America
| | - Ashrant Aryal
- Department of Construction Science, Texas A&M University, College Station, Texas, United States of America
| | | | - Eberhard Hartung
- Department of Agricultural Engineering, Kiel University, Kiel, Germany
| | - Pablo Pinedo
- Department of Animal Sciences, Colorado State University, Fort Collins, Colorado, United States of America
| | - Sushil Paudyal
- Department of Animal Science, Texas A&M University, College Station, Texas, United States of America
| |
Collapse
|
2
|
Fenta HM, Zewotir TT, Naidoo S, Naidoo RN, Mwambi H. Factors of acute respiratory infection among under-five children across sub-Saharan African countries using machine learning approaches. Sci Rep 2024; 14:15801. [PMID: 38982206 PMCID: PMC11233665 DOI: 10.1038/s41598-024-65620-1] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [MESH Headings] [Grants] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Received: 02/13/2024] [Accepted: 06/21/2024] [Indexed: 07/11/2024] Open
Abstract
Symptoms of Acute Respiratory infections (ARIs) among under-five children are a global health challenge. We aimed to train and evaluate ten machine learning (ML) classification approaches in predicting symptoms of ARIs reported by mothers among children younger than 5 years in sub-Saharan African (sSA) countries. We used the most recent (2012-2022) nationally representative Demographic and Health Surveys data of 33 sSA countries. The air pollution covariates such as global annual surface particulate matter (PM 2.5) and the nitrogen dioxide available in the form of raster images were obtained from the National Aeronautics and Space Administration (NASA). The MLA was used for predicting the symptoms of ARIs among under-five children. We randomly split the dataset into two, 80% was used to train the model, and the remaining 20% was used to test the trained model. Model performance was evaluated using sensitivity, specificity, accuracy, and the area under the receiver operating characteristic curve. A total of 327,507 under-five children were included in the study. About 7.10, 4.19, 20.61, and 21.02% of children reported symptoms of ARI, Severe ARI, cough, and fever in the 2 weeks preceding the survey years respectively. The prevalence of ARI was highest in Mozambique (15.3%), Uganda (15.05%), Togo (14.27%), and Namibia (13.65%,), whereas Uganda (40.10%), Burundi (38.18%), Zimbabwe (36.95%), and Namibia (31.2%) had the highest prevalence of cough. The results of the random forest plot revealed that spatial locations (longitude, latitude), particulate matter, land surface temperature, nitrogen dioxide, and the number of cattle in the houses are the most important features in predicting the diagnosis of symptoms of ARIs among under-five children in sSA. The RF algorithm was selected as the best ML model (AUC = 0.77, Accuracy = 0.72) to predict the symptoms of ARIs among children under five. The MLA performed well in predicting the symptoms of ARIs and associated predictors among under-five children across the sSA countries. Random forest MLA was identified as the best classifier to be employed for the prediction of the symptoms of ARI among under-five children.
Collapse
Affiliation(s)
- Haile Mekonnen Fenta
- Discipline of Public Health Medicine, School of Nursing and Public Health College of Health Sciences, University of KwaZulu-Natal, Durban, South Africa.
- Department of Statistics, College of Science, Bahir Dar University, Bahir Dar, Ethiopia.
| | - Temesgen T Zewotir
- School of Mathematics, Statistics and Computer Science, College of Agriculture Engineering and Science, University of KwaZulu-Natal, Durban, South Africa
| | - Saloshni Naidoo
- Discipline of Public Health Medicine, School of Nursing and Public Health College of Health Sciences, University of KwaZulu-Natal, Durban, South Africa
| | - Rajen N Naidoo
- Discipline of Occupational and Environmental Health, School of Nursing and Public Health, College of Health Sciences, University of KwaZulu-Natal, Durban, South Africa
| | - Henry Mwambi
- School of Mathematics, Statistics and Computer Science, College of Agriculture Engineering and Science, University of KwaZulu-Natal, Durban, South Africa
| |
Collapse
|
3
|
Raza A, Abbas K, Swangchan-Uthai T, Hogeveen H, Inchaisri C. Behavioral Adaptations in Tropical Dairy Cows: Insights into Calving Day Predictions. Animals (Basel) 2024; 14:1834. [PMID: 38929452 PMCID: PMC11201252 DOI: 10.3390/ani14121834] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Received: 05/16/2024] [Revised: 06/07/2024] [Accepted: 06/18/2024] [Indexed: 06/28/2024] Open
Abstract
This study examined changes in the activity patterns of tropical dairy cows during the transition period to assess their potential for predicting calving days. This study used the AfiTag-II biosensor to monitor activity, rest time, rest per bout, and restlessness ratio in 298 prepartum and 347 postpartum Holstein Friesian cows across three lactation groups (1, 2, and ≥3). The data were analyzed using generalized linear mixed models in SPSS, and five machine learning models, including random forest, decision tree, gradient boosting, Naïve Bayes, and neural networks, were used to predict the calving day, with their performance evaluated via ROC curves and AUC metrics. For all lactations, activity levels peak on the calving day, followed by a gradual return to prepartum levels within two weeks. First-lactation cows displayed the shortest rest duration, with a prepartum rest time of 568.8 ± 5.4 (mean ± SE), which is significantly lower than higher-lactation animals. The random forest and gradient boosting displayed an effective performance, achieving AUCs of 85% and 83%, respectively. These results indicate that temporal changes in activity behavior have the potential to be a useful indicator for calving day prediction, particularly in tropical climates where seasonal variations can obscure traditional prepartum indicators.
Collapse
Affiliation(s)
- Aqeel Raza
- International Graduate Program of Veterinary Science and Technology, Faculty of Veterinary Science, Chulalongkorn University, Bangkok 10440, Thailand; (A.R.); (K.A.)
- Research Unit of Data Innovation for Livestock, Department of Veterinary Medicine, Faculty of Veterinary Science, Chulalongkorn University, Bangkok 10330, Thailand
| | - Kumail Abbas
- International Graduate Program of Veterinary Science and Technology, Faculty of Veterinary Science, Chulalongkorn University, Bangkok 10440, Thailand; (A.R.); (K.A.)
- Research Unit of Data Innovation for Livestock, Department of Veterinary Medicine, Faculty of Veterinary Science, Chulalongkorn University, Bangkok 10330, Thailand
| | - Theerawat Swangchan-Uthai
- CU-Animal Fertility Research Unit, Department of Obstetrics, Gynaecology, and Reproduction, Faculty of Veterinary Science, Chulalongkorn University, Bangkok 10330, Thailand;
| | - Henk Hogeveen
- Business Economics Group, Wageningen University and Research, 6706KN Wageningen, The Netherlands;
| | - Chaidate Inchaisri
- Research Unit of Data Innovation for Livestock, Department of Veterinary Medicine, Faculty of Veterinary Science, Chulalongkorn University, Bangkok 10330, Thailand
| |
Collapse
|
4
|
Farhoodimoghadam M, Reagan KL, Zwingenberger AL. Diagnosis and classification of portosystemic shunts: a machine learning retrospective case-control study. Front Vet Sci 2024; 11:1291318. [PMID: 38638645 PMCID: PMC11024426 DOI: 10.3389/fvets.2024.1291318] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [Track Full Text] [Figures] [Journal Information] [Subscribe] [Scholar Register] [Received: 09/08/2023] [Accepted: 03/21/2024] [Indexed: 04/20/2024] Open
Abstract
Diagnosis of portosystemic shunts (PSS) in dogs often requires multiple diagnostic tests, and available clinicopathologic tests have limitations in sensitivity and specificity. The objective of this study was to train and validate a machine learning model (MLM) that can accurately predict the presence of a PSS utilizing routinely collected demographic data and clinicopathologic features. Dogs diagnosed with PSS or control dogs tested for PSS but had the condition ruled out (non-PSS) were identified. Dogs were included if a complete blood count and serum chemistry panel were available from PSS diagnostic testing. Dogs with a PSS were subcategorized as having a single intrahepatic PSS, a single extrahepatic PSS, or multiple extrahepatic PSS. An extreme gradient boosting (XGboost) MLM was trained with data from 70% of the cases, and MLM performance was determined on the test set, comprising the remaining 30% of the case data. Two MLMs were created. The first was designed to predict the presence of any PSS (PSS MLM), and the second to predict the PSS subcategory (PSS SubCat MLM). The trained PSS MLM had a sensitivity of 94.3% (95% CI 90.1-96.8%) and specificity of 90.5% (95% CI 85.32-94.0%) for dogs in the test set. The area under the receiver operator characteristic curve (AUC) was 0.976 (95% CI; 0.964-0.989). The mean corpuscular hemoglobin, lymphocyte count, and serum globulin concentration were most important in prediction classification. The PSS SubCat MLM had an accuracy of 85.7% in determining the subtype of PSS of dogs in the test set, with variable sensitivity and specificity depending on PSS subtype. These MLMs have a high accuracy for diagnosing PSS; however, the prediction of PSS subclassification is less accurate. The MLMs can be used as a screening tool to increase or decrease the index of suspicion for PSS before confirmatory diagnostics such as advanced imaging are pursued.
Collapse
Affiliation(s)
- Makan Farhoodimoghadam
- Department of Computer Science, University of California, Davis, Davis, CA, United States
| | - Krystle L. Reagan
- Department of Veterinary Medicine and Epidemiology, School of Veterinary Medicine, University of California, Davis, Davis, CA, United States
| | - Allison L. Zwingenberger
- Department of Surgical and Radiological Sciences, School of Veterinary Medicine, University of California, Davis, Davis, CA, United States
| |
Collapse
|
5
|
Pakrashi A, Wallace D, Mac Namee B, Greene D, Guéret C. CowMesh: a data-mesh architecture to unify dairy industry data for prediction and monitoring. Front Artif Intell 2023; 6:1209507. [PMID: 37868080 PMCID: PMC10586498 DOI: 10.3389/frai.2023.1209507] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [Grants] [Track Full Text] [Figures] [Journal Information] [Subscribe] [Scholar Register] [Received: 04/20/2023] [Accepted: 09/08/2023] [Indexed: 10/24/2023] Open
Abstract
Dairy is an economically significant industry that caters to the huge demand for food products in people's lives. To remain profitable, farmers need to manage their farms and the health of the dairy cows in their herds. There are, however, many risks to cow health that can lead to significant challenges to dairy farm management and have the potential to lead to significant losses. Such risks include cow udder infections (i.e., mastitis) and cow lameness. As automation and data recording become more common in the agricultural sector, dairy farms are generating increasing amounts of data. Recently, these data are being used to generate insights into farm and cow health, where the objective is to help farmers manage the health and welfare of dairy cows and reduce losses from cow health issues. Despite the level of data generation on dairy farms, this information is often difficult to access due to a lack of a single, central organization to collect data from individual farms. The prospect of such an organization, however, raises questions about data ownership, with some farmers reluctant to share their farm data for privacy reasons. In this study, we describe a new data mesh architecture designed for the dairy industry that focuses on facilitating access to data from farms in a decentralized fashion. This has the benefit of keeping the ownership of data with dairy farmers while bringing data together by providing a common and uniform set of protocols. Furthermore, this architecture will allow secure access to the data by research groups and product development groups, who can plug in new projects and applications built across the data. No similar framework currently exists in the dairy industry, and such a data mesh can help industry stakeholders by bringing the dairy farms of a country together in a decentralized fashion. This not only helps farmers, dairy researchers, and product builders but also facilitates an overview of all dairy farms which can help governments to decide on regulations to improve the dairy industry at a national level.
Collapse
Affiliation(s)
- Arjun Pakrashi
- School of Computer Science, University College Dublin, Dublin, Ireland
- Insight Centre for Data Analytics, Dublin, Ireland
- VistaMilk SFI Research Centre, Teagasc Moorepark, Fermoy, Ireland
| | - Duncan Wallace
- School of Computer Science, University College Dublin, Dublin, Ireland
- Insight Centre for Data Analytics, Dublin, Ireland
- VistaMilk SFI Research Centre, Teagasc Moorepark, Fermoy, Ireland
| | - Brian Mac Namee
- School of Computer Science, University College Dublin, Dublin, Ireland
- Insight Centre for Data Analytics, Dublin, Ireland
- VistaMilk SFI Research Centre, Teagasc Moorepark, Fermoy, Ireland
| | - Derek Greene
- School of Computer Science, University College Dublin, Dublin, Ireland
- Insight Centre for Data Analytics, Dublin, Ireland
- VistaMilk SFI Research Centre, Teagasc Moorepark, Fermoy, Ireland
| | | |
Collapse
|
6
|
Zhang X, Xuan C, Ma Y, Su H. A high-precision facial recognition method for small-tailed Han sheep based on an optimised Vision Transformer. Animal 2023; 17:100886. [PMID: 37422932 DOI: 10.1016/j.animal.2023.100886] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [MESH Headings] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Received: 02/13/2023] [Revised: 06/05/2023] [Accepted: 06/08/2023] [Indexed: 07/11/2023] Open
Abstract
Accurate identification of individual animals plays a pivotal role in enhancing animal welfare and optimising farm production. Although Radio Frequency Identification technology has been widely applied in animal identification, this method still exhibits several limitations that make it difficult to meet current practical application requirements. In this study, we proposed ViT-Sheep, a sheep face recognition model based on the Vision Transformer (ViT) architecture, to facilitate precise animal management and enhance livestock welfare. Compared to Convolutional Neural Network (CNN), ViT is renowned for its competitive performance. The experimental procedure of this study consisted of three main steps. Firstly, we collected face images of 160 experimental sheep to construct the sheep face image dataset. Secondly, we developed two sets of sheep face recognition models based on CNN and ViT, respectively. To enhance the ability to learn sheep face biological features, we proposed targeted improvement strategies for the sheep face recognition model. Specifically, we introduced the LayerScale module into the encoder of the ViT-Base-16 model and employed transfer learning to improve recognition accuracy. Finally, we compared the training results of different recognition models and the ViT-Sheep model. The results demonstrated that our proposed method achieved the highest performance on the sheep face image dataset, with a recognition accuracy of 97.9%. This study demonstrates that ViT can successfully achieve sheep face recognition tasks with good robustness. Furthermore, the findings of this research will promote the practical application of artificial intelligence animal recognition technology in sheep production.
Collapse
Affiliation(s)
- Xiwen Zhang
- College of Mechanical and Electrical Engineering, Inner Mongolia Agricultural University, Inner Mongolia, Hohhot 010018, China; Inner Mongolia Engineering Research Center for Intelligent Facilities in Prataculture and Livestock Breeding, Inner Mongolia, Hohhot 010018, China
| | - Chuanzhong Xuan
- College of Mechanical and Electrical Engineering, Inner Mongolia Agricultural University, Inner Mongolia, Hohhot 010018, China; Inner Mongolia Engineering Research Center for Intelligent Facilities in Prataculture and Livestock Breeding, Inner Mongolia, Hohhot 010018, China.
| | - Yanhua Ma
- College of Mechanical and Electrical Engineering, Inner Mongolia Agricultural University, Inner Mongolia, Hohhot 010018, China
| | - He Su
- College of Mechanical and Electrical Engineering, Inner Mongolia Agricultural University, Inner Mongolia, Hohhot 010018, China
| |
Collapse
|
7
|
Hao J, Zhang H, Han Y, Wu J, Zhou L, Luo Z, Du Y. Sheep Face Detection Based on an Improved RetinaFace Algorithm. Animals (Basel) 2023; 13:2458. [PMID: 37570267 PMCID: PMC10417540 DOI: 10.3390/ani13152458] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [Grants] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Received: 06/24/2023] [Revised: 07/21/2023] [Accepted: 07/28/2023] [Indexed: 08/13/2023] Open
Abstract
The accurate breeding of individual sheep has shown outstanding effectiveness in food quality tracing, prevention of fake insurance claims, etc., for which sheep identification is the key to guaranteeing its high performance. As a promising solution, sheep identification based on sheep face detection has shown potential effectiveness in recent studies. Unfortunately, the performance of sheep face detection has still been a challenge due to diverse background illumination, sheep face angles and scales, etc. In this paper, an effective and lightweight sheep face detection method based on an improved RetinaFace algorithm is proposed. In order to achieve an accurate and real-time detection of sheep faces on actual sheep farms, the original RetinaFace algorithm is improved in two main aspects. Firstly, to accelerate the speed of multi-scale sheep face feature extraction, an improved MobileNetV3-large with a switchable atrous convolution is optimally used as the backbone network of the proposed algorithm. Secondly, the channel and spatial attention modules are added into the original detector module to highlight important facial features of the sheep. This helps obtain more discriminative sheep face features to mitigate against the challenges of diverse face angles and scale in sheep. The experimental results on our collected real-world scenarios have shown that the proposed method outperforms others with an F1score of 95.25%, an average precision of 96.00%, a model size of 13.20 M, an average processing time of 26.83 ms, and a parameter of 3.20 M.
Collapse
Affiliation(s)
| | | | - Yamin Han
- College of Information Engineering, Northwest A&F University, Xianyang 712100, China; (J.H.); (H.Z.)
| | | | | | | | | |
Collapse
|
8
|
Zhou X, Xu C, Wang H, Xu W, Zhao Z, Chen M, Jia B, Huang B. The Early Prediction of Common Disorders in Dairy Cows Monitored by Automatic Systems with Machine Learning Algorithms. Animals (Basel) 2022; 12:1251. [PMID: 35625096 PMCID: PMC9137925 DOI: 10.3390/ani12101251] [Citation(s) in RCA: 12] [Impact Index Per Article: 6.0] [Reference Citation Analysis] [Abstract] [Key Words] [Grants] [Track Full Text] [Download PDF] [Figures] [Journal Information] [Subscribe] [Scholar Register] [Received: 04/02/2022] [Revised: 05/06/2022] [Accepted: 05/09/2022] [Indexed: 02/03/2023] Open
Abstract
We use multidimensional data from automated monitoring systems and milking systems to predict disorders of dairy cows by employing eight machine learning algorithms. The data included the season, days in milking, parity, age at the time of disorders, milk yield (kg/day), activity (unitless), six variables related to rumination time, and two variables related to the electrical conductivity of milk. We analyze 131 sick cows and 149 healthy cows with identical lactation days and parity; all data are collected on the same day, which corresponds to the diagnosis day for disordered cows. For disordered cows, each variable, except the ratio of rumination time from daytime to nighttime, displays a decreasing/increasing trend from d-7 or d-3 to d0 and/or d-1, with the d0, d-1, or d-2 values reaching the minimum or maximum. The test data sensitivity for three algorithms exceeded 80%, and the accuracies of the eight algorithms ranged from 65.08% to 84.21%. The area under the curve (AUC) of the three algorithms was >80%. Overall, Rpart best predicts the disorders with an accuracy, precision, and AUC of 81.58%, 92.86%, and 0.908, respectively. The machine learning algorithms may be an appropriate and powerful decision support and monitoring tool to detect herds with common health disorders.
Collapse
Affiliation(s)
- Xiaojing Zhou
- Department of Information and Computing Science, Heilongjiang Bayi Agricultural University, No. 5 Xinyang Road, Daqing 163319, China;
- Heilongjiang Provincial Key Laboratory of Prevention and Control of Bovine Diseases, College of Animal Science and Veterinary Medicine, Heilongjiang Bayi Agricultural University, No. 5 Xinyang Road, Daqing 163319, China; (Z.Z.); (M.C.)
| | - Chuang Xu
- Heilongjiang Provincial Key Laboratory of Prevention and Control of Bovine Diseases, College of Animal Science and Veterinary Medicine, Heilongjiang Bayi Agricultural University, No. 5 Xinyang Road, Daqing 163319, China; (Z.Z.); (M.C.)
| | - Hao Wang
- Animal Husbandry and Veterinary Branch of Heilongjiang Academy of Agricultural Science, Qiqihaer 161005, China; (H.W.); (B.J.); (B.H.)
| | - Wei Xu
- Department of Biosystems, Division of Animal and Human Health Engineering, KU Leuven, 3000 Leuven, Belgium;
| | - Zixuan Zhao
- Heilongjiang Provincial Key Laboratory of Prevention and Control of Bovine Diseases, College of Animal Science and Veterinary Medicine, Heilongjiang Bayi Agricultural University, No. 5 Xinyang Road, Daqing 163319, China; (Z.Z.); (M.C.)
| | - Mengxing Chen
- Heilongjiang Provincial Key Laboratory of Prevention and Control of Bovine Diseases, College of Animal Science and Veterinary Medicine, Heilongjiang Bayi Agricultural University, No. 5 Xinyang Road, Daqing 163319, China; (Z.Z.); (M.C.)
| | - Bin Jia
- Animal Husbandry and Veterinary Branch of Heilongjiang Academy of Agricultural Science, Qiqihaer 161005, China; (H.W.); (B.J.); (B.H.)
| | - Baoyin Huang
- Animal Husbandry and Veterinary Branch of Heilongjiang Academy of Agricultural Science, Qiqihaer 161005, China; (H.W.); (B.J.); (B.H.)
| |
Collapse
|