Git Product home page Git Product logo

unit-tensorflow's Introduction

UNIT-Tensorflow

Simple Tensorflow implementation of "Unsupervised Image to Image Translation Networks" (NIPS 2017 Spotlight)

Requirements

  • Tensorflow 1.4
  • Python 3.6

Usage

├── dataset
   └── YOUR_DATASET_NAME
       ├── trainA
           ├── xxx.jpg (name, format doesn't matter)
           ├── yyy.png
           └── ...
       ├── trainB
           ├── zzz.jpg
           ├── www.png
           └── ...
       ├── testA
           ├── aaa.jpg 
           ├── bbb.png
           └── ...
       └── testB
           ├── ccc.jpg 
           ├── ddd.png
           └── ...
> python main.py --phase train --dataset cat2tiger
  • See main.py for other arguments
  • If you want to multi_gpu_version, then use main_multi_gpu.py (batch_size = The batch_size per gpu)
  • If you want to faster_UNIT, then use DatasetAPI (code is more simple !)

Issue

Too much Slow !!!

  • The slower reason is that it stores checkpoints
  • If you want to speed up, do not save checkpoints per iteration

Arichitecture

architecture

Framework

framework

Model

compare

vae

gan

cycle

Training Objective

objective

Result

Success

success

Fail

fail

Related works

Reference

Author

Junho Kim

unit-tensorflow's People

Contributors

taki0112 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unit-tensorflow's Issues

Wrong files in DatasetAPI?

Hi Junho,
I'm confused with the files you put in the DatasetAPI.
Did you mistakely put the wrong code files there?
ZernMern

Question !! Which tensorflow does it work with.

I tried with latest and got this issue:

ValueError: Variable share_encoder/resblock_0/res1/conv2d/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:

UNIT-Tensorflow-master/UNIT.py", line 155, in generate_a2b
shared = self.share_encoder(out, self.is_training, reuse=True)

Difference between CycleGAN and UNIT

Hello,
thanks for this amazing work.

I have a doubt, I want to understand exactly the difference between cycle gan and UNIT in the loss function.
I read your documentation and mostly understand it, but I am still confused in the differences in the loss functions, especially the cycle loss (is it normal than that of the cycle gan) ?

TypeError: can only concatenate tuple (not "float") to tuple

Hi, Thank you for your share! I use your code to train on my dataset. After training, when I want to test the model using test images, I got this error. Could you please help solve it?

Total size of variables: 68329736
Total bytes of variables: 273318944
[] Reading checkpoints...
[
] Success to read UNIT.model-101
[*] Load SUCCESS
Processing A image: ./dataset/face2depth/testA/1.png
Traceback (most recent call last):
File "main_multi_gpu.py", line 108, in
main()
File "main_multi_gpu.py", line 104, in main
gan.test()
File "/home/xxx/UNIT-Tensorflow/UNIT_multi_gpu.py", line 481, in test
save_images(fake_img, [1, 1], image_path)
File "/home/xxx/UNIT-Tensorflow/utils.py", line 103, in save_images
return imsave(inverse_transform(images), size, image_path)
File "/home/xxx/UNIT-Tensorflow/utils.py", line 106, in inverse_transform
return (images+1.) / 2
TypeError: can only concatenate tuple (not "float") to tuple

GPU supprot

Hi, thank you for your share. When I run this code, I find that this code can not make use of gpu, even if i run the 'main_multi_gpu.py'

Train

hello,when I try to run the code, it shows self.num_batches=0 ,but I cannot find the reason.
self.trainA:[0:0]=[ ]
len=0
What should I do?Thank you very much!

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.