SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.15651 · 2020

Contrastive Learning for Unpaired Image-to-Image Translation

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 9 functions out of this paper's own repositories and ran 9 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
XiudingCai/EnCo-pytorch pwc_unofficial 9 of 9
FunctionStatusWhere it lives
fused_leaky_relu Ran XiudingCai/EnCo-pytorch/models/stylegan_networks.py
code served (permissive licence) · get_code("44c69c91b5434020")
get_filter Ran XiudingCai/EnCo-pytorch/models/networks.py
code served (permissive licence) · get_code("acc24402a2d089fa")
get_gaussian_kernel Ran XiudingCai/EnCo-pytorch/util/SWD/swd_pytorch.py
code served (permissive licence) · get_code("c8ceba12b6020549")
get_norm_layer Ran XiudingCai/EnCo-pytorch/models/networks.py
code served (permissive licence) · get_code("b27dffc0609fbec0")
get_pad_layer Ran XiudingCai/EnCo-pytorch/models/networks.py
code served (permissive licence) · get_code("50aa4a59fe718c61")
pyramid_down Ran XiudingCai/EnCo-pytorch/util/SWD/swd_pytorch.py
code served (permissive licence) · get_code("4a3a50d5b90d9dac")
pyramid_up Ran XiudingCai/EnCo-pytorch/util/SWD/swd_pytorch.py
code served (permissive licence) · get_code("d6f847810616ed82")
upfirdn2d Ran XiudingCai/EnCo-pytorch/models/stylegan_networks.py
code served (permissive licence) · get_code("c5d084250637f1f8")
upfirdn2d_native Ran XiudingCai/EnCo-pytorch/models/stylegan_networks.py
code served (permissive licence) · get_code("200baf9e83c9a4de")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In image-to-image translation, each patch in the output should reflect the content of the corresponding patch in the input, independent of domain. We propose a straightforward method for doing so -- maximizing mutual information between the two, using a framework based on contrastive learning. The method encourages two elements (corresponding patches) to map to a similar point in a learned feature space, relative to other elements (other patches) in the dataset, referred to as negatives. We explore several critical design choices for making contrastive learning effective in the image synthesis setting. Notably, we use a multilayer, patch-based approach, rather than operate on entire images. Furthermore, we draw negatives from within the input image itself, rather than from the rest of the dataset. We demonstrate that our framework enables one-sided translation in the unpaired image-to-image translation setting, while improving quality and reducing training time. In addition, our method can even be extended to the training setting where each "domain" is only a single image.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2007.15651")
get_code_for_paper("2007.15651")
have("2007.15651")

Connect an agent — have() is free.