Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
512
1.02k
label
class label
2 classes
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
0ill_images
End of preview. Expand in Data Studio

IllusionMNIST — Training Set

Dataset summary

This repository contains the training split of IllusionMNIST, introduced in Illusory VQA: Benchmarking and Enhancing Multimodal Models on Visual Illusions. The dataset is intended for training models to recognize MNIST digits embedded as visual illusions (pareidolia) in generated scenes and to reject images that contain no illusion.

MNIST source-condition images were sampled and resized to 512 × 512 pixels, combined with English scene descriptions, and transformed with a ControlNet variant. The split is balanced across digits 0–9 and an additional No illusion class.

Property Value
Hugging Face repository VQA-Illusion/MNIST_train
Official split Train
Task 11-way illusion classification / visual question answering
Annotated examples 3,960
Image format JPEG
Metadata file df_data.csv
Paper arXiv:2412.08169
Code IllusoryVQA/IllusoryVQA

Repository structure

Path Files Description
ill_images/ 3,960 Primary training images, including 3,600 illusion-bearing examples and 360 No illusion examples.
raw_images/ 3,600 MNIST source-condition images for the illusion-bearing rows. The 360 No illusion rows have no raw counterpart.
df_data.csv 1 Canonical metadata and labels.
captions.csv 1 Pool of 1,027 English scene descriptions used in generation.
Mnist_balanced_trainset_indices.pth 1 PyTorch-serialized indices used to select the balanced MNIST training subset. Load only from this trusted repository.

The image_name value is the filename stem. For example, Mnist_1 corresponds to ill_images/Mnist_1.jpg.

Metadata schema

Column Type Description
image_name string Image identifier and filename stem.
Pprompt string Positive scene prompt used during generation.
Nprompt string Negative generation prompt. It is empty for No illusion rows.
illusion_strength float or empty Control strength; 1.5 for illusion-bearing rows and empty for No illusion rows.
label string Digit ID (0–9) or no illusion.

Preserve label as a string when reading the mixed-type column:

import pandas as pd

metadata = pd.read_csv(
    "df_data.csv",
    dtype={"label": "string"},
    keep_default_na=False,
)
metadata["label_normalized"] = metadata["label"].str.strip().str.casefold()

Label mapping

This order matches MNIST and the official experiment code.

Numeric ID Class label Value stored in df_data.csv
0 digit 0 0
1 digit 1 1
2 digit 2 2
3 digit 3 3
4 digit 4 4
5 digit 5 5
6 digit 6 6
7 digit 7 7
8 digit 8 8
9 digit 9 9
10 No illusion no illusion

Use ID 10 when converting the textual No illusion target to a numeric label space.

Download

pip install -U huggingface_hub pandas pillow
from huggingface_hub import snapshot_download

dataset_dir = snapshot_download(
    repo_id="VQA-Illusion/MNIST_train",
    repo_type="dataset",
)
print(dataset_dir)

Command-line alternative:

huggingface-cli download VQA-Illusion/MNIST_train \
  --repo-type dataset \
  --local-dir MNIST_train

Load and pair images with metadata

from pathlib import Path
import pandas as pd
from huggingface_hub import snapshot_download

root = Path(snapshot_download(
    repo_id="VQA-Illusion/MNIST_train",
    repo_type="dataset",
))
df = pd.read_csv(
    root / "df_data.csv",
    dtype={"label": "string"},
    keep_default_na=False,
)

df["illusion_path"] = df["image_name"].map(
    lambda name: root / "ill_images" / (name + ".jpg")
)
df["raw_path"] = df["image_name"].map(
    lambda name: root / "raw_images" / (name + ".jpg")
)
df["raw_path"] = df["raw_path"].map(
    lambda path: path if path.exists() else None
)

def to_label_id(value):
    value = str(value).strip()
    return 10 if value.casefold() == "no illusion" else int(value)

df["label_id"] = df["label"].map(to_label_id)
df["label_text"] = df["label_id"].map(
    lambda label_id: "No illusion" if label_id == 10 else "digit " + str(label_id)
)
assert df["illusion_path"].map(Path.exists).all()

Intended use

Suitable uses include supervised illusion-aware digit classification, VQA with a constrained answer vocabulary, paired source/illusion analysis, and multimodal robustness research. For illusion classification, the expected answers are digit 0 through digit 9 and No illusion.

Dataset creation and safety

The authors generated English scene descriptions with several language models and used a ControlNet variant to combine those descriptions with resized MNIST source-condition images. Human reviewers validated dataset quality. The paper reports that the public release was screened with NSFW detectors and that flagged images were excluded.

Important usage notes

  • Use df_data.csv as the authoritative index.
  • Hugging Face may automatically treat top-level image directories as imagefolder classes. Those folder-derived labels are storage variants, not digit labels.
  • The No illusion label is textual while digit labels are numeric strings; normalize it explicitly.
  • Only illusion-bearing rows have files in raw_images/.
  • PyTorch pickle files can execute code during deserialization. Load Mnist_balanced_trainset_indices.pth only if you trust its source and need the original sampling indices.
  • The benchmark primarily contains one large hidden category per image; consult the paper for full limitations.

License

This dataset repository declares the MIT license. Users should also review and comply with any applicable terms associated with MNIST and other upstream components.

Citation

@misc{rostamkhani2024illusoryvqa,
  title        = {Illusory VQA: Benchmarking and Enhancing Multimodal Models on Visual Illusions},
  author       = {Rostamkhani, Mohammadmostafa and Ansari, Baktash and Sabzevari, Hoorieh and Rahmani, Farzan and Eetemadi, Sauleh},
  year         = {2024},
  eprint       = {2412.08169},
  archivePrefix = {arXiv},
  primaryClass = {cs.CV},
  url          = {https://arxiv.org/abs/2412.08169}
}

Contact

Questions and reproducibility issues can be submitted through the official GitHub repository.

Downloads last month
5,333

Paper for VQA-Illusion/MNIST_train