The optimization of YOLOv5 algorithm for detecting surface defects on hot rolled strips
The single-stage target detection network YOLOv5 has certain deficiencies when dealing with feature extraction and sensory feature fusion for surface defects on hot-rolled steel.This paper proposes an optimized YOLOv5 algorithm for surface defect detection of hot rolled strip steel,which adjusts the anchor clustering anchor frame setting by the IOU-K-means++algorithm,increases the dynamic head target detection head,introduces the channel attention mechanism(C3_CA),and combines the hard swish activation function with the WioU_loss bounding box regression function,effectively improving the comprehensive accuracy of hot rolled strip steel surface defect detection.Test results from the NEU-DET dataset show that compared to the single-stage YOLOv5 algorithm fusion results,the mean average precision(mAP)of the optimized YOLOv5 network model can be improved up to 75.7%,and the network constraint rate can be effectively improved by 6.1%.The above optimized YOLOv5 algorithm is a useful reference for hot rolled strip steel surface defect location surveys,classification points,and impact assessments and provides important support for high-precision screening of metal surfaces.
hot rolled steel surface defectsYOLOv5IOU-K-means++dynamic headattention mechanism