This paper presents a flexible transformer model for surface defect classification, suggesting improved accuracy and feature extraction.
In actual defect detection, missed detections are common due to the randomness of defect locations and the variability of defect sizes. To address this problem, this paper proposes a Flexible and Mobile Vision Transformer network incorporating Coordinate Attention (FlexCA-MobileViT), which is implemented by three innovative modules improved on Mobile Vision Transformer. First, a flexible deformable input module with deformable convolution structure is used to enhance the adaptability of the model to irregular defects and the efficiency of feature extraction. Second, we propose an efficient feature extraction module, Coordinate Attention Inverted Residuals, which optimizes the inverted residual structure to effectively extract multi-level features and enhance subtle defect recognition. Finally, we improve the Mobile Vision Transformer block with a coordinate attention mechanism to better fuse global and local features, creating a more efficient structure. The accuracy of our proposed model reachs 97.30% on the Xsteel Surface Defect Dataset. Moreover, our method has achieved significant results on the Magnetic Tile Dataset and the Tianchi Aluminum Dataset, which further validates the superior generalization of our model. Furthermore, our method outperforms the representative CNN-based, Transformer-based, and Mamba-based models, and achieves a better balance between accuracy, parameters, and other metrics. Thus, our method is conducive to further promotion and application in industrial surface defect classification.
No takes yet. Share an insight, caveat, or question.
Lin et al. (2025) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: