Since determining the weight of pigs during large-scale breeding and production is challenging,using non-contact estimation methods is vital.This study proposed a novel pig weight prediction method based on a mod-ifie...Since determining the weight of pigs during large-scale breeding and production is challenging,using non-contact estimation methods is vital.This study proposed a novel pig weight prediction method based on a mod-ified mask region-convolutional neural network(mask R-CNN).The modified approach used ResNeSt as the backbone feature extraction network to enhance the image feature extraction ability.The feature pyramid net-work(FPN)was added to the backbone feature extraction network for multi-scale feature fusion.The channel at-tention mechanism(CAM)and spatial attention mechanism(SAM)were introduced in the region proposal network(RPN)for the adaptive integration of local features and their global dependencies to capture global in-formation,ultimately improving image segmentation accuracy.The modified network obtained a precision rate(P),recall rate(R),and mean average precision(MAP)of 90.33%,89.85%,and 95.21%,respectively,effectively segmenting the pig regions in the images.Five image features,namely the back area,body length,body width,average depth,and eccentricity,were investigated.The pig depth images were used to build five regression algo-rithms(ordinary least squares(OLS),AdaBoost,CatBoost,XGBoost,and random forest(RF))for weight value pre-diction.AdaBoost achieved the best prediction result with a coefficient of determination(R^(2))of 0.987,a mean absolute error(MAE)of 2.96 kg,a mean square error(MSE)of 12.87 kg^(2),and a mean absolute percentage error(MAPE)of 8.45%.The results demonstrated that the machine learning models effectively predicted the weight values of the pigs,providing technical support for intelligent pig farm management.展开更多
基金supported by the Key R&D Program of Zhejiang(2022C02050)Zhejiang Provincial Natural Science Foundation of China(ZCLTGN24C1301)。
文摘Since determining the weight of pigs during large-scale breeding and production is challenging,using non-contact estimation methods is vital.This study proposed a novel pig weight prediction method based on a mod-ified mask region-convolutional neural network(mask R-CNN).The modified approach used ResNeSt as the backbone feature extraction network to enhance the image feature extraction ability.The feature pyramid net-work(FPN)was added to the backbone feature extraction network for multi-scale feature fusion.The channel at-tention mechanism(CAM)and spatial attention mechanism(SAM)were introduced in the region proposal network(RPN)for the adaptive integration of local features and their global dependencies to capture global in-formation,ultimately improving image segmentation accuracy.The modified network obtained a precision rate(P),recall rate(R),and mean average precision(MAP)of 90.33%,89.85%,and 95.21%,respectively,effectively segmenting the pig regions in the images.Five image features,namely the back area,body length,body width,average depth,and eccentricity,were investigated.The pig depth images were used to build five regression algo-rithms(ordinary least squares(OLS),AdaBoost,CatBoost,XGBoost,and random forest(RF))for weight value pre-diction.AdaBoost achieved the best prediction result with a coefficient of determination(R^(2))of 0.987,a mean absolute error(MAE)of 2.96 kg,a mean square error(MSE)of 12.87 kg^(2),and a mean absolute percentage error(MAPE)of 8.45%.The results demonstrated that the machine learning models effectively predicted the weight values of the pigs,providing technical support for intelligent pig farm management.