Manuscript Offprint

arXiv:2608.25465

Automatic weld seam segmentation for industrial quality control: a comparison of RGB and polarimetric imaging with CNN and transformer architectures

Simone Garbin, Leonardo Venturoso, Marco Todescato

Abstract

Visual inspection of welded assemblies remains one of the least automated stages in many industrial production processes, still depending largely on the experience of human operators and thus subject to inter-operator variability; the manufacturing of special-purpose machinery cabins, the setting of this study, is one representative case. This work evaluates the feasibility of automatic weld seam segmentation from RGB and polarimetric imagery, comparing controlled laboratory acquisitions with images captured under real, uncontrolled conditions. Convolutional neural network (CNN) architectures (YOLOv8/YOLOv11 segmentation variants) and transformer-based architectures (RF-DETR-Seg, Mask2Former) are benchmarked under a unified, threshold-independent protocol, training each CNN with three random seeds to separate genuine effects from seed noise. In controlled RGB conditions, CNN models reach a mean mask mAP50mAP_{50} (averaged over three training seeds) of up to 0.87, but drop to 0.22–0.48 under uncontrolled acquisition, showing that the acquisition setup is a first-order component of the inspection system. Polarimetric imaging with alignment-preserving geometric augmentation localizes previously unseen welds with a mean mask mAP50mAP_{50} up to 0.93: on par with, rather than ahead of, the best controlled-RGB result, but reaching that accuracy on uncontrolled RGB without requiring acquisition control. The clearest architectural finding concerns robustness to viewpoint change. In-distribution, transformers and CNNs are broadly comparable; but when the camera viewpoint shifts at test time (zero-shot transfer to a close-range, robot-relevant viewpoint), the transformer models, and RF-DETR in particular, retain high accuracy while every CNN collapses. This gap holds across three training seeds and survives a resolution-matched control, indicating it reflects the architecture rather than training resolution. Within the CNN family, in contrast, model capacity gives no reliable in-distribution advantage once seed variance is ac-

counted for. Small, fast CNNs are therefore a safe default when the deployment viewpoint matches training, whereas transformer-based models deserve consideration wherever that viewpoint may vary.

1. Introduction

Quality control of welded assemblies remains one of the least automated stages in the manufacturing process [10]. Post-weld inspection is typically performed visually by specialized operators, a process that is time-consuming, inconsistent, and sensitive to environmental conditions [1, 24]. Inaccurate quality monitoring compromises product integrity, driving up production costs and reducing customer satisfaction [31]. Locating weld seams in workpiece imagery is the critical first step; automating this process is essential for downstream defect detection and automated robotic inspection [15]. From a computer vision standpoint, welded metallic surfaces are a challenging domain. Brushed and galvanized steel can produce strong specular reflections that complicate weld imaging; welds can also present irregular and variable geometry; and real shop-floor imagery adds background disturbance, reflections, shadows, blur, and viewpoint variation [34, 38]. These factors degrade the performance of deep learning segmentation models in industrial inspection, especially under small annotated datasets, since collecting and labeling industrial images is costly and time-consuming [32]. The goal of this work is to assess the feasibility of automatic weld seam instance segmentation across acquisition scenarios and imaging modalities, and to identify the factors that dominate performance in practice. Specifically, we compare: (i) RGB images acquired in a controlled laboratory setup versus handheld acquisition in an uncontrolled shop-floor environment; (ii) conventional RGB imaging versus polarimetric imaging, from which six per-pixel maps (Intensity, AoLP, DoLP, ImaxI_{max}, IminI_{min}, Specular) are derived; (iii) segmentation architectures spanning two families (single-stage CNNs and transformers) and more than an order of magni-

*Corresponding author: leonardo.venturoso@fraunhofer.it tude in parameter count; and (iv) training factors including input resolution, weight initialization, optimizer, and data augmentation. All experiments follow a unified protocol with data partitions defined at the level of the physically acquired weld sample.

References (39)

  • Inspection system based on artificial vision for paint defects detection on cars bodies
  • Dsnet: A dynamic squeeze network for real-time weld seam image segmentation
  • Optics Express, 33(8):17990–18004, 2025
  • Masked-attention mask transformer for universal image segmentation
  • Deep learning approach for defective spot welds classification using small and class-imbalanced datasets
  • Comparison of different ml methods concerning prediction quality, domain adaptation and robustness
  • Fastinst: A simple query-based model for real-time instance segmentation
  • Mask r-cnn
  • Weld seam roi detection and segmentation method based on active-passive vision fusion
  • Intelligent machining: a review of trends, achievements and current progress
  • Ultralytics YOLO11, 2024
  • Ultralytics YOLOv8, 2023
  • YOLOv11: An Overview of the Key Architectural Enhancements
  • Systematic deep transfer learning method based on a small image dataset for spaghetti-shape defect monitoring of fused deposition modeling
  • Semi-supervised transfer learning-based automatic weld defect detection and visual inspection
  • One-shot polarization-based material classification with optimal illumination
  • Dn-detr: Accelerate detr training by intro-ducing query denoising
  • Microsoft coco: Common objects in context
  • Defect detection of injection molding products on small datasets using transfer learning
  • Decoupled weight decay regularization, 2019
  • Dsgnet: A lightweight network integrating depthwise separable and ghost convolutions for real-time surface defect segmentation
  • On the detection of defects on specular car body surfaces
  • A robotic surface inspection framework and machine-learning based optimal segmentation for aerospace and precision manufacturing
  • Enhanced rail surface defect segmentation using polarization imaging and dual-stream feature fusion
  • Quality control in manufacturing—review and challenges on robotic applications
  • Research on real-time precise identification of weld seam types and roi localization based on lightweight improved yolov10n
  • Intelligent robotic systems in industry 4.0: A review
  • Robust and secure quality monitoring for welding through platform-as-a-service: a resistance and submerged arc welding study
  • Segmentation-based deep-learning approach for surface-defect detection
  • Weld seam detection and extraction method based on s-yolo
  • Line-structured light fillet weld positioning method to overcome weld instability due to high specular reflection
  • 3d imaging of complex specular surfaces by fusing polarimetric and deflectometric information
  • Sabe-yolo: structure-aware and boundary-enhanced yolo for weld seam instance segmentation
  • A weld seam recognition method based on improved yolo model and its feature point extraction method
  • Rapid visual detection of laser welding defects in bright stainless steel thin plates
  • Cvt-unet: A weld pool segmentation method integrating a cnn and a transformer
  • Defect detection method for large-curvature and highly reflective surfaces based on polarization imaging and improved yolov11
  • Welding seam tracking and inspection robot based on improved yolov8s-seg model
  • Chip-integrated metasurface full-stokes polarimetric imaging sensor