Skip to main content
Veterinary Research logoLink to Veterinary Research
. 2023 Dec 15;54:122. doi: 10.1186/s13567-023-01255-w

Early detection of infectious bovine keratoconjunctivitis with artificial intelligence

Shekhar Gupta 1,, Larry A Kuehn 2, Michael L Clawson 2,
PMCID: PMC10724966  PMID: 38102629

Abstract

Artificial intelligence (AI) was developed to distinguish cattle by their muzzle patterns and identify early cases of disease, including infectious bovine keratoconjunctivitis (IBK). It was tested on 870 cattle in four locations, with 170 developing IBK. The AI identified 169 of the 170 cases prior to their identification by veterinarians, and another 17 cases that remained free of IBK signs (sensitivity = 99.4%, specificity = 97.6%). These results indicate the AI can detect emerging IBK cases by muzzle images very early in the disease process and be used as an intervention tool in the prevention of IBK outbreaks.

Keywords: Artificial intelligence, neural networks, deep learning, biosecurity, cattle disease, animal welfare, infectious bovine keratoconjunctivitis, pinkeye, cattle, muzzles

Introduction, methods, and results

Infectious bovine keratoconjunctivitis (IBK), also known as pinkeye, is the most important ocular disease of cattle in the United States and throughout much of the world [1, 2]. The disease is both a cattle welfare and economic problem [1, 3]. IBK is painful, with clinical signs that include lacrimation, blepharospasm, photophobia, epiphora, and serous or mucopurulent conjunctivitis [3, 4]. Corneas can become scarred and severe IBK cases can lead to permanent blindness [2, 3]. Cattle with IBK can have reduced weaning weights, incurring a substantial economic loss [1].

IBK is a disease complex that often involves bacterial species of Moraxella, including Moraxella bovis, which is a causative agent of IBK, and a specific genotype of Moraxella bovoculi (genotype 1) which associates with the disease but has not been shown to directly cause it [2, 5, 6]. Additional bacteria have been associated with IBK, or IBK-like disease in what appear to be more minor roles, including Mycoplasma bovis, Mycoplasma bovoculi, Ureplasma species, Listeria monocytogenes, and Chlamydia species, although the exact roles and strength of IBK associations for many of them is unclear [7]. Also, some viruses can cause ocular lesions in cattle including herpesvirus BoHV-1 and a γ-herpesvirus [7].

In the US, approved antibiotic treatments for IBK are oxytetracycline and the macrolide tulathromycin [8]. The treatments can be effective, however, they come at an economic cost, and their application in cattle raises concerns of a spike of antimicrobial resistance that could potentially spill over from cattle to humans or components of the environment [9, 10]. Given that, a primary goal for IBK is prevention [11]. There currently are no highly efficacious vaccines that protect cattle from IBK in the field, thus, there is a need for novel solutions to preventing IBK outbreaks in cattle [11, 12].

Like fingerprints of humans, muzzle dermatoglyphic patterns of cattle can identify the animals at the individual level [13, 14]. Features can be extracted from digital camera images with algorithms such as scale-invariant feature transform (SIFT) or maximally stable extremal regions (MSER), that can be used with machine learning, deep learning or convolutional neural networks for individual identification [15, 16]. The possibilities of muzzle dermatoglyphics with artificial intelligence applications in the early detection of diseases are only now beginning to be explored. In the case of IBK, early muzzle changes that proceed visible signs of disease have not been reported in the literature, but seemed possible prior to this study as the bovine cornea epithelium is densely but only superficially innervated [3], indicating that very early stages of IBK are likely painful to the animal, which in turn could affect the muzzle appearance. Early detection of animals about to break with IBK would be critically important for the development of interventions that prevent IBK outbreaks. Therefore, the goals of this study were to create a database of muzzle images of cattle with and without signs of IBK, to create a pipeline for image feature extraction, to train machine learning to differentiate between muzzle images of cattle with and without signs of IBK, and to test the ability of the artificial intelligence system to detect cattle with early, breaking cases of IBK before veterinarians could detect signs of the disease.

Creation of a pipeline to identify sick cattle by images of their muzzles

The AI pipeline was made of two different models. The first model was designed to extract critical information about cattle muzzles using pictures. The second was designed to predict whether or not cattle were sick by comparing their pictures to those in MyAnIML’s large database of healthy and sick muzzles (Figures 1 and 2). For this study, we developed preliminary AI algorithms using Regional Convolutional Neural Networks (RCNNs and Pytorch). We developed our own RCNNs for object detection as well as image classification tasks across datasets. We used Sagemaker from AWS to do analyses on the cloud. We also compared Yolo3 with RCNN, Tensorflow, and Pytorch.

Figure 1.

Figure 1

Pictures of cattle taken with GoPro camera mounted on feeder truck. The AI grabs individual images for analyses.

Figure 2.

Figure 2

Pipeline overview of the technology. Every pixel of the image is classified as either pertaining to the individual cattle or not. Machine learning extracts facial features so the computer would know what is background and what is cattle. The system ends up knowing exactly which pixels belong to a particular animal. A bounding box is drawn around the pertinent part of the image and cropped out. This both improves model accuracy and reduces storage and processing costs.

To identify and crop the muzzle from the pictures, the AI measured an animal’s face by measuring the distance from the left-to-right ear and forehead-to-lower chin (Figure 2). The AI would then create a “virtual box” of the individual’s face so that it could be analyzed (Figure 2). Once the system obtained facial feature extractions, it created a muzzle extraction net (Figure 2).

Since there were no cattle facial and muzzle libraries publicly available prior to this study, we developed one with the help of our partners. We captured 3000 healthy beef cattle pictures to train the AI. We also captured 1500 sick beef cattle pictures. Most of the cattle were crossbreeds. Out of 1500 sick cattle pictures, we had 800 IBK cases and 600 bovine respiratory disease (BRD) cases, and the rest were of different diseases such as foot rot, uterus infection, ect. The pictures were used to show the system the difference between healthy and sick muzzles.

IBK study

An IBK study was conducted in the summers of 2021 (June–Aug) and 2022 (July and Aug). The cattle were Angus 40%, Hereford 35%, and Charolais 25%, with 55% mature animals, 25% calves, and 20% heifers. Muzzle pictures were taken in three different cattle backgrounder operations in the Kansas City area: Paola, Harrisonville, Garnett, and Kansas City, KS. Paola and Kansas City, KS were from one backgrounder with two different locations. The first set of pictures was taken in 2021 with either cell phones or digital cameras, and was of animals contained within a squeeze chute. The second set was taken in 2022 using a GoPro camera on a Feeder Truck (Figure 1). In 2021, 150 cattle were photographed in Paola and 220 were photographed in Kansas City (see Table 1 for cattle numbers and IBK results). In 2022, 200 cattle were photographed in Harrisonville and 300 cattle were photographed in Garnett. All 870 muzzle pictures were analyzed by our AI for the early detection of IBK. Additionally, all 870 animals in the study were examined for IBK by veterinarians the same day their pictures were taken, and 1–2 days after they were taken. Disease diagnoses were made by the veterinarians and none of the animals were diagnosed with IBK on the day their pictures were taken. The veterinarians were notified to check on cattle flagged by our AI system as having IBK in the interest of animal welfare. Of the 870 animals, 170 were diagnosed with IBK based on early signs including lacrimation with epiphora. The veterinarians also checked for signs of mechanical injury to the eyes which would have excluded an IBK diagnosis. Prior to their diagnosis, 169 of the 170 cases were identified as developing IBK by the AI (sensitivity = 99.4%). The AI identified another 17 animals that would develop IBK but remained negative during the study (specificity = 97.6%).

Table 1.

IBK study information.

Paola cattle used in study 150
Kansas City cattle used in study 220
Harrisonville cattle used in study 200
Garnett cattle used in study 300
Total number of cattle in study 870
Total predicted healthy by AI that did not develop IBK 683
Total predicted healthy by AI that did develop IBK 1
Total predicted IBK cases by AI that did develop IBK 169
Total predicted IBK cases by AI that did not develop into IBK 17

Numbers of cattle from different locations used in the study and comparisons of IBK predictions by AI versus diagnosed cases.

Discussion

Surveillance and early detection of infectious disease is a key component to disease management and outbreak control [17]. This is particularly true for diseases in which efficacious vaccines are lacking, like IBK. IBK can emerge quickly in cattle herds and is considered highly contagious, although the exact mechanisms by which M. bovis, M. bovoculi, and other IBK-associated bacteria spread from animal to animal are unclear [3]. Thus, the AI system developed in this study could be used as an intervention tool to prevent IBK outbreaks, given that it accurately predicted the emergence of IBK cases very early in the disease progression. Environmental practices used to control the spread or severity of IBK could be implemented earlier through AI, such as enhanced fly control protocols, greater shading for protection from ultraviolet light, and disinfection between the processing or handling of cases [18, 19]. Infected animals could also be separated from their uninfected herd mates when possible. Additionally, the early identification of cases could lead to judicious administration of antibiotics before a large outbreak had the chance to emerge.

There are limitations to the system in its current stage of development. The AI was trained exclusively on beef cattle, thus additional training with dairy cattle muzzles would be necessary prior to its use for IBK detection in dairy cattle. Additional data on beef cattle could be used to train the system further, and potentially detect any specific breed effects regarding muzzle profiles with or without IBK. Visual inspection of the muzzles of cattle predicted to develop IBK in this study did not reveal a clear phenotype that correlated exclusively with the disease, thus the biological differences between the muzzles of healthy beef cattle versus those of emerging IBK cases are not fully understood. Notably, M. bovis and M. bovoculi strain types that associate with IBK can all carry the repeats-in-toxin hemolysin [6, 20], which is considered one of their main virulence factors [21]. It is possible these different organisms may elicit a similar effect on the cornea or the muzzle through hemolysin, or other biological determinants, that is not fully apparent to human eyes. Additional research could address this possibility, and facilitate calibration of the AI system to specific IBK pathogens and/or virulence factors.

How far can we push AI for disease detection in cattle? Many cattle diseases, like IBK, are polymicrobial, which gives the possibility of different muzzle phenotypes for the same disease. One of the most important diseases of cattle worldwide is BRD, which is both multifactorial and polymicrobial. The AI system is currently being trained to predict BRD by muzzle profiles, and early results indicate that it can distinguish emerging cases, although more training of the system with larger numbers of animals will be required to match the sensitivity and specificity of detection for IBK. Ultimately, AI may be incorporated as a vital tool for precision management of cattle, ensuring maximal health and well-being as part of the production process.

Acknowledgements

We thank the ranchers and veterinarians who participated in this study. The use of product and company names is necessary to accurately report the methods and results; however, the USDA neither guarantees nor warrants the standard of the products, and the use of names by the USDA implies no approval of the product to the exclusion of others that may also be suitable. The USDA is an equal opportunity provider and employer.

Authors’ contributions

SG created the AI system, designed the experiment, interpreted and analyzed the results, and revised the manuscript. LAK analyzed the results and revised the manuscript. MLC interpreted the results and drafted the manuscript. All authors read and approved the final manuscript.

Funding

Funding was provided by MyAnIML. AK and MLC were supported by the USDA/ARS project numbers 3040-31000-104-000-D and 3040-32000-036-000-D.

Availability of data and materials

Cattle muzzle pictures in the MyAnIML database that were used to train MyAnIML’s proprietary AI system are not publicly available. Data from the IBK study are available from corresponding author Shekhar Gupta upon reasonable request.

Declarations

Ethics approval and consent to participate

Cattle owners gave informed consent for the use their animals in this study.

Competing interests

SG is founder and CEO of the company myAnIML. LAK and MLC declare that they have no competing interests.

Footnotes

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Shekhar Gupta, Email: shekhar@myaniml.com.

Michael L. Clawson, Email: mike.clawson@usda.gov

References

  • 1.Dennis EJ, Kneipp M. A review of global prevalence and economic impacts of infectious bovine keratoconjunctivitis. Vet Clin North Am Food Anim Pract. 2021;37:355–369. doi: 10.1016/j.cvfa.2021.03.010. [DOI] [PubMed] [Google Scholar]
  • 2.Irby NL, Angelos JA (2018) 14 - Ocular Diseases, from Rebhun’s Diseases of Dairy Cattle. 3rd edn
  • 3.Kneipp M. Defining and diagnosing infectious bovine keratoconjunctivitis. Vet Clin North Am Food Anim Pract. 2021;37:237–252. doi: 10.1016/j.cvfa.2021.03.001. [DOI] [PubMed] [Google Scholar]
  • 4.Dewell RD, Millman ST, Gould SA, Tofflemire KL, Whitley RD, Parsons RL, Rowe EW, Liu F, Wang C, O’Connor AM. Evaluating approaches to measuring ocular pain in bovine calves with corneal scarification and infectious bovine keratoconjunctivitis-associated corneal ulcerations. J Anim Sci. 2014;92:1161–1172. doi: 10.2527/jas.2013-7264. [DOI] [PubMed] [Google Scholar]
  • 5.Dickey AM, Loy JD, Bono JL, Smith TP, Apley MD, Lubbers BV, DeDonder KD, Capik SF, Larson RL, White BJ, Blom J, Chitko-McKown CG, Clawson ML. Large genomic differences between Moraxella bovoculi isolates acquired from the eyes of cattle with infectious bovine keratoconjunctivitis versus the deep nasopharynx of asymptomatic cattle. Vet Res. 2016;47:31. doi: 10.1186/s13567-016-0316-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Dickey AM, Schuller G, Loy JD, Clawson ML. Whole genome sequencing of Moraxella bovoculi reveals high genetic diversity and evidence for interspecies recombination at multiple loci. PLoS One. 2018;13:e0209113. doi: 10.1371/journal.pone.0209113. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Loy JD, Clothier KA, Maier G. Component causes of infectious bovine keratoconjunctivitis-non-Moraxella organisms in the epidemiology of infectious bovine keratoconjunctivitis. Vet Clin North Am Food Anim Pract. 2021;37:295–308. doi: 10.1016/j.cvfa.2021.03.005. [DOI] [PubMed] [Google Scholar]
  • 8.O’Connor AM, Kneipp M. Evidence base for treatment of infectious bovine keratoconjunctivitis. Vet Clin North Am Food Anim Pract. 2021;37:329–339. doi: 10.1016/j.cvfa.2021.03.008. [DOI] [PubMed] [Google Scholar]
  • 9.Velazquez-Meza ME, Galarde-Lopez M, Carrillo-Quiroz B, Alpuche-Aranda CM. Antimicrobial resistance: one health approach. Vet World. 2022;15:743–749. doi: 10.14202/vetworld.2022.743-749. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Sagar P, Aseem A, Banjara SK, Veleri S. The role of food chain in antimicrobial resistance spread and one health approach to reduce risks. Int J Food Microbiol. 2023;391–393:110148. doi: 10.1016/j.ijfoodmicro.2023.110148. [DOI] [PubMed] [Google Scholar]
  • 11.Maier G, O’Connor AM, Sheedy D. The evidence base for prevention of infectious bovine keratoconjunctivitis through vaccination. Vet Clin North Am Food Anim Pract. 2021;37:341–353. doi: 10.1016/j.cvfa.2021.03.009. [DOI] [PubMed] [Google Scholar]
  • 12.Hille MM, Spangler ML, Clawson ML, Heath KD, Vu HLX, Rogers RES, Loy JD. A five year randomized controlled trial to assess the efficacy and antibody responses to a commercial and autogenous vaccine for the prevention of infectious bovine keratoconjunctivitis. Vaccines. 2022;10:916. doi: 10.3390/vaccines10060916. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Petersen WE. The identification of the bovine by means of nose-prints. J Dairy Sci. 1922;5:249–258. doi: 10.3168/jds.S0022-0302(22)94150-5. [DOI] [Google Scholar]
  • 14.Tharwat A, Gaber T, Hassanien AE, Hassanien HA (2014) Cattle identification using muzzle print images based on texture features approach. In: Proceedings of the Fifth International Conference on Innovations in Bio-Inspired Computing and Applications IBICA. Advances in Intelligent Systems and Computing vol. 303. Czech Republic
  • 15.Awad AI, Hassaballah M. Bag-of-visual-words for cattle identification from muzzle print images. Appl Sci. 2019;9:4914. doi: 10.3390/app9224914. [DOI] [Google Scholar]
  • 16.Hossain ME, Kabir MA, Zheng L, Swain DL, McGrath S, Medway J. A systematic review of machine learning techniques for cattle identification: datasets, methods and future directions. Artif Intell Agric. 2022;6:138–155. [Google Scholar]
  • 17.Steele L, Orefuwa E, Bino S, Singer SR, Lutwama J, Dickmann P. Earlier outbreak detection-A generic model and novel methodology to guide earlier detection supported by data from low- and mid-income countries. Front Public Health. 2020;8:452. doi: 10.3389/fpubh.2020.00452. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Maier G, Doan B, O’Connor AM. The role of environmental factors in the epidemiology of infectious bovine keratoconjunctivitis. Vet Clin North Am Food Anim Pract. 2021;37:309–320. doi: 10.1016/j.cvfa.2021.03.006. [DOI] [PubMed] [Google Scholar]
  • 19.Angelos JA. Infectious bovine keratoconjunctivitis (pinkeye) Vet Clin North Am Food Anim Pract. 2015;31(61–79):v–vi. doi: 10.1016/j.cvfa.2014.11.006. [DOI] [PubMed] [Google Scholar]
  • 20.Wynn EL, Hille MM, Loy JD, Schuller G, Kuhn KL, Dickey AM, Bono JL, Clawson ML. Whole genome sequencing of Moraxella bovis strains from North America reveals two genotypes with different genetic determinants. BMC Microbiol. 2022;22:258. doi: 10.1186/s12866-022-02670-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Loy JD, Hille M, Maier G, Clawson ML. Component causes of infectious bovine keratoconjunctivitis—the role of Moraxella species in the epidemiology of infectious bovine keratoconjunctivitis. Vet Clin North Am Food Anim Pract. 2021;37:279–293. doi: 10.1016/j.cvfa.2021.03.004. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Cattle muzzle pictures in the MyAnIML database that were used to train MyAnIML’s proprietary AI system are not publicly available. Data from the IBK study are available from corresponding author Shekhar Gupta upon reasonable request.


Articles from Veterinary Research are provided here courtesy of BMC

RESOURCES