| With the continuous development and progress of deep learning,compared with the traditional object detection algorithms,the detection accuracy of object detection algorithms based on deep learning is getting higher and higher,and it is more and more widely used in real scenes,and it is constantly developing in the direction of high performance,real-time performance and high availability.Steel is a common metal material in the manufacturing industry.Improving the detection of steel surface defects can prevent safety accidents caused by material defects.so it is important to research on defect detection and identification of steel surface.However,the production environment of steel is complex,the gap between the same type of steel defects is large,and the defect size is small.To solve the above problems,this paper chooses YOLOv5 algorithm as the model of steel surface defect detection,and conducts related research on steel surface defect detection.The main research contents are as follows:(1)In view of the environmental impact of lighting and manufacturing on the steel dataset,low contrast and low image quality,MSR algorithm is used to enhance the image quality,and K-means++ algorithm is used to recalculate the size of a priori box of YOLOv5,which makes the regression convergence faster and more accurate,and improves the Mosaic data enhancement of YOLOv5,which improves the accuracy of YOLOv5 model for steel defect image detection.(2)The precision and recall rate of YOLOv5 model for rolling scale and cracking of steel are not high,ECA and CA attention mechanisms are used to improve the YOLOv5 model,which improves the model’s attention to important feature information and improves the feature extraction ability of the network.(3)Aiming at the problem that YOLOv5 algorithm has low discrimination ability for steel image background and defects,the PANet feature fusion network of YOLOv5 is improved,and two lateral cross-scale connection paths are added to improve the model’s resolution ability for image background and defects and the resolution ability for different defect types. |