关键词:
钢轨表面伤损
深度学习
缺陷检测
YOLOv8n
注意力机制
摘要:
在采集钢轨表面伤损数据建立数据集过程中,发现钢轨表面伤损存在大尺度伤损较多及尺度变化较大的情况,针对这种情况提出了一种面向多尺度钢轨表面伤损的改进YOLOv8n检测算法。首先,将网络中的C2f与Triplet Attention融合设计新的特征提取模块C2f-TA,扩大网络层特征图的感受野,增加对大尺度目标的检测精度。然后,结合网络层连接模块SDI与TFE,设计新的多尺度特征融合Neck结构,通过在不同的网络层将Concat模块替换为TFE模块和SDI模块,实现对四个不同尺度级别的特征图的融合,赋予特征图丰富的语义特征和细节特征;同时,使用SSFF模块和CPAM模块,构建新的小尺度目标检测分支,利用通道和局部注意力机制,增强小尺度目标的特征表达。结果表明,较基准算法Precision提升了1.8%,Recall提升了7.2%,mAP@50和mAP@50-95分别提升了3%和2.8%。In the process of collecting rail surface damage data and establishing dataset, it is found that there are many large-scale damages and large-scale change of rail surface damage. In response to this, an improved YOLOv8n detection algorithm tailored for multi-scale Rail surface damage was proposed. Firstly, a new feature extraction module, C2f-TA, was designed by integrating C2f with Triplet Attention in the network to expand the receptive field of the feature maps, thereby enhancing the detection accuracy for large-scale targets. Subsequently, a novel multi-scale feature fusion Neck structure was devised by combining the network layer connection modules SDI and TFE. This was achieved by replacing the Concat modules with TFE and SDI modules at different network layers, enabling the fusion of feature maps across four distinct scale levels, thereby enriching the semantic and detailed features of the feature maps. Additionally, a new small-scale target detection branch was constructed using the SSFF and CPAM modules, leveraging channel and local attention mechanisms to strengthen the feature representation of small-scale targets. The results demonstrate that compared to the baseline algorithm, the Precision is improved by 1.8%, the Recall by 7.2%, and the mAP@50 and mAP@50-95 are enhanced by 3% and 2.8%, respectively.