A Novel and Convenient Lying Cow Identification Method Based on Yolox and Cowbodynet: a Study with Applications in a Barn
42 Pages Posted: 9 Oct 2023
Abstract
The lying time of cows is a key indicator of their health and comfort. The ability to automatically recognize the lying posture of cows while simultaneously realizing individual cow identification can play an important role in improving cow welfare, increasing milk yield, detecting cow diseases in a timely manner and enabling precision dairy farming management. In this paper, a method of individual identification for lying dairy cows in a barn based on YOLOX and a feature extraction network named CowbodyNet is proposed. In practical applications, when new cows enter the barn, there is no need to collect a large number of images to retrain the model. In practical application, it is very convenient to collect several images of newly added individual cows and store them in the database. First, the low-light images collected at night are enhanced by the multiscale retinex with chromaticity preservation (MSRCP) algorithm to improve the image quality. Then, the YOLOX target detection algorithm is applied to detect and segment cows in the lying posture. Following this, the segmented images of lying cows are input into CowbodyNet to generate feature vectors, which are used to construct a feature vector database. Subsequently, the Euclidean distances between the feature vector of a cow to be identified and the feature vectors in the database are calculated to determine the identification result. The proposed method achieves 94.43% lying cow identification accuracy on a data set containing top-view images of 72 cows. Finally, the individual cow detection and identification model is successfully deployed on the Jetson Xavier NX embedded platform. The results demonstrate the effectiveness and practicability of the proposed cow identification method. This study provides effective technical support for the practical application of identifying individual lying cows. The results show the effectiveness and practicability of the proposed cow identification method.
Keywords: Lying cow identification, Machine vision, YOLOX, Feature matching, Precision livestock management
Suggested Citation: Suggested Citation