文章から画像生成するモデルをPython3系列でも動くように変更
動作環境はtext-to-image/requirement.txtに記載
編集元のgithubはhttps://github.com/paarthneekhara/text-to-image
To generate an image drawn like an irasutoya illustration from your caption you run:
python main.py --title="This flower is a red rose"
This will firstly generate your image through a GAN and then apply style transfer with the most related irasutoya image.
The output image will be created in the main directory under the name result.jpg
.
The require file for Style Transfer is the .mat pretrained VGG9 file available here, please put this file in the 'style-transfer/pre_trained_model' directory.
The require file for Word2Vec is the .bin.gz file available here, unzip it and put it in the 'word2vec/weights' directory.