| The daily life of sheep involves activities such as eating and drinking.When sheep are sick,they will show abnormalities in their daily activities,such as prolonged lying,decreased feeding,moaning,and reduced walking,etc.The state of these behaviors and their characteristics can be an important basis for determining whether abnormalities exist.Therefore,we need to pay attention to their daily behavioral characteristics in the process of daily management and apply new technologies as well as new management concepts for real-time monitoring to detect abnormal activities in a timely manner.In this thesis,machine vision and image classification recognition methods are used to develop a system that can realize meat sheep behavior recognition with Suffolk meat sheep as the research object,and the main research and related findings are as follows.1.Daily behavior analysis and data collection of meat sheep.For the daily activities of meat sheep,the daily behavior analysis was carried out,and the data acquisition device was built through HD camera,switch and hard disk recorder.For the collected video data,the Python programming language and Opencv image processing library are used to produce the daily behavior dataset of meat sheep through the process of key frame interception,data enhancement,image annotation,etc.,and lay the foundation for the subsequent automatic feature extraction through CNN.2.Research on daily behavior recognition method for meat sheep based on improved YOLOv5.Based on the target detection network YOLOv5,in order to recognize the drinking,standing,feeding,lying and walking behaviors of meat sheep of various body types as completely and accurately as possible,and to improve the phenomenon of missed and false detection in behavior recognition,we propose to add a target detection layer to improve the recognition accuracy.Meanwhile,in order to reduce the influence of invalid features in the training process of the network and make the model more accurate in locating and identifying target regions,the CA convolutional attention mechanism module is introduced.The CA attention mechanism gradually infers the feature map through two dimensions,spatial and channel,and can adaptively optimize the representation of input features.In terms of loss function,SIo U Loss is chosen instead of CIo U Loss in order to improve the localization accuracy.3.Daily behavior recognition experiments for meat sheep.First,to verify the effectiveness of the improvements made,an experiment test was designed and conducted.The average accuracy of the improved YOLOv5 model for the five categories of behaviors reached 93.7%,which was 2.8% higher than the 90.9% of the baseline network,thus showing that the improvements made effectively enhanced the recognition of daily behaviors of meat sheep.Secondly,the effect of the improved YOLOv5 network on the recognition of daily behaviors of meat sheep was discussed.The accuracy of the improved algorithm in recognizing the behaviors of drinking,eating,standing,walking and lying down of meat sheep was 93.4%,96.0%,91.5%,90.% and 97.6%,respectively,with an average accuracy of 93.7%,which could achieve accurate recognition of daily behaviors of meat sheep.Then,the overall algorithm reliability experiment was conducted to recognize images with different lighting and shading conditions,different number of individuals and different time of day,and the robustness of the algorithm was demonstrated.Finally,comparison tests between different models were conducted,and the improved algorithm in this thesis had the best performance,proving the superiority of the improved algorithm.The experimental results show that the improved YOLOv5 proposed in this thesis can achieve accurate identification of daily behavior of meat sheep under intensive farming environment and can meet the needs of meat sheep health monitoring and disease prevention. |