| --- |
| pretty_name: "VSM Benchmarks: Cards & ChessImages" |
| license: cc-by-4.0 |
| task_categories: |
| - unconditional-image-generation |
| - image-classification |
| tags: |
| - diffusion-models |
| - hallucination |
| - generative-models |
| - benchmark |
| - chess |
| - playing-cards |
| size_categories: |
| - 100K<n<1M |
| --- |
| |
| # π² VSM Benchmarks β Cards & ChessImages |
|
|
| Two image benchmarks with **very large, structured semantic spaces** and **fast, |
| training-free validators**, released with the paper |
| **"Score-Control for Hallucination Reduction in Diffusion Models" (VSM)**. |
|
|
| π **Paper:** https://arxiv.org/abs/2606.00377 Β· |
| π» **Code:** https://github.com/bhosalems/VSM |
|
|
| Both datasets are designed for **systematic studies of hallucination** in |
| generative (especially diffusion) models. Each sample has a well-defined notion |
| of *validity*, so a generated image can be checked β without any trained |
| critic β for whether it lies on the data manifold (a legal board / a real card) |
| or is a hallucination (an illegal configuration). This makes the hallucination |
| rate a directly measurable quantity rather than a perceptual judgement. |
|
|
| | Dataset | Domain | #Images | Resolution | Semantic space | Validity check | |
| |---|---|---|---|---|---| |
| | **Cards** | 2Γ2 grids of playing cards | 91,390 | 128Γ128 | ~10β΅ | per-quadrant template match | |
| | **ChessImages** | Chessboards rendered from FEN | 196,062 | 256Γ256 | ~10β΄β΄ legal states | FEN parse + `python-chess` legality | |
|
|
| ## π¦ Repository layout |
|
|
| Image folders are shipped as `.tar` archives (a handful of large files uploads |
| far faster than hundreds of thousands of tiny PNGs); labels and metadata are |
| plain files. |
|
|
| ``` |
| mbhosale/VSM/ |
| βββ ChessImages/ |
| β βββ train_images.tar # 176,938 Γ 256Γ256 PNG -> train_images/ |
| β βββ test_images.tar # 19,124 Γ 256Γ256 PNG -> test_images/ |
| β βββ train_fen.json # {"<image_id>": "<FEN>"} (176,938 entries) |
| β βββ test_fen.json # {"<image_id>": "<FEN>"} ( 19,124 entries) |
| βββ Cards/ |
| β βββ card_imgs.tar # 91,390 Γ 128Γ128 PNG -> card_imgs/ |
| β βββ templates.tar # 40 card-face templates (64Γ64) for the validator |
| βββ validators/ # training-free hallucination checkers (see below) |
| βββ chess_validator.py |
| βββ cards_validator.py |
| βββ templates/chess/ # 26 chess-piece templates used by chess_validator.py |
| ``` |
|
|
| ## π Cards |
|
|
| A Cards sample is a **2Γ2 grid of four standard playing cards** at 128Γ128 (each |
| quadrant is 64Γ64). The card faces are drawn from **40 base cards** β ranks A |
| through 10 across the four suits (β£ β¦ β₯ β ); no face cards (J/Q/K). With four |
| independently drawn quadrants the semantic space is on the order of 10β΅. |
|
|
| - `card_imgs.tar` β the full set of 91,390 grids. |
| - `templates.tar` β the 40 single-card reference templates (resized to 64Γ64), |
| used by the training-free validator. Extracts to `resized_templates_png/`. |
|
|
| **Hallucination check.** Each of the four quadrants is template-matched |
| (`cv2.TM_CCOEFF_NORMED`) against the 40 templates. If the *worst* quadrant match |
| falls below a threshold, the image cannot be explained by four valid cards and is |
| counted as a hallucination (wrong/garbled symbols, color/count errors, noise). |
|
|
| ## βοΈ ChessImages |
|
|
| A ChessImages sample is a **256Γ256 rendering of a chessboard** generated from a |
| FEN string. The space of legal piece placements is astronomically large (~10β΄β΄), |
| making this a stringent test of whether a generator stays on-manifold. |
|
|
| - `train_images.tar` (176,938) and `test_images.tar` (19,124) β rendered boards; |
| filenames are `<image_id>.png`. |
| - `train_fen.json` / `test_fen.json` β map each `<image_id>` to its full FEN. |
|
|
| **Hallucination check.** The board image is parsed back to a FEN |
| piece-placement string by template-matching each of the 64 squares, then its |
| legality is tested with `python-chess` (`chess.Board.is_valid()`). Boards that |
| violate the rules (two white kings, >8 pawns, pawns on the back rank, β¦) are |
| counted as hallucinations. The validator can additionally report exact / fuzzy |
| FEN-reconstruction accuracy against the ground-truth FENs (conditional setting). |
|
|
| ## π Usage |
|
|
| ### Option A β via the VSM repo (recommended) |
|
|
| The [VSM repo](https://github.com/bhosalems/VSM) ships loaders and a downloader |
| that fetch and unpack these archives for you: |
|
|
| ```bash |
| python -m datasets.download --dataset chess --out ./data/ChessImages |
| python -m datasets.download --dataset cards --out ./data/Cards |
| ``` |
|
|
| ### Option B β directly with huggingface_hub |
| |
| ```python |
| from huggingface_hub import snapshot_download |
| import tarfile, glob, os |
| |
| root = snapshot_download(repo_id="mbhosale/VSM", repo_type="dataset", |
| allow_patterns=["ChessImages/*"]) |
| for tar in glob.glob(os.path.join(root, "ChessImages", "**", "*.tar"), recursive=True): |
| with tarfile.open(tar) as t: |
| t.extractall(os.path.dirname(tar)) |
| # -> ChessImages/train_images/*.png, test_images/*.png, train_fen.json, test_fen.json |
| ``` |
| |
| ## β
Verifiers (training-free hallucination validators) |
|
|
| The two validators used in the paper are bundled here under `validators/`, so you |
| can score generated images without cloning the full code repo. They need |
| `opencv-python`, `numpy`, `tqdm`, and β for chess β `python-chess`. |
|
|
| **ChessImages** β parse each rendered board back to a FEN and test legality with |
| `python-chess`; illegal boards count as hallucinations. The piece templates ship |
| alongside the script, so no extra flags are required: |
|
|
| ```bash |
| python validators/chess_validator.py --gen-dir /path/to/generated/boards |
| # optional: also report FEN-reconstruction accuracy against the ground truth |
| python validators/chess_validator.py --gen-dir /path/gen \ |
| --gt-json ChessImages/test_fen.json --conditional |
| ``` |
|
|
| **Cards** β template-match each of the 4 quadrants against the card templates; if |
| the worst-matching quadrant falls below the threshold, the image is a |
| hallucination: |
|
|
| ```bash |
| tar -xf Cards/templates.tar # -> resized_templates_png/ |
| python validators/cards_validator.py --gen-dir /path/to/generated/cards \ |
| --template-dir resized_templates_png |
| ``` |
|
|
| Each validator reports the hallucination rate (H%) per folder (repeat `--gen-dir` |
| for multiple seeds). Full fidelity metrics (FID / CLIP-FID / FLD) live in the |
| [VSM repo](https://github.com/bhosalems/VSM) under `evaluation/`. |
|
|
| ## βοΈ Intended use & license |
|
|
| These benchmarks are released **for research on generative-model reliability and |
| hallucination**. They are synthetic renderings (rule-based card grids and chess |
| positions) and contain no personal data. Released under **CC BY 4.0** β please |
| verify this matches your intended terms before redistribution, and cite the paper |
| below. |
|
|
| ## π Citation |
|
|
| ```bibtex |
| @article{bhosale2026vsm, |
| title = {Score-Control for Hallucination Reduction in Diffusion Models}, |
| author = {Bhosale, Mahesh and Devulapally, Naresh Kumar and Wasi, Abdul and |
| Pham, Chau and Lokhande, Vishnu Suresh and Doermann, David}, |
| journal = {arXiv preprint arXiv:2606.00377}, |
| year = {2026} |
| } |
| ``` |
|
|
| The ChessImages dataset uses [python-chess](https://python-chess.readthedocs.io) |
| and FEN strings sampled from [VALUED](https://arxiv.org/abs/2311.12610). |
|
|