sai-soum / anime_face

Anime Character Face Generator (conditional LSGAN)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anime Character Face Generator

cover1-1 cover1-2 cover1-3 cover1-4

cover2-1 cover2-2 cover2-3 cover2-4

cover3-1 cover3-2 cover3-3 cover3-4

cover4-1 cover4-2 cover4-3 cover4-4

Introduction

This is an anime character face generator implemented in Tensorflow.

Given some text descriptions, the model is capable to generate some anime character faces that fit the descriptions.

The model is based on conditional Least Squares Generative Adversarial Networks (LSGAN).

Training Data

The training data are images of anime character faces.

They are better to be squared, since those images will be resized to 64*64.

For example:

example1 example2 example3 example4 example5 example6

Due to the storage limit of Github, only 200 pictures are uploaded as samples.

More training data can be downloaded here.

Thanks to En-Yu Fan for collecting the training data.

Results

Given text descriptions, the model will generate corresponding images with size 64*64.

For example:

Description Image
blue hair red eyes result1
pink hair green eyes result2
black hair yellow eyes result3

Usage

Prerequisite

First, put your training data under ./faces/.

Second, please clone skip-thoughts and put it under ./model/.

Third, put your Tensorflow model under ./model/LSGAN/ if any.

The directory structure under ./model/ will be ./model/skip-thoughts/ and ./model/LSGAN/.

Train

python3 LSGAN.py --train

Test (Generate Images)

After executing the following commands, the images will be generated under ./samples/.

python3 LSGAN.py --generate -t [Description File] -n [# image per description]
  • [Description File]: A text file that contains descriptions. See description.txt as an example.

  • [# image per description]: Number of images that will be generated per desciprtion. Recommended number: 1.

Reference

The code is modified from text-to-image.

About

Anime Character Face Generator (conditional LSGAN)


Languages

Language:Python 100.0%