OpenCowID: Zero-Shot Visual Identification of Dairy Cows
Abstract
Accurate identification of individual cows is essential to precision dairy farming. While computer vision offers a non-invasive alternative to ear tags and RFID systems, its practical deployment remains limited by the need for zero-shot identification in dynamic herds where test identities are unseen during training. In this work, we propose OpenCowID, a unified framework that addresses this challenge.First, we introduce a stochastic cow coat synthesis pipeline that efficiently generates large-scale, diverse images.Second, using the generated large-scale high-quality data, we present a centroid-guided feature learning strategy that forms a well-structured embedding space using virtual class centroids, enabling generalization to unseen identities. OpenCowID achieves state-of-the-art zero-shot and open-set identification on real-world cow benchmarks, without requiring any real labeled training data. This work contributes to the advancement of automated livestock monitoring, enabling robust, non-invasive identification.The code for reproducing our results is provided in the supplementary material.