
cyclegan_resnet_6blocks_generator
Diffusion and generative67 ops7.8M params
The CycleGAN generator: a residual image-to-image network that learned to translate without paired examples.
Diffusion and generative · 91 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
This is the 9-residual-block generator the paper uses for 256 × 256 or higher-resolution training images.
About this model's family
CycleGAN is an approach for learning to translate an image from a source domain X to a target domain Y in the absence of paired examples. The goal is a mapping G such that the distribution of images from G(X) is indistinguishable from the distribution Y using an adversarial loss. Because this mapping is highly under-constrained, it is coupled with an inverse mapping F and a cycle consistency loss that pushes F(G(X)) back towards X. Results are shown on collection style transfer, object transfiguration, season transfer and photo enhancement, tasks where paired training data does not exist.
What is traced here is the generator network. Its architecture is adopted from Johnson et al., who had shown impressive results for neural style transfer and super-resolution. The network contains three convolutions, several residual blocks, two fractionally-strided convolutions, and one convolution that maps features to RGB. Like Johnson et al., it uses instance normalization. Each residual block contains two 3 × 3 convolutional layers with the same number of filters on both layers. Reflection padding was used to reduce artifacts. In the paper's notation the 9-block network reads c7s1-64, d128, d256, nine R256 blocks, u128, u64, c7s1-3: a 7 × 7 stem, two stride-2 downsampling convolutions, the residual trunk, two upsampling layers and a 7 × 7 output convolution.
The paper uses 6 residual blocks for 128 × 128 training images and 9 residual blocks for 256 × 256 or higher-resolution training images, and both variants are captured as members. All the models were trained on 256 × 256 images. The official PyTorch repository produces results comparable to or better than the original Torch software, and it ships pretrained CycleGAN generators such as horse2zebra. The pretrained generator is saved as latest_net_G.pth under a checkpoints folder named for the dataset.
Key idea. Unpaired image-to-image translation: an adversarial loss makes G(X) look like Y while a cycle consistency loss with an inverse mapping F pushes F(G(X)) back to X, so the generator can be trained without aligned image pairs.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{zhu2020unpairedimagetoimagetranslationusing,
title={Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks},
author={Jun-Yan Zhu and Taesung Park and Phillip Isola and Alexei A. Efros},
year={2020},
eprint={1703.10593},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1703.10593},
}