Skip to main content
Log in

X-ray weld defect detection based on AF-RCNN

Welding in the World Aims and scope Submit manuscript

Cite this article


For X-ray weld defect detection, this paper proposes AF-RCNN object detection framework with the application of attention mechanism because defect images have too many small defects, and feature information of small defects are more likely to be missing during the convolution. First of all, the original weld images were cut and classified, and the images were labeled in the format of PASCAL VOC dataset to build a new weld dataset for object detection. Secondly, residual network (ResNet) was combined with feature pyramid network (FPN) as the backbone, and efficient convolutional attention module (ECAM) was applied to adaptively detail the interested target feature. Finally, CIoU loss function was introduced to increase the accuracy of anchor positioning in the regression of bounding box. The experiment results show that, comparing with traditional Faster-RCNN and SSD, AF-RCNN significantly improves in weld defects detection and classification.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others


  1. Hou W, Zhang D, Wei Y et al (2020) Review on computer aided weld defect detection from radiography images[J]. Appl Sci 10(5):1878.

    Article  CAS  Google Scholar 

  2. Fan Ding, Hu Ande, Huang Jiankang, Xu Zhenya, Xu Xu (2020) Defect recognition method of X-ray image of pipe weld based on improved convolution neural network[J]. Trans China Weld Inst 41(01):7-11+97 CNKI:SUN:HJXB.0.2020-01-002

  3. Mery D, Arteta C (2017) Automatic defect recognition in x-ray testing using computer vision. In: 2017 IEEE winter conference on applications of computer vision (WACV). IEEE, pp. 1026–1035.

  4. Cheng Y, Chen S, Xiao J et al (2021) Dynamic estimation of joint penetration by deep learning from weld pool image[J]. Sci Technol Weld Join 26(4):279–285.

    Article  Google Scholar 

  5. Li C, Wang Q, Jiao W, et al. (2020) Deep learning-based detection of penetration from weld pool reflection images[J]. Weld J 99(9):239S–245S

  6. Sundaram M, Jose J P, Jaffino G (2015) Welding defects extraction for radiographic images using C-means segmentation method[C]//International Conference on Communication and Network Technologies. IEEE 79–83

  7. Ajmi C, Zapata J, Elferchichi S et al (2020) Deep learning technology for weld defects classification based on transfer learning and activation features[J]. Adv Mater Sci Eng 2020(1):1–16.

    Article  Google Scholar 

  8. Khumaidi A, Yuniarno EM, Purnomo MH (2017) Welding defect classification based on convolution neural network (CNN) and Gaussian kernel. In: 2017 international seminar on intelligent technology and its applications (ISITIA). IEEE, pp. 261–265.

  9. Ajmi C, El Ferchichi S, Laabidi K (2018) New procedure for weld defect detection based-gabor filter. In: 2018 International Conference on Advanced Systems and Electric Technologies (IC_ASET). IEEE, pp. 11–16.

  10. Zhang H, Chen Z, Zhang C, Xi J, Le X (2019) Weld defect detection based on deep learning method. In: 2019 IEEE 15th international conference on automation science and engineering (CASE). IEEE, pp. 1574–1579.

  11. Liu Mengxi, Ju Yongfeng, Gao Weixin, et al. (2018) Research on X-ray weld defects detection by deep CNN[J]. Transducer Microsyst Technol 37(05):37–39

  12. Liu H, Guo R (2018) Defect detection and recognition of petroleum steel pipe welds based on X-ray image and convolutional neural network [J]. Chin J Sci Instrum 39(4):247–256

  13. Liong ST, Gan YS, Huang YC, et al. (2019) Integrated neural network and machine vision approach for leather defect classification[J]. arXiv preprint arXiv:1905.11731. arxiv-1905.11731

  14. Zhang Z, Wen G, Chen S (2019) Weld image deep learning-based on-line defects detection using convolutional neural networks for Al alloy in robotic arc welding. J Manuf Process 45:208–216.

    Article  Google Scholar 

  15. Liu M, Xie J, Hao J et al (2022) A lightweight and accurate recognition framework for signs of X-ray weld images[J]. Comput Ind 135:103559.

    Article  Google Scholar 

  16. Jiang H, Hu Q, Zhi Z et al (2021) Convolution neural network model with improved pooling strategy and feature selection for weld defect recognition[J]. Weld World 65(4):731–744.

    Article  Google Scholar 

  17. Hou W, Wei Y, Jin Y et al (2019) Unbalanced weld flaw types[J]. ]. Deep features based on a DCNN model for classifying. Measurement 131:482–489.

    Article  Google Scholar 

  18. Ren S, He K, Girshick R, et al. (2015) Faster r-cnn: towards real-time object detection with region proposal networks[J]. arXiv preprint arXiv:1506.01497

  19. Redmon J, Divvala S, Girshick R, Farhadi A (2016) You only look once: unified, real-time object detection. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 779–788.

  20. Liu W, Anguelov D, Erhan D, et al. (2016) Ssd: Single shot multibox detector[C]//European conference on computer vision. Springer, Cham, 21–37

  21. Cai Z, Vasconcelos N (2018) Cascade R-CNN: delving into high quality object detection. IEEE/CVF Conf Comput Vis Pattern Recognit 2018:6154–6162.

    Article  Google Scholar 

  22. Li Y, Chen Y, Wang N, Zhang Z (2019) Scale-aware trident networks for object detection. IEEE/CVF Int Conf Comput Vis (ICCV) 2019:6053–6062.

    Article  Google Scholar 

  23. Zhang H, Chang H, Ma B, Wang N, Chen X (2020) Dynamic R-CNN: towards high quality object detection via dynamic training. In: Vedaldi A., Bischof H., Brox T., Frahm JM. (eds) Computer Vision – ECCV 2020. ECCV 2020. Lecture Notes in Computer Science, vol 12360. Springer, Cham

  24. Simonyan K, Zisserman A (2014) Very deep convolutional networks for large-scale image recognition[J]. arXiv preprint arXiv:1409.1556 arXiv:1409.1556

  25. Sandler M, Howard A, Zhu M, Zhmoginov A, Chen LC (2018) Mobilenetv2: inverted residuals and linear bottlenecks. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4510–4520.

  26. Hu J, Shen L, Sun G (2018) Squeeze-and-excitation networks[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 7132–7141

  27. Woo S, Park J, Lee J, Kweon I (2018) CBAM: convolutional block attention module. ECCV.

    Article  Google Scholar 

  28. He K, Zhang X, Ren S, et al. (2016) Deep residual learning for image recognition[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 770–778 arxiv-1512.03385

  29. Jang J, Van D, Jang H et al (2020) Residual neural network-based fully convolutional network for microstructure segmentation[J]. Sci Technol Weld Join 25(4):282–289.

    Article  CAS  Google Scholar 

  30. Gong Y, Yu X, Ding Y, Peng X, Zhao J, Han Z (2021) Effective fusion factor in FPN for tiny object detection. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 1160–1168.

  31. Yu J, Jiang Y, Wang Z, Cao Z, Huang T (2016) Unitbox: an advanced object detection network. In: Proceedings of the 24th ACM international conference on Multimedia, pp. 516–520.

  32. Zheng Z, Wang P, Liu W, Li J, Ye R, Ren D (2020) Distance-IoU Loss: faster and better learning for bounding box regression. Proc AAAI Conf Artif Intell 34(07):12993–13000.

    Article  Google Scholar 

  33. Wang B, Hu SJ, Sun L, et al. (2020) Intelligent welding system technologies: state-of-the-art review and perspectives[J]. J Manuf Syst 56

  34. Zaidi SSA, Ansari MS, Aslam A, Kanwal N, Asghar M, Lee B (2022). A survey of modern deep learning based object detection models. Digital Signal Processing, 103514.

  35. Wan S, Goudos S (2020) Faster R-CNN for multi-class fruit detection using a robotic vision system[J]. Comput Netw 168:107036.

    Article  Google Scholar 

Download references


This study was supported in part by the National Natural Science Foundation of China under Grant 62073118; Central government guides local technology development funds under Grant 206Z1701G; Natural Science Foundation of Hebei Province under Grant F2019202305.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Weipeng Liu.

Ethics declarations

Conflict of interest

The authors declare no competing interests.

Additional information

Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Recommended for publication by Commission V - NDT and Quality Assurance of Welded Products

Rights and permissions

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Liu, W., Shan, S., Chen, H. et al. X-ray weld defect detection based on AF-RCNN. Weld World 66, 1165–1177 (2022).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: