Automatic weld seam segmentation for industrial quality control: a comparison of RGB and polarimetric imaging with CNN and transformer architectures
Organizations: Fraunhofer Italia Research, Via A. Volta 13/A, 39100 Bolzano, Italy
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 and transformer-based architectures 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 mAP50 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 mAP50 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 viewpoint robustness. In-distribution, transformers and CNNs are broadly comparable; but under a test-time viewpoint shift, the transformer models, and RF-DETR in particular, retain high accuracy while every CNN collapses. The gap holds across three seeds and a resolution-matched control, pointing to architecture rather than training resolution. Within the CNN family, capacity brings no reliable in-distribution gain once seed variance is accounted for: small CNNs suffice for fixed viewpoints, transformers for variable ones.
Figures & tables
| Dataset | Camera | Resolution | Train (aug.) | Val | Test |
|---|---|---|---|---|---|
| RGB controlled | OAK-D | 51 (510) | 15 | 12 | |
| RGB industrial | OAK-D | 35 (175) | 11 | 8 | |
| PolarSens multi-map | PolarSens | 47 (1384) | 15 | 5 | |
| PolarSens Intensity | PolarSens | 45 (450) | 14 | 10 | |
| Close-range test | OAK-D | — | — | 62 |
| Model | Family | Params (M) | Input res. (px) | Latency (ms/img) |
|---|---|---|---|---|
| YOLOv11-n-seg | CNN | 2.8 | 2464 | 24 |
| YOLOv11-s-seg | CNN | 10.1 | 2464 | 49 |
| YOLOv11-m-seg | CNN | 22.4 | 2464 | 111 |
| YOLOv8-s-seg | CNN | 11.8 | 2464 | 42 |
| RF-DETR-Seg-S | Transformer | 36.3 | 1120 | 132 |
| Mask2Former (Swin-S) | Transformer | 69 | 1024 † | 454 |
| Test | Validation | |||
|---|---|---|---|---|
| Model | mask mAP 50 | mAP 50–95 | mask mAP 50 | mAP 50–95 |
| RF-DETR-Seg-S | 0.900 | 0.471 | 0.755 | 0.395 |
| YOLOv11-n | 0.819 | 0.452 | 0.792 | 0.436 |
| YOLOv11-s | 0.797 | 0.475 | 0.814 | 0.433 |
| YOLOv11-m | 0.795 | 0.437 | 0.783 | 0.433 |
| YOLOv8-s | 0.791 | 0.454 | 0.723 | 0.422 |
| Model | mask mAP 50 | mAP 50–95 |
|---|---|---|
| RF-DETR-Seg-S | ||
| Mask2Former (Swin-S) | ||
| YOLOv11-s | ||
| YOLOv11-n | ||
| YOLOv11-m | ||
| YOLOv8-s |
| Test | Validation | |||
|---|---|---|---|---|
| Model | mask mAP 50 | mAP 50–95 | mask mAP 50 | mAP 50–95 |
| RF-DETR-Seg-S | 0.619 | 0.243 | 0.643 | 0.311 |
| Mask2Former (Swin-S) | 0.523 | 0.198 | 0.435 | 0.212 |
| YOLOv8-s | 0.471 | 0.244 | 0.500 | 0.224 |
| YOLOv11-s | 0.414 | 0.167 | 0.477 | 0.209 |
| YOLOv11-n | 0.408 | 0.130 | 0.507 | 0.251 |
| Model | mask mAP 50 | mAP 50–95 |
|---|---|---|
| RF-DETR-Seg-S | ||
| Mask2Former (Swin-S) | ||
| YOLOv11-n | ||
| YOLOv11-s | ||
| YOLOv8-s | ||
| YOLOv11-m |
| Test | Validation | |||
|---|---|---|---|---|
| Model | mask mAP 50 | mAP 50–95 | mask mAP 50 | mAP 50–95 |
| YOLOv11-n | 0.914 | 0.501 | 0.756 | 0.350 |
| RF-DETR-Seg-S | 0.904 | 0.421 | 0.701 | 0.295 |
| YOLOv8-s | 0.862 | 0.500 | 0.700 | 0.336 |
| YOLOv11-s | 0.807 | 0.479 | 0.679 | 0.323 |
| YOLOv11-m | 0.743 | 0.382 | 0.644 | 0.289 |
| Test | Validation | |||
| Model | mask mAP 50 | mAP 50–95 | mask mAP 50 | mAP 50–95 |
| Controlled RGB | ||||
| YOLOv11-n | ||||
| YOLOv11-s | ||||
| YOLOv11-m | ||||
| YOLOv8-s | ||||
| Test | Validation | |||
|---|---|---|---|---|
| Model | mask mAP 50 | mAP 50–95 | mask mAP 50 | mAP 50–95 |
| Single-backbone (18ch, split layer) | 0.117 | 0.040 | 0.178 | 0.068 |
| Multi-backbone (6 parallel) | 0.216 | 0.029 | 0.083 | 0.039 |
| Configuration | Train (px) | Test (px) | mask mAP 50 | mAP 50–95 |
|---|---|---|---|---|
| YOLOv11-n, native (baseline) | 1920 | 1920 | 0.119 | 0.068 |
| YOLOv11-n, inference-only | 1920 | 1120 | 0.611 | 0.330 |
| YOLOv11-n, retrained matched | 1120 | 1120 | 0.174 | 0.081 |
| RF-DETR-Seg-S (reference) | 1120 | 1120 | 0.842 | 0.537 |
Image Segmentation
Image segmentation assigns pixels or voxels to objects and regions, supporting measurement, scene understanding, and decisions across image domains.
See all 399 papers