| As the country vigorously advocates the construction of "smart pasture",the fine management of dairy cows under the condition of large-scale dairy farming has become a research focus.It is of great significance for the health management of dairy cows and the guarantee of milk yield to accurately count the exercise amount of dairy cows and judge the body state of dairy cows according to the exercise amount.In this paper,deep learning technology is used to study the target detection and multi-target tracking of cows in the cattle house,and then how to count the amount of exercise,standing time,lying time and other information is studied,and finally the management system of the amount of exercise of cows is built.The main contents of the study are as follows:(1)An improved YOLOv5 s based identification detection method for cows was proposed.Firstly,the backbone network is improved,and the CBAM attention mechanism is fused with the C3 Bottle Neck mechanism,and the Transformer attention mechanism is added at the bottom to improve the feature extraction ability of YOLOv5 s for cow targets.Then,CIo U Loss is used to replace GIo U Loss as the regression loss function,which not only improves the accuracy of model detection,but also speeds up the convergence of the model.Experimental results show that compared with the original YOLOv5,YOLOv4,and YOLOv4-Tiny,the accuracy is improved by 1.1%,8.7%,and 6.2%,respectively,reaching 96.4%.The accurate identification of 25 cows is achieved without increasing parameters,and the detection speed is 80 frames /s.(2)A Deep SORT multi-object tracking algorithm based on improved YOLOv5 and Mobile Netv2 is proposed.The improved YOLOv5 is used as the detector,and Mobile Netv2 is used as the appearance information association algorithm.Solve the problem of missed detection and temporary occlusion of cows.Seven videos containing different numbers of cows were used to carry out experiments.The test results show that the average accuracy of Deep SORT multi-target tracking algorithm is 79.8%,the average speed is 32 fps,and the ID hopping can be effectively suppressed.The results show that the Deep SORT algorithm can be used to track multi-target cows in real time in the cattle house environment.(3)Implementation of dairy cow motion statistics based on surveillance video.After identifying the identity of the cow in the standing posture,the trajectory of the cow is depicted,and the trajectory reconnection before and after the occlusion of the cow is realized.The situation of the imaginary increase of the movement of the cow when standing is improved by setting the movement threshold.According to the reference object,the formula of converting the pixels in the monitoring video to the actual distance was determined.Through the test,the accuracy of dairy cow movement statistics based on the monitoring video was 87.8%,and the exercise statistics method was considered effective.(4)According to the above target detection and target tracking model,a dairy cow motion statistics system is designed and implemented.The cow exercise statistics system mainly includes two modules,the daily monitoring module of cow exercise and cow abnormal state auxiliary detection.The daily module of cow exercise monitors four aspects of exercise,standing time,lying time and environmental temperature of each cow in the cow house.Cow abnormal state auxiliary detection module determines the body state of the cow by comparing and analyzing the daily data of four aspects and combining with relevant literature data.If the cow is inferred to have relevant diseases,it provides opinions to the farm managers.Finally,Vue was used to design the web page. |