Simple DCGAN RPG Characters with Chainer up-to-date(now 4.1.0)
Credit to [SeitaroShinagawa]
DCGAN simple implementation using chainer [Paper]
train_gan.py: main code
gan.py: network definition (quoted from [Chainerを使ってコンピュータにイラストを描かせる]) (in Generator, tanh->sigmoid)
RPGCharacters_util.py: Utility of dataset([Yurudorashiru free image resource])
Chainer [[link]] verified this code works in version 4.1.0
pillow
numpy
scipy
First, download dataset from "戦闘ユニット素材 ダウンロード(181.0MB)" in [http://yurudora.com/tkool/]
(This dataset has about 62,000 images and each image is 64x64. It is same image size to the paper. So, this dataset is desirable to try simple GAN at first)
After you get 3_sv_actors_20160915 directory, put it to the same place to this code.
Fill out "image_root" path in train_gan.py (You can see from L.44 as below).
image_root="/path/to/3_sv_actors_20160915" #need to be modified
img_list=[]
with open(image_root+"/list.txt",'r') as f:
for line in f:
img_list.append(line.strip())
As you can see, you need to create image list "list.txt" as follows,
cd /path/to/3_sv_actors_20160915
ls 3_sv_actors >> list.txt
Run the code.
python train_gan.py /path/to/save
(/path/to/save
means where you want to save the model and generated images every epoch)
epoch0
epoch1
epoch100
epoch101
epoch198
epoch199