Abstract:Precision breeding in animal husbandry is a crucial requirement of modern husbandry. However, there are still some issues in the research of cow body condition scoring and individual identification methods based on traditional machine vision in the actual feeding environment. These issues included low robustness, poor reliability, weak generalization, and timely correlation between multi-tasks. To address these challenges, a multi-task learning model was proposed based on the biological visual features of the back of cows to implement and optimize the body condition scoring and individual identification model of cows. Firstly, a depth camera was used to obtain the back image of the cow. Secondly, improvements were made to the YOLO v8s model to achieve automatic positioning and detection of the back area of cows. The GSConv module was introduced into the YOLO v8s network to reduce network parameters and simplify its structure. Additionally, weighted intersection over union loss was utilized as bounding box loss to enhance recognition accuracy. Based on detecting the back region of cows, further extraction was conducted on their biological visual features from this region. Finally, a multi-task learning model based on hard parameter sharing was constructed to simultaneously realize individual identification and body condition score evaluation of cows, leveraging the common features between cow body condition scoring and individual recognition tasks. The experimental results demonstrated that the proposed multi-task learning model achieved an accuracy of 93.9% for body condition scoring and 92.2% for individual identification, which was 1.9 and 4.5 percentage points higher than that of the single task model, respectively. Furthermore, the recognition time was reduced to 5.84ms, which was 6.37ms less than the time required by the single task model to complete two tasks at once, resulting in significantly improved real-time performance. In conclusion, a multi-task learning model was presented based on the biological visual features of the back region of cows, enabling efficient and accurate output of body condition score and individual identification simultaneously. The research result can provide a theoretical basis and technical support for precise individual management in large-scale intelligent breeding of dairy cows.