Welding Seam Recognition and Trajectory Planning Based on Deep Learning in Electron Beam Welding
Abstract
1. Introduction
- Algorithmic Innovation for Challenging Environments: We propose a novel integration of the UFO-ViT attention mechanism into the YOLOv11-seg architecture.
- Enhanced Detection for Specific Weld Geometries: To address the challenge of accurately detecting weld seams with extreme aspect ratios (long and narrow), we introduce optimizations in the detection head, including increasing the reg_max parameter and adjusting the positive sample IoU threshold.
- A Hybrid “Coarse-to-Fine” Recognition Framework: We architect a robust two-stage framework that synergistically combines deep learning-based coarse segmentation (YOLOv11-seg) with traditional adaptive Canny edge detection.
- An End-to-End System Integration from Vision to Motion: Beyond visual recognition, this research implements a complete closed-loop workflow from image acquisition and seam recognition to physical coordinate transformation and automated G-code generation.
2. Algorithm Implementation and Key Technologies
2.1. The Overall Framework of the Algorithm
2.2. Improving the Coarse Positioning of Welds in YOLOv11-Seg
2.2.1. Add Attention Mechanism
2.2.2. Optimization of Loss Function
2.2.3. Optimization of Large Target Detection
2.2.4. Model Training and Validation Process
2.3. Fine Positioning of Weld Seam by Adaptive Canny
2.4. Physical Coordinate Transformation and Trajectory Fitting
3. Experimental Verification and Result Analysis
3.1. System Hardware Platform
3.2. Algorithm Experiment
3.2.1. Algorithm Experiment Settings
3.2.2. Evaluation Indicators
3.2.3. Comparative Tests
3.3. Experiment of Weld Track Generation
3.3.1. Comparative Experiments
3.3.2. Experiment of Weld Track Generation and Code Generation
4. Conclusions
- (1)
- A specialized weld image dataset for vacuum high-reflection environments was constructed, featuring algorithmic and hardware-level optimizations to effectively suppress metallic reflections, motion blur, and other high-dynamic interference.
- (2)
- A hybrid algorithm integrating YOLOv11-seg and adaptive Canny edge detection was proposed to achieve real-time robust weld seam recognition under computational constraints.
- (3)
- Through the integration design of an industrial camera and optical prism, the visual penetration and stable imaging of welding area in a vacuum environment are realized, which provides a high-quality input source for subsequent recognition.
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Liu, X.; Dong, Q.; Wang, P.; Chen, H. Review of Electron Beam Welding Technology in Space Environment. Optik 2020, 225, 165720. [Google Scholar] [CrossRef] [Scilit]
- Kozhechenko, S.A.; Sliva, P.A.; Maslov, N.A.; Shcherbakov, A.V.; Goncharov, A.L.; Rodyakina, R.V.; Dragunov, V.K. On Designing Control Systems for Electron-Beam Processing Plants. Russ. Electr. Eng. 2024, 95, 579–584. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y. Research on Electron Beam Welding System. Metall. Manag. 2022, 3, 73–75. [Google Scholar]
- Chu, Q.; Mao, Y.; Xie, H.; Ren, C.; Li, W.; Yang, X.; Fan, W. Review on microstructure and properties of joints welded by using high-energy beam. Xibei Gongye Daxue Xuebao/J. Northwestern Polytech. Univ. 2024, 42, 857–865. [Google Scholar] [CrossRef] [Scilit]
- Trigka, M.; Dritsas, E. A Comprehensive Survey of Machine Learning Techniques and Models for Object Detection. Sensors 2025, 25, 214. [Google Scholar] [CrossRef] [Scilit]
- Kumar, N.; Singh, P. Small and dim target detection in infrared imagery: A review, current techniques and future directions. Neurocomputing 2025, 630, 129640. [Google Scholar] [CrossRef] [Scilit]
- Wang, J.; Huang, L.; Yao, J.; Liu, M.; Du, Y.; Zhao, M.; Su, Y.; Lu, D. Weld Seam Tracking and Detection Robot Based on Artificial Intelligence Technology. Sensors 2023, 23, 6725. [Google Scholar] [CrossRef] [Scilit]
- Zhao, M.; Liu, X.; Wang, K.; Liu, Z.; Dong, Q.; Wang, P.; Su, Y. Welding Seam Tracking and Inspection Robot Based on Improved YOLOv8s-Seg Model. Sensors 2024, 24, 4690. [Google Scholar] [CrossRef] [Scilit]
- Yong, W. Research on the Automatic Detection System of Nuclear Element Defect Based on YOLOv8. Master’s Thesis, Inner Mongolia University of Science and Technology, Baotou, China, 2025. [Google Scholar] [CrossRef]
- Huang, C.; Ye, A.; Yi, H.; Zneg, H.; Peng, Y. Weld seam recognition of underwater robots in nuclear environment based on improved YOLOv8 algorithm. J. Wuhan Inst. Technol. 2025, 47, 325–330+354. [Google Scholar] [CrossRef]
- Hu, S.; Xing, R.; Han, L.; Liu, T. EBAD-YOLO: Efficient bidirectional adaptive dense network for UAV small-object detection. J. Real-Time Image Process. 2025, 23, 40. [Google Scholar] [CrossRef] [Scilit]
- Li, H.; Liu, J.; Ke, H.; Cai, X. CAFM-Enhanced YOLOv8: A Two-Stage Optimization for Precise Strawberry Disease Detection in Complex Field Conditions. Appl. Sci. 2025, 15, 10025. [Google Scholar] [CrossRef] [Scilit]
- Deng, X.; Chen, J.; Luo, Q. Defect detection of lithium-ion batteries based on improved YOLO and canny operators. Eng. Res. Express 2025, 7, 035324. [Google Scholar] [CrossRef] [Scilit]
- Akalin, F.; Yildiz, T. Detection and classification of enhanced periapical lesion images with YOLO algorithms. Connect. Sci. 2025, 37, 2522706. [Google Scholar] [CrossRef] [Scilit]
- Hu, X.; Cao, Y.; Sun, Y.; Tang, T. Railway Automatic Switch Stationary Contacts Wear Detection Under Few-Shot Occasions. IEEE Trans. Intell. Transp. Syst. 2022, 23, 14893–14907. [Google Scholar] [CrossRef] [Scilit]
- Hou, S.; Tian, Y.; Sun, Y.; Gao, Y. A hybrid approach for island recognition by synthesizing object-oriented deep learning and pixel-based adaptive thresholding: Global experiments on Sentinel-2 imagery. Int. J. Remote Sens. 2025, 46, 2456–2481. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Li, Z.; Liang, S.; Shi, X. A coastline extraction method based on neural network optimization of Canny operator. Surv. Mapp. Bull. 2025, 9, 84–90. [Google Scholar] [CrossRef]
- Yan, Q.; Ge, R.; Wang, J. Research on weld edge detection based on improved canny algorithm. J. Phys. Conf. Ser. 2025, 3068, 012152. [Google Scholar] [CrossRef] [Scilit]
- Manimegalai, D.; Monicka, S.G.; Karthikeyan, M. Detection of microcracks in silicon solar cells using Otsu-Canny edge detection algorithm. Renew. Energy Focus 2022, 43, 183–190, Corrigendum in Renew. Energy Focus 2025, 53, 100678. https://doi.org/10.1016/J.REF.2024.100678. [Google Scholar] [CrossRef] [Scilit]
- Tan, C.; He, Y.; Luo, X.; Fang, C.; Duan, L. A method for generating G code of industrial CT images based on adjacent layer data matching. J. Instrum. Meter 2021, 42, 265–274. [Google Scholar] [CrossRef]
- Gao, Y.B.; He, P.; Zhou, Z.; Gao, Y.B.; He, P.; Zhou, Z. Design and implementation of an agent—Based Q&A system for G-Code generation. J. Small Micro Comput. Syst. 2025, 1–11. Available online: https://link.cnki.net/urlid/21.1106.TP.20250312.1025.018 (accessed on 30 December 2025).
- Li, S.; Li, S.; Li, H.; Zhou, Z. Data enhancement and feature extraction optimization in tunnel surface defect detection: Combining DCGAN-RC and Repvit-YOLO methods. Eng. Fail. Anal. 2025, 177, 109715. [Google Scholar] [CrossRef] [Scilit]
- Song, K. Face detection based on GAN network in YOLOv5. Inf. Rec. Mater. 2025, 26, 196–199. [Google Scholar] [CrossRef]
- Tu, H.; Zhang, Y.; Wang, X.; Li, Y. Attention-Enhanced Conditional Wasserstein GAN with Wavelet–ResNet for Fault Diagnosis Under Imbalanced Data. Processes 2025, 13, 3531. [Google Scholar] [CrossRef] [Scilit]
- Li, L.Y.; Zheng, L.T.; Yang, C.L.; Dong, Y.S. GAL-GAN: Global styles and local high—Frequency learning based generative adversarial network for image cartoonization. Comput. Electr. Eng. 2025, 123, 110164. [Google Scholar] [CrossRef] [Scilit]
- Sulzbach, E.; Scheeren, I.; Veras, M.S.T.; Tosin, M.C.; Kroth, W.A.E.; Merotto, A.; Markus, C. Deep learning model optimization methods and performance evaluation of YOLOv8 for enhanced weed detection in soybeans. Comput. Electron. Agric. 2025, 232, 110117. [Google Scholar] [CrossRef] [Scilit]
- Chen, X.; Tao, H.; Zhou, H.; Zhou, P.; Deng, Y. Hierarchical and progressive learning with key point sensitive loss for sonar image classification. Multimed. Syst. 2024, 30, 380. [Google Scholar] [CrossRef] [Scilit]
















| Class | Side Seam | Turn Right 90° | Turn Left 70° | Turn Right 70° | Amount to | Material |
|---|---|---|---|---|---|---|
| Train | 85 | 206 | 149 | 60 | 500 | nonrust steel |
| Val | 10 | 23 | 17 | 9 | 59 | nonrust steel |
| Test | 19 | 13 | 15 | 12 | 59 | nonrust steel |
| Method | mAP (%) | FPS | Epochs | Model-Size/M | F1-Score (%) |
|---|---|---|---|---|---|
| YOLOv11 | 68.3 | 18 | 400 | 7.2 | 72.1 |
| Faster R-CNN | 66.1 | 6 | 400 | 330.2 | 67.4 |
| YOLO-V8 | 67.2 | 15 | 400 | 5.2 | 69.9 |
| Ours | 78.6 | 20 | 400 | 8.5 | 77.8 |
| Method | mAP (%) | F1-Score (%) | ΔmAP (vs. YOLOv11-Seg) |
|---|---|---|---|
| YOLOv11-seg | 69.4 | 72.1 | 0 |
| YOLOv11-seg + GAN | 74.3 | 75.3 | +7.1% |
| YOLOv11-seg + UFO_ViT | 72.8 | 74.3 | +4.9% |
| YOLOv11-seg + EIOU | 72.5 | 73.9 | 4.5% |
| Ours | 78.6 | 79.2 | +13.2% |
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
Yang, H.; Zuo, C.; Xu, H.; Xu, X. Welding Seam Recognition and Trajectory Planning Based on Deep Learning in Electron Beam Welding. Sensors 2026, 26, 641. https://doi.org/10.3390/s26020641
Yang H, Zuo C, Xu H, Xu X. Welding Seam Recognition and Trajectory Planning Based on Deep Learning in Electron Beam Welding. Sensors. 2026; 26(2):641. https://doi.org/10.3390/s26020641
Chicago/Turabian StyleYang, Hao, Congjin Zuo, Haiying Xu, and Xiaofei Xu. 2026. "Welding Seam Recognition and Trajectory Planning Based on Deep Learning in Electron Beam Welding" Sensors 26, no. 2: 641. https://doi.org/10.3390/s26020641
APA StyleYang, H., Zuo, C., Xu, H., & Xu, X. (2026). Welding Seam Recognition and Trajectory Planning Based on Deep Learning in Electron Beam Welding. Sensors, 26(2), 641. https://doi.org/10.3390/s26020641

