File size: 2,262 Bytes
6d42776
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d0530b9
6d42776
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d0530b9
6d42776
 
 
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
---
license: apache-2.0
pretty_name: VerdictAD decision cache
tags:
- anomaly-detection
- few-shot
- industrial-inspection
- mvtec-ad
- visa
- mvtec-loco
---

# VerdictAD decision cache

Decision-model outputs and reference lists behind every number in
**VerdictAD: Few-Shot Anomaly Detection via Decision-Guided Refinement**
([paper](https://arxiv.org/abs/2611.02654), [code](https://github.com/sgstq0811/VerdictAD-Jev-AD)).

With this cache, `evaluate.py` reproduces the VerdictAD results on any detector run without running the decision model (Clef-Flash 9B).

## Contents

27 runs: MVTec AD, VisA and MVTec LOCO AD × 1/2/4-shot × three reference draws (seeds 42/43/44 for 1- and 2-shot, 42/43/45 for 4-shot); 49,095 test images in total.

```
refs/<dataset>_k<shots>_s<seed>/refs_<class>.json       the k normal references (paths relative to the dataset root)
decisions/<dataset>_k<shots>_s<seed>/<class>.json       one record per test image
```

Each record:

| Field | Meaning |
|---|---|
| `img_path` | `<class>/test/<type>/<file>`, relative to the dataset root |
| `anomaly` | 1 for an anomalous test image |
| `z_free` | GVR logit, query image alone |
| `z_ref` | GVR logit, query image against the 2×2 reference mosaic |
| `boxes` | 32 windows `(x0, y0, x1, y1)` in [0, 1]: 16 crop windows, then the same 16 as red boxes |
| `logits` | LVR logit of each window |

The references come from the official SubspaceAD sampler at the given seed, and every detector in the paper uses them. LOCO paths follow the layout written by `tools/prepare_loco.py`; VisA paths follow the 1-class split.

## Usage

```bash
huggingface-cli download sunsean/VerdictAD --repo-type dataset --local-dir verdictad_cache
python evaluate.py <detector_run> verdictad_cache/decisions/mvtec_k4_s42 --subspacead SubspaceAD
```

`<detector_run>` is a SubspaceAD run (patched to save maps) or a `detectors.py` output that uses `refs/mvtec_k4_s42`.

## Citation

```bibtex
@article{sun2026verdictad,
  title   = {VerdictAD: Few-Shot Anomaly Detection via Decision-Guided Refinement},
  author  = {Sun, Shangquan and Luo, Wenjun and Wang, Yuanzhi and Li, Ruiqi and Chen, Ruoyu and Liu, Jiachen and Lu, Shijian},
  journal = {arXiv preprint arXiv:2611.02654},
  year    = {2026}
}
```