Ability to identify individual cows quickly and readily in the barn would enable real time monitoring of their behavior, health, eating habits and more, all of which could save time, money, or effort. This work focuses on creating an eidetic recognition or re-identification (ReID) algorithm that learns to recognize individual cows with just a single training example per cow and with near zero time to learn to identify a new cow, both features which the existing cattle ReID systems lack. Our algorithm is designed to improve recognition robustness to deformations in cow bodies that occur when they are walking, turning, or are seen slightly off-angle. Individual cows are first detected and localized using popular keypoint and mask detection techniques, then aligned to a fixed template, pixelated, binarized to reduce lighting effects, and serialized to obtain bit-vectors. Bit-vectors from cows at inference time are matched to those from training time using Hamming distance. To improve results, we add modules to verify the validity of detected keypoints, interpolate missing keypoints, and combine predictions from multiple frames using a majority vote. The video level accuracy is over 60% for a set of nearly 150 Holstein cows.
Manu Ramesh, Amy R. Reibman, Jacquelyn P. Boerman, "Eidetic recognition of cattle using keypoint alignment" in Electronic Imaging, 2023, pp 279--1 - 279-6, https://doi.org/10.2352/EI.2023.35.7.IMAGE-279