{"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/residual-conditioned-optimal-transport","title":"Residual-Conditioned Optimal Transport: Towards Structure-Preserving Unpaired and Paired Image Restoration","arxiv_id":"2405.02843","date":"2024-05-05","proceeding":null,"authors":["Xiaole Tang","Xin Hu","Xiang Gu","Jian Sun"],"abstract":"Deep learning-based image restoration methods generally struggle with faithfully preserving the structures of the original image. In this work, we propose a novel Residual-Conditioned Optimal Transport (RCOT) approach, which models image restoration as an optimal transport (OT) problem for both unpaired and paired settings, introducing the transport residual as a unique degradation-specific cue for both the transport cost and the transport map. Specifically, we first formalize a Fourier residual-guided OT objective by incorporating the degradation-specific information of the residual into the transport cost. We further design the transport map as a two-pass RCOT map that comprises a base model and a refinement process, in which the transport residual is computed by the base model in the first pass and then encoded as a degradation-specific embedding to condition the second-pass restoration. By duality, the RCOT problem is transformed into a minimax optimization problem, which can be solved by adversarially training neural networks. Extensive experiments on multiple restoration tasks show that RCOT achieves competitive performance in terms of both distortion measures and perceptual quality, restoring images with more faithful structures as compared with state-of-the-art methods.","url_abs":"https://arxiv.org/abs/2405.02843v2","url_pdf":"https://arxiv.org/pdf/2405.02843v2.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":"residual-conditioned-optimal-transport","repo_url":"https://github.com/xl-tang3/RCOT","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"color-image-denoising","task_name":"Color Image Denoising"},{"task_slug":"image-restoration","task_name":"Image Restoration"},{"task_slug":"image-super-resolution","task_name":"Image Super-Resolution"}],"methods":[{"method_slug":"base","method_name":"BASE"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/color-image-denoising-on-cbsd68-sigma50","task":"Color Image Denoising","dataset":"CBSD68 sigma50","model":"RCOT","rank_in_archive_order":8,"of":18,"metrics":{"PSNR":"28.25"},"uses_additional_data":false},{"leaderboard":"/sota/image-super-resolution-on-div2k-val-4x","task":"Image Super-Resolution","dataset":"DIV2K val - 4x upscaling","model":"RCOT","rank_in_archive_order":4,"of":21,"metrics":{"LPIPS":"0.104","PSNR":"28.41","SSIM":"0.804"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2405.02843","atlas_url":"https://app.syntology.ai/?focus=2405.02843","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.02843"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/xl-tang3/RCOT","reach":null}],"summary":{"ran":7,"ran_draft_wrong":2,"ran_honours":2,"unverified":1},"by_repo_kind":{"official":{"samples":10,"ran":9,"repositories":1},"community":{"samples":1,"ran":1,"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":11,"samples":[{"code_sha256_prefix":"678f3130b1d60fa6","entry":"CAB","repo":"xl-tang3/RCOT","repo_kind":"official","path":"Net.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/Net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"678f3130b1d60fa6"}},{"code_sha256_prefix":"d487b4aabe9c084e","entry":"CALayer","repo":"xl-tang3/RCOT","repo_kind":"official","path":"Net.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/Net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d487b4aabe9c084e"}},{"code_sha256_prefix":"51c52bb9f66035a4","entry":"Decoder","repo":"xl-tang3/RCOT","repo_kind":"official","path":"Net.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/Net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"51c52bb9f66035a4"}},{"code_sha256_prefix":"45d120cfa343ebec","entry":"DownSample","repo":"xl-tang3/RCOT","repo_kind":"official","path":"Net.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/Net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"45d120cfa343ebec"}},{"code_sha256_prefix":"3354aabf0ecc8c18","entry":"Encoder","repo":"xl-tang3/RCOT","repo_kind":"official","path":"Net.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/Net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3354aabf0ecc8c18"}},{"code_sha256_prefix":"f4c99d0f2598f605","entry":"PSNR","repo":"xl-tang3/DA-RCOT","repo_kind":"community","path":"tester.py","file_url":"https://github.com/xl-tang3/DA-RCOT/blob/HEAD/tester.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f4c99d0f2598f605"}},{"code_sha256_prefix":"4bf95f287cef1b67","entry":"SAM","repo":"xl-tang3/RCOT","repo_kind":"official","path":"Net.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/Net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4bf95f287cef1b67"}},{"code_sha256_prefix":"486b1e7f3f32e75e","entry":"SkipUpSample","repo":"xl-tang3/RCOT","repo_kind":"official","path":"Net.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/Net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"486b1e7f3f32e75e"}},{"code_sha256_prefix":"9496ce74f56e1d57","entry":"adjust_learning_rate","repo":"xl-tang3/RCOT","repo_kind":"official","path":"trainer.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9496ce74f56e1d57"}},{"code_sha256_prefix":"ad4c565716dab068","entry":"conv","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"ad4c565716dab068"}},{"code_sha256_prefix":"a23501ebdd938df8","entry":"get_parameter_number","repo":"xl-tang3/RCOT","repo_kind":"official","path":"trainer.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a23501ebdd938df8"}},{"code_sha256_prefix":"21d9b606fd0956a1","entry":"T_net","repo":"xl-tang3/RCOT","repo_kind":"official","path":"Net.py","file_url":"https://github.com/xl-tang3/RCOT/blob/HEAD/Net.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"21d9b606fd0956a1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}