DCLGAN
A GAN for unpaired image-to-image translation trained with patch contrastive losses in both directions.
Diffusion and generative · 448 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.
At a glance
- Parameters
- 28.3M
- Operations
- 448
- Framework
- PyTorch
- Recurrent
- No
- Published
- NTIRE, CVPRW 2021
- Cited by
- 243 (as of 27 October 2026)
- Authors
- Junlin Han, Mehrdad Shoeiby, Lars Petersson, Mohammad Ali Armin
- Source
- GitHub: JunlinHan/DCLGAN
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
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.
Details
- Stable ID
- m15565
- Graph hash
- ea67146da70df16c3ebbe369602379b4cbd452e3348f1886bc957aca6dcce2b6
- Skeleton hash
- 5b0bbc80d62136edf42942ea6422644b44c1388553f44e3156362da9aa4ec870
- Architecture hash
- 3529f3ac0fd4ba10a822d8969b03198f9c09e8d444c2ac0d95b3d4529f6bceef
- Diagram SHA-256
- 81dea1b36917191aa06647f73f7369ec50389d613463267b3f07ddc9ad5e5e66
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
DCLGAN translates images from one domain to another, such as horse to zebra, when the training images are unpaired. It starts from CUT, which learns the translation by maximizing mutual information between input and output patches but uses only one encoder for both domains. The authors argue that one embedding for two distinct domains may not capture the gap between them.
DCLGAN therefore has two generators, one for each direction, and two discriminators. The first half of each generator acts as an encoder; features from four of its layers go to a two-layer MLP projection head, and each domain has its own encoder and head. Training combines an adversarial loss, the patch-based PatchNCE contrastive loss and an identity loss, and the SimDCL variant adds a similarity loss to address mode collapse.
Each generator is ResNet-based: 2 downsampling blocks, 9 residual blocks and 2 upsampling blocks. The discriminator is the PatchGAN design also used by CycleGAN and Pix2Pix, which judges local 70x70 patches. The paper concludes that the cycle-consistency constraint of earlier methods is unnecessary when there is no strict constraint on geometrical structure.
Key idea. DCLGAN applies patch-based contrastive learning to unpaired image translation in a dual setting, with a separate encoder and projection head for each domain.
- DCLGAN
- Dual Contrastive Learning
- SimDCL
- unpaired image-to-image translation
- unsupervised image-to-image translation
- image translation GAN
- contrastive learning GAN
- PatchNCE
- dual contrastive learning adversarial generative networks
- horse to zebra
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{han2021dualcontrastivelearningunsupervised,
title={Dual Contrastive Learning for Unsupervised Image-to-Image Translation},
author={Junlin Han and Mehrdad Shoeiby and Lars Petersson and Mohammad Ali Armin},
year={2021},
eprint={2104.07689},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2104.07689},
}