Font Size: a A A

Research On Pigs Behavior Recognition Method Based On Deep Learning

Posted on:2024-02-09Degree:MasterType:Thesis
Country:ChinaCandidate:C L LiuFull Text:PDF
GTID:2543307178980869Subject:Electronic information
Abstract/Summary:
China is the country with the largest pork consumption in the world.The annual pork consumption is more than 50% of the total global consumption.Therefore,the safe breeding of pigs is particularly important.In 2018,the African swine fever hit,killing about 800,000 pigs across the country,leading to a significant reduction in the supply of pork across the country,and its price soared.An important precondition for stable pork supply is that the pigs can keep healthy until they are sold,so it is particularly important to monitor the health of pigs.Most diseases can be judged by observing the behavior of pigs.The traditional way to detect pig behavior is mainly through human observation,which requires a lot of human resources and cannot be monitored continuously.Therefore,computer vision can be used to identify pig behavior on a large scale,so as to judge whether its behavior is abnormal,and then intervene as early as possible to ensure the success rate.Two pigs behavior recognition methods are proposed in this thesis.The pigs behavior recognition method based on improved DETR has an average accuracy of 95.7%;The pigs behavior recognition method based on improved YOLOV5 has an average recognition accuracy of 96.0%,which is improved by 2.5% and 1.2% respectively compared with the original network model.The main work of this thesis is as follows:1.Build a dataset.Due to the lack of open pigs behavior recognition data set,this thesis has built a pigs behavior recognition data set,and added random motion blur according to pigs behavior characteristics,as well as increased random light enhancement to avoid the impact of light changes.2.A pigs behavior recognition method based on improved DETR network is proposed.In this thesis,the input of each Encoder module is normalized by Norm,and then transmitted to the Add&Norm module.At the same time,the input of the first Encoder module is transmitted to the Add&Norm module of the last Encoder module.In this way,the Encoder module can more fully integrate feature information,which helps it obtain more global features,and thus improve the network performance.In addition,the GIOU loss function in the DETR network is changed to the CIOU function,which increases the influence of the center point distance and the aspect ratio between the prediction frame and the real frame.The experiments in the pig behavior recognition dataset built in this thesis show that the recognition accuracy of the method used in this thesis has been significantly improved.3.A pigs behavior recognition method based on improved YOLOv5 is proposed.In this thesis,CBAM attention mechanism is introduced into the backbone network of YOLOv5,which is combined with C3 module.At the same time,add a branch in C3 module to form XCBAMC3 module.By introducing the CBAM attention mechanism,the model can focus on some important features and suppress other non important features.At the same time,the branch enables the backbone network to integrate more image feature information.In addition,this thesis adds a feature fusion layer in the neck network of YOLOv5 to enable it to obtain more feature information from the backbone network,and transfer these features to the deeper network to promote the recognition capability of the model.According to the experimental results,it effectively improves the recognition accuracy of the model,and also has a certain effect in removing occlusion.Finally,the UI interface is built to prepare for deployment.
Keywords/Search Tags:Pigs behavior recognition, Deep learning, DETR, YOLOv5, CBAM
Related items