Skip to content

samsgates/anime_face

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 mixed with conditional Deep Convolutional Generative Adversarial Networks (DCGAN) and 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/DCGAN/ if any.

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

Train

python3 DCGAN.py --train

Test (Generate Images)

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

python3 DCGAN.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 DCGAN & LSGAN)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%