基于边缘引导的输油管道焊缝缺陷检测方法

Edge-guided defect detection method for oil pipeline welds

  • 摘要:
    目的 输油管道环焊缝内部缺陷直接威胁在役管道的安全运行与完整性管理。尽管X射线底片可形成直观、可追溯的缺陷记录,但现场复检仍高度依赖人工判读,存在效率低、主观性强、一致性波动大等问题。同时,焊缝X射线图像中的缺陷常呈现弱对比、小尺度及形态多样性,叠加焊道纹理、厚度起伏与曝光不均等结构干扰,易造成漏检、误检与定位偏移,难以满足规模化巡检对检测稳定性与可重复性的要求。为此,本文面向输油管道环焊缝X射线底片提出一种边缘感知多尺度自适应检测模型EMA-DETR,以提升缺陷自动识别的准确性与一致性。
    方法 EMA-DETR以RT-DETR为基线,首先在骨干网络中引入边缘引导残差结构EG-ResNet18,将浅层边缘先验融入特征提取过程,以增强微小缺陷的轮廓与细粒度纹理表征能力。其次,设计多尺度自适应融合路径MAFP,通过双通路交互实现浅层细节与深层语义的对齐融合,提升跨尺度特征的判别鲁棒性。此外,提出尺度感知梯度聚焦损失SGFL,利用难度调制与中心距离约束强化小目标与难例的梯度贡献,缓解因尺度与类别不均衡造成的训练偏置。
    结果 在公开数据集SPWDD上,EMA-DETR的mAP@0.50达到95.98%,提升约1.91%;在自建输油管道焊缝数据集上,mAP@0.50达94.05%,提升约1.90%。消融实验表明,EG-ResNet18、MAFP与SGFL分别从边缘表征增强、多尺度融合优化与损失调控层面带来稳定增益,三者协同作用显著提升弱缺陷检出率与定位一致性。
    结论 EMA-DETR通过边缘先验引导、多尺度自适应融合与尺度感知梯度聚焦的协同设计,实现了复杂焊缝背景下缺陷检测精度与一致性的同步提升,有效降低人工判读工作量与主观差异风险,为缺陷清单自动生成、结果数字化归档与管道完整性管理提供了可行的技术路径。

     

    Abstract:
    Objective Internal defects in girth welds of oil pipelines pose significant risks to pipeline safety and integrity management. Although X-ray films provide clear and traceable defect records, on-site re-inspections still rely heavily on manual interpretation, which suffers from low efficiency, subjectivity, and inconsistent results. Additionally, weld defects in X-ray images often exhibit weak contrast, small scale, and varied morphology, compounded by structural interferences such as weld bead texture, thickness variations, and uneven exposure. These factors frequently cause missed detections, false positives, and location errors, hindering the stability and repeatability required for large-scale inspections. To address these challenges, this study proposes an edge-aware multi-scale adaptive detection model EMA-DETR to enhance the accuracy and consistency of automatic defect identification in girth weld X-ray films.
    Methods EMA-DETR was developed upon RT-DETR by introducing three key enhancements. First, an edge-guided residual structure, EG-ResNet18, was integrated into the backbone network, embedding shallow edge priors into the feature extraction process to enhance the representation of contours and fine-grained textures for tiny defects. Second, a multi-scale adaptive fusion path (MAFP) was designed to align and fuse shallow details with deep semantics via dual-path interaction, enhancing the discriminative robustness of cross-scale features. Additionally, a scale-aware gradient focal loss (SGFL) was proposed to strengthen the gradient contribution of small targets and difficult examples via difficulty modulation and center-distance constraints, alleviating training bias caused by scale and class imbalance.
    Results On the public dataset SPWDD, EMA-DETR achieved an mAP@0.50 of 95.98%, reflecting an increase of approximately 1.91%. On the self-built oil pipeline weld dataset, it reached an mAP@0.50 of 94.05%, with a similar increase of about 1.90%. Ablation studies confirmed that EG-ResNet18, MAFP, and SGFL consistently enhanced performance by improving edge representation, multi-scale fusion, and loss regulation, respectively. Their combined effect significantly boosted faint defect detection and location consistency.
    Conclusion EMA-DETR enhances defect detection accuracy and consistency in complex weld backgrounds through the integrated design of edge prior guidance, multi-scale adaptive fusion, and scale-aware gradient focusing. It reduces manual interpretation workload and subjective variability, offering a practical solution for automatic defect listing, digital archiving, and pipeline integrity management.

     

/

返回文章
返回