- Download and extract COCO 2017 into
data/coco. - run
python data/gen_benchmark/coco.pyto obtaindata/coco/meta_20_x.jsonandval2017_mask_ad_20_x, wherex=0,1,2,3represent splits. - Use
DefaultADindata/ad_dataset.pyas the dataloader.
data
├── coco
├── annotations
├── instances_train2017.json
├── instances_val2017.json
├── train2017
├── val2017
├── meta_20_0.json
├── val2017_mask_ad_20_0
├── 000000000139.png
├── 000000000724.png
- Download and extract MVTec AD into
data/mvtec. - run
python data/gen_benchmark/mvtec.pyto obtaindata/mvtec/meta.jsonthat matches standardDefaultADindata/ad_dataset.py.
data
├── mvtec
├── meta.json
├── bottle
├── train
└── good
├── 000.png
├── test
├── good
├── 000.png
├── anomaly1
├── 000.png
└── ground_truth
├── anomaly1
├── 000.png
- Download and extract MVTec 3D-AD into
data/mvtec3d. - run
python data/gen_benchmark/mvtec.pyto obtaindata/mvtec3d/meta.jsonthat matches standardDefaultADindata/ad_dataset.py.
- Download and extract VisA into
data/visa. - Refer to project page for data preparation, and run.
- run
python data/gen_benchmark/visa.pyto obtaindata/visa/meta.jsonthat matches standardDefaultADindata/ad_dataset.py.
- Download and extract Real-IAD into
data/realiad.
- Download and extract Uni-Medical into
data/medical. - Refer to ViTAD and BMAD for data declaration.
- Download and extract Cifar10 / Cifar100 into
data/cifar - Use
CifarADindata/ad_dataset.pyas the dataloader, which covers three general settings forCifar10and one unified setting forCifar100.
| Dataset | Setting | Description |
|---|---|---|
| Cifar10 | Unified | 5 normals & 5 abnormals 5x5,000 for train & 5x1,000+5x1,000 for test |
| Cifar10 | One-Class-Train | 1 normal & 9 abnormals 1x5,000 for train & 1x1,000+1,000 for test |
| Cifar10 | One-Class-Test | 9 normals & 1 abnormal 9x5,000 for train & 9x1,000+6,000 for test |
| Cifar100 | Unified | 50 normals & 50 abnormals 50x500 for train & 50x100+50x100 for test |
data
├── cifar
├── cifar-100-python
├── cifar-10-batches-py
- Download and extract Tiny ImageNet into
data/tiny-imagenet-200. - run
python data/gen_benchmark/coco.pyto obtaindata/coco/meta_20_x.jsonandval2017_mask_ad_20_x, wherex=0,1,2,3represent splits. - Use
TinyINADindata/ad_dataset.pyas the dataloader.
data
├── cifar
├── cifar-100-python
├── cifar-10-batches-py
| Dataset | Setting | Description |
|---|---|---|
| Cifar100 | Unified | 100 normals & 100 abnormals 100x500 for train & 100x50+100x50 for test |