Unofficial Re-implementation for MemSeg: A semi-supervised method for image surface defect detection using differences and commonalities
- Docker image: nvcr.io/nvidia/pytorch:20.12-py3
anomalib
opencv
einops
timm
wandb
python main.py --yaml_config ./configs/bottle.yaml
configs/custom.yaml
EXP_NAME: MemSeg
SEED: 42
DATASET:
datadir: './datasets'
texture_source_dir: './datasets/dtd/images'
target: 'custom'
resize: !!python/tuple
- 256 # height
- 256 # width
structure_grid_size: 8
transparency_range:
- 0.15 # under bound
- 1. # upper bound
perlin_scale: 6
min_perlin_scale: 0
perlin_noise_threshold: 0.5
将自定义数据放到
datasets/custom
文件夹下格式如下
└─datasets
└─custom
├─test
│ ├─bad/ <- 这一个级别内存放图片
│ ├─good/
│ └─.../
└─train
├─good/
└─.../
train
python main.py --yaml_config ./configs/custom.yaml
Onnx is exported by default during training
You can export custom format by using
export.py
voila "[demo] model inference.ipynb" --port ${port} --Voila.ip ${ip}
TBD
target | AUROC-image | AUROC-pixel | AUPRO-pixel | |
---|---|---|---|---|
0 | leather | 100 | 93.93 | 90.44 |
1 | wood | 99.12 | 92.71 | 84.96 |
2 | carpet | 91.33 | 91.32 | 78.34 |
3 | capsule | 95.77 | 88.55 | 81.56 |
4 | cable | 92.41 | 81.77 | 64.45 |
5 | metal_nut | 99.9 | 71.13 | 79.92 |
6 | tile | 100 | 98.1 | 95.41 |
7 | grid | 96.57 | 76.78 | 59.63 |
8 | bottle | 99.92 | 95 | 89.95 |
9 | zipper | 97.58 | 93.76 | 83.94 |
10 | transistor | 97.71 | 71.78 | 66.86 |
11 | hazelnut | 95.29 | 91.73 | 87.83 |
12 | pill | 83.69 | 91.91 | 72.62 |
Average | 96.1 | 87.57 | 79.69 |
@article{DBLP:journals/corr/abs-2205-00908,
author = {Minghui Yang and
Peng Wu and
Jing Liu and
Hui Feng},
title = {MemSeg: {A} semi-supervised method for image surface defect detection
using differences and commonalities},
journal = {CoRR},
volume = {abs/2205.00908},
year = {2022},
url = {https://doi.org/10.48550/arXiv.2205.00908},
doi = {10.48550/arXiv.2205.00908},
eprinttype = {arXiv},
eprint = {2205.00908},
timestamp = {Tue, 03 May 2022 15:52:06 +0200},
biburl = {https://dblp.org/rec/journals/corr/abs-2205-00908.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}