The implement for paper : "A Novel Approach to Industrial Defect Generation through Blended Latent Diffusion Model with Online Adaptation"
2024/04/25 : Update the training code! 😊
- MVTEC AD
- BTAD
- KSDD2
Due to the non-square ksdd2 image , it need to crop the image of KSDD2 samples.
Preprocess code in this.
We follows ControlNet.
Build trainset for AdaBLDM training.
MVTec-AD in this.
BTAD in this.
KSDD in this.
Mvtec-AD Part
- Download Mvtec-AD dataset.
- Foreground_predictor : Look this
- Prepare for mvtec dataset : Look this
- Download SD model : download "v1-5-pruned.ckpt". And put it on the directory named "./models".
- Convert weight of sd model :
python tool_add_control.py ./models/v1-5-pruned.ckpt ./models/control_sd15_ini.ckpt
- Config training setting : Look this
- Start to train a AdaBLDM:
# default : train a hazelnut with hole. python train.py
- Input the model checkpoint : in test.py line 35.
- Run code:
# default : test with hazelnut with hole. python test.py
Pretrain Stage
How to obtain the mvtec object's description? Look at this.
Foreground_predictor for trimap
How to get the object's foreground ? Look at this
Coming soon....
DeSTSeg: Segmentation Guided Denoising Student-Teacher for Anomaly Detection
Few-Shot Defect Image Generation via Defect-Aware Feature Manipulation
Anomaly detection (following DeSTSeg)
- pixel-auc
- pro
- ap
- iap
- iap90
Image quality (following DFMGAN)
- KID
- LPIPS
@article{Li2024ANA,
title={A Novel Approach to Industrial Defect Generation through Blended Latent Diffusion Model with Online Adaptation},
author={Hanxi Li and Zhengxun Zhang and Hao Chen and Lin Wu and Bo Li and Deyin Liu and Mingwen Wang},
year={2024},
url={https://api.semanticscholar.org/CorpusID:268091266},
}