| Plastic products industry is one of the pillar industries of China’s light industry,it is closely related to the development of China’s national economy.Defect detection is a very important step in the production process of injection molded parts,it is crucial to ensure product quality.At present,surface defects of injection molded workpieces usually need to rely on manual inspection,but manual inspection has such problems as low efficiency and high influence by subjective factors.Therefore,more reliable and efficient automated defect detection technology is needed to improve production efficiency and product quality.Detection technology based on Traditional machine vision require manual selection of feature parameters,but manual extraction of defective features is difficult,which leads to its lower generalization ability and recognition accuracy.Convolutional neural networks are able to extract image features autonomously,and it has higher generalization ability and algorithmic accuracy than traditional machine vision.Therefore,this paper investigates a algorithm for surface defect detection of injection molded workpieces based on deep learning,with the aim of improving the efficiency and accuracy of defect detection.The main work of this paper is as follows:(1)This paper analyzed the current status of research on various detection algorithms at home and abroad.According to the various requirements of injection molding companies for defect detection of injection molded parts,this paper proposed a overall system for defect detection of injection molded parts based on machine vision.In addition,a visual inspection system with multi-station was designed,and the hardware analysis and selection for the visual inspection system with multi-station were carried out.(2)The original images were collected using the visual inspection system with multi-station to build a dataset of surface defects on injection molded parts.Common types of defects on injection molded parts were studied and presented.Data enhancement was performed on the acquired original images,and then all defective images of injection molded parts were labeled using the Label Img.A dataset of surface defects of injection molded parts was created using the labeled images,and the dataset was divided into training set,validation set and test set according to the ratio of 6:2:2.(3)The evaluation metrics for defect detection were presented,and the performance of the YOLOv5 algorithm with different sizes was compared on public datasets.The YOLOv5 s algorithm was chosen as the basic algorithm of defect detection for this topic.Then,this paper built the original YOLOv5 s network model.(4)This paper combined the characteristics of surface defects of injection molded parts and proposed corresponding improvement strategies.In order to improve the attention of the neural network to the defective part in the training and inference stages,the CBAM convolutional attention mechanism module was added to the Backbone and Neck structures of YOLOv5 s network structure model.The defects of the injection molded parts in this experiment are mostly small targets,but the YOLOv5 s network structure model is not very effective to detect small target,so two improvements were proposed in this paper:Small target segmentation algorithm,adding small target detection layer.According to the speed requirements for the projects of industrial-grade defect detection,the addition of small target detection layers was chosen as the improvement strategy.In this paper,we used depth-separable convolution for YOLOv5 s network structure model,which aims to reduce the parameters of the model and improve the detection speed of the defect detection network.(5)This paper described the experimental environment for model training and the training parameters,and the model was trained using the three completed datasets.Then,the saved model after training was tested on the test set.The defect detection models before and after the improvement were compared,and the results of the comparison proved the effectiveness of the proposed model improvement method.Improved defect detection model around injection molded parts achieved 100.00% mAP and 23 ms forward transmission elapsed time.Improved model for detecting defects under injection molded parts achieved 98.29% mAP and 23 ms forward transmission elapsed time.Improved defect detection model above injection molded parts achieved 99.64%mAP and 23 ms forward transmission elapsed time.In summary,this paper proposes a algorithm for surface defect detection of injection molded workpieces based on deep learning.The defect detection algorithm has huge advantages in terms of detection accuracy and speed compared to manual detection,which can meet the demand of real-time detection.The defect detection algorithm is of great significance to improve the quality inspection efficiency and economic efficiency of the injection molding parts industry. |