| With the rapid development of industrial manufacturing intelligence,the printing industry has also put forward higher requirements for printing equipment and product quality.Traditional reliance on manual print quality inspection can no longer meet production needs,and deep learning-based defect detection technology provides a new research direction for intelligent detection in the printing indusstry.Printed cartons occupy a large proportion in the printing industry,and the defect detection of printed cartons in actual industrial scenarios scenarios still faces many difficult problems,such as low contrast between defects and background,high similarity between background and defects,large variation of defect scales,diverse defect types,small number of defect samples and difficulty in labeling.In view of the above difficulties,this paper conducts relevant study,which mainly includes the following:(1)To address the problem that there is no open-source high-quality printed carton defect dataset in this research area,a printed carton datasel containing 1630 images is created in this paper.The dataset is created by first collecting various defect samples from actual printing scenarios,then photographing the samples with an industrial camera,labeling the captured images with defect areas using labeling software,and finally renaming and classifying the dataset into categories for subsequent experiments.(2)A YOLOv5-based defect detection method for printed cartons is proposed.The method has been simplified for the backbone network in order to increase the speed of detection.In order to enhance the detection capabilily of the network for different size defects,a weighted multiscale pyramid feature fusion module is designed,which can effectively extract multi-scale defect features.The coordinate attention mechanism is adopted to solve the problem of high similarity and low contrast between defects and background to a greater extent.The effectiveness of the method is verified by the ablation experimental results.(3)A YOLOX-based defect detection method for printed carton samples with multiple variations is proposed.The method is improved by using the YOLOX-s network with Anchor free strategy as the baseline network,and introduces a neural network-based style migration scheme,which can reduce the feature differences between the new samples of the test set and the training set samples,thus improving the detection effect of the network.In the feature fusion stage,the defect feature representation can be improved by adding a compression-incentive attention module.Further,the grouping operation of the compression-incentive module reduces the number of parameters and improves the detection speed.The experimental results obtained on the printed carton dataset show that the proposed solution can better cope with defect detection in the case of product variation. |