Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the handling of noise z in DTLCGAN with an encoder attached #45

Closed
XijieJiao opened this issue Oct 15, 2020 · 8 comments

Comments

@XijieJiao
Copy link

Hi, I am referring to your DTLCGAN code. According to your last reply, I added an encoder to it and have some questions about your code.
In your train.py, the z_sample you choose to sample is generated by:
z_ipt_samples = [np.stack([np.random.normal(size=[z_dim])] * len(c_ipt_sample)) for i in range(15)]
which is of (15,18,100).

So, right now I used an encoder, and the noise of z (as well as the z_ipt used in training) here should be replaced by the encoder's output, right?

But, what does len(c_ipt_sample) here mean? You generated 18 noises for one testing sample? I counted your sampling training, the lowest layer in your decision tree does have 18 images( 233=18). So why do you generate testing sample from bottom to the top, but not the reverse? How can you be certain that this 18 noises all belong to the same person since you generated from bottom to top?

Besides, should my encoder do the parellel, choosing 18 frontcodes of 18 images and uses them to do the sampling? It seems wrong here because the 18 frontcodes of mine are from 18 different images(or say 18 different persons), the resulting sampling tree was weird(some are ok, and I am confused about them).
But if I used the same frontcode of one image(or say the same person) and copy it for 18 times, the training samples are the same, no change of attributes at all.

@LynnHo
Copy link
Owner

LynnHo commented Oct 17, 2020

@XijieJiao I am sorry that I do not very understand the details of your questions since the DTLC-GAN code was done a very long time ago. I suggest not start with DTLC-GAN because it's very complicated. Just start with incorporating CF-GAN into AttGAN or StarGAN or even a pure CF-GAN. I provide you the DTLC-GAN code for just a reference of how to implement such controllable generation, but I think you should start with implementing a CF-GAN.

@XijieJiao
Copy link
Author

Thank you. DTLC-GAN is indeed complicated. I am curious about how long it took you to work it out. Two weeks? Or may be one month?

@LynnHo
Copy link
Owner

LynnHo commented Oct 20, 2020

@XijieJiao I spend a week for DTLC-GAN, but with lots of help that I have much experience with CF-GAN and other GAN implementations.

@jiaoxijie
Copy link

Hi, I had some problems with CFGAN. I noticed in your DTLCGAN code, you haven't used the label provided in CelebA dataset. Is it the same with CFGAN, meaning CFGAN is also unsupervised learning? (The y in it is got from classifying images)
Second, is unsupervised learning enough to represent the attributes?

@LynnHo
Copy link
Owner

LynnHo commented Nov 12, 2020

@jiaoxijie CFGAN uses 0-1 attribute labels of CelebA, I think it can be viewed as a weakly supervised method.

@jiaoxijie
Copy link

Thank you so much. I followed and had another question. How many attributes did you use in training CFGAN or the style controller in ATTGAN? (Is it 13 as the number of strongest visual attributes?)
You suggested in the issue before that it is good for me to start with Bangs on CelebA? Were you meaning that it could be better to work on one attribute at a time?

@LynnHo
Copy link
Owner

LynnHo commented Nov 21, 2020

I use 13 but only "Bangs" and "Eyeglasses" have obvious effects. One attribute at a time may be easier for training but not necessarily better.

@jiaoxijie
Copy link

Get it. Thank you for so much help.

@LynnHo LynnHo closed this as completed Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants