Paper: MirrorGAN: Learning Text-to-image Generation by Redescription
Kerasで実装してみました。公式の実装ではありませんので注意してください。
今回の実装の記事はこちらです。
Attention because it is not official
- python 3.6.8
- keras 2.2.4
- tensorflow 1.12.0
Other
- easydict
- pandas
- tqdm
- cloneします
$ git clone git@github.com:komiya-m/MirrorGAN.git
$ cd MirrorGAN
- データをダウンロードしてください
AttnGAN こちらのDataの欄を参考にbirdsの前処理されたメタデータとデータセットをダウンロードしてください。
ディレクトリ構造参考
- まずはSTREAM部分をpretraningすることをおすすめします。
config.pyで設定が変更できます。TREE.BRANCH_NUM = 3 にしてください。その後下記を実行。
- TREE.BRANCH_NUM がGANの階層です。1 -> 64x64サイズの画像で出力, 2 -> 128x128, 3 -> 256,256
$ python pretrain_STREAM.py
- GANのトレーニング。TREE.BRANCH_NUM = 1から始めてください。
$ python train.py
- MirrorGAN: Learning Text-to-image Generation by Redescription
- StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
- AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks
2019/4/28