Skip to content

walter090/noir2color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noir2Color

f

Introduction

This repo contain the project to train and test a conditional generative adversarial network model to colorize black and white images. The implementation is based on Ian Goodfellow's GAN paper.

Requirements

This project is implemented with Tensorflow, to install the latest version of Tensorflow, follow the instructions on this page.

Usage

Training

To train on your own dataset, use

python noir2color.py --bw-folder bw --colored-folder color

You can also set other parameters using the command line, for example

python noir2color.py --keep-prob 0.5

For information about specifying other parameters, type

python noir2color.py -h

Colorize

To use a trained model, use the model_test function in colorizer.py. The function takes one or a list of black and white images and output the colorized. For details regrading the arguments for this function, check the docstring.

To colorize one single image, use

python colorizer.py --meta dir/to/saved/model --input input_image.jpg

Models and Datasets

The trained models are saved at this repo, and datasets at this repo.