MemSeg
MemSeg, a U-Net that segments surface defects by comparing an image with stored normal samples.
Segmentation · 322 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Segmentation
- Parameters
- 39.3M
- Operations
- 322
- Framework
- PyTorch
- Recurrent
- No
- Published
- Engineering Applications of Artificial Intelligence (arXiv 2022)
- Cited by
- 253 (as of 27 October 2026)
- Authors
- Minghui Yang, Peng Wu, Jing Liu, Hui Feng
- Source
- GitHub: areylng/MemSeg
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18396
- Graph hash
- c9ce6eb66ec2e2e51f7ab2f3bfd3ead35e6ddfc801c6084bef5c41e5ffea50d3
- Skeleton hash
- 0eb13ba4e3c60c7352107b370280fe79326b069a86cc31d1b02039e34beb8f0d
- Architecture hash
- fbd05ed89e9278355c4122902b8ad3bd5bdd2a26cd79f2245cfde62ae1686e33
- Diagram SHA-256
- 845968500ef9bcdb342b6011cfb8b316e0ca74b2fd46aa72bdafb63d5ff71b34
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
MemSeg is a memory-based segmentation network for detecting surface defects on industrial products. It marks the abnormal regions of an image directly, without first reconstructing the input. The setting is semi-supervised, which here means that training needs only normal samples.
The design rests on two kinds of information that the paper calls differences and commonalities. For differences, artificially simulated anomalies are introduced during training so that the model learns to tell normal from non-normal. For commonalities, a small number of normal samples serve as memory samples, and their high-level features are extracted with a pre-trained ResNet18 encoder. The input is compared with this memory to obtain the differences between it and its most similar memory sample. That difference information is concatenated with the input features, passed through a multi-scale feature fusion module, and sent to the decoder through the skip connections of a U-Net.
On the MVTec AD datasets, the paper reports AUC scores of 99.56% at the image level and 98.84% at the pixel level. It also reports an inference speed of 31.34 images per second. In the paper's setup the input image size is 256×256. The last Conv Layer of the decoder ends in a 2-channel convolution layer.
Key idea. MemSeg turns semi-supervised surface defect detection into an end-to-end segmentation task by adding simulated anomalies and a memory of normal-sample features to a U-Net.
- memseg
- surface defect detection
- anomaly detection
- anomaly segmentation
- industrial inspection
- memory-based segmentation network
- semi-supervised defect detection
- mvtec ad
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{yang2022memsegsemisupervisedmethodimage,
title={MemSeg: A semi-supervised method for image surface defect detection using differences and commonalities},
author={Minghui Yang and Peng Wu and Jing Liu and Hui Feng},
year={2022},
eprint={2205.00908},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2205.00908},
}