Giter Club home page Giter Club logo

Comments (7)

ubersexualShupeng avatar ubersexualShupeng commented on July 27, 2024

In the cycle-gan keras code, why the 'combine model' required using the 'identity mapping' as a loss (as following):

'Identity mapping of images'
img_A_id = self.g_BA(img_A)
img_B_id = self.g_AB(img_B)

Anyone have idea? In the original paper (Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks), they do not have this terms in their loss. Am I correct?

from keras-gan.

eriklindernoren avatar eriklindernoren commented on July 27, 2024

@parasjain-12 The dataloader can't find images in the path that you specified in that case. So np.random.random([]) will throw an errow.

@ubersexualShupeng The identity loss in from CycleGAN means that an image from domain A that is translated to domain A should exactly
match the original image. In this case images from A translated to domain A and images from domain B
translated to domain B should reproduce the original images, just as the implementation does. It is used in the paper for painting-to-photograph translation problems.

from keras-gan.

ubersexualShupeng avatar ubersexualShupeng commented on July 27, 2024

@eriklindernoren Thank you for your kind response! I understand that the 'reconstruct image' should be matched to the 'real image', as the following two lines code:

Translate images back to original domain
reconstr_A = self.g_BA(fake_B)
reconstr_B = self.g_AB(fake_A)

However, I quite confuse with another two line codes as follows:
Identity mapping of images
img_A_id = self.g_BA(img_A)
img_B_id = self.g_AB(img_B)

Why the model loss required both of them?
Thanks.

from keras-gan.

eriklindernoren avatar eriklindernoren commented on July 27, 2024

@ubersexualShupeng This is explained in detail in the section Photo generation from paintings in the paper (https://arxiv.org/pdf/1703.10593.pdf).

from keras-gan.

ubersexualShupeng avatar ubersexualShupeng commented on July 27, 2024

@eriklindernoren OK. Got it. Thank you!

from keras-gan.

Rabia-Raja avatar Rabia-Raja commented on July 27, 2024

I run this code and obtained good results on different datasets but I want to know something
about quantitative parameters we obtained after the end of code.

Acc, adv: recon, and iD? Can you please explain them

from keras-gan.

DanielXu123 avatar DanielXu123 commented on July 27, 2024

Hi, erik.

May I ask how to save the trained model of cyclegan?

I tried follow the codes of acgan.py but still failed to save the generate model and the discrimitor model for now.

from keras-gan.

Related Issues (20)

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.