{"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/ridcp-revitalizing-real-image-dehazing-via","title":"RIDCP: Revitalizing Real Image Dehazing via High-Quality Codebook Priors","arxiv_id":"2304.03994","date":"2023-04-08","proceeding":"CVPR 2023 1","authors":["Rui-Qi Wu","Zheng-Peng Duan","Chun-Le Guo","Zhi Chai","Chong-Yi Li"],"abstract":"Existing dehazing approaches struggle to process real-world hazy images owing to the lack of paired real data and robust priors. In this work, we present a new paradigm for real image dehazing from the perspectives of synthesizing more realistic hazy data and introducing more robust priors into the network. Specifically, (1) instead of adopting the de facto physical scattering model, we rethink the degradation of real hazy images and propose a phenomenological pipeline considering diverse degradation types. (2) We propose a Real Image Dehazing network via high-quality Codebook Priors (RIDCP). Firstly, a VQGAN is pre-trained on a large-scale high-quality dataset to obtain the discrete codebook, encapsulating high-quality priors (HQPs). After replacing the negative effects brought by haze with HQPs, the decoder equipped with a novel normalized feature alignment module can effectively utilize high-quality features and produce clean results. However, although our degradation pipeline drastically mitigates the domain gap between synthetic and real data, it is still intractable to avoid it, which challenges HQPs matching in the wild. Thus, we re-calculate the distance when matching the features to the HQPs by a controllable matching operation, which facilitates finding better counterparts. We provide a recommendation to control the matching based on an explainable solution. Users can also flexibly adjust the enhancement degree as per their preference. Extensive experiments verify the effectiveness of our data synthesis pipeline and the superior performance of RIDCP in real image dehazing.","url_abs":"https://arxiv.org/abs/2304.03994v1","url_pdf":"https://arxiv.org/pdf/2304.03994v1.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":"ridcp-revitalizing-real-image-dehazing-via","repo_url":"https://github.com/RQ-Wu/RIDCP_dehazing","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-dehazing","task_name":"Image Dehazing"},{"task_slug":"high","task_name":"Vocal Bursts Intensity Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2304.03994","atlas_url":"https://app.syntology.ai/?focus=2304.03994","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.03994"}},"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/RQ-Wu/RIDCP_dehazing","reach":null}],"summary":{"ran":5,"unverified":15},"by_repo_kind":{"official":{"samples":20,"ran":5,"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":"98b8086551afc505","entry":"CombineQuantBlock","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"98b8086551afc505"}},{"code_sha256_prefix":"316a2941ffe6e503","entry":"PatchEmbed","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"316a2941ffe6e503"}},{"code_sha256_prefix":"57e191838eccb314","entry":"PatchUnEmbed","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"57e191838eccb314"}},{"code_sha256_prefix":"357ba1220656b8cf","entry":"RSTB","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"357ba1220656b8cf"}},{"code_sha256_prefix":"48e41377ffa75208","entry":"WindowAttention","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"48e41377ffa75208"}},{"code_sha256_prefix":"5bab9cf0da278cdd","entry":"BasicLayer","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5bab9cf0da278cdd"}},{"code_sha256_prefix":"8a529df91e6d85ec","entry":"DCNv2Pack","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8a529df91e6d85ec"}},{"code_sha256_prefix":"4691d3a2780aa4c8","entry":"DecoderBlock","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"4691d3a2780aa4c8"}},{"code_sha256_prefix":"8fe94a4d56b986ff","entry":"ModulatedDeformConv","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8fe94a4d56b986ff"}},{"code_sha256_prefix":"bc370612a5163031","entry":"ModulatedDeformConvPack","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"bc370612a5163031"}},{"code_sha256_prefix":"02baa6cd7348cf6b","entry":"MultiScaleDecoder","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"02baa6cd7348cf6b"}},{"code_sha256_prefix":"e51e884e57372d9d","entry":"MultiScaleEncoder","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e51e884e57372d9d"}},{"code_sha256_prefix":"a5db9179d98568ce","entry":"Registry","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a5db9179d98568ce"}},{"code_sha256_prefix":"7775af00673aadf8","entry":"ResBlock","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"7775af00673aadf8"}},{"code_sha256_prefix":"09d15290f908d1d3","entry":"SwinLayers","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"09d15290f908d1d3"}},{"code_sha256_prefix":"ad1688f5befc5f30","entry":"SwinTransformerBlock","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ad1688f5befc5f30"}},{"code_sha256_prefix":"49281385811fce95","entry":"VGGFeatureExtractor","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"49281385811fce95"}},{"code_sha256_prefix":"8b0f749d672e59df","entry":"VQWeightDehazeNet","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8b0f749d672e59df"}},{"code_sha256_prefix":"6a91256c000435ed","entry":"VectorQuantizer","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"6a91256c000435ed"}},{"code_sha256_prefix":"857343cb56612c9c","entry":"WarpBlock","repo":"RQ-Wu/RIDCP_dehazing","repo_kind":"official","path":"basicsr/archs/dehaze_vq_weight_arch.py","file_url":"https://github.com/RQ-Wu/RIDCP_dehazing/blob/HEAD/basicsr/archs/dehaze_vq_weight_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"857343cb56612c9c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}