DLCS-YOLO Model for Detecting Defects in Long-Distance Oil and Gas Pipelines
Abstract
1. Introduction
2. Materials and Methods
2.1. Principle of PMFP-Based Defect Detection
2.2. Improvement of YOLOv11
2.3. C3k2-DAttention Module
2.4. SPPF-LSKA Module
2.5. Context-Guided FPN Module
2.6. SEAM
3. Results
3.1. Experimental Environment and Parameters
3.2. Dataset
3.3. Evaluation Metrics
3.4. Ablation Experiment
3.5. Performance Comparison Experiments
3.5.1. Comparison Between the Proposed Model and General-Purpose YOLO Models
3.5.2. Comparison of the Proposed Model with Representative Detection Models
3.6. Visualization of Detection Results
3.7. Heatmap Visualization Analysis
3.8. Generalization Analysis
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| YOLO | You Only Look Once |
| DLCS-YOLO | Deformable Large-kernel Context-fused Spatial-YOLO |
| PMFP | permanent magnetic field perturbation |
| C3k2-DAttention | C3k2-Deformable Attention |
| SPPF-LSKA | Spatial Pyramid Pooling-Fast-Large Separable Kernel Attention |
| Context-Guided FPN | Context-Guided Feature Pyramid Network |
| SEAM | Spatially Enhanced Attention Module |
| ViT | Vision Transformer |
| CycleGAN | cycle-consistent generative adversarial network |
| NDT | Nondestructive testing |
| ILI | in-line inspection |
| LSKA | Large Separable Kernel Attention |
| CGFM | context-guided fusion submodule |
References
- Yuksel, V.; Tetik, Y.E.; Basturk, M.O.; Recepoglu, O.; Gokce, K.; Cimen, M.A. A novel Cascaded Deep Learning Model for the Detection and Quantification of Defects in Pipelines via Magnetic Flux Leakage Signals. IEEE Trans. Instrum. Meas. 2023, 72, 1–9. [Google Scholar] [CrossRef]
- Huang, S.; Peng, L.; Sun, H.; Li, S. Deep Learning for Magnetic Flux Leakage Detection and Evaluation of Oil & Gas Pipelines: A Review. Energies 2023, 16, 1372. [Google Scholar] [CrossRef]
- Liu, J.; Wen, Z.; Shen, X.; Zuo, F.; Jiang, L.; Zhang, H. Online Pipeline Weld Defect Detection for Magnetic Flux Leakage Inspection System via Lightweight Rotated Network. IEEE Trans. Ind. Electron. 2024, 72, 7573–7584. [Google Scholar] [CrossRef]
- Zhang, M.; Guo, Y.; Xie, Q.; Zhang, Y.; Wang, D.; Chen, J. Defect identification for oil and gas pipeline safety based on autonomous deep learning network. Comput. Commun. 2022, 195, 14–26. [Google Scholar] [CrossRef]
- Yao, J.; Liang, W.; Xiong, J. Novel intelligent diagnosis method of oil and gas pipeline defects with transfer deep learning and feature fusion. Int. J. Press. Vessels Pip. 2022, 200, 104781. [Google Scholar] [CrossRef]
- Xu, X.; Li, X. Research on surface defect detection algorithm of pipeline weld based on YOLOv7. Sci. Rep. 2024, 14, 1881. [Google Scholar] [CrossRef] [PubMed]
- Yang, D.; Ma, C.; Yu, G.; Chen, Y. Automatic defect detection of pipelines based on improved OFG-YOLO algorithm. Measurement 2025, 242, 115847. [Google Scholar] [CrossRef]
- Chen, P.; Li, R.; Fu, K.; Zhong, Z.; Xie, J.; Wang, J.; Zhu, J. A cascaded deep learning approach for detecting pipeline defects via pretrained YOLOv5 and ViT models based on MFL data. Mech. Syst. Signal Process. 2024, 206, 110919. [Google Scholar] [CrossRef]
- Zhao, Q.; Wang, G. Multi-architecture optimization of pipeline inner wall defect detection algorithm based on YOLOv8. Measurement 2025, 242, 116305. [Google Scholar] [CrossRef]
- Chen, K.; Li, H.; Li, C.; Zhao, X.; Wu, S.; Duan, Y.; Wang, J. An Automatic Defect Detection System for Petrochemical Pipeline Based on Cycle-GAN and YOLO v5. Sensors 2022, 22, 7907. [Google Scholar] [CrossRef] [PubMed]
- Shen, D.; Liu, X.; Shang, Y.; Tang, X. Deep Learning-Based Automatic Defect Detection Method for Sewer Pipelines. Sustainability 2023, 15, 9164. [Google Scholar] [CrossRef]
- Xiong, Y.; Shu, X.; Liu, Q.; Yuan, D. HCMNet: A Hybrid CNN-Mamba Network for Breast Ultrasound Segmentation for Consumer Assisted Diagnosis. IEEE Trans. Consum. Electron. 2025, 71, 8045–8054. [Google Scholar] [CrossRef]
- Xiong, Y.; Li, L.; Yuan, D.; Wang, H.; Ma, T.; Wang, Z.; Yang, Y. CFRNet: Road Extraction in Remote Sensing Images Based on Cascade Fusion Network. IEEE Geosci. Remote Sens. Lett. 2024, 21, 1–5. [Google Scholar] [CrossRef]
- Ma, Q.; Liang, W.; Zhou, P. A Review on Pipeline In-Line Inspection Technologies. Sensors 2025, 25, 4873. [Google Scholar] [CrossRef] [PubMed]
- Chen, P. Advancements and future outlook of safety monitoring, inspection and assessment technologies for oil and gas pipeline networks. J. Pipeline Sci. Eng. 2025, 5, 100267. [Google Scholar] [CrossRef]
- Hu, Y.; Wang, S.; Duan, Z.; Gao, Y.; Xiao, Y.; Feng, B.; Li, C.; Kang, Y. A flexible permanent magnetic field perturbation testing probe based on through-slot flexible magnetic sheet. Sens. Actuators A Phys. 2024, 366, 114899. [Google Scholar] [CrossRef]
- Sun, Y.; Kang, Y.; Qiu, C. A new NDT method based on permanent magnetic field perturbation. NDT E Int. 2011, 44, 1–7. [Google Scholar] [CrossRef]
- Jiang, L.; Zhang, H.; Liu, J.; Shen, X.; Xu, H. A Multisensor Cycle-Supervised Convolutional Neural Network for Anomaly Detection on Magnetic Flux Leakage Signals. IEEE Trans. Ind. Inform. 2022, 18, 7619–7627. [Google Scholar] [CrossRef]
- Li, J.; Wang, Y.; Ning, X.; He, W.; Cai, W. FefDM-Transformer: Dual-channel multi-stage Transformer-based encoding and fusion mode for infrared–visible images. Expert Syst. Appl. 2025, 277, 127229. [Google Scholar] [CrossRef]
- Xia, Z.; Pan, X.; Song, S.; Li, L.E.; Huang, G. Vision Transformer with Deformable Attention. In Proceedings of the Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 4794–4803. [Google Scholar] [CrossRef]
- Lau, K.W.; Po, L.M.; Rehman, Y.A.U. Large Separable Kernel Attention: Rethinking the Large Kernel Attention design in CNN. Expert Syst. Appl. 2024, 236, 121352. [Google Scholar] [CrossRef]
- Guo, M.H.; Lu, C.Z.; Liu, Z.N.; Cheng, M.M.; Hu, S.M. Visual attention network. Comput. Vis. Media 2023, 9, 733–752. [Google Scholar] [CrossRef]
- Yu, Z.; Huang, H.; Chen, W.; Su, Y.; Liu, Y.; Wang, X. YOLO-FaceV2: A scale and occlusion aware face detector. Pattern Recognit. 2024, 155, 110714. [Google Scholar] [CrossRef]
- Chen, C.; Fu, K.; Zheng, J.; Wang, Y.; Jia, G.; Qin, D.; Li, R. MBDSF-Net: An Efficient Network for In-line Inspection in Long-Distance Oil and Gas Pipelines. J. Pipeline Sci. Eng. 2026, in press. [Google Scholar] [CrossRef]
- Wang, G.; Chen, Y.; An, P.; Hong, H.; Hu, J.; Huang, T. UAV-YOLOv8: A Small-Object-Detection Model Based on Improved YOLOv8 for UAV Aerial Photography Scenarios. Sensors 2023, 23, 7190. [Google Scholar] [CrossRef] [PubMed]
- Li, X.; Zhang, Z.; Wang, J.; Liu, L.; Liu, P. Research on Wheat Spike Phenotype Extraction Based on YOLOv11 and Image Processing. Agriculture 2025, 15, 2295. [Google Scholar] [CrossRef]
- Ma, S.; Hui, Y.; Zhang, Y.; Wu, Y. A Lightweight and Sustainable UAV-Based Forest Fire Detection Algorithm Based on an Improved YOLO11 Model. Sustainability 2026, 18, 2436. [Google Scholar] [CrossRef]
- Yao, J.; Li, Y.; Xia, Z.; Nie, P.; Li, X.; Li, Z. WTAD-YOLO: A lightweight tomato leaf disease detection model based on YOLO11. Smart Agric. Technol. 2025, 12, 101349. [Google Scholar] [CrossRef]
- Zhao, P.; Qiang, G.; Fan, Y.; Du, Y.; Yang, J.; Tian, Z. YOLO11-FGA: Express Package Quality Detection Based on Improved YOLO11. Information 2025, 16, 1021. [Google Scholar] [CrossRef]
- Song, K.; Yan, Y. A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defects. Appl. Surf. Sci. 2013, 285, 858–864. [Google Scholar] [CrossRef]















| Parameters | YOLO-Series | RT-DETR-L | D-FINE-N |
|---|---|---|---|
| Image size | 640 × 640 | 640 × 640 | 640 × 640 |
| Epoch | 500 | 150 | 160 |
| Batch size | 32 | 4 | 8 |
| Learning rate | 0.02 | 0.0005 | 0.0008 |
| Weight decay | 0.0005 | 0.0001 | 0.0001 |
| Momentum/β1 | 0.937 | 0.937 | 0.9 |
| Optimizer | SGD | AdamW | AdamW |
| Class | Labeling Criteria |
|---|---|
| Metal loss | The region is labeled as metal loss when the signal curve shows a localized downward spike or a clear peak-valley mutation within a narrow range. This type of response usually spans approximately 1–2 channel widths. |
| Indentation | The region is labeled as indentation when the signal shows several continuous upward protrusions, with an overall response direction opposite to that of metal loss. This type of response usually spans more than two channel widths. |
| Blocked-tee | The region is labeled as a blocked tee when the signal shows a relatively wide elliptical or curved-wave response, with a downward-curving feature near the middle of the target region. |
| Exhaust valve | The region is labeled as an exhaust valve when the signal shows a downward peak with upward responses on both sides. The response range is relatively wide, usually spanning approximately 10–15 channel widths. |
| Patch | The region is labeled as a patch when the signal shows a relatively wide circular response region with a distinct downward spike inside. The response usually spans approximately 12–17 channel widths. |
| Valve | The region is labeled as a valve when a large rectangular or wide-range structural response appears in the image. The central region shows a clear structural response, with weld-related or regular vertical fluctuation features. The continuous and symmetric weld region is mainly used for labeling and is confirmed according to the recorded valve mileage position. |
| Tee | The region is labeled as a tee according to the local structural waveform variation caused by the branch connection and the symmetric weld structures on both sides. |
| Class | Original | After AutoAugment | |||
|---|---|---|---|---|---|
| Images | Boxes | Train | Val | Test | |
| Metal loss | 162 | 199 | 111 | 35 | 16 |
| Indentation | 45 | 49 | 128 | 40 | 18 |
| Blocked-tee | 16 | 37 | 92 | 22 | 12 |
| Exhaust valve | 17 | 21 | 82 | 20 | 10 |
| Patch | 20 | 28 | 95 | 20 | 14 |
| Valve | 50 | 50 | 105 | 30 | 14 |
| Tee | 38 | 47 | 140 | 30 | 18 |
| Total | 348 | 431 | 753 | 197 | 102 |
| Models | P/% | mAP@50/% | mAP@50:95/% | FLOPs/G | Params/M |
|---|---|---|---|---|---|
| Baseline | 89.9 | 90.7 | 61.7 | 6.3 | 2.583 |
| + C3k2-DAttention | 89.5 | 93.9 | 63.2 | 6.3 | 2.618 |
| + SPPF-LSKA | 91.6 | 91.7 | 62.2 | 6.5 | 2.856 |
| + Context-Guided FPN | 89.2 | 91.3 | 62.5 | 6.5 | 2.739 |
| + SEAM | 91.2 | 90.3 | 62.2 | 5.8 | 2.491 |
| + C3k2-DAttention + SPPF-LSKA | 92.6 | 91.4 | 63.1 | 6.7 | 2.889 |
| + C3k2-DAttention + Context-Guided FPN | 91.5 | 92.6 | 61.7 | 6.5 | 2.774 |
| + C3k2-DAttention + SEAM | 90.7 | 90.9 | 61.8 | 6.6 | 2.782 |
| + C3k2-DAttention + SPPF-LSKA + Context-Guided FPN | 92.8 | 93.7 | 63.1 | 6.9 | 3.055 |
| DLCS-YOLO | 93.0 | 94.5 | 64.7 | 6.2 | 2.955 |
| Models | P/% | R/% | F1/% | mAP@50/% | mAP@50:95/% | FLOPs/G | Params/M |
|---|---|---|---|---|---|---|---|
| YOLOv5n | 92.4 ± 0.5 | 85.8 ± 0.3 | 89.0 ± 0.2 | 91.2 ± 0.4 | 60.4 ± 0.5 | 5.8 | 2.183 |
| YOLOv8n | 87.6 ± 0.5 | 89.9 ± 0.3 | 88.7 ± 0.4 | 90.4 ± 0.3 | 61.7 ± 0.1 | 6.8 | 2.685 |
| YOLOv10n | 89.5 ± 0.2 | 84.3 ± 0.3 | 86.8 ± 0.2 | 88.6 ± 0.2 | 60.6 ± 0.1 | 8.2 | 2.697 |
| YOLOv11n | 89.9 ± 0.4 | 88.7 ± 0.2 | 89.3 ± 0.3 | 90.7 ± 0.2 | 61.7 ± 0.3 | 6.3 | 2.583 |
| YOLOv12n | 87.0 ± 0.1 | 84.0 ± 0.2 | 85.5 ± 0.1 | 86.5 ± 0.3 | 58.3 ± 0.2 | 6.8 | 2.509 |
| YOLOv13n | 85.3 ± 0.2 | 86.6 ± 0.4 | 85.9 ± 0.1 | 87.7 ± 0.2 | 62.2 ± 0.3 | 6.2 | 2.449 |
| DLCS-YOLO | 93.0 ± 0.2 | 90.1 ± 0.3 | 91.5 ± 0.2 | 94.5 ± 0.3 | 64.7 ± 0.1 | 6.2 | 2.955 |
| Models | P/% | R/% | F1/% | mAP@50/% | mAP@50:95/% | FLOPs/G | Params/M |
|---|---|---|---|---|---|---|---|
| FT-YOLOv11 [26] | 83.4 ± 0.2 | 82.2 ± 0.2 | 82.8 ± 0.1 | 82.6 ± 0.3 | 54.1 ± 0.5 | 7.9 | 2.556 |
| AHE-YOLO [27] | 92.1 ± 0.3 | 87.6 ± 0.2 | 89.8 ± 0.3 | 92.3 ± 0.1 | 60.1 ± 0.3 | 4.6 | 3.512 |
| WTAD-YOLO [28] | 91.0 ± 0.3 | 88.7 ± 0.1 | 89.9 ± 0.1 | 91.6 ± 0.2 | 62.9 ± 0.1 | 6.3 | 2.321 |
| YOLO11-FGA [29] | 89.7 ± 0.4 | 88.6 ± 0.3 | 89.1 ± 0.4 | 91.5 ± 0.3 | 61.8 ± 0.4 | 8.7 | 3.714 |
| D-FINE-N | 92.7 ± 0.1 | 89.6 ± 0.4 | 91.1 ± 0.3 | 93.9 ± 0.3 | 63.7 ± 0.3 | 7.1 | 3.725 |
| RT-DETR-L | 92.2 ± 0.5 | 89.5 ± 0.5 | 90.9 ± 0.4 | 93.2 ± 0.2 | 63.9 ± 0.2 | 103.5 | 31.998 |
| DLCS-YOLO | 93.0 ± 0.2 | 90.1 ± 0.3 | 91.5 ± 0.2 | 94.5 ± 0.3 | 64.7 ± 0.1 | 6.2 | 2.955 |
| Class | YOLOv11n | DLCS-YOLO | ||||
|---|---|---|---|---|---|---|
| R/% | AP@50/% | AP@50:95/% | R/% | AP@50/% | AP@50:95/% | |
| Metal loss | 81.6 | 89.1 | 37.1 | 81.3 | 90.7 | 38.6 |
| Indentation | 85.0 | 81.3 | 33.3 | 92.8 | 91.0 | 43.8 |
| Blocked-tee | 96.4 | 99.5 | 81.0 | 97.1 | 98.7 | 78.5 |
| Exhaust valve | 75.0 | 86.9 | 60.6 | 78.8 | 95.3 | 68.3 |
| Patch | 89.3 | 81.1 | 52.3 | 90.9 | 89.1 | 60.3 |
| Valve | 100.0 | 99.5 | 94.9 | 98.1 | 99.2 | 95.2 |
| Tee | 93.3 | 97.7 | 72.9 | 92.0 | 97.2 | 68.3 |
| Models | P/% | mAP@50/% | mAP@50:95/% | FLOPs/G | Params/M |
|---|---|---|---|---|---|
| YOLOv5n | 77.1 | 77.2 | 44.4 | 5.8 | 2.183 |
| YOLOv8n | 72.3 | 77.5 | 44.7 | 6.8 | 2.685 |
| YOLOv10n | 72.0 | 76.7 | 44.0 | 8.2 | 2.697 |
| YOLOv11n | 66.2 | 76.0 | 44.1 | 6.3 | 2.583 |
| YOLOv12n | 70.9 | 75.7 | 44.6 | 6.8 | 2.509 |
| YOLOv13n | 65.3 | 73.1 | 41.8 | 6.2 | 2.449 |
| FT-YOLOv11 | 74.3 | 77.9 | 44.1 | 7.9 | 2.556 |
| AHE-YOLO | 66.6 | 76.2 | 43.1 | 4.6 | 3.512 |
| WTAD-YOLO | 77.7 | 77.6 | 44.0 | 6.3 | 2.321 |
| YOLO11-FGA | 77.0 | 75.3 | 42.7 | 8.7 | 3.714 |
| DLCS-YOLO | 71.2 | 76.7 | 46.0 | 6.2 | 2.955 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wang, Y.; Li, R.; Fu, K.; Ma, T.; Huang, J.; Duan, J.; Wang, E.; Wang, Z. DLCS-YOLO Model for Detecting Defects in Long-Distance Oil and Gas Pipelines. Sensors 2026, 26, 4523. https://doi.org/10.3390/s26144523
Wang Y, Li R, Fu K, Ma T, Huang J, Duan J, Wang E, Wang Z. DLCS-YOLO Model for Detecting Defects in Long-Distance Oil and Gas Pipelines. Sensors. 2026; 26(14):4523. https://doi.org/10.3390/s26144523
Chicago/Turabian StyleWang, Yanan, Rui Li, Kuan Fu, Tao Ma, Jie Huang, Jinyao Duan, Enpeng Wang, and Ziyang Wang. 2026. "DLCS-YOLO Model for Detecting Defects in Long-Distance Oil and Gas Pipelines" Sensors 26, no. 14: 4523. https://doi.org/10.3390/s26144523
APA StyleWang, Y., Li, R., Fu, K., Ma, T., Huang, J., Duan, J., Wang, E., & Wang, Z. (2026). DLCS-YOLO Model for Detecting Defects in Long-Distance Oil and Gas Pipelines. Sensors, 26(14), 4523. https://doi.org/10.3390/s26144523

