Font Size: a A A

Research On Potato Defect Detection Based On Improved YOLOv7

Posted on:2024-07-18Degree:MasterType:Thesis
Country:ChinaCandidate:T L LuoFull Text:PDF
GTID:2543306926968059Subject:Engineering
Abstract/Summary:PDF Full Text Request
With the continuous advancement of potato industry development,the important position of potato in ensuring national food security has been established.At present,potato defect detection mainly relies on manual and traditional detection techniques for screening,and these detection methods have problems such as low efficiency,low accuracy and poor real-time performance,which cannot screen out defective potatoes accurately and efficiently.Therefore,this thesis proposes a potato defect detection method based on improved YOLOv7.By analyzing and comparing the existing target detection models,we improve the YOLOv7 model,aiming to improve the model detection accuracy and detection speed.The main research contents of this thesis are as follows:(1)Potato defect dataset construction and data enhancement.In order to improve the robustness and generalization of the training model,four data enhancement methods of linear transformation,image rotation,image aspect ratio adjustment and Gaussian noise addition are used to expand the dataset in this thesis,expanding the defect photos from 266 to 5000,and finally using labelImg to label the data and make the dataset in YOLO format.(2)YOLO series model performance comparison.In this thesis,we choose the newly released YOLOv7 model and the widely studied YOLOv5-1 model with similar parameters to compare the performance on the potato defect dataset.The experimental results show that the mAP of YOLOv5-1 is 90.5%and the detection speed is 59.8 FPS.The mAP of YOLOv7 is 92.0%and the detection speed is 62.9 FPS,which is 1.5%and 5.2%better than YOLOv5-1’s mAP and detection speed.YOLOv7 not only converges faster,but also has better performance in terms of detection accuracy and detection speed.(3)Potato defect detection research and improvement.Firstly,in this thesis,the spatial pyramid pooling layer is lightened and improved by replacing SPPCSPC with SimSPPFCSPC,which improves the operation speed of the model under the condition that the receptive field remains unchanged;then the ELAN module,CBS module,ELAN module and MPConv module in the backbone network are lightweighted,which reduces the parameters and GFLOPs of the model;then the SENet attention mechanism is added to the last layer of the backbone network.Finally,the bounding box loss function CIoU is replaced by Alpha-CIoU,and the bounding box loss function can adapt to different sizes of detection frames after introducing the power parameter α,which accelerates the convergence of the model.The improved YOLOv7-LSA model achieves 92.1%mAP and 92.6 FPS in potato defect detection.The mAP of YOLOv7-LSA is improved by 0.1%and detection speed is improved by 47.2%compared with the original YOLOv7 model.It is demonstrated by ablation experiments that the improved scheme in this thesis can make the model further improve the detection performance.
Keywords/Search Tags:Potato, Defect Detection, YOLOv7, Spatial Pyramid Pooling, Attention Mechanism
PDF Full Text Request
Related items