Diagnosing lameness with the Random Forest classification algorithm using thermal cameras and digital colour parameters

Lameness is a serious disease that affects the health and welfare of dairy cattle whilst also causing yield and economic losses. The primary goal of this study is to determine if lameness can be detected early on in herd management using the Random Forest (RF) algorithm and the surface temperatures of the cows' hoof soles, as well as the digital colour parameters generated by processing these thermal camera images. Ages, hoof sole temperatures, and digital colour characteristics of 40 Simmental cattle were used as independent variables in this study, while lameness was evaluated by scoring and employed as a dependent variable after being updated as a binary variable. The parameters ntree= 100 and mtry= 3 were used to develop the RF algorithm for predicting lameness in animals. As a result, the RF algorithm correctly classified 19 of 22 healthy animals and incorrectly classified 3, while it correctly classified 15 of 18 unhealthy animals and incorrectly classified 3. The classification success of the RF algorithm was 85%, sensitivity, specificity and area under the ROC curve (AUC) were 0.864, 0.833, and 0.848±0.059, respectively, and it was successful in detecting lameness. Also, AUC, which is one of the RF algorithm's classification performances, was found to be statistically significant (P<0.05). As a direct consequence it can be stated that the RF algorithm is a suitable classifier in terms of the use of animal hoof sole temperatures and digital colour parameters obtained through image processing in the detection of lameness in herd management.

Diagnosing lameness with the Random Forest classification algorithm using thermal cameras and digital colour parameters

Lameness is a serious disease that affects the health and welfare of dairy cattle whilst also causing yield and economic losses. The primary goal of this study is to determine if lameness can be detected early on in herd management using the Random Forest (RF) algorithm and the surface temperatures of the cows' hoof soles, as well as the digital colour parameters generated by processing these thermal camera images. Ages, hoof sole temperatures, and digital colour characteristics of 40 Simmental cattle were used as independent variables in this study, while lameness was evaluated by scoring and employed as a dependent variable after being updated as a binary variable. The parameters ntree= 100 and mtry= 3 were used to develop the RF algorithm for predicting lameness in animals. As a result, the RF algorithm correctly classified 19 of 22 healthy animals and incorrectly classified 3, while it correctly classified 15 of 18 unhealthy animals and incorrectly classified 3. The classification success of the RF algorithm was 85%, sensitivity, specificity and area under the ROC curve (AUC) were 0.864, 0.833, and 0.848±0.059, respectively, and it was successful in detecting lameness. Also, AUC, which is one of the RF algorithm's classification performances, was found to be statistically significant (P<0.05). As a direct consequence it can be stated that the RF algorithm is a suitable classifier in terms of the use of animal hoof sole temperatures and digital colour parameters obtained through image processing in the detection of lameness in herd management.

___

  • Akar Ö, Güngör O (2012) Rastgele orman algoritması kullanılarak çok bantlı görüntülerin sınıflandırılması. Jeodezi ve Jeoinformasyon Dergisi 1(2): 139-146.
  • Akkose M, Celal I (2017) Süt ineklerinde yatma süresinin topallıklara etkisi ve yatma süresini etkileyen faktörler. Lalahan Hayvancılık Araştırma Enstitüsü Dergisi 57(1): 44-51.
  • Alsaaod M, Schaefer AL, Büscher W, Steiner A (2015) The role of infrared thermography as a non-invasive tool for the detection of lameness in cattle. Sensors 15(6): 14513-14525.
  • Archer KJ, Kimes RV (2008) Empirical characterization of random forest variable importance measures. Computational Statistics & Data Analysis 52(4): 2249-2260.
  • Bobić T, Mijić P, Gregić M, Bagarić A, Gantner V (2017) Early detection of the hoof diseases in Holstein cows using thermovision camera. Agriculturae Conspectus Scientificus 82(2): 197-200.
  • Boztepe S, Aytekin İ, Zülkadir U (2015) Süt Sığırcılığı. Selçuk Üniversitesi Basım Evi, Konya, Türkiye.
  • Breiman L (2001) Random forests. Machine learning 45(1): 5-32.
  • Chesterton RN, Lawrence KE, Laven RA (2008) A descriptive analysis of the foot lesions identified during veterinary treatment for lameness on dairy farms in north Taranaki. New Zealand Veterinary Journal 56(3): 130-138.
  • Colak A, Polat B, Okumus Z, Kaya M, Yanmaz LE, Hayirli A (2008) Early detection of mastitis using infrared thermography in dairy cows. Journal of Dairy Science 91(11): 4244-4248.
  • Coskun G, Aytekin I (2021) Early detection of mastitis by using infrared thermography in holstein-friesian dairy cows via classification and regression tree (CART) Analysis. Selcuk Journal of Agriculture and Food Sciences 35(2): 115-124.
  • Cutler DR, Edwards JTC, Beard KH, Cutler A, Hess KT, Gibson J, Lawler JJ (2007) Random forests for classification in ecology. Ecology 88(11): 2783-2792.
  • Dembele I, Spinka M, Stehulova I, Panama J, Firla P (2006) Factors contributing to the incidence of prevalence of lameness on Czech dairy farms. Czech Journal of Animal Science 51(3): 102.
  • Dogan S, Turkoglu I (2008) Iron-deficiency anemia detection from hematology parameters by using decision trees. International Journal of Science & Technology 3(1): 85-92.
  • Eddy AL, Van Hoogmoed LM, Snyder JR (2001) The role of thermography in the management of equine lameness. The Veterinary Journal 162(3): 172-181.
  • Enting H, Kooij D, Dijkhuizen AA, Huirne RBM, Noordhuizen-Stassen EN (1997) Economic losses due to clinical lameness in dairy cattle. Livestock production science 49(3): 259-267.
  • Ercire M (2019) Kısa süreli güç kalitesi bozulmalarının dalgacık analizi ve rastgele orman yöntemi ile sınıflandırılması. Yüksek Lisans Tezi, Kütahya Dumlupınar Üniversitesi Fen Bilimleri Enstitüsü, Kütahya.
  • Gianesella M, Arfuso F, Fiore E, Giambelluca S, Giudice E, Armato L, Piccione G (2018) Infrared thermography as a rapid and non-invasive diagnostic tool to detect inflammatory foot diseases in dairy cows. Polish Journal of Veterinary Sciences 21(2): 299-305.
  • Gislason PO, Benediktsson JA, Sveinsson JR (2004) Random forest classification of multisource remote sensing and geographic data. In: 2004 IEEE International Geoscience and Remote Sensing Symposium IGARSS 2004, Anchorage, AK, USA, pp. 1049-1052.
  • Gislason PO, Benediktsson JA, Sveinsson JR (2006) Random forests for land cover classification. Pattern recognition letters 27(4): 294-300.
  • Hanley JA, McNeil BJ (1982) The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology 143(1): 29-36.
  • Horning N (2010) Random Forests: An algorithm for image classification and generation of continuous fields data sets. In Proceedings of the International Conference on Geoinformatics for Spatial Infrastructure Development in Earth and Allied Sciences, Osaka, Japan (Vol. 911).
  • İstek Ö, Durgun T (2004) Muş ve yöresindeki sığırlarda görülen ayak hastalıklarının prevalansı üzerine araştırmalar. Fırat Üniversitesi Doğu Araştırmaları Dergisi 3(1): 39-47.
  • Lahiri BB, Bagavathiappan S, Jayakumar T, Philip J (2012) Medical applications of infrared thermography: a review. Infrared Physics & Technology 55(4): 221-235.
  • Leach KA, Offer JE, Svoboda I, Logue DN (2005) Effects of type of forage fed to dairy heifers: Associations between claw characteristics, clinical lameness, environment and behaviour. The Veterinary Journal 169(3): 427-436.
  • Liaw A, Wiener M (2002) Classification and regression by random Forest. R News 2(3): 18-22.
  • Lin YC, Mullan S, Main DC (2018) Optimising lameness detection in dairy cattle by using handheld infrared thermometers. Veterinary Medicine and Science 4(3): 218-226.
  • Main DC, Stokes JE, Reader JD, Whay HR (2012) Detecting hoof lesions in dairy cattle using a hand-held thermometer. The Veterinary Record 171(20): 504.
  • Mülling CK, Green L, Barker Z, Scaife J, Amory J, Speijers M (2006) Risk factors associated with foot lameness in dairy cattle and a suggested approach for lameness reduction. In World Buiatrics Congress, Nice France, (Vol. 24).
  • Murray RD, Downham DY, Clarkson MJ, Faull WB, Hughes JW, Manson FJ, Merritt JB, Russell WB, Sutherst JE, Ward WR (1996) Epidemiology of lameness in dairy cattle: Description and analysis of foot lesions. Veterinary Record 138(24): 586-591.
  • Nikkhah A, Plaizier JC, Einarson MS, Berry RJ, Scott SL, Kennedy AD (2005) Infrared thermography and visual examination of hooves of dairy cows in two stages of lactation. Journal of Dairy Science 88(8): 2749-2753.
  • Pal M (2003) Random forests for land cover classification. In IGARSS 2003 IEEE International Geoscience and Remote Sensing Symposium. Proceedings Toulouse, France, pp. 3510-3512.
  • Pedersen S, Wilson J (2021) Early detection and prompt effective treatment of lameness in dairy cattle. Livestock 26(3): 115-121.
  • Prasad AM, Iverson LR, Liaw A (2006) Newer classification and regression tree techniques: bagging and random forests for ecological prediction. Ecosystems 9(2): 181-199.
  • R Core Team (2020) R: A language and environment for statistical computing. Vienna, Austria: R Foundation for Statistical Computing. Retrieved from https://www.R-project.org/. Accessed 5 March, 2020.
  • Rainwater-Lovett K, Pacheco JM, Packer C, Rodriguez LL (2009) Detection of foot-and-mouth disease virus infected cattle using infrared thermography. The Veterinary Journal 180(3): 317-324.
  • Rasband WS (1997) Image J. Bethesda, MD: National Institutes of Health. http:/rsb.info.nih.gov/ij/. Accessed 25 December, 2021.
  • Renn N, Onyango J, McCormick W (2014) Digital ınfrared thermal ımaging and manual lameness scoring as a means for lameness detection in cattle. Veterinary Clinical Science 2(2): 16-23.
  • Rodríguez AR, Olivares FJ, Descouvieres PT, Werner MP, Tadich NA, Bustamante HA (2016) Thermographic assessment of hoof temperature in dairy cows with different mobility scores. Livestock Science 184: 92-96.
  • Savas S, Topaloglu N, Yılmaz M (2012) Veri madenciliği ve Türkiye’deki uygulama örnekleri. İstanbul Ticaret Üniversitesi Fen Bilimleri Dergisi 11(21): 1-23.
  • Schlageter-Tello A, Bokkers EAM, Koerkamp PWG, Van Hertem T, Viazzi S, Romanini CEB, Halachmi I, Bahr C, Berckmans D, Lokhorst K (2015) Comparison of locomotion scoring for dairy cows by experienced and inexperienced raters using live or video observation methods. Animal Welfare 24(1): 69-79. doi: 10.7120/09627286.24.1.069.
  • Sprecher DEA, Hostetler DE, Kaneene JB (1997) A lameness scoring system that uses posture and gait to predict dairy cattle reproductive performance. Theriogenology 47(6): 1179-1187.
  • Stokes JE, Leach KA, Main DCJ, Whay HR (2012) An investigation into the use of infrared thermography (IRT) as a rapid diagnostic tool for foot lesions in dairy cattle. The Veterinary Journal 193(3): 674-678.
  • Tangirala S (2020) Evaluating the impact of GINI index and information gain on classification using decision tree classifier algorithm. International Journal of Advanced Computer Science and Applications 11(2): 612-619.
  • Thomas HJ, Remnant JG, Bollard NJ, Burrows A, Whay HR, Bell NJ, Mason C, Huxley JN (2016) Recovery of chronically lame dairy cows following treatment for claw horn lesions: A randomised controlled trial. Veterinary Record 178(5): 116-116.
  • Watts JD, Powell SL, Lawrence RL, Hilker T (2011) Improved classification of conservation tillage adoption using high temporal and synthetic satellite imagery. Remote Sensing of Environment 115(1): 66-75.
  • Werema CW, Laven L, Mueller K, Laven R (2021) Evaluating alternatives to locomotion scoring for lameness detection in pasture-based dairy cows in new zealand: infra-red thermography. Animals 11(12): 3473.
  • Whay HR, Shearer J (2017) The impact of lameness on welfare of the dairy cow. Veterinary Clinics of North America: Food Animal Practice 33(2): 153-164.
  • Wilhelm K, Wilhelm J, Fürll M (2015) Use of thermography to monitor sole haemorrhages and temperature distribution over the claws of dairy cattle. Veterinary Record 176(6): 146-146.
  • Yakan S (2018) Ağrı ilinde sığırlarda ayak hastalıkları prevalansının belirlenmesi. Harran Üniversitesi Veteriner Fakültesi Dergisi 7(2): 207-212.
  • Yayla S, Aksoy Ö, Kılıç E, Cihan M, Özaydın İ, Ermutlu CŞ (2012) Kars ve yöresinde sığırların bakım ve barındırma koşulları ile ayak hastalıkları arasındaki ilişkinin değerlendirilmesi. Harran Üniversitesi Veteriner Fakültesi Dergisi 1(1): 22-27.
  • Yaylak E (2008) Süt sığırlarında topallık ve topallığın bazı özelliklere etkisi. Hayvansal Üretim 49(1): 47-56.