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.
In cattle farm, it is important to monitor activity of cattle to know their health condition and prevent accidents. Sensors were used by conventional methods to recognize activity of cattle, but attachment of sensors to the animal may cause stress. Camera was used to recognize activity of cattle, but it is difficult to identify cattle because cattle have similar appearance, especially for black or brown cattle. We propose a new method to identify cattle and recognize their activity by surveillance camera. The cattle are recognized at first by CNN deep learning method. Face and body areas of cattle, sitting and standing state are recognized separately at same time. Image samples of day and night were collected for learning model to recognize cattle for 24-hours. Among the recognized cattle, initial ID numbers are set at first frame of the video to identify the animal. Then particle filter object tracking is used to track the cattle. Combing cattle recognition and tracking results, ID numbers of the cattle are kept to the following frames of the video. Cattle activity is recognized by using multi-frame of the video. In areas of face and body of cattle, active or static activities are recognized. Activity times for the areas are outputted as cattle activity recognition results. Cattle identification and activity recognition experiments were made in a cattle farm by wide angle surveillance cameras. Evaluation results demonstrate effectiveness of our proposed method.