基于区域一致性注意力的单幅图像阴影去除算法
Single Image Shadow Removal Algorithm Based on Region-Consistent Attention
摘要: 单幅图像去阴影是计算机视觉领域的重要研究任务。针对现有深度学习去阴影算法在处理复杂阴影时,极易产生阴影区与非阴影区特征相互干扰,从而导致边界色彩不一致和局部结构失真的问题,本文提出了一种融合区域一致性注意力的生成式图像去阴影算法。首先,引入具备强大数据分布拟合能力的扩散模型作为基线框架,将去阴影过程建模为条件引导的逐步去噪生成过程。其次,为了消除非阴影背景与核心阴影区在特征提取阶段的相互污染,在网络的编码器与解码器阶段创新性地设计了区域一致性注意力模块(RCAM)。该模块利用阴影掩码(Mask)对自注意力机制的计算范围进行严格的空间约束,确保特征聚合仅在各自区域内部进行,有效提升了光照恢复的全局色彩一致性。在ISTD数据集上的大量对比实验表明,本文方法在峰值信噪比(PSNR)和结构相似性(SSIM)等客观指标上均优于主流对比算法,能够生成色彩自然、边界过渡平滑的高质量无阴影图像。
Abstract: Removing shadows from a single image is an important research task in the field of computer vision. In response to the problem that existing deep learning shadow removal algorithms are prone to interference between shadow and non-shadow features when dealing with complex shadows, resulting in inconsistent boundary colors and local structural distortion, this paper proposes a generative image shadow removal algorithm that integrates region-consistent attention. Firstly, a diffusion model with strong data distribution fitting ability is introduced as the baseline framework to model the shadow removal process as a condition-guided gradual denoising generation process. Secondly, in order to eliminate the mutual contamination between non-shadow background and core shadow area in the feature extraction stage, a region consistent attention module (RCAM) was innovatively designed in the encoder and decoder stages of the network. This module uses shadow masks to strictly constrain the computational range of the self-attention mechanism, ensuring that feature aggregation only occurs within their respective regions, effectively improving the global color consistency of lighting restoration. A large number of comparative experiments on the ISTD dataset show that our method outperforms mainstream comparison algorithms in objective indicators such as peak signal-to-noise ratio (PSNR) and structural similarity (SSIM), and can generate high-quality shadowless images with natural colors and smooth boundary transitions.
文章引用:黄鑫庆. 基于区域一致性注意力的单幅图像阴影去除算法[J]. 图像与信号处理, 2026, 15(2): 294-301. https://doi.org/10.12677/jisp.2026.152025

参考文献

[1] Finlayson, G.D., Hordley, S.D., Cheng, L. and Drew, M.S. (2006) On the Removal of Shadows from Images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28, 59-68. [Google Scholar] [CrossRef] [PubMed]
[2] Finlayson, G.D., Hordley, S.D. and Drew, M.S. (2002) Removing Shadows from Images. In: Heyden, A., et al., Eds., European Conference on Computer Vision, Springer, 823-836. [Google Scholar] [CrossRef
[3] Gryka, M., Terry, M. and Brostow, G.J. (2015) Learning to Remove Soft Shadows. ACM Transactions on Graphics, 34, 1-15. [Google Scholar] [CrossRef
[4] Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., et al. (2020) Generative Adversarial Networks. Communications of the ACM, 63, 139-144. [Google Scholar] [CrossRef
[5] Hu, X., Zhu, L., Fu, C., Qin, J. and Heng, P. (2018) Direction-Aware Spatial Context Features for Shadow Detection. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, 18-22 June 2018, 7454-7462. [Google Scholar] [CrossRef
[6] Hu, X., Jiang, Y., Fu, C. and Heng, P. (2019) Mask-Shadowgan: Learning to Remove Shadows from Unpaired Data. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, 27-28 October 2019, 2472-2481. [Google Scholar] [CrossRef
[7] Ho, J., Jain, A. and Abbeel, P. (2020) Denoising Diffusion Probabilistic Models. Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, 6-12 December 2020, 6840-6851.
[8] Liu, J., Wang, Q., Fan, H., Wang, Y., Tang, Y. and Qu, L. (2024) Residual Denoising Diffusion Models. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 16-22 June 2024, 2773-2783. [Google Scholar] [CrossRef
[9] Jin, Y., Sharma, A. and Tan, R.T. (2021) DC-ShadowNet: Single-Image Hard and Soft Shadow Removal Using Unsupervised Domain-Classifier Guided Network. 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, 10-17 October 2021, 5027-5036. [Google Scholar] [CrossRef
[10] Wang, J., Li, X. and Yang, J. (2018) Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, 18-22 June 2018, 1788-1797. [Google Scholar] [CrossRef
[11] Fu, L., Zhou, C., Guo, Q., Juefei-Xu, F., Yu, H., Feng, W., et al. (2021) Auto-Exposure Fusion for Single-Image Shadow Removal. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, 20-25 June 2021, 10571-10580. [Google Scholar] [CrossRef
[12] Zhu, Y., Huang, J., Fu, X., Zhao, F., Sun, Q. and Zha, Z. (2022) Bijective Mapping Network for Shadow Removal. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 5627-5636. [Google Scholar] [CrossRef
[13] Liu, J., Wang, Q., Fan, H., Li, W., Qu, L. and Tang, Y. (2023) A Decoupled Multi-Task Network for Shadow Removal. IEEE Transactions on Multimedia, 25, 9449-9463. [Google Scholar] [CrossRef