{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/dual-contrastive-learning-for-unsupervised","title":"Dual Contrastive Learning for Unsupervised Image-to-Image Translation","arxiv_id":"2104.07689","date":"2021-04-15","proceeding":null,"authors":["Junlin Han","Mehrdad Shoeiby","Lars Petersson","Mohammad Ali Armin"],"abstract":"Unsupervised image-to-image translation tasks aim to find a mapping between a source domain X and a target domain Y from unpaired training data. Contrastive learning for Unpaired image-to-image Translation (CUT) yields state-of-the-art results in modeling unsupervised image-to-image translation by maximizing mutual information between input and output patches using only one encoder for both domains. In this paper, we propose a novel method based on contrastive learning and a dual learning setting (exploiting two encoders) to infer an efficient mapping between unpaired data. Additionally, while CUT suffers from mode collapse, a variant of our method efficiently addresses this issue. We further demonstrate the advantage of our approach through extensive ablation studies demonstrating superior performance comparing to recent approaches in multiple challenging image translation tasks. Lastly, we demonstrate that the gap between unsupervised methods and supervised methods can be efficiently closed.","url_abs":"https://arxiv.org/abs/2104.07689v1","url_pdf":"https://arxiv.org/pdf/2104.07689v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"dual-contrastive-learning-for-unsupervised","repo_url":"https://github.com/JunlinHan/DCLGAN","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"dual-contrastive-learning-for-unsupervised","repo_url":"https://github.com/Deopoler/DCLGAN-Keras","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dual-contrastive-learning-for-unsupervised","repo_url":"https://github.com/hthoai/UI2IT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"image-to-image-translation","task_name":"Image-to-Image Translation"},{"task_slug":"translation","task_name":"Translation"},{"task_slug":"unsupervised-image-to-image-translation","task_name":"Unsupervised Image-To-Image Translation"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2104.07689","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.07689"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hthoai/UI2IT","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Deopoler/DCLGAN-Keras","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JunlinHan/DCLGAN","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"unverified":10},"by_repo_kind":{"listed":{"samples":10,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"29723a1d716a52d8","entry":"Discriminator","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"modules/networks.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/modules/networks.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29723a1d716a52d8"}},{"code_sha256_prefix":"5d5451412586a03f","entry":"Encoder","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"modules/networks.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/modules/networks.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5d5451412586a03f"}},{"code_sha256_prefix":"ce20b860ac6c1fb9","entry":"Generator","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"modules/networks.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/modules/networks.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce20b860ac6c1fb9"}},{"code_sha256_prefix":"4f77a9e3e132775c","entry":"create_dataset","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4f77a9e3e132775c"}},{"code_sha256_prefix":"ff8a46b5b4b20261","entry":"create_dir","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ff8a46b5b4b20261"}},{"code_sha256_prefix":"2b7516dd2ec5a0a7","entry":"filter_2d","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"modules/ops/upfirdn_2d.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/modules/ops/upfirdn_2d.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2b7516dd2ec5a0a7"}},{"code_sha256_prefix":"ead4a48eefa54ab0","entry":"get_plugin","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"modules/ops/custom_ops.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/modules/ops/custom_ops.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ead4a48eefa54ab0"}},{"code_sha256_prefix":"c29e9a0f14c25a2f","entry":"load_image","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c29e9a0f14c25a2f"}},{"code_sha256_prefix":"f0893af6a4c9b53b","entry":"upfirdn_2d","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"modules/ops/upfirdn_2d.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/modules/ops/upfirdn_2d.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f0893af6a4c9b53b"}},{"code_sha256_prefix":"570d341df62e8b14","entry":"upsample_2d","repo":"Deopoler/DCLGAN-Keras","repo_kind":"listed","path":"modules/ops/upfirdn_2d.py","file_url":"https://github.com/Deopoler/DCLGAN-Keras/blob/HEAD/modules/ops/upfirdn_2d.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"570d341df62e8b14"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}