Abstract:
This paper proposes a detection algorithm based on an improved you only look once version 5(YOLOv5) model to address the issues of low efficiency and poor accuracy in defect detection of substation roof constructions.Firstly, the algorithm preprocesses images to reduce the impact of external noise on the detection outcomes.Secondly, it introduces an improved self-attention mechanism into the network’s backbone.It replaces the traditional convolutional layers at the end of the YOLOv5 backbone with multi-head self-attention layers to better capture global correlation information.Finally, a cross-layer weighted cascade structure is introduced in the detection phase to integrate surface-level defects′ edge and contour information into deeper feature layers, thereby improving the network′s accuracy in defect boundary regression.Experimental results show that the improved YOLOv5 algorithm achieves an average accuracy of 93.2% in defect detection across five types of layers: insulation, isolation, steam barrier, waterproofing, and leveling, with a frame rate of 163.5 frames per second.This solves the problem of uneven defect distribution and varying target scales encountered in practical engineering settings, offering superior accuracy and real-time performance compared to similar algorithms.