--- license: mit task_categories: - image-classification - visual-question-answering language: - en tags: - visual-illusions - pareidolia - multimodal - synthetic - animals pretty_name: IllusionAnimals Test Set size_categories: - 1Kdf_data.csv | | Paper | [arXiv:2412.08169](https://arxiv.org/abs/2412.08169) | | Code | [IllusoryVQA/IllusoryVQA](https://github.com/IllusoryVQA/IllusoryVQA) | ## Repository structure | Path | Files | Description | Evaluation target | | --- | ---: | --- | --- | | ill_images/ | 1,000 | Generated images containing the animal illusion. | Animal in label. | | illusion_images_filtered/ | 1,000 | Illusion images processed with the paper's filter pipeline. | Animal in label. | | illusionless_images/ | 1,000 | Matched generated scenes without an embedded illusion. | No illusion. | | illusionless_images_filtered/ | 1,000 | Filtered illusionless controls. | No illusion. | | raw_images/ | 1,001 | Source-condition animal images. Exactly 1,000 match metadata IDs; one auxiliary file is not indexed. | Animal in label for indexed files. | | df_data.csv | 1 | Canonical metadata for the 1,000 indexed examples. | — | | captions.csv | 1 | Pool of 1,027 English scene descriptions used in generation. | — | The indexed files share the same stem across directories. For example, IllusionAnimals_1 maps to IllusionAnimals_1.jpg in each condition. The file raw_images/IllusionAnimals_IllusionAnimals.jpg is not referenced by df_data.csv and should be excluded from indexed evaluation. ## 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 2.5. | | label | string | Ground-truth animal name. | The label describes the source-condition image and the hidden target in illusion-bearing conditions. For either illusionless directory, override the target with **No illusion**. ## Label mapping The numeric order below matches the official experiment code. The CSV itself stores animal names. | Numeric ID | Class label | Stored test value | | ---: | --- | --- | | 0 | cat | cat | | 1 | dog | dog | | 2 | pigeon | pigeon | | 3 | butterfly | butterfly | | 4 | elephant | elephant | | 5 | horse | horse | | 6 | deer | deer | | 7 | snake | snake | | 8 | fish | fish | | 9 | rooster | rooster | | 10 | No illusion | Derived target for the two illusionless directories | ## Download ~~~bash pip install -U huggingface_hub pandas pillow ~~~ ~~~python from huggingface_hub import snapshot_download dataset_dir = snapshot_download( repo_id="VQA-Illusion/IllusionAnimals_test", repo_type="dataset", ) print(dataset_dir) ~~~ Command-line alternative: ~~~bash huggingface-cli download VQA-Illusion/IllusionAnimals_test \ --repo-type dataset \ --local-dir IllusionAnimals_test ~~~ ## Load all five image conditions ~~~python from pathlib import Path import pandas as pd from huggingface_hub import snapshot_download root = Path(snapshot_download( repo_id="VQA-Illusion/IllusionAnimals_test", repo_type="dataset", )) df = pd.read_csv(root / "df_data.csv", keep_default_na=False) label_to_id = { "cat": 0, "dog": 1, "pigeon": 2, "butterfly": 3, "elephant": 4, "horse": 5, "deer": 6, "snake": 7, "fish": 8, "rooster": 9, "no illusion": 10, } folders = { "illusion": "ill_images", "illusion_filtered": "illusion_images_filtered", "illusionless": "illusionless_images", "illusionless_filtered": "illusionless_images_filtered", "raw": "raw_images", } records = [] for row in df.itertuples(index=False): for condition, folder in folders.items(): label_text = "no illusion" if condition.startswith("illusionless") else row.label.casefold() records.append({ "image_name": row.image_name, "condition": condition, "image_path": root / folder / (row.image_name + ".jpg"), "label_id": label_to_id[label_text], "label_text": label_text, }) evaluation_df = pd.DataFrame(records) assert evaluation_df["image_path"].map(Path.exists).all() ~~~ ## Filtered variants The released filtered images are outputs of 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 animal-illusion classification, constrained-answer VQA, No illusion rejection, and paired robustness comparisons. Recommended metrics are accuracy, macro precision, macro recall, and macro F1. Keep every condition for a given image_name together in any derived split. ## Dataset creation and safety The authors generated animal source-condition images with SDXL-Lightning, generated English scene prompts with several language models, and created the illusion images with ControlNet. Human reviewers validated quality. The paper reports NSFW screening and exclusion of flagged images from the public release. The paper reports 1,100 IllusionAnimals test samples, while the current repository contains 1,000 metadata rows. This card documents the repository as currently hosted; use df_data.csv 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 animal classes. - For either illusionless condition, the correct answer is No illusion (ID 10), irrespective of the stored animal label. - Exclude the one unindexed auxiliary file in raw_images/ when reproducing the 1,000-example split. - 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 upstream models and components. ## Citation ~~~bibtex @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](https://github.com/IllusoryVQA/IllusoryVQA).