M Wieland, W Flanders, A Singh, J Runyan, C Guarino, P Basran
{"title":"Development and evaluation of a computer vision system for identifying mastitis-related pathogens in dairy cows from bacterial culture media.","authors":"M Wieland, W Flanders, A Singh, J Runyan, C Guarino, P Basran","doi":"10.3168/jds.2026-28858","DOIUrl":null,"url":null,"abstract":"<p><p>The objective of this study was to investigate the diagnostic accuracy of a computer vision system for identifying mastitis pathogens from tryptic soy agar plates containing 5% sheep blood. We used isolates of the following mastitis pathogens: Escherichia coli, Klebsiella pneumoniae, Lactococcus lactis, Staphylococcus aureus, Staphylococcus chromogenes, Streptococcus dysgalactiae, Streptococcus infantarius, and Streptococcus uberis. In addition, a 'no growth' category was included to represent samples in which no bacterial growth was detected. After primary culture and pathogen identification at the species level by matrix-assisted laser desorption/ionization time-of-flight mass spectrometry (MALDI-TOF), a representative colony was selected and subcultured, and plates were incubated at 37°C for 48 h. After 24 h of incubation, a representative colony from each plate was submitted for MALDI-TOF analysis, which served as the gold standard. Images were obtained at 24 and 48 h of incubation using a digital camera and a custom-made light box. A custom convolutional neural network architecture was designed to predict pathogen classification from digital images obtained at 24 and 48 h. We calculated the overall accuracy, diagnostic test statistics [sensitivity, specificity, positive predictive value (PPV), and negative predictive value (NPV)], and the area under the curve (AUC) of the receiver operating characteristic (ROC) curves to assess the models' performance in detecting the different pathogen categories. The overall classification accuracy was 74.0% for the 24-h model and 72.8% for the 48-h model. The mean ROC AUC was 0.950 for the 24-h model and 0.943 for the 48-h model, indicating strong separability among pathogen categories. Sensitivity, specificity, PPV, and NPV for the 24-model were E. coli, 0.79, 0.97, 0.74, 0.97; K. pneumoniae, 0.71, 0.93, 0.60, 0.96; L. lactis, 0.51, 0.94, 0.52, 0.94; Staph. aureus, 0.53, 0.98, 0.71, 0.95; Staph. chromogenes, 0.78, 0.98, 0.86, 0.97; Strep. dysgalactiae, 0.77, 0.99, 0.84, 0.98; Strep. infantarius, 0.46, 0.97, 0.64, 0.93; Strep. uberis, 1.00, 0.95, 0.72, 1.00; and 'no growth', 1.00, 1.00, 1.00, 1.00; and for the 48-h model E. coli, 0.96, 0.98, 0.86, 0.99; K. pneumoniae, 0.72, 0.97, 0.76, 0.96; L. lactis, 0.47, 0.92, 0.37, 0.95; Staph. aureus, 0.55, 0.97, 0.67, 0.95; Staph. chromogenes, 0.74, 0.96, 0.69, 0.97; Strep. dysgalactiae, 0.86, 0.98, 0.83, 0.99; Strep. infantarius, 0.43, 0.95, 0.56, 0.92; Strep. uberis, 0.78, 0.97, 0.74, 0.98; and 'no growth', 1.00, 1.00, 0.98, 1.00. When pathogen predictions were grouped according to antimicrobial treatment recommendation (treatment vs. no treatment), the 24-h and 48-h models achieved sensitivities of 90.8% and 92.3%, specificities of 92.9% and 90.1%, PPV of 95.9% and 93.9%, NPV of 84.4% and 87.8%, accuracies of 91.5% and 91.5%, and F1 scores of 93.3% and 93.0%, respectively. Our results indicate that the computer vision system developed in this study can accurately classify mastitis pathogens from digital images of tryptic soy agar plates containing 5% sheep blood and may be a promising tool for pathogen identification in mastitis diagnostics. However, because the system was developed and evaluated under standardized laboratory conditions, further validation using commercially available on-farm culture systems and practical field imaging conditions is warranted.</p>","PeriodicalId":354,"journal":{"name":"Journal of Dairy Science","volume":" ","pages":""},"PeriodicalIF":4.7000,"publicationDate":"2026-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Dairy Science","FirstCategoryId":"97","ListUrlMain":"https://doi.org/10.3168/jds.2026-28858","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, DAIRY & ANIMAL SCIENCE","Score":null,"Total":0}
引用次数: 0
Abstract
The objective of this study was to investigate the diagnostic accuracy of a computer vision system for identifying mastitis pathogens from tryptic soy agar plates containing 5% sheep blood. We used isolates of the following mastitis pathogens: Escherichia coli, Klebsiella pneumoniae, Lactococcus lactis, Staphylococcus aureus, Staphylococcus chromogenes, Streptococcus dysgalactiae, Streptococcus infantarius, and Streptococcus uberis. In addition, a 'no growth' category was included to represent samples in which no bacterial growth was detected. After primary culture and pathogen identification at the species level by matrix-assisted laser desorption/ionization time-of-flight mass spectrometry (MALDI-TOF), a representative colony was selected and subcultured, and plates were incubated at 37°C for 48 h. After 24 h of incubation, a representative colony from each plate was submitted for MALDI-TOF analysis, which served as the gold standard. Images were obtained at 24 and 48 h of incubation using a digital camera and a custom-made light box. A custom convolutional neural network architecture was designed to predict pathogen classification from digital images obtained at 24 and 48 h. We calculated the overall accuracy, diagnostic test statistics [sensitivity, specificity, positive predictive value (PPV), and negative predictive value (NPV)], and the area under the curve (AUC) of the receiver operating characteristic (ROC) curves to assess the models' performance in detecting the different pathogen categories. The overall classification accuracy was 74.0% for the 24-h model and 72.8% for the 48-h model. The mean ROC AUC was 0.950 for the 24-h model and 0.943 for the 48-h model, indicating strong separability among pathogen categories. Sensitivity, specificity, PPV, and NPV for the 24-model were E. coli, 0.79, 0.97, 0.74, 0.97; K. pneumoniae, 0.71, 0.93, 0.60, 0.96; L. lactis, 0.51, 0.94, 0.52, 0.94; Staph. aureus, 0.53, 0.98, 0.71, 0.95; Staph. chromogenes, 0.78, 0.98, 0.86, 0.97; Strep. dysgalactiae, 0.77, 0.99, 0.84, 0.98; Strep. infantarius, 0.46, 0.97, 0.64, 0.93; Strep. uberis, 1.00, 0.95, 0.72, 1.00; and 'no growth', 1.00, 1.00, 1.00, 1.00; and for the 48-h model E. coli, 0.96, 0.98, 0.86, 0.99; K. pneumoniae, 0.72, 0.97, 0.76, 0.96; L. lactis, 0.47, 0.92, 0.37, 0.95; Staph. aureus, 0.55, 0.97, 0.67, 0.95; Staph. chromogenes, 0.74, 0.96, 0.69, 0.97; Strep. dysgalactiae, 0.86, 0.98, 0.83, 0.99; Strep. infantarius, 0.43, 0.95, 0.56, 0.92; Strep. uberis, 0.78, 0.97, 0.74, 0.98; and 'no growth', 1.00, 1.00, 0.98, 1.00. When pathogen predictions were grouped according to antimicrobial treatment recommendation (treatment vs. no treatment), the 24-h and 48-h models achieved sensitivities of 90.8% and 92.3%, specificities of 92.9% and 90.1%, PPV of 95.9% and 93.9%, NPV of 84.4% and 87.8%, accuracies of 91.5% and 91.5%, and F1 scores of 93.3% and 93.0%, respectively. Our results indicate that the computer vision system developed in this study can accurately classify mastitis pathogens from digital images of tryptic soy agar plates containing 5% sheep blood and may be a promising tool for pathogen identification in mastitis diagnostics. However, because the system was developed and evaluated under standardized laboratory conditions, further validation using commercially available on-farm culture systems and practical field imaging conditions is warranted.
期刊介绍:
The official journal of the American Dairy Science Association®, Journal of Dairy Science® (JDS) is the leading peer-reviewed general dairy research journal in the world. JDS readers represent education, industry, and government agencies in more than 70 countries with interests in biochemistry, breeding, economics, engineering, environment, food science, genetics, microbiology, nutrition, pathology, physiology, processing, public health, quality assurance, and sanitation.