Giter VIP home page Giter VIP logo

discogan's People

Contributors

jazzsaxmafia avatar tengdahan 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  avatar  avatar  avatar  avatar  avatar

Watchers

 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

discogan's Issues

Unnecessary computation in backward pass

In the code of WassersteinGAN, they have this line:

        for p in netD.parameters():
            p.requires_grad = False # to avoid computation

I think it means that when you train G, by default you'll compute gradients for D as well (but not updating them), and vice versa. Setting the flag to False to avoid the computation should speed up the training a lot.
I found that my tensorflow implementation runs much faster than this code, and this is probably the reason.

import error

when I run 'image_translation.py'
that import error occurred

python ./discogan/image_translation.py --task_name='celebA' --style_A='Blond_Hair' --style_B='Black_Hair' --constarint='Male'

Traceback (most recent call last):
File "./discogan/image_translation.py", line 9, in
from dataset import *
File "/home/khryang/Documents/DiscoGAN-master/discogan/dataset.py", line 2, in
import cv2
ImportError: /home/khryang/.local/lib/python2.7/site-packages/torch/lib/libgomp.so.1: version `GOMP_4.0' not found (required by /usr/lib/x86_64-linux-gnu/libsoxr.so.0)

Is there any problem with my python or pythorch?
please let me thank you for any help!

Error :

dataset_path = './datasets/'
celebA_path = os.path.join(dataset_path, 'celebA')
handbag_path = os.path.join(dataset_path, 'edges2handbags')
shoe_path = os.path.join(dataset_path, 'edges2shoes')
facescrub_path = os.path.join(dataset_path, 'fonts')
chair_path = os.path.join(dataset_path, 'rendered_chairs')
face_3d_path = os.path.join(dataset_path, 'PublicMM1', '05_renderings')
face_real_path = os.path.join(dataset_path, 'real_face')
car_path = os.path.join(dataset_path, 'data', 'cars')

def shuffle_data(da, db):
    a_idx = range(len(da))
    np.random.shuffle( a_idx )

    b_idx = range(len(db))
    np.random.shuffle(b_idx)

    shuffled_da = np.array(da)[ np.array(a_idx) ]

Giving error on the last line :


Traceback (most recent call last):
  File "./discogan/image_translation.py", line 314, in <module>
    main()
  File "./discogan/image_translation.py", line 181, in main
    data_style_A, data_style_B = shuffle_data( data_style_A, data_style_B)
  File "/Users/kadia/Desktop/DiscoGAN-master/discogan/dataset.py", line 27, in shuffle_data
    shuffled_da = np.array(da)[ np.array(a_idx) ]
IndexError: arrays used as indices must be of integer (or boolean) type

Face Training Time Too Long

Training faces is set up for 5,000 epochs, which on my Pascal Titan X requires a few minutes per epoch. There are three things I can imagine have gone wrong:

1 (and most likely): The dataset I'm using comes from the Google Drive link, and has more files than you were training against
2: The images in the dataset need to be downsampled
3: Epoch default is too high

Or maybe something else?

How to test model??

Hello Sir,

I trained your code using edges2shoes.
But I couldn't test.

If you don't mind, please tell me test-code using trained-model and input-image.

Thanks.

Model collapse

I've trained the complete model (A-->B and B->A) on the CELEBA training set, split between males and females (50k images per group) with images resized to 76x76 and random 64x64 crop. After approximatively 300 epochs the model fully collapsed:
schermata del 2018-01-31 10 26 58

While not having the reported quality (in terms of definition on both domains) even before.
Anyone else experiencing similar issues?

Error with 1.2.0 Tf version and python 3

Hello,
Currently getting the following error:
File "./discogan/image_translation.py", line 314, in
main()
File "./discogan/image_translation.py", line 131, in main
test_B = read_images( test_style_B, 'B', args.image_size )
File "/Users/haosun/Raju/DiscoGAN-master/discogan/dataset.py", line 53, in read_images
images = np.stack( images )
File "/Users/haosun/Raju/anaconda/lib/python3.6/site-packages/numpy/core/shape_base.py", line 350, in stack
raise ValueError('need at least one array to stack')
ValueError: need at least one array to stack

after downloading the dataset and running the following command:
python ./discogan/image_translation.py --task_name='edges2handbags'.

Please help to check.

Thanks

AttributeError: 'TerminalInteractiveShell' object has no attribute 'debugger_cls'

Traceback (most recent call last):
File "./discogan/image_translation.py", line 10, in
from model import *
File "/home/ii/DiscoGAN/discogan/model.py", line 6, in
import ipdb
File "/home/ii/anaconda2/lib/python2.7/site-packages/ipdb/init.py", line 7, in
from ipdb.main import set_trace, post_mortem, pm, run # noqa
File "/home/ii/anaconda2/lib/python2.7/site-packages/ipdb/main.py", line 32, in
debugger_cls = TerminalInteractiveShell().debugger_cls
AttributeError: 'TerminalInteractiveShell' object has no attribute 'debugger_cls'

unpaired date?

I think the dates of edges2shoes are paired,same as pix2pix. what do you think ?

Toy experient

I want to know how to reproduce results. Can you share your code?

Does the number of datasets affect learning a lot?

When the number of each data was 5000, learning did not work well.
When the epoch increased a little, learning did not proceed. And it showed very bad results.
I want to know what part of discoGAN is causing this result.

Feature matching loss

A feature matching loss is provided as part of the loss for the generator G. There is no mention of this loss in the paper, and its seems to be much greater then the standard GAN loss (Ratio of 0.9 to 0.1). Could you explain its use? How does its use, or lack of, affect results?

Thanks!

Training facescrub

Hello,
when running this command python ./discogan/image_translation.py --task_name='facescrub' i have this error:

Traceback (most recent call last): File "./discogan/image_translation.py", line 314, in <module> main() File "./discogan/image_translation.py", line 139, in main test_B = read_images( test_style_B, None, args.image_size ) File "/home/lafi/Desktop/DiscoGAN-master/discogan/dataset.py", line 53, in read_images images = np.stack( images ) File "/usr/local/lib/python2.7/dist-packages/numpy/core/shape_base.py", line 350, in stack raise ValueError('need at least one array to stack') ValueError: need at least one array to stack

If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues or send an email to the mailing list at [email protected] You can print a more detailed traceback right now with "%tb", or use "%debug" to interactively debug it. Extra-detailed tracebacks for bug-reporting purposes can be enabled via: %config Application.verbose_crash=True

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.