Imagine a scenario where we ask you to perform image translation from one class to another, but not give the input and the corresponding output images to train the model. However, we give you the images of both classes in two distinct folders. CycleGAN comes in handy in such a scenario.
In this section, we will learn how to train CycleGAN to convert the image of an apple into the image of an orange and vice versa. The Cycle in CycleGAN refers to the fact that we are translating (converting) an image from one class to another and back to the original class.
At a high level, we will have three separate loss values in this architecture (more detail is provided here):
- Discriminator loss: This ensures that the object class is modified while training the model (as seen in the previous section).
- Cycle loss: The loss of recycling an image from the generated image to the original to ensure that the surrounding pixels are not changed.
- Identity loss: The loss when an image of...