Assessing Dairy Cow Thermotolerance Through Behavioral Monitoring
2025 · Prairie View A&M University
A machine learning and computer vision framework for evaluating thermotolerance-related behavior in a commercial dairy herd by quantifying how frequently individual cows used water troughs and mechanical brushes during the summer study period. Published in IEEE Access.
Study objective
Heat stress affects dairy productivity and animal welfare, and individual cows vary in their capacity to tolerate elevated temperatures. The study evaluated behavioral phenotypes potentially associated with thermotolerance by measuring drinking frequency, mechanical-brush use, and social interactions during the summer experimental period.
Because continuous manual observation is impractical at commercial-herd scale, the paper developed an automated framework for identifying individual cows and converting video of their interactions with farm resources into behavioral event counts and durations.
Experimental setting and data
Data were collected at T&K Dairy in Snyder, Texas, in a tunnel-ventilated barn housing approximately 1,100 Holstein, Jersey, and crossbred cows across six free-stall pens. Each pen contained four water troughs and three mechanical rotating brushes. Side-angle and top-down cameras were positioned to observe cow access to these resources.
The study involved 288 focal cows between 45 and 90 days in milk, with 96 cows selected for intensive monitoring. The side-angle collection contained 154,368 videos, of which 3,584 were processed; the top-down collection contained approximately 150,000 videos, of which 38,152 were processed. Sampling across days, times, and animal groups was used to represent variation in behavior and barn conditions.
Behavioral analysis pipeline
YOLOv8 detects full cow bodies, cow heads, water troughs, and brushes in each frame. DeepSORT maintains tracks across frames, while coat-pattern features and a CNN with squeeze-and-excitation layers support individual identification. Geometric overlap and temporal rules then classify drinking and brushing bouts and record their frequency and duration in a database-backed dashboard.
Across the two camera views, YOLOv8 achieved reported classification accuracies of 93% and 94%, while the CNN identification model reached 96% on both datasets. Behavioral outputs were additionally compared with human annotations from 457 two-minute videos. Brushing duration showed strong agreement with observer records (Pearson r = 0.867); drinking was more difficult because crowding and trough occlusion disrupted head localization and event boundaries.
Interpretation
The deployed system automatically extracts drinking and brushing event counts from more than 38,000 commercial-farm videos, producing individual-level summaries of how frequently cows used heat-relevant resources during the study period. This provides a scalable behavioral dataset for evaluating phenotypes associated with thermotolerance and for informing future management and genetic-selection research.
The paper treats these behaviors as indicators potentially relevant to thermotolerance rather than as a direct physiological measurement. It identifies integration with temperature, humidity, temperature-humidity index, respiration rate, and body-temperature measurements as the next step for establishing a more direct relationship between resource use and heat tolerance.