Real-Time Automated Body Condition Scoring of Dairy Cows in a Commercial Rotary Milking Parlor Using RGB-D Two-Stream Deep Learning
Automated body condition scoring (BCS) can improve the frequency, objectivity, and decision-making value of dairy cow monitoring, but its deployment in commercial rotary milking parlors remains challenging because animals are imaged under continuous flow, variable posture, changing backgrounds, and strict real-time constraints. This study presents a deployment-oriented RGB-D framework for automated BCS estimation during routine milking in a commercial rotary parlor. Synchronized RGB and depth images were acquired with an overhead Kinect sensor during three daily milking sessions, while RFID-triggered acquisition linked each image pair to individual cow identity. Expert reference scores were assigned using the Ferguson five-point BCS protocol with 0.25-unit increments. After quality control, the dataset comprised 25,700 RGB-D image pairs from 1,025 lactating cows. The proposed pipeline integrates YOLOv26l-based cow localization, RGB-D region-of-interest alignment, pad-and-resize preprocessing, and continuous BCS regression using a Two-Stream ResNet18 architecture with late feature fusion. Performance was assessed using an animal-wise split and compared with single-modality and alternative backbone models. The Two-Stream ResNet18 achieved the best performance, with MAE = 0.076, Accuracy0 = 83.6 %, Accuracy0.25 = 95.76 %, and Accuracy0.50 = 99.35 %, while maintaining an end-to-end latency of 95.0 ms. By combining RFID-linked RGB-D sensing, modality-aligned fusion, and low-latency inference, the framework enables automated BCS estimation under routine commercial rotary milking conditions. The resulting industrial-scale RGB-D dataset provides a reproducible benchmark for future precision dairy monitoring systems.
Authors
- Andrea Pezzuolo (ORCID: https://orcid.org/0000-0002-9955-9896)
- Vladimir Kolpakov
- Alexey Ruchay
- Vitaly Ryazanov
- Hao Guo
Institutions
- Peoples' Friendship University of Russia (RU)
- University of Padua (IT)
- Federal Scientific Center for Biological Systems and Agricultural Technologies of the Russian Academy of Sciences (RU)
- China Agricultural University (CN)
Publication Details
- Journal
- Computers and Electronics in Agriculture
- Published
- 2026-07-27
- DOI
- https://doi.org/10.1016/j.compag.2026.112252
- Primary Topic
- Milk Quality and Mastitis in Dairy Cows
- Type
- article
- Field-Weighted Citation Impact
- 0.00