{"id":13482776,"url":"https://github.com/zsdonghao/text-to-image","last_synced_at":"2025-04-04T21:08:10.207Z","repository":{"id":44007292,"uuid":"72644375","full_name":"zsdonghao/text-to-image","owner":"zsdonghao","description":"Generative Adversarial Text to Image Synthesis / Please Star --\u003e","archived":false,"fork":false,"pushed_at":"2021-01-22T07:11:25.000Z","size":773,"stargazers_count":602,"open_issues_count":35,"forks_count":161,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-03-28T20:07:34.904Z","etag":null,"topics":["gan","tensorflow","tensorlayer","text-to-image"],"latest_commit_sha":null,"homepage":"https://github.com/zsdonghao/tensorlayer","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zsdonghao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-02T13:50:16.000Z","updated_at":"2025-03-14T13:10:02.000Z","dependencies_parsed_at":"2022-07-09T14:46:19.838Z","dependency_job_id":null,"html_url":"https://github.com/zsdonghao/text-to-image","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsdonghao%2Ftext-to-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsdonghao%2Ftext-to-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsdonghao%2Ftext-to-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsdonghao%2Ftext-to-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zsdonghao","download_url":"https://codeload.github.com/zsdonghao/text-to-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249525,"owners_count":20908212,"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":["gan","tensorflow","tensorlayer","text-to-image"],"created_at":"2024-07-31T17:01:05.408Z","updated_at":"2025-04-04T21:08:10.184Z","avatar_url":"https://github.com/zsdonghao.png","language":"Python","funding_links":[],"categories":["Models/Projects","Model Deployment library","4. GAN"],"sub_categories":["Tensorflow \u003ca name=\"tensorflow\"/\u003e","1.2 DatasetAPI and TFRecord Examples"],"readme":"# Text To Image Synthesis \n\n\nThis is a tensorflow implementation of synthesizing images. The images are synthesized using the GAN-CLS Algorithm from the paper [Generative Adversarial Text-to-Image Synthesis][2]. This implementation is built on top of the excellent [DCGAN in Tensorflow][3].\n\nPlese star https://github.com/tensorlayer/tensorlayer\n\n![Model architecture](http://i.imgur.com/dNl2HkZ.jpg)\n\nImage Source : [Generative Adversarial Text-to-Image Synthesis][2] Paper\n\n## Requirements\n- [TensorFlow][4] 1.0+\n- [TensorLayer](https://github.com/zsdonghao/tensorlayer) 1.4+\n- [NLTK][8] : for tokenizer\n\n## Datasets\n- The model is currently trained on the [flowers dataset][9]. Download the images from [here][9] and save them in ```102flowers/102flowers/*.jpg```. Also download the captions from [this link][10]. Extract the archive, copy the ```text_c10``` folder and paste it in ```102flowers/text_c10/class_*```.  \n\n**N.B**  You can downloads all data files needed manually or simply run the downloads.py and put the correct files to the right directories.\n```python \npython downloads.py\n```\n\n## Codes\n- `downloads.py` download Oxford-102 flower dataset and caption files(run this first).\n- `data_loader.py` load data for further processing.\n- `train_txt2im.py` train a text to image model.\n- `utils.py` helper functions.\n- `model.py` models.\n\n## References\n- [Generative Adversarial Text-to-Image Synthesis][2] Paper\n- [Generative Adversarial Text-to-Image Synthesis][11] Torch Code\n- [Skip Thought Vectors][1] Paper\n- [Skip Thought Vectors][12] Code\n- [Generative Adversarial Text-to-Image Synthesis with Skip Thought Vectors](https://github.com/paarthneekhara/text-to-image) TensorFlow code\n- [DCGAN in Tensorflow][3]\n\n## Results\n\n- the flower shown has yellow anther red pistil and bright red petals.\n- this flower has petals that are yellow, white and purple and has dark lines\n- the petals on this flower are white with a yellow center\n- this flower has a lot of small round pink petals.\n- this flower is orange in color, and has petals that are ruffled and rounded.\n- the flower has yellow petals and the center of it is brown\n- this flower has petals that are blue and white.\n- these white flowers have petals that start off white in color and end in a white towards the tips.\n\n\u003ca href=\"http://tensorlayer.readthedocs.io\"\u003e\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"result.png\" width=\"70%\" height=\"70%\"/\u003e\n\u003c/div\u003e\n\u003c/a\u003e\n\n\n## License\nApache 2.0\n\n\n[1]:http://arxiv.org/abs/1506.06726\n[2]:http://arxiv.org/abs/1605.05396\n[3]:https://github.com/zsdonghao/dcgan\n[4]:https://github.com/tensorflow/tensorflow\n[5]:http://www.h5py.org/\n[6]:https://github.com/Theano/Theano\n[7]:http://scikit-learn.org/stable/index.html\n[8]:http://www.nltk.org/\n[9]:http://www.robots.ox.ac.uk/~vgg/data/flowers/102/\n[10]:https://drive.google.com/file/d/0B0ywwgffWnLLcms2WWJQRFNSWXM/view\n[11]:https://github.com/reedscot/icml2016\n[12]:https://github.com/ryankiros/skip-thoughts\n[13]:https://github.com/ryankiros/skip-thoughts#getting-started\n[14]:https://bitbucket.org/paarth_neekhara/texttomimagemodel/raw/74a4bbaeee26fe31e148a54c4f495694680e2c31/latest_model_flowers_temp.ckpt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsdonghao%2Ftext-to-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzsdonghao%2Ftext-to-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsdonghao%2Ftext-to-image/lists"}