{"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/diffcr-a-fast-conditional-diffusion-framework","title":"DiffCR: A Fast Conditional Diffusion Framework for Cloud Removal from Optical Satellite Images","arxiv_id":"2308.04417","date":"2023-08-08","proceeding":null,"authors":["Xuechao Zou","Kai Li","Junliang Xing","Yu Zhang","Shiying Wang","Lei Jin","Pin Tao"],"abstract":"Optical satellite images are a critical data source; however, cloud cover often compromises their quality, hindering image applications and analysis. Consequently, effectively removing clouds from optical satellite images has emerged as a prominent research direction. While recent advancements in cloud removal primarily rely on generative adversarial networks, which may yield suboptimal image quality, diffusion models have demonstrated remarkable success in diverse image-generation tasks, showcasing their potential in addressing this challenge. This paper presents a novel framework called DiffCR, which leverages conditional guided diffusion with deep convolutional networks for high-performance cloud removal for optical satellite imagery. Specifically, we introduce a decoupled encoder for conditional image feature extraction, providing a robust color representation to ensure the close similarity of appearance information between the conditional input and the synthesized output. Moreover, we propose a novel and efficient time and condition fusion block within the cloud removal model to accurately simulate the correspondence between the appearance in the conditional image and the target image at a low computational cost. Extensive experimental evaluations on two commonly used benchmark datasets demonstrate that DiffCR consistently achieves state-of-the-art performance on all metrics, with parameter and computational complexities amounting to only 5.1% and 5.4%, respectively, of those previous best methods. The source code, pre-trained models, and all the experimental results will be publicly available at https://github.com/XavierJiezou/DiffCR upon the paper's acceptance of this work.","url_abs":"https://arxiv.org/abs/2308.04417v1","url_pdf":"https://arxiv.org/pdf/2308.04417v1.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":"diffcr-a-fast-conditional-diffusion-framework","repo_url":"https://github.com/xavierjiezou/diffcr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"cloud-removal","task_name":"Cloud Removal"},{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/cloud-removal-on-sen12ms-cr","task":"Cloud Removal","dataset":"SEN12MS-CR","model":"DiffCR","rank_in_archive_order":2,"of":10,"metrics":{"MAE":"0.019","PSNR":"31.77","SAM":"5.821","SSIM":"0.902"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2308.04417","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.04417"}},"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/xavierjiezou/diffcr","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":2,"ran_violates":3,"ran":11,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":20,"ran":17,"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":20,"samples":[{"code_sha256_prefix":"6a35b62fbc80f70a","entry":"interpolate_fn","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/dpm_solver_pytorch.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/dpm_solver_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a35b62fbc80f70a"}},{"code_sha256_prefix":"fbf9ec7be545688e","entry":"default","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"models/network.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/models/network.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fbf9ec7be545688e"}},{"code_sha256_prefix":"60fc13986769e4c7","entry":"dict2str","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/praser.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/praser.py","link_basis":"harvester_set","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":"60fc13986769e4c7"}},{"code_sha256_prefix":"38e77ca35f1f8bcb","entry":"dict_to_nonedict","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/praser.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/praser.py","link_basis":"harvester_set","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":"38e77ca35f1f8bcb"}},{"code_sha256_prefix":"608e364a9d2376a3","entry":"exists","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"models/network.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/models/network.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"608e364a9d2376a3"}},{"code_sha256_prefix":"e6110366588c5c65","entry":"expand_dims","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/dpm_solver_pytorch.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/dpm_solver_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e6110366588c5c65"}},{"code_sha256_prefix":"31ab8b34a9eae739","entry":"get_rgb","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/util.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/util.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":"31ab8b34a9eae739"}},{"code_sha256_prefix":"ab4109634b75ef8b","entry":"is_image_file","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/base_dataset.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/base_dataset.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ab4109634b75ef8b"}},{"code_sha256_prefix":"ec9619e0218df36b","entry":"l1_loss","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"models/loss.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/models/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ec9619e0218df36b"}},{"code_sha256_prefix":"0570fbc1e2582ae7","entry":"mae","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"models/metric.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/models/metric.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0570fbc1e2582ae7"}},{"code_sha256_prefix":"fd901efe5f883205","entry":"make_dataset","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/base_dataset.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/base_dataset.py","link_basis":"harvester_set","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":"fd901efe5f883205"}},{"code_sha256_prefix":"9848e01415415f8a","entry":"model_wrapper","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/dpm_solver_pytorch.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/dpm_solver_pytorch.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":"9848e01415415f8a"}},{"code_sha256_prefix":"c4e49babf7143348","entry":"model_wrapper","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/dpm_solver_pytorch_no_noise.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/dpm_solver_pytorch_no_noise.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":"c4e49babf7143348"}},{"code_sha256_prefix":"632959a67ae7fdac","entry":"mse_loss","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"models/loss.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/models/loss.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"632959a67ae7fdac"}},{"code_sha256_prefix":"534e80dab769ec2f","entry":"pil_loader","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/base_dataset.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/base_dataset.py","link_basis":"harvester_set","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":"534e80dab769ec2f"}},{"code_sha256_prefix":"323b38636782c5cc","entry":"postprocess","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/util.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/util.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":"323b38636782c5cc"}},{"code_sha256_prefix":"5f41e21e2d6d8972","entry":"tensor2img","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/util.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/util.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":"5f41e21e2d6d8972"}},{"code_sha256_prefix":"e894fcce48231d2f","entry":"extract","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"models/network.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/models/network.py","link_basis":"harvester_set","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":"e894fcce48231d2f"}},{"code_sha256_prefix":"6d3c813b7561493d","entry":"inception_score","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"models/metric.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/models/metric.py","link_basis":"harvester_set","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":"6d3c813b7561493d"}},{"code_sha256_prefix":"89ecc1cd0adb6951","entry":"init_obj","repo":"xavierjiezou/diffcr","repo_kind":"official","path":"core/praser.py","file_url":"https://github.com/xavierjiezou/diffcr/blob/HEAD/core/praser.py","link_basis":"harvester_set","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":"89ecc1cd0adb6951"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}