{"id":13488405,"url":"https://github.com/ExplainableML/ImageSelect","last_synced_at":"2025-03-28T00:33:53.231Z","repository":{"id":168408005,"uuid":"642810724","full_name":"ExplainableML/ImageSelect","owner":"ExplainableML","description":"Code for the paper \"If at First You Don't Succeed, Try, Try Again: Faithful Diffusion-based Text-to-Image Generation by Selection\"","archived":false,"fork":false,"pushed_at":"2023-07-10T15:51:41.000Z","size":3683,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-10-31T00:39:57.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ExplainableML.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-19T11:54:41.000Z","updated_at":"2024-07-10T15:02:06.000Z","dependencies_parsed_at":"2024-01-16T09:02:46.542Z","dependency_job_id":"36c36b32-f424-4c77-980a-505082988f2d","html_url":"https://github.com/ExplainableML/ImageSelect","commit_stats":null,"previous_names":["explainableml/imageselect"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExplainableML%2FImageSelect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExplainableML%2FImageSelect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExplainableML%2FImageSelect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExplainableML%2FImageSelect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExplainableML","download_url":"https://codeload.github.com/ExplainableML/ImageSelect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245949289,"owners_count":20698913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T18:01:15.177Z","updated_at":"2025-03-28T00:33:48.201Z","avatar_url":"https://github.com/ExplainableML.png","language":"Python","funding_links":[],"categories":["T2I Diffusion Model augmentation"],"sub_categories":[],"readme":"# Faithful Diffusion-based Text-to-Image Generation by Selection\n\nThis 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) .\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"utils/overview.png\" /\u003e\n\u003c/p\u003e\n\n## Setup\n\nYou can setup the environments required by [Stable Diffusion](https://huggingface.co/blog/stable_diffusion) and [ImageReward](https://github.com/THUDM/ImageReward)\n\n\n\n## Demo\nTo 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 \u003cnum_imgs_generated\u003e --prompt \u003cprompt\u003e`. The best image selected by ImageReward will be saved in the directory `./best_images`. \n\n## Diverse1k Dataset\nThe 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`. \n\n\n## References\nIf you find this work useful, please cite:\n```\n@article{karthik2023if,\n  title={If at First You Don't Succeed, Try, Try Again: Faithful Diffusion-based Text-to-Image Generation by Selection},\n  author={Karthik, Shyamgopal and Roth, Karsten and Mancini, Massimiliano and Akata, Zeynep},\n  journal={arXiv preprint arXiv:2305.13308},\n  year={2023}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FExplainableML%2FImageSelect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FExplainableML%2FImageSelect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FExplainableML%2FImageSelect/lists"}