413 Evaluating the effect of lighting conditions on YOLOv5-based estrus detection and animal identification in dairy cattle.
Abstract Advancements in computer vision have potential to improve efficiency in animal management practices across the animal agriculture industry. Precise estrus detection and individual animal records directly impact reproductive success and profitability, making them crucial components of dairy production. The current study aimed to evaluate the effect of lighting conditions on the performance of computer vision for cattle identification and behavioral estrus detection. Ten group-housed Holstein-Friesian cows were evaluated over two seven-day trial periods (n = 10 per trial, N = 20 total animals). Estrus synchronization was conducted using a single dose of Lutalyse (Dinoprost tromethamine 5 mg/mL; Zoetis). Continuous video footage was captured in 1080p resolution using five corner-mounted cameras, resulting in 840 hours of video. Twenty-nine hours of manually identified estrus behavior video were extrapolated into 104,400 frames, with 956 of those frames randomly selected and manually annotated. Eighty percent of frames (765) were utilized for training, and the remaining twenty percent (191) were used for validation. YOLOv5s served as the base model, and six models were developed—three for estrus detection and three for individual animal identification. The estrus detection models were trained separately for low-light, night-vision, and a combination of both lighting conditions. Similarly, individual animal identification used independent models for night-vision identification (NVID), low-light identification (LLID), and combined lighting conditions (COMBID). Statistical analysis was performed using the PROC MIXED procedure in SAS. Results demonstrated that YOLOv5 effectively identifies both behavioral estrus and individual animals in varying light conditions. However, lighting conditions significantly impacted model precision (P = 0.01) and recall (P < 0.01). Precision values for LLID, NVID, and COMBID were 84.4%, 68.2%, and 91.9%, respectively. Recall values for these models were 89.2%, 68%, and 87.1%, respectively. LLID and COMBID performed significantly better than NVID with respect to precision (P < 0.01 for both) and recall (P < 0.01 for both). A trial effect on model performance (P < 0.01) was noted, with trial 1 performance inferior to Trial 2. Variations in training and validation datasets did not produce differences in precision (P = 0.13 and P = 0.54, respectively) or recall (P = 0.8785 and P = 0.4833, respectively). Estrus detection performance remained consistent across models (Precision ≥ 97.6% and Recall ≥ 97.3%). Given these findings, a combined model incorporating both low-light and night-vision conditions would be most applicable for dairy producers, as it would allow them to maintain existing lighting practices while optimizing detection performance. Additionally, deploying a unified model reduces computational overhead. The inclusion of these technologies enhances efficiency and increases the reproductive performance of dairy operations with the possibility of expanding into other livestock enterprises.
Authors
- Allison Griffin (ORCID: https://orcid.org/0000-0001-7055-068X)
- Kenneth Graves
- Christopher R. Hudson (ORCID: https://orcid.org/0000-0002-6216-8234)
- Marcus McGee
- Kevin Wilson (ORCID: https://orcid.org/0000-0003-4574-8250)
- Cierra Clayton
Institutions
- Mississippi State University (US)
Publication Details
- Journal
- Journal of Animal Science
- Published
- 2025-10-01
- DOI
- https://doi.org/10.1093/jas/skaf300.297
- Primary Topic
- Milk Quality and Mastitis in Dairy Cows
- Type
- article
- Field-Weighted Citation Impact
- 0.00