Skip to content

Simple PyTorch model that generates cartoon faces using GAN

Notifications You must be signed in to change notification settings

hiepnguyen034/cartoon_GAN

Repository files navigation

This is a simple DCGAN network that generates cartoon faces. The code from this implementation is pretty much borrowed form this awesome PyTorch tutorial with some minor adjustments. The only purpose of this repo is to explore/experiment GAN and have some fun.

While the dataset used in this repos is cartoon faces, the code can pretty much generate all kinds of images.

to get started, do pip install -r requirements.txt

use python run.py --begin_training True --img_path [PATH to training images directory] to train model

use python run.py --generate_img True --num_img [number of images] to generate image(s) from random noise

For more options, see python run.py -h

Example:

Noise:

img 1

Generated output:

img2

You should be able to build a grid of whatever size you configure.

An example of grid size =3, which means running (python run.py --generate_img True --num_img 9):

single_output

About

Simple PyTorch model that generates cartoon faces using GAN

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages