Git Product home page Git Product logo

pix2pix's Introduction

Binary to Color and Color to Binary

Most of us have observed the power of generalizaton of gans from tasks like pix2pix. In their work pix2pix had tried edges to photo(like binary to color) but showed it on cases like bags and cats but here we tried it in broader way i.e., from Binarized Images to Color Images.Some examples are shown here below:-

Binary to Color

Left Image is Binarized Image

Middle Image is binary to color networks output

Right Image is Ground Truth

binary to color

Color to Binary

Left Image is Color Image

Middle Image is color to binary network's output

Right Image is Ground Truth color_to_bnary

Dataset Preperation

We have prepared the dataset for this task by using voting technique for every pixel by Otsu's, Kittler, Niblack and Sauvola binarized images.Original Images are taken from BSDS300.

dataset

PPT

PPT link

Setup

Prerequisites

  • Linux or OSX
  • NVIDIA GPU + CUDA CuDNN (CPU mode and CUDA without CuDNN may work with minimal modification, but untested)

Getting Started

Binary to Color A->B

Color to Binary B->A

Installation Prerequisites

luarocks install nngraph
luarocks install https://raw.githubusercontent.com/szym/display/master/display-scm-0.rockspec

Dataset

Unzip the files in binarization folder.

python scripts/combine_A_and_B.py --fold_A datasets/binarization/A --fold_B datasets/binarization/B --fold_AB datasets/binarization

Train

  • Train the model from A to B
DATA_ROOT=datasets/binarization name=binary_color which_direction=AtoB th train.lua

Test

DATA_ROOT=datasets/binarization name=binary_color which_direction=AtoB phase=val th test.lua

Pretrained models

For pretrained models you can look at checkpoint

Acknowledgements

Code borrows heavily from Image-to-Image Translation with Conditional Adversarial Networks (pix2pix)

pix2pix's People

Contributors

phillipi avatar junyanz avatar chandu-97 avatar tinghuiz avatar brannondorsey avatar dexhunter avatar uakfdotb avatar ag2s1 avatar

Watchers

 avatar Srikar avatar

Forkers

gayamtrishal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.