howarder3 / CycleCoopNet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CycleCoopNet

Using Tensorflow to learn image-to-image translation without input-output pairs.

CycleCoopNet method is proposed by Chien-Hao Weng in CycleCoopNet: Image-to-Image Translation with Cooperative Learning Networks.

Prepare environment

In our experient environment, we use windows 10 with NVIDIA GTX1060 6GB GPU, Intel i5-7400 CPU.

install CUDA 9.0

For NVIDIA GPU users, we install CUDA 9.0 for GPU device driver. Your can find it on CUDA Toolkit downloads website.

We are NOT sure the newest version of CUDA can work.

install cuDNN 7.0

cuDNN is part of the NVIDIA Deep Learning SDK. We can install it in the cuDNN developer website. Remember to choose the version that matches your Tensorflow version.

We are also NOT sure the newest version of cuDNN can work.

create new Anaconda environment

Here we use Anaconda to help us manage python environment. You can download it on Anaconda website.

Use Anaconda to create a new python environment, and install all python packages below.

conda create -n [your-environment-name] python=3.6.3
conda activate [your-environment-name]

Or you can use Anaconda GUI to create your own python environment:

alt text

install python Packages

  • tensorflow-gpu 1.13.1
  • numpy 1.15.4
  • scipy 1.1.0
  • pillow 5.3.0
  • pandas 0.23.4

Getting Started

Prepare the model

  • Clone this repository:
git clone https://github.com/howarder3/CycleCoopNet

Download training dataset

  • edges2handbags dataset
bash ./download_dataset_bag.sh	
  • vangogh2photo dataset
bash ./download_dataset_vangogh.sh

Start Training a model

Training a model: (e.g. edges2handbags datasets)

python main.py --dataset_name=edges2handbags

Testing

Put the picture your want to test in the "test_datasets" folder, you can find these results in the "sample" folder. (After you start the training, this folder will auto create by our program.)

The testing pictures will NOT affect the model training, that is, these pictures will NOT change the parameters of the model.

Experiment Results Sample

  • Sketches -> Bags

sketch: alt text

Our result: alt text

sketch: alt text

Our result: alt text

  • Photos -> VanGogh-style picture

Photos: alt text

Our result: alt text

Photos: alt text

Our result: alt text

  • VanGogh picture -> real style

VanGogh picture: alt text

Our result: alt text

VanGogh picture: alt text

Our result: alt text

Some of our analysis tools

Original work: https://github.com/howarder3/analysis_pix2pix_by_yenchenlin

Original work: https://github.com/xhujoy/CycleGAN-tensorflow

Reference

Github:

Websites:

About


Languages

Language:Jupyter Notebook 98.6%Language:Python 1.4%Language:Shell 0.0%Language:HTML 0.0%Language:Makefile 0.0%