Food is the first necessity of the people and the country.The storage of food is the lifeblood of a country.With the increase in food production,our country has established a comprehensive grain storage management system that combines central grain storage and local grain storage.Reserve grain serves as the regulator of market supply and demand,the forerunner of disaster relief and the protector of strategic security,which has improved the country’s ability to resist risks in development.However,stored grain pests are the biggest threat in the process of grain storage.Therefore,in the early stage of the occurrence of pests,it is particularly important to detect pests in time and take control measures to reduce losses.In response to this problem,the thesis proposes a stored-grain pest detection model based on deep learning.By improving the YOLOv4 algorithm and introducing a transfer learning training network to achieve pest detection,the main work is as follows:(1)In order to solve the problem of huge data set and time-consuming in the training process of target detection algorithm,the thesis introduces transfer learning method and designs three transfer learning schemes.In view of the low mass of stored grain pest data,this thesis proposed a secondary transfer learning method and designed a source region selection strategy based on Maximum Mean Discrepancy(MMD)to determine the effective source region for transfer learning.Experiments show that the whole network structure of migration training has a higher mean Average Precision(mAP)in the field of stored grain pest detection,and the secondary migration learning under source region selection strategy further improves the mAP of the algorithm detection.(2)In order to improve the detection precision of stored-grain pests,the thesis proposes the P-YOLOv4(Pets-YOLOv4)algorithm,which realizes the classification and location of five common stored-grain pests.Based on the YOLOv4 algorithm,this algorithm strengthens the learning ability of the algorithm for the target characteristics of stored grain pests by adding Convolutional Block Attention Module(CBAM)and Spatial Pyramid Pooling(SPP).It combines the Mish activation function and optimized a priori box to improve the detection precision of pests.Experiments show that compared with the YOLOv4 algorithm,the mAP of the P-YOLOv4 algorithm for the detection of stored-grain pests is increased by 5.41%.(3)The thesis designs and implements a P-YOLOv4-based stored-grain pest detection model.The model mainly includes two parts: data set preprocessing and P-YOLOv4 stored-grain pest detection based on secondary transfer learning.Experiments show that the stored-grain pest detection model proposed in the thesis has a higher mAP,which is 5.34%~10.65% higher than other pest detection models.The average detection precision of this model on the three test sets of single-type single-headed insects,single-type multi-headed insects and multi-type multi-headed insects is 98.2%,88.7% and 75.48%. |