{"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/ecmamba-consolidating-selective-state-space","title":"ECMamba: Consolidating Selective State Space Model with Retinex Guidance for Efficient Multiple Exposure Correction","arxiv_id":"2410.21535","date":"2024-10-28","proceeding":null,"authors":["Wei Dong","Han Zhou","Yulun Zhang","Xiaohong Liu","Jun Chen"],"abstract":"Exposure Correction (EC) aims to recover proper exposure conditions for images captured under over-exposure or under-exposure scenarios. While existing deep learning models have shown promising results, few have fully embedded Retinex theory into their architecture, highlighting a gap in current methodologies. Additionally, the balance between high performance and efficiency remains an under-explored problem for exposure correction task. Inspired by Mamba which demonstrates powerful and highly efficient sequence modeling, we introduce a novel framework based on Mamba for Exposure Correction (ECMamba) with dual pathways, each dedicated to the restoration of reflectance and illumination map, respectively. Specifically, we firstly derive the Retinex theory and we train a Retinex estimator capable of mapping inputs into two intermediary spaces, each approximating the target reflectance and illumination map, respectively. This setup facilitates the refined restoration process of the subsequent Exposure Correction Mamba Module (ECMM). Moreover, we develop a novel 2D Selective State-space layer guided by Retinex information (Retinex-SS2D) as the core operator of ECMM. This architecture incorporates an innovative 2D scanning strategy based on deformable feature aggregation, thereby enhancing both efficiency and effectiveness. Extensive experiment results and comprehensive ablation studies demonstrate the outstanding performance and the importance of each component of our proposed ECMamba. Code is available at https://github.com/LowlevelAI/ECMamba.","url_abs":"https://arxiv.org/abs/2410.21535v1","url_pdf":"https://arxiv.org/pdf/2410.21535v1.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":"ecmamba-consolidating-selective-state-space","repo_url":"https://github.com/lowlevelai/ecmamba","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"exposure-correction","task_name":"Exposure Correction"},{"task_slug":"mamba","task_name":"Mamba"}],"methods":[{"method_slug":"mamba","method_name":"Mamba"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.21535","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.21535"}},"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":"deterministic:regex_extraction","url":"https://github.com/LowlevelAI/ECMamba","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lowlevelai/ecmamba","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":5,"ran":4,"ran_honours":2,"ran_fixture":1,"unverified":7},"by_repo_kind":{"official":{"samples":19,"ran":12,"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":"e7f1a63c2e99c70f","entry":"build_norm_layer","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/archs/ecmambaincontext_arch.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/archs/ecmambaincontext_arch.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e7f1a63c2e99c70f"}},{"code_sha256_prefix":"d292dd965ab59629","entry":"calculate_psnr","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"utils.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d292dd965ab59629"}},{"code_sha256_prefix":"a05b184dc6c264a0","entry":"calculate_ssim","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"utils.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a05b184dc6c264a0"}},{"code_sha256_prefix":"6154e3744ece5728","entry":"create_window","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/losses/pytorch_ssim.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/losses/pytorch_ssim.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6154e3744ece5728"}},{"code_sha256_prefix":"ef9faf68f492a375","entry":"flow_warp","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/archs/arch_util.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/archs/arch_util.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ef9faf68f492a375"}},{"code_sha256_prefix":"c56b7ef16f309a45","entry":"gaussian","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/losses/onerestore_loss.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/losses/onerestore_loss.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c56b7ef16f309a45"}},{"code_sha256_prefix":"cd569444547de84f","entry":"get_position_from_periods","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/models/lr_scheduler.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/models/lr_scheduler.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cd569444547de84f"}},{"code_sha256_prefix":"631a9cdc62e42ba1","entry":"index_reverse","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/archs/ecmambaincontext_arch.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/archs/ecmambaincontext_arch.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"631a9cdc62e42ba1"}},{"code_sha256_prefix":"96ad5dc9ca239aec","entry":"make_layer","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/archs/arch_util.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/archs/arch_util.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"96ad5dc9ca239aec"}},{"code_sha256_prefix":"5a1d8458dc7077a6","entry":"resize_flow","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/archs/arch_util.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/archs/arch_util.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5a1d8458dc7077a6"}},{"code_sha256_prefix":"4972b6068f4eb0c6","entry":"rgb","repo":"LowLevelAI/ECMamba","repo_kind":"official","path":"test_lol.py","file_url":"https://github.com/LowLevelAI/ECMamba/blob/HEAD/test_lol.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4972b6068f4eb0c6"}},{"code_sha256_prefix":"c76d18678f19d332","entry":"trunc_normal_","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/archs/ecmambaincontext_arch.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/archs/ecmambaincontext_arch.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c76d18678f19d332"}},{"code_sha256_prefix":"8eccacd101833667","entry":"PSNR","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"utils.py","file_url":"https://github.com/LowlevelAI/ECMamba/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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8eccacd101833667"}},{"code_sha256_prefix":"443341084ce76798","entry":"create_window","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/losses/onerestore_loss.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/losses/onerestore_loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"443341084ce76798"}},{"code_sha256_prefix":"7e067489302d7df6","entry":"data_process","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/losses/onerestore_loss.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/losses/onerestore_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7e067489302d7df6"}},{"code_sha256_prefix":"a648a03a952822c0","entry":"reduce_loss","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/losses/loss_util.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/losses/loss_util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a648a03a952822c0"}},{"code_sha256_prefix":"9151c793f90473f0","entry":"ssim","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/losses/pytorch_ssim.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/losses/pytorch_ssim.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9151c793f90473f0"}},{"code_sha256_prefix":"1ba39317ea81871a","entry":"weight_reduce_loss","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/losses/loss_util.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/losses/loss_util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1ba39317ea81871a"}},{"code_sha256_prefix":"cf63f8afc13f62a7","entry":"weighted_loss","repo":"LowlevelAI/ECMamba","repo_kind":"official","path":"basicsr/losses/loss_util.py","file_url":"https://github.com/LowlevelAI/ECMamba/blob/HEAD/basicsr/losses/loss_util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cf63f8afc13f62a7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}