Few-shot Industrial Defect Image Classification Based on Lightweight Model with Attention Mechanism

Meiqi Tu,Zhixiao Qi,Libin Yu,Linxuan Zhang
DOI: https://doi.org/10.1145/3634814.3634841
2024-01-01
Abstract:This study investigates the application of deep learning methods in industrial defect image classification, particularly when training samples are limited. A metric-based approach is proposed, which utilizes a pre-trained deep convolutional neural network for feature extraction. This approach achieves effective category discrimination by computing the cosine similarity between query images and support images, without the need for additional adjustments for new defect categories. To enhance feature extraction, a DenseNet with an attention mechanism is employed, providing a more lightweight model compared to ResNet12. The inclusion of a hybrid domain attention mechanism improves performance and alleviates potential performance degradation that may arise from parameter reduction. Extensive evaluations are conducted on both general datasets and industrial defect datasets, demonstrating the effectiveness of the proposed model in real-world scenarios. This approach only requires a small number of defect samples, and the attention mechanism-enhanced DenseNet feature extraction network utilizes only one-fourth of the parameters of ResNet12, achieving comparable or better detection results. An ablation experiment confirms the superiority of the DenseNet with an attention mechanism. In summary, this research contributes to the field of few-shot learning in industrial defect image classification by proposing a low-cost and efficient solution.
What problem does this paper attempt to address?