| The behavior of pigs is one of the basis for diagnosing their health.Under normal environmental and physiological conditions,pigs show normal behaviors such as resting,walking,eating,drinking,etc.Pigs will perform abnormally when the living environment changes.Pig behavior recognition can be done by means of video surveillance.Current research mostly focuses on the detection and identification of pigs,and research on behavior recognition is still in the preliminary stage.Based on pig farm video data,the thesis applies image processing and deep learning methods to study the automatic extraction for various behaviors of pigs.In pig farming industry,the most practical application is to grasp the behavior of pigs at every moment.Focusing on this demand,the thesis sets up a research goal for pig detection and behavior recognition through the pig farm supervision video.A technical route for automatic pig behavior recognition is developed.The research contents and results of the thesis are as follows.(1)The supported data set construction for pig behavior recognition.This thesis starts from the construction of pig behavior data set.Learning from the experience of human behavior data sets,we take sample images from surveillance video as a basis.Then we enhance the data set through histogram equalization,image geometric change,and the generated models.Manual labels are added to some sample images and videos for supervised learning.The thesis successfully completes the construction of the pig farm data set,which has been used as a training set and test set in our pig detection and behavior recognition algorithm.(2)Pig detection and individual identification.Based on the pig farm video,this thesis proposes a color-based pig contour segmentation algorithm,which distinguishes pig pixels from background pixels in the image.For individual pigidentification,the thesis proposes an innovative approach.The back of each pig is painted with letters used as identification mark.The deep convolutional neural network is applied for feature extraction and classification of pig images.Pig individual identity problem is thus solved.At the same time,the thesis completes the detection of pig’s head and tail.An algorithm for estimating the position of the pig parts not detected is proposed.Results of the pig segmentation and the individual pig identification are ideal.The precision rate of pig segmentation is 96.22% and the recall rate is 89%.The average precision rate of individual pig identification is97.44% and the average recall rate is 95.25%.The precision rate of pig head detection is 98.75% and the recall rate is 79.00%.The precision rate of pig tail detection is 99.40% and the recall rate is 82.25%.(3)Differentiated strategy scheme for pig behavior recognition.The thesis divides the behavior of pigs into two categories,simple behavior and complex behavior.It develops a scheme for recognizing pig’s simple behavior and complex behavior by different solutions.The simple behavior recognition is first to train a pig posture classifier.The posture of pigs is classified as three categories,namely lying,bending and standing.According to the difference of posture and the position change of pigs,the resting,walking and standing behavior of pigs are identified.The recognition of complex behaviors is achieved by combining the functional characteristics of the pig house,the interaction between pigs and the temporal characteristics of the video frames.The location information of pigs is combined with the functional area and time data to realize the recognition of drinking and feeding behavior.Through position changing trend of two pigs in the time series,pig mounting behavior is detected.By analyzing the correlation between two adjacent frames in the surveillance video,changed pixels are counted to evaluate pig herd activity level.The average precision and recall rate of pigs’ posture classification is76.67%.The precision rate of drinking behavior recognition is 92.11% and the recall rate is 85.37%.The precision rate of feeding behavior recognition is 99.59% and the recall rate is 86.83%.The thesis successfully recognizes different kinds of pigbehaviors.(4)Application of pig behavior data.In order to solve the problem that pig farm video data requires large-capacity storage and high-bandwidth transmission,the thesis designs a distributed processing framework for pig behavior supervision.Behavior data extraction is performed locally on the farm through the algorithm proposed in this thesis.The extracted data,small and structured,is then transferred to a remote server.The server presents pig behavior results in the form of graphs and tables.Our work can make pig farming decisions smarter and more objective.The main innovations of the thesis are the individual pig identification algorithm and the pig behavior recognition strategy based on multivariate factors.With the pig behavior extraction scheme proposed in this thesis,the behavioral rhythm of pigs can be built and abnormal behavior can be found.It will make the pig farming decision more objective and intelligent. |