Skip to content

An attempt to convert Cartoon Sketches into Images using GAN

Notifications You must be signed in to change notification settings

omkarghugarkar007/sketch_to_colour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sketch_to_colour

This repository contains implementation of the CVPR - 2017 Paper "Image-to-Image Translation with Conditional Adversarial Networks".

Part of Winter of GANs

Generator

The architecture is of U-Net kind, which takes input as a sketch images of size (256 X 256 X 3) and outputs a coloured image of size (256 X 256 X 3). Encoder layer consists of 8 layers which convert images into latent space of size (1 X 1 X 512). Decoder contains 7 layer which upsamples the image. L1 loss is used to the generator along with the cGan loss

Discriminator

It takes sketch as well as coloured images a input and stack one on another. It return the probability that given the sketch, does the coloured image belongs to it or not.

Training

Gan Model contains the generator and the discriminator architecture. Train contains loss function and the code to train the model. The model was trained on the kaggle dataset Anime-sketch-colorization-pair which contains 14k images. Training was done on Google Colab for 2 session of 8 hours and 100 epochs.

Test

Generator weights can be found at - https://drive.google.com/file/d/1cu-MbW4fxP0F9MKQh2HXPjHrACFUzXux/view?usp=sharing

To test the model, run the command,

python3 test.py

Results

Some of the results

image

image

image

Evolution of Results over epochs

ezgif com-gif-maker

Thanks Bhuvan Aggarwal for helping the training procedure ❤

  • From Omkar with love 💙 !!!

About

An attempt to convert Cartoon Sketches into Images using GAN

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages