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

Update cycle_gan_model.py #362

Closed
wants to merge 1 commit into from

Conversation

AltynayKadyrova
Copy link

Dear Sir

In line 30 and 31, there are might be typos with naming: 'fake_A' and 'fake_B'. I have changed places with incorrect ones. Initially, in line 30 it was visual_names_A = ['real_A', 'fake_B, 'rec_A'] <-- Here I suppose fake_B should be fake_A, no? The same in line 31 but in opposite way.

Thanks

Kind regards
Altynay

Dear Sir

In line 30 and 31, there are might be typos with naming: 'fake_A' and 'fake_B'. I have changed places with incorrect ones.  Initially, in line 30 it was visual_names_A = ['real_A', 'fake_B, 'rec_A'] <-- Here I suppose fake_B should be fake_A, no? The same in line 31 but in opposite way.

Thanks

Kind regards
Altynay
@junyanz
Copy link
Owner

junyanz commented Sep 2, 2018

The current code is correct as fake_B is generated from G(real_A). Sorry for the naming confusion.

@AltynayKadyrova
Copy link
Author

maps
Dear Jun-Yan Zhu,

I am writing to ask why as shown in the attached image, idt_A looks like as real_B (which starts in 2nd row from left) and idt_B looks like as real_A? As far as I understood from paper, idt is identity mapping loss function to preserve color of the input image, right?

Here I formulated my interpretation of result figure: Could you please have look and let me know if I am in right direction or not. I am trying to understand it more than one week so far, but I have a lot of confusion, I tried to follow line by line in code, but then decided to ask author if I interpret final figure correctly:

1st row from left to right: We give input map image which is real_A, and then second image is generated from Generator A trained on satellite images and produces A image but in B style (i.e. as satellite) and marked as fake_B. After, by difference of real_A and fake_B, we get reconstructed A, rec_A. And then we add identity mapping loss on on A image and as a result of it we transform our initial input map image into aerial (satellite) image??? I have big confusion here, the image idt_A does not look as A at all.

2nd row from left to right: similar logic: we have input aerial image as real_B, and from Generator B trained on maps images, we produce aerial image but in maps style representation and mark it as fake_A, and goes reconstruction and again idt_B???

Could you please explain in details:

  1. Am I thinking in right direction by above interpretation of final figure? Especially when we get fake_B is it from Generator B trained on A images? Similarly for fake_A, it is from Generator A trained on B images?

  2. the reconstructed image: rec_A = realA - fake_B? Am I thinking correctly here?

  3. I thought that 1st row from left to right = forward cycle and 2nd row = from left to right backward cycle. Is it true?

  4. we start from 1st row with map image and at the end of 1st row we get transformed aerial image, then from 2nd row we start from transformed aerial image and transform back into map image, correct? But then name labels for idt_A and idt_B is confusing, do not they be inverse?

I would be grateful if You can have time and answer to my questions in details because I am new in GANs.

Thanks

Looking forward to hear from You soon

Kind regards
Altynay

@AltynayKadyrova
Copy link
Author

And forget to add, I would be happy to get correct interpretation of results from author of the paper in order continue to explore further GANs with correct foundation information from the author :)

@junyanz
Copy link
Owner

junyanz commented Sep 9, 2018

This post should help you understand the intuition of identity loss.
Sorry for the naming confusion. It might be better to look at the code.

self.fake_B = self.netG_A(self.real_A)
self.rec_A = self.netG_B(self.fake_B)
self.fake_A = self.netG_B(self.real_B)
self.rec_B = self.netG_A(self.fake_A)
self.idt_A = self.netG_A(self.real_B)
self.idt_B = self.netG_B(self.real_A)

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

Successfully merging this pull request may close these issues.

2 participants