Giter Site home page Giter Site logo

relgan-pytorch's Introduction

RelGAN-PyTorch

A PyTorch implementation of RelGAN: Multi-Domain Image-to-Image Translation via Relative Attributes

The paper is accepted to ICCV 2019. We also have the Keras version here.

Get Started

Install

  1. Python 3.6 or higher
  2. PyTorch 0.4.0 or higher
  3. All the dependencies
pip3 install -r requirements.

Start TensorBoard server

tensorboard --logdir runs

Train your RelGAN!

CUDA_VISIBLE_DEVICES=0 python3 train.py --data <PATH_TO_CELEBA-HQ> --gpu [--image_size 256]

Use multiple GPUs

CUDA_VISIBLE_DEVICES=0,1,2,3 python3 train.py --data <PATH_TO_CELEBA-HQ> --multi_gpu [--image_size 256]

Specify your own training settings in config.yaml

CUDA_VISIBLE_DEVICES=0 python3 train.py --config config.yaml

relgan-pytorch's People

Contributors

elvisyjlin 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

relgan-pytorch's Issues

SyntaxError: invalid syntax

File "/home/lbl/work/Meta-learning and I2I Translation/RelGAN-PyTorch-master/nn.py", line 212
alpha = alpha.cuda(async=self.multi_gpu) if self.gpu else alpha
^
SyntaxError: invalid syntax

about wrong triplets

hi!
i am confused about wrong triplets. why you use wrong triplets? and is it important for match discriminator?
hope for your reply.
best wishes

About metric

Hi, can you share the script to reproduce your great metrics in your paper. Also, i want to compare my own model with yours, so it will help a lot if you can release more details! Thank you anyway!

When will it release the updated version?

Hi, I am reproducing the results of celebA and celebA-HQ using this repo. However, I find the results are very bad.
In another issue, I find you said you were still working on this repo, could you tell me when will it release the updated version? Thanks!

About the bad results of stargan in your paper.

I found that in your paper in page.6, the results of stargan is really poor. I reproduced stargan in celeba-hq and got bad results too. But in stargan paper, it is good to generate 256x256...
So i'm a little confused, (Once i train stargan in celeba, the results is good enough, but in celebahq, it cannot succeed even to reconstruct the image).

ERROR

rain.py:111: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
args.selected_attributes = yaml.load(open(args.attr, 'r', encoding='utf-8'))
Loading annotations...
Loading image list...
Splitting image list...
Picking training images
CelebA dataset loaded.
Traceback (most recent call last):
File "train.py", line 160, in
train_data = PairedData(train_dset, batch_size)
File "/home/dell/train/RelGAN-PyTorch-master/data.py", line 133, in init
self.shuffle = mode == 'train'
NameError: name 'mode' is not defined

Sorry to bother you,do you know how to solve this error?

inter loss

I want to only the attribute "Smiling". Do you have some advice?The result of relgan(keras version) is poor...

hi

Hi,
it can train with 1024 image size

Poor results?

After training it on 110k iterations (paper trained it on 100k) this is the result. It seems very different from the paper, have I done something wrong? I must add that I trained it on normal celeba not hq.
img

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.