mkeid / Image-Colorization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image-Colorization via Generative Adversarial Networks

This is a PyTorch implementation of Unsupervised Diverse Colorization via Generative Adversarial Networks which makes use of batch normalization and conditional concatenation to improve upon other published implementations in terms of training efficiency and evaluation results.

A pair of neural networks are trained in an alternating manner to learn a conditional mapping from a single channel grayscale image to a three-channel colorized image. The HSV cylindrical-coordinate encoding is used rather than RGB as it only requires the networks to learn 2 other channels rather than three. The mapping learned thus entails learning the hue and saturation channels given the value channel.

Implementation Architecture

A pair of generative and discriminative models are trained end to end. The generator is given uniform noise as input and is conditioned on the value channel of some given image. This conditioning gives rise ot the conditional GAN architecture. Unlike former image colorizer proposals, this generator is conditioned on the input at each convolutional block. This vastly improves the training procedure.

Results

Input Output Target

Prerequisites

Usage

python train.py
python3 eval.py

Files

About

License:MIT License


Languages

Language:Python 100.0%