Text2image 文本到图像的合成

文本到图像合成 用Thought Vectors

这是一个为从描述合成图像的tensorflow实现,用的是Skip Thought Vectors模型。

基于DCGAN(tf版本)来构建的。所使用的图像是GAN-CLS算法所使用的图像数据。

依赖;

-Python 2.7.6

-Tensorflow

-h5py

-Theano : for skip thought vectors

-scikit-learn : for skip thought vectors

-NLTK : for skip thought vectors

数据集:通过运行python download_datasets.py来下载数据集。

目前的模型是基于flowers dataset训练的。

预训练模型文件在Data/skipthoughts下。

训练:基本用法是python train.py --data_set="flowers"

生成图像:

python generate_thought_vectors.py --caption_file="Data/sample_captions.txt"

例子,参见如下。



你可能感兴趣的:(机器学习,深度学习,工具使用)