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

Journal: Journal of dairy science
Published Date:

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 datasets, (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 an accuracy of 0.946, mean average precision of 0.964, and an F1-score of 0.939 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

Keywords

No keywords available for this article.