- Download and extract COCO 2017 into
data/coco
. - run
python data/gen_benchmark/coco.py
to obtaindata/coco/meta_20_x.json
andval2017_mask_ad_20_x
, wherex=0,1,2,3
represent splits. - Use
DefaultAD
indata/ad_dataset.py
as 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.py
to obtaindata/mvtec/meta.json
that matches standardDefaultAD
indata/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.py
to obtaindata/mvtec3d/meta.json
that matches standardDefaultAD
indata/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.py
to obtaindata/visa/meta.json
that matches standardDefaultAD
indata/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
CifarAD
indata/ad_dataset.py
as the dataloader, which covers three general settings forCifar10
and 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.py
to obtaindata/coco/meta_20_x.json
andval2017_mask_ad_20_x
, wherex=0,1,2,3
represent splits. - Use
TinyINAD
indata/ad_dataset.py
as 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 |