Code for Commonsense-T2I Challenge: Can Text-to-Image Generation Models Understand Commonsense? [COLM 2024]
24
stars
8
commits
Python
primary language
Aug 13, 2024
updated
This repo contains code for the paper "Commonsense-T2I Challenge: Can Text-to-Image Generation Models Understand Commonsense?" [COLM 2024]
🌐 Homepage | 🤗 Dataset | 📑 Paper | 💻 Code | 📖 arXiv | 𝕏 Twitter
🔥[2024-08-12]: Codes and output visualizations are released!
🔥[2024-08-05]: Added Stable Diffusion 3 and Flux models for comparison.
🔥[2024-07-10]: Commonsense-T2I is accepted to COLM 2024 with review scores of 8/8/7/7 🎉
🔥[2024-06-13]: Released the website.
We present a novel task and benchmark for evaluating the ability of text-to-image(T2I) generation models to produce images that fit commonsense in real life, which we call Commonsense-T2I.
Commonsense-T2I presents an adversarial challenge, providing pairwise text prompts along with expected outputs.

import datasets
dataset_name = 'CommonsenseT2I/CommonsensenT2I'
data = load_dataset(dataset_name)['train']
# We include image generation codes that use huggingface checkpoints
python generate_images.py
# Evaluate the generated images and calculate an overall score
python evaluate.py
# To better see the generated images, visualize the outputs
python visualize.py
An example output is provided in example_visualization_dalle.html, check it out using a web browser.
Output visualizations can be found for the text-to-image models tested in our paper, e.g. DALL-E 3 outputs, Stable Diffusion 3 outputs, and Flux model outputs. For more details, check out our paper!

BibTeX:
@article{fu2024commonsenseT2I,
title = {Commonsense-T2I Challenge: Can Text-to-Image Generation Models Understand Commonsense?},
author = {Xingyu Fu and Muyu He and Yujie Lu and William Yang Wang and Dan Roth},
journal={arXiv preprint arXiv:2406.07546},
year = {2024},
}
8 commits
Python
63.1%
HTML
36.9%
Code for Commonsense-T2I Challenge: Can Text-to-Image Generation Models Understand Commonsense? [COLM 2024]
24
stars
8
commits
Python
primary language
Aug 13, 2024
updated
This repo contains code for the paper "Commonsense-T2I Challenge: Can Text-to-Image Generation Models Understand Commonsense?" [COLM 2024]
🌐 Homepage | 🤗 Dataset | 📑 Paper | 💻 Code | 📖 arXiv | 𝕏 Twitter
🔥[2024-08-12]: Codes and output visualizations are released!
🔥[2024-08-05]: Added Stable Diffusion 3 and Flux models for comparison.
🔥[2024-07-10]: Commonsense-T2I is accepted to COLM 2024 with review scores of 8/8/7/7 🎉
🔥[2024-06-13]: Released the website.
We present a novel task and benchmark for evaluating the ability of text-to-image(T2I) generation models to produce images that fit commonsense in real life, which we call Commonsense-T2I.
Commonsense-T2I presents an adversarial challenge, providing pairwise text prompts along with expected outputs.

import datasets
dataset_name = 'CommonsenseT2I/CommonsensenT2I'
data = load_dataset(dataset_name)['train']
# We include image generation codes that use huggingface checkpoints
python generate_images.py
# Evaluate the generated images and calculate an overall score
python evaluate.py
# To better see the generated images, visualize the outputs
python visualize.py
An example output is provided in example_visualization_dalle.html, check it out using a web browser.
Output visualizations can be found for the text-to-image models tested in our paper, e.g. DALL-E 3 outputs, Stable Diffusion 3 outputs, and Flux model outputs. For more details, check out our paper!

BibTeX:
@article{fu2024commonsenseT2I,
title = {Commonsense-T2I Challenge: Can Text-to-Image Generation Models Understand Commonsense?},
author = {Xingyu Fu and Muyu He and Yujie Lu and William Yang Wang and Dan Roth},
journal={arXiv preprint arXiv:2406.07546},
year = {2024},
}
8 commits
Python
63.1%
HTML
36.9%