comodgan_inpainting
A co-modulated GAN generator that fills in large missing regions of an image.
Diffusion and generative · 1,101 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
- 79.8M
- Operations
- 1,101
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICLR 2021
- Cited by
- 188 (as of 20 October 2026)
- Authors
- Shengyu Zhao, Jonathan Cui, Yilun Sheng and others
- Source
- GitHub: zsyzzsoft/co-mod-gan
- License
- BSD-2-Clause
- 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
- m3843
- Graph hash
- 21bf7dd3558425ef053a138e1d41c5e8b907981407039f8295761f8766e9b4c5
- Skeleton hash
- 6207f1663e9421968483319defae3578f3f02eef50e82496fbc1b15175b0a47b
- Architecture hash
- 17f1bcf8550cd08cfc142367661c60aa30e42ea27271a4f245ac920303ac286b
- Diagram SHA-256
- c5cf5c86f58691417f59d7c43a46cbc2094b926d4d20ef8ec3e4f2fc0a01fc2d
- 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
CoModGAN is a generative adversarial network for image completion, where the generator has to produce the missing part of an image while the known pixels stay unchanged. The paper starts from the observation that the completion methods existing at the time tended to fail when the missing region is large.
The generator builds on the modulated design of StyleGAN2, in which a latent vector passes through a fully connected mapping network and the result sets a style vector for each convolution. Setting the style from the encoded input image alone has a drawback the paper names: the generator loses its stochastic capability. Co-modulation instead derives each style vector from both the encoded image and the mapped latent vector through a joint affine transformation.
Skip residual connections link each level of the conditional encoder to the decoder. The dropout on the conditional style representation stays enabled at test time, because the authors observed that it partially correlates to the inherent stochasticity. The paper also proposes a metric, the Paired/Unpaired Inception Discriminative Score (P-IDS/U-IDS), which measures linear separability of real and generated images in a pre-trained feature space. The paper reports 109M parameters in total for its model.
Key idea. The paper conditions a modulated generator on both an encoded input image and a random latent vector through co-modulation, so it can complete large missing regions with diverse results.
- CoModGAN
- Co-Mod-GAN
- co-modulated GAN
- co-modulation
- image completion
- image inpainting
- large-scale image completion
- free-form inpainting
- P-IDS
- U-IDS
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{zhao2021largescaleimagecompletion,
title={Large Scale Image Completion via Co-Modulated Generative Adversarial Networks},
author={Shengyu Zhao and Jonathan Cui and Yilun Sheng and Yue Dong and Xiao Liang and Eric I Chang and Yan Xu},
year={2021},
eprint={2103.10428},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2103.10428},
}