Surface Defect Detection of Workpiece Based on Improved YOLOv3_tiny Algorithm
To address the problems of current workpiece surface defect detection algorithms with large models,poor real-time performance,and difficulty in running in performance-constrained embedded systems,an improved algorithm Defect_YOLOv3_ti-ny is proposed based on the lightweight algorithm YOLOv3_tiny.Firstly,the K-means algorithm is applied to generate a priori box suitable for defect features.Secondly,the spatial pyramid pooling(SPP)module is added to the network,and the attention mecha-nism is introduced to optimize the defect detection accuracy.Finally,the algorithm detection branch is added to contain minor de-fects missed.The experimental results show that the detection speed of the improved algorithm is 81.41fps,and the average detec-tion accuracy mAP is 94.7%.Compared with the original YOLOv3_tiny,the detection speed of the improved algorithm is only re-duced by 11.6%,and the mAP is increased from 89.8%to 94.7%,indicating that the improved detection algorithm meets the re-quirements of the embedded system for lightweight and accuracy of defect detection.