GSLD-QueryInst: global spatial and local detail attention for weld defect instance segmentation
Abstract
X-ray weld defect instance segmentation provides important pixel-level information for automated weld quality assessment in industrial non-destructive testing. However, practical x-ray weld images often contain elongated defects with discontinuous mask predictions, small defects with weak responses, irregular boundaries, and background noise interference, making accurate mask prediction challenging. To address these issues, this study proposes GSLD-QueryInst, a QueryInst-based instance segmentation model that integrates global spatial high-frequency enhancement and local detail collaborative attention (LDCA). Specifically, a global spatial high-frequency attention (GSHA) module is introduced into the mask region-of-interest feature extraction stage to enhance long-range spatial dependencies and high-frequency boundary responses, thereby improving the structural continuity of elongated defects. In addition, a LDCA module is embedded into the mask prediction stage to strengthen local texture, boundary, and salient responses of candidate instance regions through attention-guided weighting and depthwise convolution. Experiments are conducted on the self-constructed x-ray weld defect instance segmentation dataset (XR-DS), which contains 2754 x-ray weld images and 6068 defect instances. GSLD-QueryInst achieves average precision (AP), AP 50, and AP 75 scores of 42.9%, 72.7%, and 43.5%, respectively, on XR-DS, with AP 50 improving by 4.2 percentage points over the original QueryInst baseline. Further validation on the phased-array ultrasonic (PAU) weld image dataset (PAU-DS) demonstrates that the proposed method maintains favorable instance segmentation performance on PAU weld images.