Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ExplainableML/ImageSelect
Code for the paper "If at First You Don't Succeed, Try, Try Again: Faithful Diffusion-based Text-to-Image Generation by Selection"
https://github.com/ExplainableML/ImageSelect
Last synced: 13 days ago
JSON representation
Code for the paper "If at First You Don't Succeed, Try, Try Again: Faithful Diffusion-based Text-to-Image Generation by Selection"
- Host: GitHub
- URL: https://github.com/ExplainableML/ImageSelect
- Owner: ExplainableML
- License: mit
- Created: 2023-05-19T11:54:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-10T15:51:41.000Z (over 1 year ago)
- Last Synced: 2024-08-01T18:37:29.052Z (3 months ago)
- Language: Python
- Homepage:
- Size: 3.51 MB
- Stars: 27
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-diffusion-categorized - [Code
README
# Faithful Diffusion-based Text-to-Image Generation by Selection
This is the PyTorch code our work [If at First You Don't Succeed, Try, Try Again: Faithful Diffusion-based Text-to-Image Generation by Selection](https://arxiv.org/abs/2305.13308) .
## Setup
You can setup the environments required by [Stable Diffusion](https://huggingface.co/blog/stable_diffusion) and [ImageReward](https://github.com/THUDM/ImageReward)
## Demo
To generate an image for a given prompt, all you need to do is create the directories `./all_images` and `./best_images` and then run the command `python3 src/imageselect_demo.py --num_seeds --prompt `. The best image selected by ImageReward will be saved in the directory `./best_images`.## Diverse1k Dataset
The prompts for the `Diverse1k` dataset can be found in `./data/1k_prompts.json` and the corresponding QA data (which can be used for the [TIFA](https://github.com/Yushi-Hu/tifa) evaluation) collected from GPT3.5 is provided in `./data/qa.json`.## References
If you find this work useful, please cite:
```
@article{karthik2023if,
title={If at First You Don't Succeed, Try, Try Again: Faithful Diffusion-based Text-to-Image Generation by Selection},
author={Karthik, Shyamgopal and Roth, Karsten and Mancini, Massimiliano and Akata, Zeynep},
journal={arXiv preprint arXiv:2305.13308},
year={2023}
}
```