File size: 2,534 Bytes
a71062d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2f1709f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---

license: cc-by-nc-sa-4.0
task_categories:
  - image-classification
  - image-segmentation
language:
  - en
tags:
  - anomaly-detection
  - continual-learning
  - test-time-adaptation
  - medical-imaging
  - industrial-inspection
size_categories:
  - 10K<n<100K
---


# CTTA-AD Benchmarks

Dataset collection for **CTTA-AD: Continual Test-Time Adaptation for Unified Few-Shot Visual Anomaly Detection** (AAAI 2027 submission).

## Datasets

| Dataset | Domain | Categories | Train Normal | License |
|---|---|---|---|---|
| MVTec-AD | Industrial | 15 | 209–391 per category | CC BY-NC-SA 4.0 |
| VisA | Industrial | 12 | 400–905 per category | CC BY-NC-SA 4.0 |
| MVTec-LOCO | Logical | 5 | varies | CC BY-NC-SA 4.0 |
| BrainMRI | Medical | 1 | 7,500 | Research only |
| LiverCT | Medical | 1 | 1,542 | Research only |
| RESC | Medical | 1 | 4,297 | Research only |
| HIS | Medical | 1 | 5,088 | Research only |
| OCT17 | Medical | 1 | 11,017 | Research only |
| ChestXray | Medical | 1 | 100 | Research only |

## Folder Structure

All datasets follow this unified format:

    DatasetName/

    ├── category_name/

    │   ├── train/

    │   │   └── good/               # normal training images

    │   ├── test/

    │   │   ├── good/               # normal test images

    │   │   └── <defect_type>/      # anomalous test images

    │   └── ground_truth/           # pixel-level masks (where available)


**Notes:**
- Medical datasets use `Ungood` as the anomaly folder name
- OCT17 train is split into `good_a` and `good_b` (>10k files)
- ChestXray anomaly is split into `Ungood_a` and `Ungood_b` (>10k files)

## Download and Setup

```python

from huggingface_hub import snapshot_download



snapshot_download(

    repo_id="Hammadhaideerr/CTTA-AD-Benchmarks",

    repo_type="dataset",

    local_dir="data/",

)

```

Or download a single dataset:

```python

from huggingface_hub import snapshot_download



snapshot_download(

    repo_id="Hammadhaideerr/CTTA-AD-Benchmarks",

    repo_type="dataset",

    local_dir="data/BrainMRI/",

    allow_patterns="BrainMRI/*",

)

```

## Citation

If you use these datasets, please cite the original dataset papers alongside our work:

- **MVTec-AD:** Bergmann et al., CVPR 2019
- **VisA:** Zou et al., ECCV 2022
- **MVTec-LOCO:** Bergmann et al., IJCV 2022
- **BMAD (BrainMRI, LiverCT, RESC, HIS, OCT17, ChestXray):** Bao et al., CVPR Workshops 2024