Surface defect detection is an indispensable part of industrial production in order to guarantee product quality. With rapid development of deep learning, automatic surface defect detection is gradually applied to a variety of industrial scenarios. However, defect detection still faces some challenges, such as diverse defect types, various defect size and texture structures. To address the problems, we proposed a local and global feature fusion network (LGFNet) for surface defect segmentation. The network adopts a U-shaped encoder-decoder structure with a convolution-based local feature extraction unit (LFE) and a transformer-based global feature extraction unit (GFE). LFE utilizes multi-head convolutional attention to obtain the detailed textures of defects, and GFE utilizes dual attention module to obtain global contextual information of defects. LGFNet cross-cascades the two feature extraction units to obtain multi-scale defect features, thus adapting the segmentation network to different types of defects. Experiments on two widely used surface defect datasets (NEU-Seg, Road Defect) demonstrate that the network can accurately segment defects of multiple shapes and sizes.
|