Coder Social home page Coder Social logo

cartmanishere / pix2pix-tensorflow Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 16 KB

Easy to use general purpose implementation of pix2pix model in tensorflow to train for image to image translation

Python 100.00%
pix2pix-tensorflow gan image-to-image-translation image-processing python

pix2pix-tensorflow's Introduction

Pix2Pix Tensorflow

This is a general purpose implementation of the pix2pix algorithm for image to image translation. This algorithm is based on pix2pix by Isola et al.

Code in this repo has been heavily borrowed from this implementation of the pix2pix tensorflow. But the linked code is not easy to use as I have experienced it first hand while working on a related project.

This repo is an attempt to make the pix2pix implementation easily approachable for training and testing.

A guide on how to use this code for image to image translation is provided.


Dependencies

You should have the following dependencies installed in your system to run this code.

  • python 3
  • tensorflow==1.10.0

Getting Started

1. Training

The goal in image to image translation is to convert the input image A to target image B.

A to B

Example:

Example

You can also specify the mapping AtoB or BtoA in config.py.

For training, you should generate such images and put all the training images in the train_data folder in the root directory.

Alternatively, you can also use --input-dir flag to set your custom input directory.

e.g

python train.py --input_dir <training_images_folder>

For more control over the training, refer to config.py which contains all the configurable settings to be used. You'll find comments there to help you out.

2. Generating samples

For generating output samples using your trained model, you should follow this pattern.

  • Create folder inputs inside folder test_data inside the project root. (Note: You can change this in the config.py file)
  • Put your input images inside the inputs folder and run test.py.
  • You can specify the --checkpoint flag to point to the folder where model checkpoints are saved.

Contributors

  1. Pranav Gajjewar
  2. Omkar Thawakar

pix2pix-tensorflow's People

Contributors

cartmanishere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.