/cyclegan-line2color

Toy demo of CGAN, automatic color filling for ACG style avaters.

Primary LanguagePython

This is a application demo of CycleGAN, filling colors automatically based on black-and-white line drafts of a fixed size of 256x256.

Usage

Environment

To run the code, an environment of TensorFlow and Keras is needed.

Dataset

To train the model, you have to prepare 4 datasets:

  • trainA: Line drafts for training.
  • trainB: Colored avaters for training.
  • testA: Line drafts for testing.
  • testB: Colored avaters for testing.

To start training, open cmd and input: python main.py -t

Training options can be modified in main.py.

References

Codes are edited from gan-zoo on GitHub.

Result

First row: line draft to colored image Second row: colored image to line draft 190_0

And here are some training results during the training period.

Original sketch: origin

Results during the training: 5_100 14_0 23_0 44_100 333_100 341_0 342_0 347_0 348_0 353_0