Faster and lighter surface defect detection model for transparent wine bottle
摘要
Aiming at the problems of low detection efficiency and high false detection rate due to the small defects on the surface labels of wine bottles and the similarity between patterns and defects, this paper proposes an improved YOLOv5s detection model for wine bottle surface defects. First, this paper introduces the lightweight C3 module and depthwise separable convolution, which greatly reduces the amount of parameters in the model; Secondly, the feature fusion structure of the neck network in the YOLOv5s model is designed, and the weighted bidirectional feature pyramid network is used to further promote the feature fusion of different scales through cross-level multi-scale connections; Finally, the optimized XIOU loss function is used to replace the loss function of the original model, and the detection accuracy of the lightweight model is improved. Experiments show that the model proposed in this paper, with the detection accuracy not weaker than that of the baseline model, reduces the number of parameters to 64.9% of the baseline model, and the mAP value of the model on the wine bottle surface defect dataset in the Tianchi industrial dataset is 79.7%. Compared with the original YOLOv5s and YOLOv7 models, the size of the original model is reduced to 62.6% and 12.7%, respectively, and the lightweight effect is remarkable.