Multi-Scale Plastic Lunch Box Surface Defect Detection Based on Dynamic Convolution - Jing Yang; Gang Zhang; Yunwang Ge; Jingzhuo Shi; Yiming Wang; Jiahao Li (IEEE Access, 2024)
Plastic lunch box is a topic that food safety has been neglected, and there are few studies on the defects of plastic lunch box production. A multi-scale attention mechanism based on dynamic convolution is designed in this paper to solve the problems of large differences in surface defects of plastic lunch boxes and insensitive perception of multi-scale features. This attention mechanism enables the network to capture complex features adaptively, and enhances the perception of feature channel information and spatial information at various scales. Firstly, this paper integrates the attention mechanism into Slim-neck, and enhances the model’s ability to perceive multi-scale feature information. Secondly, a small target detection layer is added to Slim-neck to solve the semantic information loss problem of various defect features. Then dynamic convolution is integrated into YOLOv8n backbone network to capture complex features adaptively. Finally, MPDIoU is used as the boundary frame loss function, and geometric characteristics are used to improve the model’s perception ability of various defects. Experimental results show that the improved model YOLOv8n-D2SM in this paper achieves 82.8% mAP@0.5 index on the plastic lunch box dataset, which is 10% higher than that of the original model. The detection speed is 26 frames/s, and the number of model parameters is basically consistent with that of the original model. This improvement makes the model more adaptable and reliable in the task of surface defect detection of plastic lunch boxes, which is convenient for deployment and application in actual production scenarios.