A tracking-by-classification approach for continuous individual monitoring of Holstein dairy cows in a free-stall barn

Dairy cattle are essential for agricultural food systems, converting non-human-edible feedstuffs into nutrient-rich milk, while supporting global food security and rural livelihoods. Monitoring the behaviour and health status of animals is crucial for effective farm management and ensuring animal welfare. Continuous animal identification (ID) and tracking supports these goals. Computer vision (CV) has emerged as a promising approach for automated monitoring. However, most existing CV-based tracking methods focused on short-term tracking, where animals remained within the field of view (FOV). In commercial free-stall barns, cows frequently move in and out of the FOV due to environmental complexity and daily management activities, making continuous tracking more challenging. This study introduced a unique two-step Hungarian matching process for re-identifying Holstein cows when re-entering the FOV in a free-stall barn. The approach first employed a YOLOv8-based object detector to localise cows in each frame, followed by a feature-based classification step that assigns ID probabilities. A two-step Hungarian matching process then associated detections with identities by maximising classification probabilities. The method was trained and tested on video footages of 13 cows and evaluated against SORT, DeepSORT, ByteTrack and TrackFormer. It outperformed the compared methods in maintaining accurate and long-term identification, achieving average Identification F1 score, Higher Order Tracking Accuracy, Multiple Object Tracking Accuracy, Mostly Tracked, Mostly Lost, and Identification Switches of 0.946, 0.929, 0.894, 10, 0.5, and 221, respectively. These results support the integration of this technology into behaviour monitoring systems to enhance animal health and welfare. The code is available at: https://github.com/meiqing-wang/Cow-TrackingbyClassification . • Developed a CV-based tracking-by-classification method for reidentifying cows. • Achieved continuous, long-term tracking with consistent unique IDs. • Validated method on large dataset under varied environmental conditions.

Authors

Institutions

Publication Details

Journal
Biosystems Engineering
Published
2026-03-07
DOI
https://doi.org/10.1016/j.biosystemseng.2026.104420
Primary Topic
Animal Behavior and Welfare Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A tracking-by-classification approach for continuous individual monitoring of Holstein dairy cows in a free-stall barn

S.E. Räisänen, Aira Maye Serviento, Boris Zandona, M. Wang et al.
Biosystems Engineering
Animal Behavior and Welfare Studies
article

A tracking-by-classification approach for continuous individual monitoring of Holstein dairy cows in a free-stall barn

S.E. Räisänen, Aira Maye Serviento, Boris Zandona, M. Wang, Mutian Niu
article en

Abstract

Dairy cattle are essential for agricultural food systems, converting non-human-edible feedstuffs into nutrient-rich milk, while supporting global food security and rural livelihoods. Monitoring the behaviour and health status of animals is crucial for effective farm management and ensuring animal welfare. Continuous animal identification (ID) and tracking supports these goals. Computer vision (CV) has emerged as a promising approach for automated monitoring. However, most existing CV-based tracking methods focused on short-term tracking, where animals remained within the field of view (FOV). In commercial free-stall barns, cows frequently move in and out of the FOV due to environmental complexity and daily management activities, making continuous tracking more challenging. This study introduced a unique two-step Hungarian matching process for re-identifying Holstein cows when re-entering the FOV in a free-stall barn. The approach first employed a YOLOv8-based object detector to localise cows in each frame, followed by a feature-based classification step that assigns ID probabilities. A two-step Hungarian matching process then associated detections with identities by maximising classification probabilities. The method was trained and tested on video footages of 13 cows and evaluated against SORT, DeepSORT, ByteTrack and TrackFormer. It outperformed the compared methods in maintaining accurate and long-term identification, achieving average Identification F1 score, Higher Order Tracking Accuracy, Multiple Object Tracking Accuracy, Mostly Tracked, Mostly Lost, and Identification Switches of 0.946, 0.929, 0.894, 10, 0.5, and 221, respectively. These results support the integration of this technology into behaviour monitoring systems to enhance animal health and welfare. The code is available at: https://github.com/meiqing-wang/Cow-TrackingbyClassification . • Developed a CV-based tracking-by-classification method for reidentifying cows. • Achieved continuous, long-term tracking with consistent unique IDs. • Validated method on large dataset under varied environmental conditions.

Biosystems EngineeringVol. 265
University College Dublin (IE), Aarhus University (DK), ETH Zurich (CH)
Zero hunger
Openalex Percentile: Top 29%
Animal Behavior and Welfare Studies
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.