[Paper Review] MemSeg: A semi-supervised method for image surface defect detection using differences and commonalities
MemSeg proposes an end-to-end, memory-augmented semi-supervised deep learning framework for industrial surface defect detection that leverages both differences between normal and simulated abnormal samples and commonalities stored in a memory bank. It achieves state-of-the-art performance with 99.56% AUC at the image level and 98.84% at the pixel level on the MVTec AD dataset, while enabling real-time inference due to its efficient, end-to-end design.
Under the semi-supervised framework, we propose an end-to-end memory-based segmentation network (MemSeg) to detect surface defects on industrial products. Considering the small intra-class variance of products in the same production line, from the perspective of differences and commonalities, MemSeg introduces artificially simulated abnormal samples and memory samples to assist the learning of the network. In the training phase, MemSeg explicitly learns the potential differences between normal and simulated abnormal images to obtain a robust classification hyperplane. At the same time, inspired by the mechanism of human memory, MemSeg uses a memory pool to store the general patterns of normal samples. By comparing the similarities and differences between input samples and memory samples in the memory pool to give effective guesses about abnormal regions; In the inference phase, MemSeg directly determines the abnormal regions of the input image in an end-to-end manner. Through experimental validation, MemSeg achieves the state-of-the-art (SOTA) performance on MVTec AD datasets with AUC scores of 99.56% and 98.84% at the image-level and pixel-level, respectively. In addition, MemSeg also has a significant advantage in inference speed benefiting from the end-to-end and straightforward network structure, which better meets the real-time requirement in industrial scenarios.
Motivation & Objective
- To address the challenge of limited annotated defect data in industrial surface defect detection by leveraging semi-supervised learning.
- To improve detection robustness by explicitly modeling differences between normal and simulated abnormal samples.
- To enhance feature representation by storing and comparing general patterns of normal samples via a memory bank.
- To enable real-time inference through an end-to-end, lightweight network architecture suitable for industrial deployment.
Proposed method
- MemSeg introduces artificially simulated abnormal samples during training to explicitly learn the discriminative differences between normal and defective patterns.
- It employs a memory bank to store feature representations of normal samples, mimicking human memory for pattern recognition.
- During inference, the model compares input features with stored memory features to detect anomalies based on low similarity and high dissimilarity.
- The network is trained end-to-end using a contrastive loss that encourages separation between normal and abnormal features.
- The memory bank is updated dynamically using momentum-based encoding to maintain stable and representative normal patterns.
- The architecture is designed for efficiency, enabling fast inference critical for real-time industrial applications.
Experimental results
Research questions
- RQ1Can a semi-supervised framework effectively detect surface defects using only a small number of annotated defect samples?
- RQ2How can differences between normal and simulated abnormal samples improve model generalization in defect detection?
- RQ3To what extent can a memory bank of normal patterns enhance anomaly localization and detection performance?
- RQ4Can an end-to-end, memory-augmented network achieve both high accuracy and real-time inference in industrial settings?
Key findings
- MemSeg achieves a state-of-the-art image-level AUC of 99.56% on the MVTec AD benchmark.
- It attains a pixel-level AUC of 98.84%, demonstrating precise localization of defect regions.
- The method significantly outperforms existing semi-supervised approaches in both detection accuracy and inference speed.
- The end-to-end design enables real-time inference, making it suitable for industrial deployment.
- The use of a memory bank improves detection robustness by capturing and comparing general normal patterns.
- The model maintains high performance even with limited annotated defect data, validating its effectiveness in low-resource settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.