A lightweight transformer with linear self‐attention for defect recognition

Yuwen Zhai,Xinyu Li,Liang Gao,Yiping Gao
DOI: https://doi.org/10.1049/ell2.13292
2024-09-11
Electronics Letters
Abstract:This paper presents LSA‐Former, a lightweight transformer architectural backbone that integrates the benefits of convolution and ViT. LSA‐Former proposes a novel self‐attention with linear computational complexity. LSA‐ Former is pre‐trained on large‐scale data and its practicality is validated in defect detection tasks. Visual defect recognition techniques based on deep learning models are crucial for modern industrial quality inspection. The backbone, serving as the primary feature extraction component of the defect recognition model, has not been thoroughly exploited. High‐performance vision transformer (ViT) is less adopted due to high computational complexity and limitations of computational resources and storage hardware in industrial scenarios. This paper presents LSA‐Former, a lightweight transformer architectural backbone that integrates the benefits of convolution and ViT. LSA‐Former proposes a novel self‐attention with linear computational complexity, enabling it to capture local and global semantic features with fewer parameters. LSA‐Former is pre‐trained on ImageNet‐1K and surpasses state‐of‐the‐art methods. LSA‐Former is employed as the backbone for various detectors, evaluated specifically on the PCB defect detection task. The proposed method reduces at least 18M parameters and exceeds the baseline by more than 2.2 mAP.
engineering, electrical & electronic
What problem does this paper attempt to address?