Abstract
In industrial manufacturing, surface defect detection is critical for quality control. However, existing models struggle with Incremental Few-Shot Defect Detection (IFSDD), where new defect types must be learned from limited samples without forgetting previously known categories. This paper introduces the Dual Knowledge Align Network (DKAN), a teacher-student distillation framework designed to mitigate catastrophic forgetting and misclassification. DKAN employs specialized feature and logit alignment losses alongside a decoupled R-CNN architecture with cosine-similarity classifiers. Experimental results on the NEU-DET dataset demonstrate that DKAN significantly outperforms state-of-the-art methods, achieving up to a 6.65% improvement in mean Average Precision (mAP).
Introduction
Surface defect detection on materials like hot-rolled steel is essential for maintaining production standards. Traditional deep learning models face two primary challenges in dynamic industrial environments: the continuous emergence of new defect types (incremental learning) and the scarcity of labeled data for these new defects (few-shot learning).
When models are updated with new data, they often suffer from "catastrophic forgetting," where performance on original "base" classes degrades sharply. Furthermore, the lack of samples for "novel" classes leads to poor generalization and confusion between similar defect patterns.
Methodology: The Dual Knowledge Align Network (DKAN)
DKAN addresses these challenges through a two-stage "pretrain-then-finetune" paradigm, utilizing a teacher-student framework to preserve legacy knowledge while adapting to new information.
Teacher-Student Framework
During the fine-tuning stage, a frozen "Teacher" network, pre-trained on abundant base class data, guides a "Student" network. This setup allows the student to learn novel features while being constrained by the teacher's established knowledge, preventing the model from drifting too far from its original capabilities.
Incremental R-CNN and Cosine Classifiers
The student network utilizes a decoupled architecture where base and novel categories are handled by separate classification heads. To improve robustness in few-shot scenarios, standard linear layers are replaced with Cosine-Similarity Classifiers. By measuring the angular distance between features rather than raw magnitude, the model reduces the impact of sample noise and prevents overfitting to the small number of novel examples.
Dual Knowledge Alignment
To prevent forgetting, DKAN introduces two key loss functions:
- Feature Knowledge Align (FKA) Loss: This loss ensures that the student's intermediate feature maps remain consistent with the teacher's. It uses KL divergence to provide a "soft" constraint, allowing for flexibility in learning new features while retaining base knowledge.
- Logit Knowledge Align (LKA) Loss: This aligns the final output probabilities (logits) for base categories between the teacher and student, ensuring the model maintains its discriminative power for old classes.
Experimental Results
The proposed method was evaluated using the I-FSND (Incremental Few-shot NEU-DET) benchmark, derived from the NEU-DET dataset containing six steel strip defect types. DKAN consistently outperformed state-of-the-art (SOTA) methods such as TFA, FSCE, and MPSR. In the 5-shot SPLIT-1 scenario, DKAN achieved an overall Average Precision (AP) of 0.5394, a 6.65% improvement over the previous SOTA.
A key strength of DKAN is its ability to balance performance across both base and novel categories. Ablation studies confirmed that both FKA and LKA losses are critical; removing either component resulted in a significant performance drop in either base or novel class detection.
Conclusion and Future Work
DKAN provides a robust solution for incremental few-shot defect detection by combining soft knowledge distillation with cosine-similarity-based classification. While highly effective, the current approach relies on supervised learning. Future research will explore the integration of unlabeled data and the potential of Transformer-based architectures (e.g., DETR) to further enhance detection capabilities in diverse industrial settings.
Summary updated