← 开源
paarthneekhara

text-to-image

Text to image synthesis using thought vectors

Model DevelopmentArchitecturePython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
2.17k
Star
398
Fork
+1
本周
4
贡献者
创建于 2016-08-16 · 更新于 2026-10-10 · 今日第 8908 名
主要开发者
paarthneekharaneilshAbhishekNarayanan

paarthneekhara/text-to-image 排名第 8,908,有 2,166 个星标。

同类别比较

paarthneekhara/text-to-image 排名第 8,908,此处有 8 个同类条目;bubbliiiing/yolov4-pytorch 排名第 8,910。

同类别比较
名称排名指标
TsingZ0/PFLlib8,894
语言:
Python
星标数:
2,177
分叉数:
416
maxpumperla/hyperas8,897
语言:
Python
星标数:
2,173
分叉数:
314
简介:
Keras + Hyperopt: A very simple wrapper for convenient hyperparameter optimization
pannous/tensorflow-speech-recognition8,898
语言:
Python
星标数:
2,173
分叉数:
628
简介:
🎙Speech recognition using the tensorflow deep learning framework, sequence-to-sequence neural networks
openai/roboschool8,899
语言:
Python
星标数:
2,171
分叉数:
488
简介:
DEPRECATED: Open-source software for robot simulation, integrated with OpenAI Gym.
bubbliiiing/yolov4-pytorch8,910
语言:
Python
星标数:
2,163
分叉数:
593
简介:
这是一个YoloV4-pytorch的源码,可以用于训练自己的模型。
fangwei123456/spikingjelly8,911
语言:
Python
星标数:
2,162
分叉数:
327
简介:
SpikingJelly is an open-source deep learning framework for Spiking Neural Network (SNN) based on PyTorch.
facebookresearch/pycls8,912
语言:
Python
星标数:
2,161
分叉数:
239
简介:
Codebase for Image Classification Research, written in PyTorch.
jeonsworld/ViT-pytorch8,915
语言:
Jupyter Notebook
星标数:
2,159
分叉数:
396
简介:
Pytorch reimplementation of the Vision Transformer (An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale)
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Architecture
关键词Image production
星标数2,166
分叉数398
贡献者4
创建日期2016-08-16
更新日期2026-10-10
1 天星标数0
7 天星标数1
排名8,908
上次排名8,966
排名变化58
7 天星标排名9,459
上次 7 天星标排名9,512
7 天星标排名变化53
总星标排名5,960
上次总星标排名5,949
总星标排名变化-11
国家USA
README 摘录

Text To Image Synthesis Using Thought Vectors This is an experimental tensorflow implementation of synthesizing images from captions using Skip Thought Vectors. The images are synthesized using the GAN-CLS Algorithm from the paper Generative Adversarial Text-to-Image Synthesis. This implementation is built on top of the excellent DCGAN in Tensorflow. The following is the model architecture. The blue bars represent the Skip Thought Vectors for the captions. Image Source : Generative Adversarial Text-to-Image Synthesis Paper Requirements Python

2. 6 Tensorflow h5py Theano : for skip thought vectors scikit-learn : for skip thought vectors NLTK : for skip thought vectors Datasets All the steps below for downloading the datasets and models can be performed automatically by running . Several gigabytes of files will be downloaded and extracted. The model is currently trained on the flowers dataset. Download the images from this link and save them in . Also download the captions from this link. Extract the archive, copy the folder and paste

it in . Download the pretrained models and vocabulary for skip thought vectors as per the instructions given here. They will be used for sampling the generated images and saving the trained models. Usage Data Processing : Extract the skip thought vectors for the flowers data set using : Training Basic usage Options Generating Images from Captions Write the captions in text file, and save it as . Generate the skip thought vectors for these captions using: Generate the Images for the thought vectors

using: specifies the number of images to be generated per caption. Sample Images Generated Following are the images generated by the generative model from the captions. I have not tried training the model with combine-skip vectors. The model was trained for around 200 epochs on a GPU. The images generated are 64 x 64 in dimension. While processing the batches before training, the images are flipped horizontally with a probability of 0. Pre-trained Models Download the pretrained model

from here and save it in . Use this path for generating the images. Try different embedding options for captions(other than skip thought vectors). Also try to train the caption embedding RNN along with the GAN-CLS model. References Generative Adversarial Text-to-Image Synthesis Paper Generative Adversarial Text-to-Image Synthesis Code Skip Thought Vectors Paper Skip Thought Vectors Code DCGAN in Tensorflow DCGAN in Tensorlayer Alternate Implementations Text to Image in Torch by Scot Reed Text to Image

in Tensorlayer by Dong Hao License MIT

常见问题

记录了多少星标和分叉?

paarthneekhara/text-to-image 有 2,166 个星标和 398 个分叉。

仓库排名是多少?

paarthneekhara/text-to-image 排名第 8,908。

记录的语言和类别是什么?

paarthneekhara/text-to-image 有 2,166 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

paarthneekhara/text-to-image 与 bubbliiiing/yolov4-pytorch 比较,后者排名第 8,910,有 2,163 个星标。

README

Text To Image Synthesis Using Thought Vectors

This is an experimental tensorflow implementation of synthesizing images from captions using Skip Thought Vectors. The images are synthesized using the GAN-CLS Algorithm from the paper Generative Adversarial Text-to-Image Synthesis. This implementation is built on top of the excellent DCGAN in Tensorflow. The following is the model architecture. The blue bars represent the Skip Thought Vectors for the captions.

Image Source : Generative Adversarial Text-to-Image Synthesis Paper

Requirements

Datasets

  • All the steps below for downloading the datasets and models can be performed automatically by running python download_datasets.py. Several gigabytes of files will be downloaded and extracted.
  • The model is currently trained on the flowers dataset. Download the images from this link and save them in Data/flowers/jpg. Also download the captions from this link. Extract the archive, copy the text_c10 folder and paste it in Data/flowers.
  • Download the pretrained models and vocabulary for skip thought vectors as per the instructions given here. Save the downloaded files in Data/skipthoughts.
  • Make empty directories in Data, Data/samples, Data/val_samples and Data/Models. They will be used for sampling the generated images and saving the trained models.

Usage

  • Data Processing : Extract the skip thought vectors for the flowers data set using :
python data_loader.py --data_set="flowers"
  • Training

    • Basic usage python train.py --data_set="flowers"
    • Options
      • z_dim: Noise Dimension. Default is 100.
      • t_dim: Text feature dimension. Default is 256.
      • batch_size: Batch Size. Default is 64.
      • image_size: Image dimension. Default is 64.
      • gf_dim: Number of conv in the first layer generator. Default is 64.
      • df_dim: Number of conv in the first layer discriminator. Default is 64.
      • gfc_dim: Dimension of gen untis for for fully connected layer. Default is 1024.
      • caption_vector_length: Length of the caption vector. Default is 1024.
      • data_dir: Data Directory. Default is Data/.
      • learning_rate: Learning Rate. Default is 0.0002.
      • beta1: Momentum for adam update. Default is 0.5.
      • epochs: Max number of epochs. Default is 600.
      • resume_model: Resume training from a pretrained model path.
      • data_set: Data Set to train on. Default is flowers.
  • Generating Images from Captions

    • Write the captions in text file, and save it as Data/sample_captions.txt. Generate the skip thought vectors for these captions using:
    python generate_thought_vectors.py --caption_file="Data/sample_captions.txt"
    
    • Generate the Images for the thought vectors using:
    python generate_images.py --model_path= --n_images=8
    

    n_images specifies the number of images to be generated per caption. The generated images will be saved in Data/val_samples/. python generate_images.py --help for more options.

Sample Images Generated

Following are the images generated by the generative model from the captions.

Caption Generated Images
the flower shown has yellow anther red pistil and bright red petals
this flower has petals that are yellow, white and purple and has dark lines
the petals on this flower are white with a yellow center
this flower has a lot of small round pink petals.
this flower is orange in color, and has petals that are ruffled and rounded.
the flower has yellow petals and the center of it is brown

Implementation Details

  • Only the uni-skip vectors from the skip thought vectors are used. I have not tried training the model with combine-skip vectors.
  • The model was trained for around 200 epochs on a GPU. This took roughly 2-3 days.
  • The images generated are 64 x 64 in dimension.
  • While processing the batches before training, the images are flipped horizontally with a probability of 0.5.
  • The train-val split is 0.75.

Pre-trained Models

  • Download the pretrained model from here and save it in Data/Models. Use this path for generating the images.

TODO

  • Train the model on the MS-COCO data set, and generate more generic images.
  • Try different embedding options for captions(other than skip thought vectors). Also try to train the caption embedding RNN along with the GAN-CLS model.

References

Alternate Implementations

License

MIT

排名相邻
同类项目