Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
512
1.02k
label
class label
5 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 — Test Set

Dataset summary

This repository contains the public test split of IllusionMNIST, introduced in Illusory VQA: Benchmarking and Enhancing Multimodal Models on Visual Illusions. Every indexed example can be compared across source-condition, illusion, filtered-illusion, illusionless-control, and filtered-illusionless-control images.

The source-condition images are sampled from MNIST and resized to 512 × 512 pixels. Illusion images were produced from these inputs and English scene prompts with a ControlNet variant.

Property Value
Hugging Face repository VQA-Illusion/MNIST_test
Official split Test
Task Illusion digit classification / visual question answering
Annotated base examples 1,109
Image variants per example 5
Image format JPEG
Metadata file df_data.csv
Paper arXiv:2412.08169
Code IllusoryVQA/IllusoryVQA

Repository structure

Path Files Description Evaluation target
ill_images/ 1,109 Generated images containing a digit illusion. Digit in label.
illusion_images_filtered/ 1,109 Illusion images processed with the paper's filter pipeline. Digit in label.
illusionless_images/ 1,109 Matched scene images without an embedded illusion. No illusion.
illusionless_images_filtered/ 1,109 Filtered illusionless controls. No illusion.
raw_images/ 1,109 MNIST source-condition images used to guide generation. Digit in label.
df_data.csv 1 Canonical metadata for the base examples. —
captions.csv 1 Pool of 1,027 English scene descriptions used in generation. —

The same filename stem is used across all five directories. For example, Mnist_1 maps to Mnist_1.jpg in every variant directory.

Metadata schema

Column Type Description
image_name string Image identifier and shared filename stem.
Pprompt string Positive scene prompt used during generation.
Nprompt string Negative generation prompt; currently low quality.
illusion_strength float Control strength used during illusion generation; currently 1.5.
label integer-like string Ground-truth digit, from 0 to 9.

For either illusionless directory, replace the row's digit target with No illusion.

Label mapping

Numeric ID Class label Stored test value
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 Derived target for the two illusionless directories

Download

pip install -U huggingface_hub pandas pillow
from huggingface_hub import snapshot_download

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

Command-line alternative:

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

Load all five image conditions

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

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

folders = {
    "illusion": "ill_images",
    "illusion_filtered": "illusion_images_filtered",
    "illusionless": "illusionless_images",
    "illusionless_filtered": "illusionless_images_filtered",
    "raw": "raw_images",
}
for condition, folder in folders.items():
    df[condition + "_path"] = df["image_name"].map(
        lambda name, folder=folder: root / folder / (name + ".jpg")
    )

records = []
for row in df.itertuples(index=False):
    for condition in folders:
        label_id = 10 if condition.startswith("illusionless") else int(row.label)
        records.append({
            "image_name": row.image_name,
            "condition": condition,
            "image_path": getattr(row, condition + "_path"),
            "label_id": label_id,
            "label_text": "No illusion" if label_id == 10 else "digit " + str(label_id),
        })

evaluation_df = pd.DataFrame(records)
assert evaluation_df["image_path"].map(Path.exists).all()

Filtered variants

The released filtered images were produced with the preprocessing evaluated in the paper: Gaussian, averaging, and median blurs followed by grayscale conversion and sharpening. Appendix K provides the exact OpenCV implementation and parameters.

Intended use and evaluation

Use this split for zero-shot or fine-tuned digit-illusion recognition, VQA, No illusion rejection, and paired robustness comparisons. Recommended classification metrics are accuracy, macro precision, macro recall, and macro F1. Keep all conditions for the same image_name together when creating any derived partitions.

Dataset creation and safety

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

The paper reports 1,219 IllusionMNIST test samples, while the current repository has 1,109 rows in df_data.csv. This card describes the files currently hosted; use the current metadata file for reproducible indexing.

Important usage notes

  • Treat df_data.csv as the authoritative index.
  • Hugging Face may auto-detect top-level folders as imagefolder classes. These are image conditions, not digit targets.
  • The correct target for both illusionless variants is No illusion (ID 10), irrespective of label.
  • 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,220

Paper for VQA-Illusion/MNIST_test