CrossMamba: Transformer-Mamba fusion for document shadow removal
摘要
Document image shadow removal is challenging, as uneven illumination leads to color distortion and text structure degradation. Existing deep learning methods, such as CNN or Transformer, often fail to address both effectively due to limited receptive fields or the high computational cost of self-attention. To address this, we propose CrossMamba, a hybrid Transformer–Mamba network with Laplacian pyramid decomposition. In the low-frequency branch, we introduce a Bayesian guided color tokenization (BGCT). Exploiting the low-rank property of document colors, BGCT constructs a global color codebook via Bayesian inference. To resolve spatial-chromatic ambiguity, we design a cross-attention mechanism which aligns global color priors with local features for spatially adaptive correction. In the high-frequency branch, we introduce a texture-conditioned windowed mamba (TCWM) for texture restoration, leveraging the linear efficiency of state space models (SSM) of Mamba to capture long-range stroke dependencies. Coupled with a pyramid texture modulation (PTM), it injects illumination context from the low-frequency branch to provide cross-frequency semantic guidance, enabling adaptive texture-conditioned gating. Finally, the image is reconstructed via Laplacian pyramid reconstruction. We design a pyramid-level reconstruction consistency loss to jointly optimize the physical consistency of high-frequency text details and low-frequency background colors. Extensive experiments on both public datasets and our collected image datasets validate the effectiveness of our proposed approach.