This article is the 16th day article of Kinki University Advent Calendar 2019. I don't know what number it is, but Gan will generate an image of Pokemon. In the future, I would like to add an explanation of Pokédex to the generated image. The source code is here
DCGAN DCGAN was used for image generation. For details, refer to Paper. I used DCGAN-tensorflow for the implementation, but for some reason there was a bug in the official source code, so [fixed](https: / /github.com/mina-moto/DCGAN-tensorflow-pokemon) is used.
I used the Pokemon images published in pokemon-images-dataset-by-type.
Docker image download
docker pull minamotofordocker/pokemon_generator:latest
setup.sh
#!/bin/sh
# Pokemon Image Data
git clone https://github.com/rileynwong/pokemon-images-dataset-by-type
# DCGAN
git clone https://github.com/mina-moto/DCGAN-tensorflow-pokemon
# Dataset setting
mkdir -p data/pokemon_image/
cp pokemon-images-dataset-by-type/all/* data/pokemon_image/
echo "Finish!"
Install Pokemon images.
git clone https://github.com/rileynwong/pokemon-images-dataset-by-type
Installation of DCGAN-tensorflow.
git clone https://github.com/mina-moto/DCGAN-tensorflow-pokemon
Change the location of the installed image.
mkdir -p data/pokemon_image/
cp pokemon-images-dataset-by-type/all/* data/pokemon_image/
For parameter adjustment, I referred to this article.
docker run -v $PWD:/PokemonGenerator -w /PokemonGenerator -it --rm minamotofordocker/pokemon_generator:latest python DCGAN-tensorflow-pokemon/main.py --data_dir data/ --dataset pokemon_image --out_dir out/ --out_name pokemon_gan_sample --input_fname_pattern=*.png --input_height 120 --output_height 120 --train --epoch=5000 --batch_size=64 --learning_rate=0.001 --G_img_sum
Learning (images generated every 200 epoch up to 4600 epoch).
4600 Epoch eye image. Is there something like Pokemon?
Recommended Posts