| Food is one of the national strategic materials and living materials of life,the quality and safety of food is closely related to everyone.Storage is an important part in the grain supply chain.Accurate and efficient detection of stored-grain pests is of great significance for food security.There are many ways to detect stored grain pests.In this paper,deep learning object detection technology is used to detect stored-grain pests.SSD algorithm and YOLOv3 algorithm of one-stage object detection are optimized,and a large number of experiments are carried out.Finally,the optimal detection model of the most effective is obtained.Based on the existing grain information platform,the grain insect target detection system is designed and realize the development of a key part of the system-grain insect object detection APP.According to the requirements of the system,the experimental results of the two optimized object detection algorithms are compared,and the model with better effect is transplanted to the Android terminal.Finally,the model transplantation of stored-grain pest detection based on the deep learning target detection algorithm was realized and the development of APP was completed.The main work of this paper is as follows:1.Self-made data set,shoot video by shooting live adults,and use video screenshot to complete the acquisition of data set pictures.Using the Label Img software to mark the grain pest object,and then writing data enhancement code to generate enhanced pictures and automatically generate corresponding bounding boxes and XML files.Coding the data set segmentation programs,dividing the data set into training set,validation set and test set according to the ratio of 7:2:1,and finally complete the production of the VOC2007 data set..2.Optimizing the SSD algorithm,the Top-down module is used to fuse the feature maps output by conv4 and conv5 in SSD network structure,and block 11 is deleted,because it is not good for small object detection.K-means clustering algorithm is used to cluster the length width ratio of prior bounding boxes which are suitable for grain pests.So as to improve the detection performance of the original SSD algorithm using default prior bounding boxes.The prior bounding box after clustering is more suitable to the detection of small grain insects.Other open source feature fusion algorithms are studied,and the experimental results are compared with the optimized SSD algorithm.Compared with other algorithms,the optimized SSD algorithm has the best detection effect.3.Optimizing the YOLOv3 algorithm,GIo U algorithm is used to make up for the deficiencies of Io U algorithm in the original YOLOv3 algorithm.Using K-means clustering algorithm to cluster the data set,which greatly improves the detection accuracy of grain pests.Studying other open source algorithms and conducted experiments.The experimental results are compared with the optimized YOLOv3 algorithm.The optimized YOLOv3 algorithm has the best detection accuracy.4.Design a grain pest object detection system based on the existing grain information platform,and complete the development of the mobile terminal’s grain pest object detection APP,which is a key part of the system.This part is mainly to transplant the algorithm model with better effect after training to Android terminal.First,transplanting the official demo to familiar with the transplanting process,and then transplant the optimized YOLOv3 model and YOLOv5 model.Because the APP detection speed of the optimized model is too slow,the smaller model of yolov5 is transplanted again,and the detection speed is faster and the effect is good. |