Abstract
Lithium Battery Surface defect detection plays a critical role in industrial applications. The current detection tasks face two major challenges: (1) significant variation in defect scales, especially the difficulty in capturing and identifying tiny defects; (2) the need for the detection process to simultaneously meet strict standards of high accuracy and real-time performance. To address these issues, this paper proposes a Dual Attention Pyramid Segmentation Network (DAPSeg), which ensures high precision while achieving real-time segmentation of surface defects. The Selective Kernel Module (SKM) assists the backbone network in adaptively extracting multi-scale features according to the importance of different scales, addressing the significant scale variation in defect scenarios. In the design part of the segmentation head, a lightweight architecture is adopted. The Blueprint Separable Layer (BSL) aims to capture more semantic information from different levels of the encoder while further improving the model's inference efficiency; the Dual Attention Feature Fusion Module (DAFFM) is used for multi-scale feature fusion, obtaining finer segmentation regions from both spatial and channel dimensions. Additionally, we use the diffusion model to generate additional image data on the proposed lithium battery surface defect segmentation dataset (LB-SD) to alleviate the overfitting problem of model training caused by the imbalance of different defect samples. Experimental results show that DAPSeg achieves mIoU scores of 79.57%, 83.53%, and 89.10% on LB-SD, MT, and MSD, respectively, with a processing speed of 74.09 FPS. Compared with other state-of-the-art models, DAPSeg strikes a good balance between accuracy and inference speed, while also demonstrating strong generalization performance.