| The competitiveness of the tobacco industry is mainly composed of product quality and popularity.Defects of cigarettes in cigarette packs are closely related to the quality of cigarettes.If there are defective cigarettes in the sold cigarette packs,it is considered that there is a problem with the quality of the cigarettes.Therefore,the identification of defective cigarettes is an effective way to improve the quality of cigarettes.With the development of image processing technology and machine learning technology,the detection and identification of defective cigarettes by machines has become a trend.In view of the problems of time-consuming,high cost,few detection categories,and low detection accuracy caused by the use of mechanical,photoelectric,and traditional target detection methods for cigarette defect detection,and the problem that existing algorithms based on deep learning cannot meet real-time requirements,this paper The main research work of this paper includes the following points:(1)Cigarette image collection.CCD image sensor,LED light source,and 1.1-inch F2.8/35 lens are used to shoot images of cigarettes.The camera at the tobacco end is installed at a shooting angle of less than 57.4°,and the shooting angle at the filter tip is kept level with the filter tip.Use Make Sense to annotate data on cigarette images according to the national standard for appearance defects of cigarettes.(2)Detection model improvement.On the basis of the YOLOv5 model,the Mobile Net V3 network is introduced,the network layers and step size of Mobile Net V3 are improved,the SE module is added on the basis of Shuffle Net V2,and the activation function,Stem Block structure,and Focus structure are modified to build 5 new backbone networks,using the same Data set,model evaluation using detection accuracy(m AP)and detection speed(FPS)for cigarette defect detection models.The experimental results show that Mobile Net V3 series cigarette defect detection is better than YOLOv5 model in detection speed,but it still does not meet the real-time requirements,and the detection accuracy is lower than that of YOLOv5.The cigarette defect detection models of the Shuffle Net series meet the real-time requirements.The detection accuracy of the Shuffle Net V2_1-Stem Block-YOLOv5 model and the Shuffle Net V2_1-Focus-YOLOv5 model is also better than that of YOLOv5.(3)Cigarette defect detection system.A cigarette defect detection system is designed using Py Qt5.The system provides users with seven functions: login,registration,selecting detection model,uploading detection images,adjusting model parameters,displaying results and saving detection results. |