Improved YOLOv7-Based Algorithm for Detecting Defect on Steel Surface
摘要
The steel during its production and processing is prone to be influenced by raw materials and the processing environment, resulting in surface defects, affecting its corrosion resistance and service life. In addition, deep learning-based defect detection models typically have a relatively large size, making it challenging to fulfill the requirements of real-time steel surface defect detection tasks. To address the above problems, this paper proposes an improved model YOLOv7-Lig based on the YOLOv7-tiny model. By introducing the CBAM attention mechanism, and replacing the original CIoU loss function with the Wise-IoU loss function, the network model is enhanced to pay attention to the key features of the input data, thus enabling it to accurately capture the true boundary of the target, effectively reduces the problem of inadequate feature extraction. The CSP-Faster module is introduced in the BACKBONE, this approach reduces the number of parameters in the network model, facilitating its deployment in resource-constrained environments. Then the CARAFE upsampling operator is introduced at the head, this mechanism efficiently integrates contextual features and elevates the precision of the upsampling process. The YOLOv7-Lig model achieves a mAP of 85.1% and a detection speed of 82FPS, this demonstrates that the model is capable of enhancing both accuracy and detection speed while minimizing the parameter count.