Artificial intelligence for animal identification: Development of a computer vision system for reliable dairy cattle traceability across developmental phases

Individual animal identification is crucial for dairy cattle management, regulatory compliance, and enhancing food security. Although computer vision systems (CVS) have been proposed for noninvasive animal recognition, limited research has explored their capability to identify the same individual across various life phases and in open-set scenarios. This study evaluated the efficacy of Siamese neural networks (SNN) for identifying individual dairy cattle throughout extensive periods of growth and physiological change. The primary objectives were to (1) leverage a semi-supervised approach to compile and augment data sets, (2) investigate the effects of temporal growth on SNN-based identification model performance, and (3) evaluate open-set inference capabilities in real-world applications. We collected and processed 2,397,338 infrared and depth images from 106 Holstein heifers spanning from birth to first lactation (average 803 d of age). Images underwent comprehensive preprocessing including semantic segmentation via U-Net architecture, binary classification of mask quality, and image augmentation. The SNN architecture utilized a ResNet-50 backbone with L2-normalized 128-dimensional embedding vectors and was trained using categorical cross-entropy and triplet loss functions. Our best-performing model, integrating data from preweaning through 12-mo phases, achieved 94.6% accuracy, 96.4% mean average precision, and 93.9% F1-score when identifying lactating animals in closed-set evaluation using 15 support images. In open-set inference under real-world farm conditions with unknown animals present, the model maintained F1-scores exceeding 0.80 across all growth phases. Infrared imaging consistently outperformed depth imaging for longitudinal identification. These findings demonstrate the feasibility of CVS for noninvasive cattle traceability across different growth phases and environmental conditions, with further research needed to validate performance in diverse commercial settings and across multiple herds.

Authors

Institutions

Publication Details

Journal
Journal of Dairy Science
Published
2026-02-01
DOI
https://doi.org/10.3168/jds.2025-27653
Primary Topic
Food Supply Chain Traceability
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Artificial intelligence for animal identification: Development of a computer vision system for reliable dairy cattle traceability across developmental phases

R.E.P. Ferreira, G.L. Menezes, L.L. Hernandez, E. Casella et al.
Journal of Dairy Science
Food Supply Chain Traceability
article

Artificial intelligence for animal identification: Development of a computer vision system for reliable dairy cattle traceability across developmental phases

R.E.P. Ferreira, G.L. Menezes, L.L. Hernandez, E. Casella, J.R.R. Dórea, A. Negreiro, D. Döpfer, T. Bresolin, G.J.M. Rosa
article en

Abstract

Individual animal identification is crucial for dairy cattle management, regulatory compliance, and enhancing food security. Although computer vision systems (CVS) have been proposed for noninvasive animal recognition, limited research has explored their capability to identify the same individual across various life phases and in open-set scenarios. This study evaluated the efficacy of Siamese neural networks (SNN) for identifying individual dairy cattle throughout extensive periods of growth and physiological change. The primary objectives were to (1) leverage a semi-supervised approach to compile and augment data sets, (2) investigate the effects of temporal growth on SNN-based identification model performance, and (3) evaluate open-set inference capabilities in real-world applications. We collected and processed 2,397,338 infrared and depth images from 106 Holstein heifers spanning from birth to first lactation (average 803 d of age). Images underwent comprehensive preprocessing including semantic segmentation via U-Net architecture, binary classification of mask quality, and image augmentation. The SNN architecture utilized a ResNet-50 backbone with L2-normalized 128-dimensional embedding vectors and was trained using categorical cross-entropy and triplet loss functions. Our best-performing model, integrating data from preweaning through 12-mo phases, achieved 94.6% accuracy, 96.4% mean average precision, and 93.9% F1-score when identifying lactating animals in closed-set evaluation using 15 support images. In open-set inference under real-world farm conditions with unknown animals present, the model maintained F1-scores exceeding 0.80 across all growth phases. Infrared imaging consistently outperformed depth imaging for longitudinal identification. These findings demonstrate the feasibility of CVS for noninvasive cattle traceability across different growth phases and environmental conditions, with further research needed to validate performance in diverse commercial settings and across multiple herds.

Journal of Dairy Science
University of Wisconsin System (US), Pennsylvania State University (US), University of Wisconsin–Madison (US), University of Illinois Urbana-Champaign (US)
Zero hunger
Openalex Percentile: Top 60%
Food Supply Chain Traceability
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.