Font Size: a A A

Research On Body Weight Estimation Method Of Fattening Pigs Based On Machine Vision And Machine Learning

Posted on:2023-01-06Degree:MasterType:Thesis
Country:ChinaCandidate:S Z WanFull Text:PDF
GTID:2543306803465334Subject:Agriculture
Abstract/Summary:PDF Full Text Request
With the increasing scale of the pig breeding industry,the demand for all aspects of computer technology has also increased.In order to improve the informatization level of the pig breeding industry,it is necessary to improve the problems of difficulty in obtaining pig body weight and easily lead to pig stress in traditional methods,so as to achieve efficient and rapid pig weight estimation.This research is based on the combination of machine vision and machine learning.This paper proposes to use Mask R-CNN instance segmentation algorithm to achieve pig contour segmentation and obtain pig image feature information.The Stacking model was used to fit the relationship between pig image features and body weight to achieve pig body weight estimation.The main contents of this research are as follows:(1)The principle and actual effect of various image segmentation algorithms are studied,combined with the actual environment of the pig farm,the applicability of various segmentation models is compared,and the Mask R-CNN model is finally selected as the image segmentation research algorithm.Build the Detectron2 platform to ensure the training efficiency of the model.(2)Optimize the structure of the Mask R-CNN model,which mainly includes adjusting the network structure of Resnet50 and constructing 4 different types of feature extraction networks to meet the diversification of pig image feature extraction.Combined with pig image features,3 kinds of targets are obtained through RPN parameter optimization.According to the input size of the box,a total of 12 image segmentation models are formed.By comparing the segmentation evaluation indicators of various models,it is concluded that the optimized model has an average segmentation accuracy m PA of 96.95% for pixels,which can effectively segment and extract pig features.(3)Using image processing method,feature extraction is performed on the segmented image to obtain features such as pixel area,perimeter,body length,body width,eccentricity and deviation of the pig outline,and a data set corresponding to the features and body weight is created.(4)Build a Stacking model with Xgboost,random forest and BP neural network as the primary trainer and simple linear regression as the secondary trainer,which is used for model building of pig image features and body weight.The results showed that: The effect of the Stacking model is better than that of the primary trainer models,and the model generalization is stronger.The coefficient of determination between the model estimated value and the true value is 0.9889,the mean absolute error is 1.272 kg and the mean square error is 2.760 kg.(5)Edit the user image operation interface with the framework of Py QT5 in Python,and develop intelligent weight estimation software.The software can realize the acquisition of pig image feature information and weight estimation,which can provide effective weight estimation software for breeders and effectively relieve the pressure of traditional weighing.This paper studies the method of fattening pig body weight estimation,which has a certain role in promoting the development of pig breeding industry.
Keywords/Search Tags:Fattening pig, Machine vision, Machine learning, Weight, Image processing
PDF Full Text Request
Related items