Datasets:
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 |
IllusionFashionMNIST — Training Set
Dataset summary
This repository contains the training split of IllusionFashionMNIST, one of the four datasets introduced in Illusory VQA: Benchmarking and Enhancing Multimodal Models on Visual Illusions. It is designed to train and evaluate models on the recognition of Fashion-MNIST categories embedded as visual illusions (pareidolia) in generated scenes.
The source-condition images are sampled from Fashion-MNIST and resized to 512 × 512 pixels. They are combined with English scene descriptions and transformed into illusory images using ControlNet. The split also includes a balanced No illusion class.
| Property | Value |
|---|---|
| Hugging Face repository | VQA-Illusion/FashionMnist_train |
| Official split | Train |
| Task | 11-way illusion classification / visual question answering |
| Annotated examples | 3,300 |
| Image format | JPEG |
| Metadata file | df_data.csv |
| Paper | arXiv:2412.08169 |
| Code | IllusoryVQA/IllusoryVQA |
Repository structure
| Path | Files | Description |
|---|---|---|
ill_images/ |
3,300 | Primary training images. The folder contains both illusion-bearing examples and the 300 examples assigned to the No illusion class. |
raw_images/ |
3,000 | Source-condition images used to generate the illusion-bearing examples. No raw counterpart is provided for the 300 No illusion rows. |
df_data.csv |
1 | Canonical metadata and target labels. |
README.md |
1 | Dataset card. |
The value in image_name is the filename stem. For example, FashionMnist_train_0 corresponds to ill_images/FashionMnist_train_0.jpg.
Metadata schema
The CSV contains one row per primary training example.
| Column | Type | Description |
|---|---|---|
image_name |
string | Image identifier and filename stem. |
Pprompt |
string | Positive scene prompt used during illusion-image generation. |
Nprompt |
string | Negative generation prompt. It is empty for No illusion rows. |
illusion_strength |
float or empty | Control strength used for illusion generation. It is 1.5 for illusion-bearing rows and empty for No illusion rows. |
label |
string | Ground-truth Fashion-MNIST class ID (0–9) or No Illusion. |
Read the CSV with string-preserving options because label contains both numbers and text:
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
The following order matches Fashion-MNIST and the class lists used in the official experiment code.
| Numeric ID | Class label | Value stored in df_data.csv |
|---|---|---|
| 0 | T-shirt/top | 0 |
| 1 | Trouser | 1 |
| 2 | Pullover | 2 |
| 3 | Dress | 3 |
| 4 | Coat | 4 |
| 5 | Sandal | 5 |
| 6 | Shirt | 6 |
| 7 | Sneaker | 7 |
| 8 | Bag | 8 |
| 9 | Ankle boot | 9 |
| 10 | No illusion | No Illusion |
Use ID 10 when converting the textual No illusion target to a fully numeric label space.
Download
Install the required packages:
pip install -U huggingface_hub pandas pillow
Download the complete repository:
from huggingface_hub import snapshot_download
dataset_dir = snapshot_download(
repo_id="VQA-Illusion/FashionMnist_train",
repo_type="dataset",
)
print(dataset_dir)
Command-line alternative:
huggingface-cli download VQA-Illusion/FashionMnist_train \
--repo-type dataset \
--local-dir FashionMnist_train
Load and pair images with metadata
Use df_data.csv as the source of truth rather than treating the top-level image directories as semantic classes.
from pathlib import Path
import pandas as pd
from huggingface_hub import snapshot_download
root = Path(snapshot_download(
repo_id="VQA-Illusion/FashionMnist_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
)
id_to_label = {
0: "T-shirt/top",
1: "Trouser",
2: "Pullover",
3: "Dress",
4: "Coat",
5: "Sandal",
6: "Shirt",
7: "Sneaker",
8: "Bag",
9: "Ankle boot",
10: "No illusion",
}
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)
assert df["illusion_path"].map(Path.exists).all()
Intended use
Suitable uses include:
- supervised training for illusion-aware image classification;
- VQA-style prompting over a fixed answer vocabulary;
- paired comparisons between source-condition and generated illusion images; and
- robustness analysis for multimodal and vision-language models.
For VQA evaluation, ask whether the image contains an illusion and restrict the answer space to the ten Fashion-MNIST classes plus No illusion. The exact prompt templates used in the paper are available in Appendix G and in the official code repository.
Dataset creation and safety
The authors generated diverse English scene descriptions with several language models, combined those descriptions with source-condition images, and produced the illusion images with ControlNet. Human reviewers validated dataset quality. The paper also reports content-safety screening and the removal of images flagged by NSFW detectors from the public release.
Important usage notes
df_data.csvis the authoritative index. Do not infer the semantic target from the top-level directory name.- Hugging Face may automatically display the top-level image folders as
imagefolderclasses. Those folder-derived labels describe image variants, not Fashion-MNIST targets. - The No illusion label is textual while the other labels are numeric strings; normalize it explicitly as shown above.
- Only illusion-bearing rows have files in
raw_images/. - This benchmark primarily covers a single large hidden category per image. See the paper for the full limitations.
License
This dataset repository declares the MIT license. Users should also review and comply with any applicable terms associated with Fashion-MNIST and other upstream components.
Citation
If you use this dataset, please cite:
@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
- 245