A Noise-Robust Deep-Learning Framework for Weld-Defect Detection in Magnetic Flux Leakage Systems
Abstract
:1. Introduction
- We analyze the impact of various noise patterns on existing models, revealing their susceptibility to degradation and underscoring the need for enhanced noise robustness across diverse environments.
- We introduce a noise-robust framework that effectively handles both static and dynamic noise, leveraging an encoder–decoder architecture with a specialized denoising block to learn noise-invariant feature representations.
- Extensive experiments validate the effectiveness of our approach, showing consistent performance gains across different noise conditions.
2. MFL Inspection System and Data Acquisition
2.1. Principle of MFL in Pipeline Inspection
- Axial component (along the direction of pipeline movement).
- Radial component (perpendicular to the pipe wall) to capture flux leakage intensity.
- Circumferential component (along the pipeline’s circumference), which is equipped with uniformly distributed Hall sensors.
2.2. MFL Inspection System
2.3. Data Processing
2.4. Problem Statement
3. Methodology
3.1. Preliminary
3.1.1. Vision Transformer (ViT)
- Image Patch Embedding. An input image is divided into N non-overlapping patches , where each patch has a resolution of . These patches are flattened into 1D vectors and linearly projected to a D-dimensional embedding space via a trainable matrix .
- Positional Encoding. To retain spatial information, learnable positional embeddings are added to the patch embeddings. An additional [CLS] token is prepended to the sequence to aggregate global features for classification.
- Transformer Encoder. The resulting sequence is fed into a standard transformer encoder comprising L layers. Each layer consists of multi-head self-attention and a feed-forward network (FFN), with layer normalization and residual connections applied to stabilize training. The self-attention mechanism enables global interactions between patches, overcoming the limited receptive fields of CNNs.
3.1.2. YOLOS
3.2. Overview
3.3. Embedding Layer
3.4. Transformer Encoder
3.5. Denoising Block
3.6. Noise-Invariant Representation Learning and Object Detection
4. Experiments
4.1. Experimental Setup
4.1.1. Datasets
- MFL dataset: The MFL data originate from a pipeline platform in a factory in northern China and includes both artificial and natural corrosion defects. The training data are collected from a pipeline with a diameter of 12 inches, a length of 100 m, and a wall thickness of 12.7 mm. The test data come from a pipeline with a diameter of 16 inches, a length of 200 m, and a wall thickness of 12.7 mm. The pre-processing pipeline can be divided into four steps: data baseline correction, abnormal data determination and correction, inter-lobe data interpolation of sensors, and data filtering. Then, we converted the collected data into pseudo-color images in four steps: grayscale mapping, smoothing, sharpening, and pseudo-colorization. After converting the collected data into pseudo-color images, we obtain a total of 1405 samples, which then are divided into 70% training set, 15% validation set, and 15% test set. Finally, we add Gaussian noise to the images and convert the images and labels into YOLO format.
- NEU-DET dataset (http://faculty.neu.edu.cn/songkechen/zh_CN/zdylm/263270/list/index.htm, accessed on 18 December 2024): This dataset is a widely used benchmark for surface defect detection in industrial settings. It contains 1800 grayscale images with a 200 × 200 pixel resolution, covering six common types of defects found in hot-rolled steel strips: crazing, inclusion, patches, pitted surface, rolled-in scale, and scratches. Each defect type has 300 images, all captured under consistent conditions to ensure dataset reliability. The dataset is primarily used for tasks such as defect classification, object detection, and segmentation in the field of industrial quality inspection.
4.1.2. Comparison Methods
- Mask R-CNN [34] is a two-stage model for instance segmentation by adding a mask prediction branch, enabling precise object detection and segmentation.
- YOLOv7 [35] is an advanced object-detection model designed to perform real-time object detection with high precision.
- DETR [33] is a transformer-based object-detection mode, which formulates object detection as a direct set prediction problem, eliminating the need for region proposals and post-processing.
- YOLOS [32] a modified vision transformer framework designed to extend ViT capabilities from image classification to object detection.
- DWWA-Net [24] introduces wavelet transform and convolution networks to dynamically filter static noise and improve model convergence for defect detection.
4.1.3. Synthetic Noise in Defect Detection
- is the noise at time step t,
- is a controlling factor of Gaussian noise,
- is independent Gaussian noise,
- determines the amplitude of the sinusoidal noise,
- is the angular frequency of the sinusoidal interference.
4.1.4. Implementation Details
4.2. Results
4.2.1. Performance Without Noise
4.2.2. Performance Under Static Noise
4.2.3. Performance Under Dynamic Noise
4.2.4. Ablation Study
4.2.5. Visualization
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Biezma, M.; Andrés, M.; Agudo, D.; Briz, E. Most fatal oil & gas pipeline accidents through history: A lessons learned approach. Eng. Fail. Anal. 2020, 110, 104446. [Google Scholar]
- Shi, Y.; Zhang, C.; Li, R.; Cai, M.; Jia, G. Theory and application of magnetic flux leakage pipeline detection. Sensors 2015, 15, 31036–31055. [Google Scholar] [CrossRef]
- Feng, B.; Wu, J.; Tu, H.; Tang, J.; Kang, Y. A review of magnetic flux leakage nondestructive testing. Materials 2022, 15, 7362. [Google Scholar] [CrossRef] [PubMed]
- 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, S.; Wang, H.; Li, R. Attention module magnetic flux leakage linked deep residual network for pipeline in-line inspection. Sensors 2022, 22, 2230. [Google Scholar] [CrossRef]
- Yang, L.; Wang, Z.; Gao, S. Pipeline magnetic flux leakage image detection algorithm based on multiscale SSD network. IEEE Trans. Ind. Inform. 2019, 16, 501–509. [Google Scholar] [CrossRef]
- Yang, L.; Wang, Z.; Gao, S.; Shi, M.; Liu, B. Magnetic flux leakage image classification method for pipeline weld based on optimized convolution kernel. Neurocomputing 2019, 365, 229–238. [Google Scholar] [CrossRef]
- Liu, J.; Shen, X.; Wang, J.; Jiang, L.; Zhang, H. An intelligent defect detection approach based on cascade attention network under complex magnetic flux leakage signals. IEEE Trans. Ind. Electron. 2022, 70, 7417–7427. [Google Scholar] [CrossRef]
- Zhao, H.; Liu, J.; Tang, J.; Shen, X.; Lu, S.; Wang, Q. A MFL mechanism-based self-supervised method for defect detection with limited labeled samples. IEEE Trans. Instrum. Meas. 2022, 72, 1–10. [Google Scholar] [CrossRef]
- Shen, X.; Liu, J.; Jiang, L.; Liu, X.; Zhang, H. A Novel Weld Defect Detection Method for Intelligent Magnetic Flux Leakage Detection System via Contextual Relation Network. IEEE Trans. Ind. Electron. 2023, 71, 6304–6314. [Google Scholar] [CrossRef]
- Wang, L.; Zhang, H.; Liu, J.; Shen, X.; Zuo, F. Irregular Defect Size Estimation for the Magnetic Flux Leakage Detection System via Expertise-Informed Collaborative Network. IEEE Trans. Ind. Electron. 2024, 71, 13189–13200. [Google Scholar] [CrossRef]
- Zhao, H.; Liu, J.; Wang, Q.; Shen, X.; Jiang, L. A novel anomaly detection method for magnetic flux leakage signals via a feature-based unsupervised detection network. Comput. Ind. 2025, 164, 104190. [Google Scholar] [CrossRef]
- Liu, X.; Liu, J.; Wang, Z.; Wang, L.; Zhang, H. Basic-class and cross-class hybrid feature learning for class-imbalanced weld defect recognition. IEEE Trans. Ind. Inform. 2022, 19, 9436–9446. [Google Scholar] [CrossRef]
- Shen, X.; Liu, J.; Zhang, H.; Jiang, L.; Zhao, H.; Yang, H. A Novel Incremental Defect Detection Method via Elastic Heterogeneous Distillation Network. IEEE Trans. Autom. Sci. Eng. 2024, 22, 10149–10161. [Google Scholar] [CrossRef]
- Shen, X.; Liu, J.; Sun, J.; Jiang, L.; Zhao, H.; Zhang, H. SSCT-Net: A semisupervised circular teacher network for defect detection with limited labeled multiview MFL samples. IEEE Trans. Ind. Inform. 2023, 19, 10114–10124. [Google Scholar] [CrossRef]
- Wang, L.; Liu, J.; Zhang, H.; Zuo, F. KMSA-Net: A knowledge-mining-based semantic-aware network for cross-domain industrial process fault diagnosis. IEEE Trans. Ind. Inform. 2023, 20, 2738–2750. [Google Scholar] [CrossRef]
- Liu, J.; Li, H.; Zuo, F.; Zhao, Z.; Lu, S. Kd-lightnet: A lightweight network based on knowledge distillation for industrial defect detection. IEEE Trans. Instrum. Meas. 2023, 72, 1–13. [Google Scholar] [CrossRef]
- Mukherjee, S.; Huang, X.; Udpa, L.; Deng, Y. A kriging-based magnetic flux leakage method for fast defect detection in massive pipelines. J. Nondestruct. Eval. Diagn. Progn. Eng. Syst. 2022, 5, 011002. [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. early access. [Google Scholar] [CrossRef]
- Heo, C.G.; Kim, Y.C.; Bae, J.H.; Park, G.S. A Novel Magnetic Flux Leakage Sensor System for Inspecting Large Diameter Pipeline. J. Magn. 2022, 27, 100–105. [Google Scholar] [CrossRef]
- Cui, W.; Xiao, Z.; Feng, Z.; Yang, J.; Zhang, Q. A magnetic flux leakage detector for ferromagnetic pipeline welds with a magnetization direction perpendicular to the direction of travel. Sensors 2024, 24, 5158. [Google Scholar] [CrossRef] [PubMed]
- Zhang, O.; Wei, X. De-noising of magnetic flux leakage signals based on wavelet filtering method. Res. Nondestruct. Eval. 2019, 30, 269–286. [Google Scholar] [CrossRef]
- Wang, D.; Zhu, L.; Yue, J.; Lu, J.; Li, G. Denoising method of natural gas pipeline leakage signal based on empirical mode decomposition and improved Bhattacharyya distance. Eng. Res. Express 2021, 3, 035030. [Google Scholar] [CrossRef]
- Liu, J.; Zhao, H.; Chen, Z.; Wang, Q.; Shen, X.; Zhang, H. A dynamic weights-based wavelet attention neural network for defect detection. IEEE Trans. Neural Netw. Learn. Syst. 2023, 35, 16211–16221. [Google Scholar] [CrossRef] [PubMed]
- Zhang, W.; Li, C.; Peng, G.; Chen, Y.; Zhang, Z. A deep convolutional neural network with new training methods for bearing fault diagnosis under noisy environment and different working load. Mech. Syst. Signal Process. 2018, 100, 439–453. [Google Scholar] [CrossRef]
- Zhou, K.; Liu, Z.; Qiao, Y.; Xiang, T.; Loy, C.C. Domain generalization: A survey. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 45, 4396–4415. [Google Scholar] [CrossRef]
- Zhang, C.; Bengio, S.; Hardt, M.; Recht, B.; Vinyals, O. Understanding deep learning requires rethinking generalization. In Proceedings of the International Conference on Learning Representations, San Juan, Puerto Rico, 2–4 May 2016. [Google Scholar]
- Recht, B.; Roelofs, R.; Schmidt, L.; Shankar, V. Do imagenet classifiers generalize to imagenet? In Proceedings of the 36th International Conference on Machine Learning, Long Beach, CA, USA, 9–15 June 2019; pp. 5389–5400. [Google Scholar]
- Zhou, S.K.; Greenspan, H.; Davatzikos, C.; Duncan, J.S.; Van Ginneken, B.; Madabhushi, A.; Prince, J.L.; Rueckert, D.; Summers, R.M. A review of deep learning in medical imaging: Imaging traits, technology trends, case studies with progress highlights, and future promises. Proc. IEEE 2021, 109, 820–838. [Google Scholar] [CrossRef]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image is Worth 16 × 16 Words: Transformers for Image Recognition at Scale. In Proceedings of the International Conference on Learning Representations, Vienna, Austria, 3–7 May 2021. [Google Scholar]
- He, K.; Chen, X.; Xie, S.; Li, Y.; Dollár, P.; Girshick, R. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 16000–16009. [Google Scholar]
- Fang, Y.; Liao, B.; Wang, X.; Fang, J.; Qi, J.; Wu, R.; Niu, J.; Liu, W. You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection. In Proceedings of the Neural Information Processing Systems, Virtual, 6–14 December 2021. [Google Scholar]
- Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-end object detection with transformers. In Proceedings of the European Conference on Computer Vision; Springer: Cham, Switzerland, 2020; pp. 213–229. [Google Scholar]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2961–2969. [Google Scholar]
- Wang, C.Y.; Bochkovskiy, A.; Liao, H.Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 7464–7475. [Google Scholar]
- Goodfellow, I.; Bengio, Y.; Courville, A.; Bengio, Y. Deep Learning; MIT Press: Cambridge, MA, USA, 2016; Volume 1. [Google Scholar]
Method | mAP | mAP@0.5:0.95 | Crazing | Inclusion | Patches | Pitted Surface | Rolled in Scale | Scratches |
---|---|---|---|---|---|---|---|---|
Mask R-CNN | 69.5 | 32.2 | 35.5 | 76.9 | 88.7 | 79.2 | 55.9 | 80.6 |
YOLO v7 | 72.5 | 35.6 | 40.3 | 78.1 | 91.5 | 80.7 | 57.5 | 86.8 |
DETR-ResNet18 | 71.6 | 34.7 | 40.6 | 77.3 | 92.0 | 79.4 | 57.1 | 83.3 |
YOLOS | 74.3 | 38.6 | 41.1 | 79.2 | 91.5 | 82.0 | 62.7 | 89.4 |
DWWA-Net | 79.0 | 42.1 | 50.1 | 80.9 | 90.6 | 84.8 | 73.1 | 94.6 |
Ours | 81.2 | 45.4 | 51.6 | 81.3 | 92.4 | 85.8 | 78.2 | 96.7 |
Noise Level | Mask R-CNN | YOLOv7 | DETR | YOLOS | DWWA-Net | Ours | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | |
0 dB | 38.6 | 8.9 | 50.2 | 18.6 | 48.1 | 17.9 | 51.7 | 20.3 | 70.9 | 41.0 | 90.7 | 50.4 |
10 dB | 52.7 | 20.8 | 68.5 | 31.9 | 67.4 | 32.6 | 69.1 | 35.4 | 84.2 | 48.3 | 93.1 | 55.8 |
20 dB | 65.3 | 36.2 | 86.9 | 43.4 | 81.4 | 44.1 | 84.7 | 46.3 | 93.0 | 52.8 | 95.6 | 57.1 |
50 dB | 82.1 | 49.8 | 97.1 | 54.5 | 94.3 | 53.9 | 96.4 | 55.9 | 96.8 | 56.4 | 98.9 | 58.6 |
N/A | 97.9 | 53.4 | 97.7 | 55.5 | 97.5 | 56.9 | 97.3 | 58.1 | 98.4 | 58.6 | 99.2 | 59.9 |
Mask R-CNN | YOLOv7 | DETR | YOLOS | DWWA-Net | Ours | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | mAP | mAP@0.5:0.95 | ||
0.8 | 0.2 | 90.4 | 54.2 | 96.5 | 57.9 | 95.6 | 57.3 | 95.8 | 57.5 | 97.7 | 58.6 | 98.4 | 59.0 |
0.6 | 0.4 | 84.2 | 50.5 | 91.4 | 54.8 | 89.8 | 53.9 | 90.3 | 54.2 | 94.6 | 56.8 | 96.8 | 58.1 |
0.4 | 0.6 | 78.1 | 46.9 | 86.2 | 51.7 | 84.0 | 50.4 | 84.8 | 50.9 | 91.6 | 54.9 | 95.3 | 57.2 |
0.2 | 0.8 | 72.0 | 43.2 | 81.1 | 48.6 | 78.2 | 46.9 | 79.2 | 47.5 | 88.5 | 53.1 | 93.7 | 56.2 |
0.0 | 1.0 | 65.9 | 39.5 | 75.9 | 45.5 | 72.4 | 43.4 | 73.7 | 44.2 | 85.5 | 51.3 | 92.1 | 55.3 |
Denoising Block | Reconstruction Loss | Noise Augmentation | mAP | mAP@0.5:0.95 |
---|---|---|---|---|
✗ | ✗ | ✗ | 51.7 | 20.3 |
✓ | ✗ | ✗ | 58.6 | 23.8 |
✗ | ✓ | ✗ | 67.4 | 28.7 |
✗ | ✗ | ✓ | 66.3 | 28.9 |
✗ | ✓ | ✓ | 78.4 | 35.5 |
✓ | ✓ | ✓ | 90.7 | 50.4 |
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. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Yang, J.; Lu, S. A Noise-Robust Deep-Learning Framework for Weld-Defect Detection in Magnetic Flux Leakage Systems. Mathematics 2025, 13, 1382. https://doi.org/10.3390/math13091382
Yang J, Lu S. A Noise-Robust Deep-Learning Framework for Weld-Defect Detection in Magnetic Flux Leakage Systems. Mathematics. 2025; 13(9):1382. https://doi.org/10.3390/math13091382
Chicago/Turabian StyleYang, Junlin, and Senxiang Lu. 2025. "A Noise-Robust Deep-Learning Framework for Weld-Defect Detection in Magnetic Flux Leakage Systems" Mathematics 13, no. 9: 1382. https://doi.org/10.3390/math13091382
APA StyleYang, J., & Lu, S. (2025). A Noise-Robust Deep-Learning Framework for Weld-Defect Detection in Magnetic Flux Leakage Systems. Mathematics, 13(9), 1382. https://doi.org/10.3390/math13091382