DSAR is a reconstruction-based algorithm for anomaly detection. It employs an encoder-decoder structure embedded with feature distillation and spatial attention for feature extraction. For feature classification, the algorithm utilizes a U-Net network. DSAR demonstrates effective detection results for both structural and textural industrial defects.
We have organized a magnetic tile industrial dataset, which includes five types of defects and normal samples. Click here to download the dataset.The types of defects and data distribution are shown.
We have embedded the anomaly detection results into the annotation software LabelMe, enhancing the speed and accuracy of defect labeling. The annotation software can be downloaded by clicking here.
- Feature DIstillation
- Spatial attention
Supervisied Algorithms and Anomaly Detection
Category | Image Level AUROC | Pixel Level AUROC |
---|---|---|
Carpet | 99.5 | 97.2 |
Grid | 100.0 | 99.6 |
Tile | 100.0 | 99.2 |
Wood | 100.0 | 96.4 |
Leather | 100.0 | 99.3 |
Bottle | 99.9 | 99.2 |
Capsule | 99.1 | 90.7 |
Pill | 98.4 | 96.7 |
Transistor | 95.4 | 88.2 |
Zipper | 100.0 | 98.0 |
cable | 96.3 | 95.2 |
Hazelnut | 100.0 | 99.3 |
Metal nut | 100.0 | 99.4 |
Screw | 98.5 | 98.1 |
Toothbrush | 100.0 | 96.1 |
Mean | 99.1 | 96.8 |
The last line is the result of our DSAR algorithm.
git clone [email protected]:Wangh257/DSAR.git
cd DSAR
# python=3.7 torch=1.8.0 torchvision=0.9.0 numpy=1.19.0
pip install -r requirements.txt
# cd DSAR/tools
#train
sh train.sh
#test
sh test.sh
#visual
sh visual.sh
#structure of Dataset
train.txt / test.txt / visual.txt
img1_path
img2_path
....
- 项目链接: https://github.com/Wangh257/DSAR
- 联系邮箱: [email protected]