104 Non-invasive pregnancy diagnosis in Holstein dairy cows using computer vision analysis of thermal images

Abstract Thermal visualization of Holstein dairy cattle skin can be indicative of the pregnancy state (cyclic or pregnant) of the cow by observing the size and shape of skin thermal patterns. However, visual assessment of skin thermal patterns can be subjective and laborious. Further, infrared thermography implementation on-farm requires automated analysis to be feasible for dairy producers. The objectives of this study were to implement a machine learning convolutional neural network (CNN) to detect features in thermal images associated with pregnant (Pregnant) and non-pregnant (Cyclic) and to evaluate the accuracy of pregnancy diagnosis in dairy cows. A total of 938 images from 18 Pregnant cows and 982 images from 18 Cyclic were used to build the CNN model, and 120 images from Pregnant (60 images) and Cyclic (60 images) dairy cows were used to validate the model. Pregnant cows were confirmed to be pregnant 90 d after insemination via transrectal ultrasonography. Cyclic cows were confirmed to be non-pregnant using follicular dynamics and corpora lutea presence via transrectal ultrasonography. Images were recorded using a T620s infrared camera at 640 × 480 (307,200) to train the CNN model and images from an E40 FLIR camera at 320 x 240 (76,800 pixels) were used for the validation test. The CNN model was created using TensorFlow in Google Colab to binary classify images into Pregnant or Cyclic using a single output neuron (1: Pregnant and 0: Cyclic) with different Epochs (10, 25, and 100). The diagnosis accuracy (acc) was 0.72 with a validation accuracy (val_acc) of 0.41 for 10 Epochs, acc 0.76 with val_acc 0.37 for 25 Epochs, and acc 0.80 with val_acc 0.63. The acc and val_acc of the training model and validation test were optimized when using images from the T620s exclusively (Epochs 10: acc = 0.70 and val_acc = 0.64; Epoch 25: acc = 0.74 and val_acc = 0.70; Epoch 100: acc = 0.81 and val_acc = 0.80). Greater resolution of thermal images was proven to increase the accuracy of pregnancy diagnosis (307,200 compared with 76,800 pixels) and the greater number of Epoch used to train the model. Machine learning algorithms can diagnose pregnancy using thermal images with an acceptable evaluation accuracy (> 0.70).

Authors

Institutions

Publication Details

Journal
Journal of Animal Science
Published
2024-09-01
DOI
https://doi.org/10.1093/jas/skae234.313
Primary Topic
Effects of Environmental Stressors on Livestock
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

104 Non-invasive pregnancy diagnosis in Holstein dairy cows using computer vision analysis of thermal images

C.J. Bench, A. L. Schaefer, H.J. Perez Marquez
Journal of Animal Science
Effects of Environmental Stressors on Livestock
article

104 Non-invasive pregnancy diagnosis in Holstein dairy cows using computer vision analysis of thermal images

C.J. Bench, A. L. Schaefer, H.J. Perez Marquez
article en

Abstract

Abstract Thermal visualization of Holstein dairy cattle skin can be indicative of the pregnancy state (cyclic or pregnant) of the cow by observing the size and shape of skin thermal patterns. However, visual assessment of skin thermal patterns can be subjective and laborious. Further, infrared thermography implementation on-farm requires automated analysis to be feasible for dairy producers. The objectives of this study were to implement a machine learning convolutional neural network (CNN) to detect features in thermal images associated with pregnant (Pregnant) and non-pregnant (Cyclic) and to evaluate the accuracy of pregnancy diagnosis in dairy cows. A total of 938 images from 18 Pregnant cows and 982 images from 18 Cyclic were used to build the CNN model, and 120 images from Pregnant (60 images) and Cyclic (60 images) dairy cows were used to validate the model. Pregnant cows were confirmed to be pregnant 90 d after insemination via transrectal ultrasonography. Cyclic cows were confirmed to be non-pregnant using follicular dynamics and corpora lutea presence via transrectal ultrasonography. Images were recorded using a T620s infrared camera at 640 × 480 (307,200) to train the CNN model and images from an E40 FLIR camera at 320 x 240 (76,800 pixels) were used for the validation test. The CNN model was created using TensorFlow in Google Colab to binary classify images into Pregnant or Cyclic using a single output neuron (1: Pregnant and 0: Cyclic) with different Epochs (10, 25, and 100). The diagnosis accuracy (acc) was 0.72 with a validation accuracy (val_acc) of 0.41 for 10 Epochs, acc 0.76 with val_acc 0.37 for 25 Epochs, and acc 0.80 with val_acc 0.63. The acc and val_acc of the training model and validation test were optimized when using images from the T620s exclusively (Epochs 10: acc = 0.70 and val_acc = 0.64; Epoch 25: acc = 0.74 and val_acc = 0.70; Epoch 100: acc = 0.81 and val_acc = 0.80). Greater resolution of thermal images was proven to increase the accuracy of pregnancy diagnosis (307,200 compared with 76,800 pixels) and the greater number of Epoch used to train the model. Machine learning algorithms can diagnose pregnancy using thermal images with an acceptable evaluation accuracy (> 0.70).

Journal of Animal ScienceVol. 102(Supplement_3)
University of Alberta (CA), Reckitt Benckiser (United States) (US), TerraMetrics (United States) (US), Infram (Czechia) (CZ)
Openalex Percentile: Top 84%
Effects of Environmental Stressors on Livestock
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.