Class prototype rectification and multi-scale feature measurement for few-shot classification of bearing surface defects
摘要
Industrial defect detection often exhibits limited generalization and reduced accuracy when labeled data are scarce. To address this challenge, we propose a meta-learning framework for few-shot industrial defect detection that learns task-adaptive embeddings, rectified class prototype representations, and multi-scale metric inference, leading to improved classification performance under scarce annotations. Adaptive weighted pooling generates normalized spatial weights for channel-wise weighted summation, and a local sliding operation enables fast cross-task adaptation while preserving micro-crack and low-contrast details. Class Prototype Rectification (PR) uses a Sum-of-Absolute-Differences (SAD)-based weighting in embedding space to down-weight outlier support samples and form robust class prototypes. A Multi-Scale Feature Measurement (MSFM) module extracts features from each convolutional/residual block via parallel branches with local–global fusion and similarity attention; per-scale predictions are ensembled for layer-wise supervision and improved detection of small/low-contrast defects. Focal Loss is adopted during meta-training. Experiments on mini-ImageNet and a bearing-surface defect dataset show consistent gains over strong baselines; ablations verify each module’s contribution, and production-line tests confirm feasibility. The framework improves accuracy and robustness under limited data, offering a practical solution for few-shot industrial defect classification.