Surface Defect Detection of Copper Tube Based on YOLOX with Convolutional Block Attention and Adaptive Spatial Feature Fusion
Abstract
1. Introduction
2. CBA-ASFF-YOLOX
2.1. YOLOX
2.2. CBA-ASFF-YOLOX Network Structure
2.3. Focal Loss Function
2.4. Optimized IoU Loss Function
3. Experimental Results and Analysis
3.1. Data Set
3.2. Evaluation Indexes
3.3. Ablation Experiments
3.4. Analysis of Experimental Results
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Jodhani, J.; Handa, A.; Gauta, A. Ultrasonic non-destructive evaluation of composites: A review. Mater. Today Proc. 2023, 78, 627–632. [Google Scholar] [CrossRef] [Scilit]
- Darmon, M. Special Issue on Ultrasonic Modeling for Non-Destructive Testing. Appl. Sci. 2024, 14, 2008. [Google Scholar] [CrossRef] [Scilit]
- Saddoud, R.; Sergeeva, N.; Darmon, M. Eddy Current Sensors Optimization for Defect Detection in Parts Fabricated by Laser Powder Bed Fusion. Sensors 2023, 23, 4336. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Palma, D.; Ross, B.; Font, P. Deep convolutional neural network for weld defect classification in radiographic images. Heliyon 2024, 10, e30590. [Google Scholar] [CrossRef] [Scilit]
- Ou, Y.; Xu, T.; Fan, J. Vision-based quality evaluation method towards automated penetrant testing. NDT E Int. 2025, 153, 103334. [Google Scholar] [CrossRef] [Scilit]
- Zuo, X.; Zhao, N.; Wang, K.; Hu, J. MDEB-YOLO: A Lightweight Multi-Scale Attention Network for Micro-Defect Detection on Printed Circuit Boards. Micromachines 2026, 17, 192. [Google Scholar]
- Hu, Y.; Chen, N.; Zhang, H.; Hou, Y.; Liu, P. RoadDiffBox: Automatic Road Distress Diagnosis through Controlled Image Generation and Semi-Supervised Learning. Research 2025, 8, 0833. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Y.; Fan, R.; Chen, J.; Shi, Y.; Cai, G. RA-RCNN: A Physical-Feature-Aware Adaptive Detection Network for Multi-Scale Rail Surface Defects. Appl. Sci. 2026, 16, 4970. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Pan, D.; Liu, J.; Jiang, Z. A novel MAS-GAN-based data synthesis method for object surface defect detection. Neurocomputing 2022, 499, 106–114. [Google Scholar]
- Versini, E.; Snidaro, L.; Liani, A. SCL—Segmentation–classification combined loss for surface defect detection. Expert Syst. Appl. 2022, 198, 116710. [Google Scholar]
- Lian, J.; Jia, W.; Zareapoor, M.; Zheng, Y.; Luo, R.; Jain, D.K.; Kumar, N. Deep-learning-based small surface defect detection via an exaggerated local variation-based generative adversarial network. IEEE Trans. Ind. Inform. 2019, 16, 1343–1351. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Yang, Y.; Geng, R.; Chang, Y.; Jiang, Y.; Wu, K.; Lu, J. YOLOv11-LLR: An Enhanced Framework for Steel Surface Defect Detection in Industrial Settings. Appl. Sci. 2026, 16, 4609. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Zhang, Z.; Chen, Y.; Wu, T.; Zhong, H.; Wang, Y. Application advance and prospect of nondestructive testing technology for industrial casting defects. Acta Autom. Sin. 2022, 48, 935–956. [Google Scholar]
- Božič, J.; Tabernik, D.; Skočaj, D. Mixed supervision for surface-defect detection: From weakly to fully supervised learning. Comput. Ind. 2021, 129, 103459. [Google Scholar] [CrossRef] [Scilit]
- Li, Y.; Wang, S.; Jing, Z.; Zheng, J.; Han, X.; Zheng, X.; Sun, F. DSRF: Few-shot PCB surface defect detection via dynamic selective regulation fusion. J. Supercomput. 2025, 81, 529. [Google Scholar] [CrossRef] [Scilit]
- Mao, H.; Ren, J.; Tang, Y.; Chen, Y.; Yi, X.; Huang, Z.; Li, X. Detection of weld defects using ultrasonic-guided waves based on matching pursuit and density peak clustering. Trans. Inst. Meas. Control. 2023, 45, 1470–1483. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.; Zhang, J.; Tian, Y.; Chen, H.; Sun, H.; Liu, K. A simple guidance template-based defect detection method for strip steel surfaces. IEEE Trans. Ind. Inform. 2019, 15, 2798–2809. [Google Scholar] [CrossRef] [Scilit]
- Yoshimura, H.H.Y. Specular surface detection with deep static specular flow and highlight. Mach. Vis. Appl. 2024, 35, 126. [Google Scholar] [CrossRef] [Scilit]
- Zhang, J.; Su, H.; Zou, W.; Gong, X.; Zhang, Z.; Shen, F. CADN: A weakly supervised learning-based category-aware object detection network for surface defect detection. Pattern Recognit. 2021, 109, 107571. [Google Scholar] [CrossRef] [Scilit]
- Xie, S.; Xie, Y.; Ying, H.; Jiang, Z.; Gui, W. Neurofuzzy-based plant-wide hierarchical coordinating optimization and control: An application to zinc hydrometallurgy plant. IEEE Trans. Ind. Electron. 2020, 67, 2207–2219. [Google Scholar] [CrossRef] [Scilit]
- Fu, G.; Peize, S.; Zhu, W.; Yang, J.; Cao, Y.; Yang, M.; Cao, Y. A deep-learning-based approach for fast and robust steel surface defects classification. Opt. Lasers Eng. 2019, 121, 397–405. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Lu, Z.; Chen, X.; Lu, S.; Yao, L. Masked contrastive generative adversarial network for defect detection of yarn-dyed fabric. J. Supercomput. 2025, 81, 239. [Google Scholar] [CrossRef] [Scilit]
- Xu, D.; Cao, B. Adaptive Multiobjective Evolutionary Generative Adversarial Network for Metaverse Network Intrusion Detection. Research 2025, 8, 0665. [Google Scholar] [CrossRef] [Scilit]
- He, Y.; Song, K.; Meng, Q.; Yan, Y. An end-to-end steel surface defect detection approach via fusing multiple hierarchical features. IEEE Trans. Instrum. Meas. 2020, 69, 1493–1504. [Google Scholar] [CrossRef] [Scilit]
- Li, W.; Ye, X.; Zhao, Y.; Wang, W. Strip steel surface defect detection based on improved YOLOv3 Algorithm. Acta Electron. Sin. 2020, 48, 1284–1292. [Google Scholar]
- Liu, L.; Feng, X.; Li, F.; Xian, Q.; Chen, Z.; Jia, Z. Surface defect detection of industrial components based on improved YOLOV5s. IEEE Sens. J. 2024, 24, 23940–23950. [Google Scholar] [CrossRef] [Scilit]
- Chao, C.; Mu, X.; Guo, Z.; Sun, Y.; Tian, X.; Yong, F. IAMF-YOLO: Metal surface defect detection based on improved YOLOv8. IEEE Trans. Instrum. Meas. 2025, 74, 5016817. [Google Scholar] [CrossRef] [Scilit]
- Redmon, J.; Divvala, S.; Girshick, R.B.; Farhadi, A. You Only Look Once: Unified, real-time object detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLO9000: Better, Faster, Stronger. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 6517–6525. [Google Scholar]
- Xie, Y.; Hu, W.; Xie, S.; He, L. Surface defect detection algorithm based on feature-enhanced YOLO. Cogn. Comput. 2023, 15, 565–579. [Google Scholar] [CrossRef] [Scilit]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. YOLOX: Exceeding YOLO Series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar] [CrossRef] [Scilit]
- Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.-S. CBAM: Convolutional block attention module. In European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; Springer International Publishing: Cham, Switzerland, 2018. [Google Scholar]
- Lin, T.-Y.; Goyal, P.; Girshick, R.B.; He, K.; Dollár, P. Focal loss for dense object detection. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 42, 318–327. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zheng, Z.; Wang, P.; Liu, W.; Li, J.; Ye, R.; Ren, D. Distance-IoU Loss: Faster and better learning for bounding box regression. arXiv 2020, arXiv:1911.08287. [Google Scholar] [CrossRef] [Scilit]
- Gevorgyan, Z. SIoU Loss: More Powerful Learning for Bounding Box Regression. arXiv 2022, arXiv:2205.12740. [Google Scholar] [CrossRef] [Scilit]
- Ren, S.; He, K.; Girshick, R.B.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 39, 1137–1149. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.E.; Fu, C.-Y.; Berg, A. SSD: Single shot multibox detector. In European Conference on Computer Vision (ECCV), Amsterdam, The Netherlands, 11–14 October 2016; Springer International Publishing: Cham, Switzerland, 2016. [Google Scholar]
- Liao, Z.; Zhao, Y.; Shan, X.; Yan, Y.; Liu, C.; Lu, L.; Ji, X.; Chen, J. RT-DETRv4: Painlessly Furthering Real-Time Object Detection with Vision Foundation Models. arXiv 2025, arXiv:2510.25257. [Google Scholar]
- Song, B.; Zhao, S.; Wang, Z.; Chen, J.; Liu, W.; Liu, X. LW-DETR: A lightweight transformer-based object detection algorithm for efficient railway crossing surveillance. Complex Intell. Syst. 2025, 11, 480. [Google Scholar] [CrossRef] [Scilit]
- Qin, D.; Leichner, C.; Delakis, M.; Fornoni, M.; Luo, S.; Yang, F.; Wang, W.; Banbury, C.; Ye, C.; Akin, B.; et al. MobileNetV4: Universal models for the mobile ecosystem. In European Conference on Computer Vision, Milan, Italy, 29 September–4 October 2024; Springer Nature: Cham, Switzerland, 2024; pp. 78–96. [Google Scholar]











| Model | Params (M) | FLOPs (G) | mAP0.5 (%) | mAP0.5:0.95 (%) |
|---|---|---|---|---|
| YOLOX (Darknet53) | 8.73 | 12.4 | 70.5 | 36.3 |
| YOLOX | ||||
| +CSPDarknet53 | 9.05 | 12.7 | 71.0 | 36.6 |
| +CBA module | 9.15 | 12.8 | 71.8 | 36.7 |
| +ASFF | 11.34 | 16.1 | 75.6 | 37.2 |
| +FocalLoss | 11.34 | 16.1 | 77.1 | 38.3 |
| +SIoU | 11.34 | 16.1 | 77.8 | 38.6 |
| Model | IoU | mAP0.5 | mAP0.5:0.95 |
|---|---|---|---|
| YOLOX | CE | 70.5 | 36.3 |
| Focal Loss | 74.8 | 36.8 | |
| CBA-ASFF-YOLOX | CE | 75.6 | 37.2 |
| Focal Loss | 77.1 | 38.3 |
| Model | IoU | mAP0.5 | mAP0.5:0.95 |
|---|---|---|---|
| YOLOX | IoU | 70.5 | 36.3 |
| CIoU | 70.9 | 36.5 | |
| SIoU | 71.2 | 36.6 | |
| CBA-ASFF-YOLOX | IoU | 75.6 | 37.2 |
| CIoU | 75.9 | 37.4 | |
| SIoU | 78.0 | 38.6 |
| Model | IoU Threshold | mAP0.5 |
|---|---|---|
| CBA-ASFF-YOLOX | 0.35 | 78.01 |
| 0.45 | 78.24 | |
| 0.55 | 77.80 | |
| 0.65 | 76.92 |
| Model | Minimum Number of Feature Points | mAP0.5 |
|---|---|---|
| CBA-ASFF-YOLOX | 7 | 72.67 |
| 10 | 78.24 | |
| 12 | 78.94 | |
| 15 | 79.03 | |
| 18 | 76.50 |
| Model | BS | FaW | FlW | UE | mAP0.5 | mAP0.5:0.95 | FPS |
|---|---|---|---|---|---|---|---|
| Faster RCNN [36] | 59.8 | 49.9 | 78.6 | 58.9 | 61.8 | 30.7 | 7 |
| SSD [37] | 40.1 | 31.4 | 87.8 | 18.5 | 44.4 | 21.0 | 10 |
| YOLOv5 [30] | 65.6 | 57.7 | 87.9 | 56.9 | 67.1 | 33.2 | 18 |
| YOLOX [31] | 65.9 | 56.0 | 94.5 | 65.7 | 70.5 | 36.3 | 21 |
| RT-DETRv4 [38] | 69.7 | 66.2 | 93.5 | 72.9 | 74.7 | 36.7 | 22 |
| LW-DETR [39] | 71.5 | 65.1 | 95.2 | 74.8 | 78.2 | 37.5 | 20 |
| MobileNetV4-based defect detection method [40] | 70.8 | 62.3 | 92.3 | 70.8 | 75.4 | 37.1 | 32 |
| CBA-ASFF-YOLOX | 75.1 | 69.2 | 92.3 | 76.5 | 79.0 | 38.6 | 26 |
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
He, J.; Wang, J. Surface Defect Detection of Copper Tube Based on YOLOX with Convolutional Block Attention and Adaptive Spatial Feature Fusion. Appl. Sci. 2026, 16, 5155. https://doi.org/10.3390/app16105155
He J, Wang J. Surface Defect Detection of Copper Tube Based on YOLOX with Convolutional Block Attention and Adaptive Spatial Feature Fusion. Applied Sciences. 2026; 16(10):5155. https://doi.org/10.3390/app16105155
Chicago/Turabian StyleHe, Jianjun, and Ji Wang. 2026. "Surface Defect Detection of Copper Tube Based on YOLOX with Convolutional Block Attention and Adaptive Spatial Feature Fusion" Applied Sciences 16, no. 10: 5155. https://doi.org/10.3390/app16105155
APA StyleHe, J., & Wang, J. (2026). Surface Defect Detection of Copper Tube Based on YOLOX with Convolutional Block Attention and Adaptive Spatial Feature Fusion. Applied Sciences, 16(10), 5155. https://doi.org/10.3390/app16105155

