Tobacco is one of the important industries in China, and the annual tobacco tax is an important source of China 's fiscal revenue. However, in the process of cigarette production, it is inevitable that cigarettes will be short, which will affect the quality of cigarettes and the brand reputation of cigarette factories. Therefore, it is necessary to study the detection method of cigarette short phenomenon. At present, there is a lack of image data of cigarette shorts. The use of target defect detection methods for training has the problem of insufficient sample data and unsatisfactory training results, which may affect the detection accuracy of short cigarettes. Therefore, a YOLOv4 cigarette short detection method based on GAN algorithm is proposed. First of all, in view of the lack of sample data of cigarettes, the GAN algorithm is used to generate sample data, which plays a role in expanding the data set. Then, the real cigarette blank image and the blank image generated by GAN algorithm are merged as sample data, and the YOLOv4 network is trained to improve the detection accuracy of the defect detection model. Finally, experimental verification. Through experiments, it is found that the detection accuracy of the detection model can be improved to a certain extent by using the GAN algorithm to expand the sample data.
|