基于跨区域特征交互与掩码引导的单幅图像去阴影算法研究
Single Image Shadow Removal via Cross-Region Feature Interaction and Mask Guidance
摘要: 单幅图像去阴影旨在恢复被光源遮挡区域的底层内容,是计算机视觉领域重要且极具挑战性的任务。现有多数深度学习去阴影算法在特征修复时,往往过度依赖阴影区域内部的局部特征映射,忽视了同一图像中非阴影区域所蕴含的丰富且干净的背景先验,导致大面积阴影的复原结果极易出现纹理模糊与结构失真。针对此问题,本文提出了一种基于跨区域特征交互与掩码引导的单幅图像去阴影算法。该算法构建了一个多尺度的编码器–解码器网络,并创新性地在网络的最深层(瓶颈层)引入了跨区域特征感知注意力模块(SACA)。该模块以二值阴影掩码作为空间约束,将非阴影区域的高质量精细特征作为键(Key)和值(Value),将阴影区域特征作为查询(Query)。通过交叉注意力机制,网络能够跨越空间距离,将背景处完整的纹理与结构信息精准对齐并传递至阴影目标区域,有效打破了阴影重构的信息瓶颈。在公开的去阴影数据集上进行的广泛定性与定量实验表明,本文方法在客观评价指标上优于现有主流算法,生成的无阴影图像具有更高的纹理清晰度与更平滑的边界过渡。
Abstract: Single image shadow removal aims to recover the underlying content in regions occluded by light sources, which remains a crucial yet challenging task in computer vision. During feature restoration, most existing deep learning-based shadow removal algorithms rely heavily on local feature mapping within the shadow regions. However, they tend to overlook the rich and clean background priors inherent in the non-shadow regions of the same image, which often leads to texture blurring and structural distortion when dealing with large-area shadows. To address this issue, this paper proposes a single image shadow removal algorithm based on cross-region feature interaction and mask guidance. Specifically, we construct a multi-scale encoder-decoder network and innovatively introduce a Structure-Aware Cross Attention (SACA) module at the deepest bottleneck layer. With the binary shadow mask acting as a spatial constraint, this module utilizes the high-quality fine features from the non-shadow regions as the Key and Value, while taking the shadow region features as the Query. Through a cross-attention mechanism, the network bridges spatial distances to accurately align and propagate the intact texture and structural information from the background to the target shadow regions, thereby effectively breaking the information bottleneck in shadow reconstruction. Extensive qualitative and quantitative experiments on public shadow removal datasets demonstrate that the proposed method outperforms mainstream algorithms in objective evaluation metrics, generating shadow-free images with clearer textures and smoother boundary transitions.
文章引用:黄鑫庆. 基于跨区域特征交互与掩码引导的单幅图像去阴影算法研究[J]. 人工智能与机器人研究, 2026, 15(3): 714-721. https://doi.org/10.12677/airr.2026.153067

参考文献

[1] Qu, L., Tian, J., He, S., Tang, Y. and Lau, R.W.H. (2017) DeshadowNet: A Multi-Context Embedding Deep Network for Shadow Removal. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, 21-26 July 2017, 3016-3024. [Google Scholar] [CrossRef
[2] 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 October 2019-2 November 2019, 2472-2481. [Google Scholar] [CrossRef
[3] 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-23 June 2018, 7454-7462. [Google Scholar] [CrossRef
[4] Vaswani, A., Shazeer, N., Parmar, N., et al. (2017) Attention Is All You Need.
https://arxiv.org/abs/1706.03762
[5] Ronneberger, O., Fischer, P. and Brox, T. (2015) U-Net: Convolutional Networks for Biomedical Image Segmentation. In: Navab, N., Hornegger, J., Wells, W. and Frangi, A. Eds., Lecture Notes in Computer Science, Springer International Publishing, 234-241. [Google Scholar] [CrossRef
[6] Cun, X., Pun, C. and Shi, C. (2020) Towards Ghost-Free Shadow Removal via Dual Hierarchical Aggregation Network and Shadow Matting Gan. Proceedings of the AAAI Conference on Artificial Intelligence, 34, 10680-10687. [Google Scholar] [CrossRef
[7] 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
[8] Wan, J., Yin, H., Wu, Z., Wu, X., Liu, Y. and Wang, S. (2022) Style-Guided Shadow Removal. In: Avidan, S., Brostow, G., Cissé, M., Farinella, G.M. and Hassner, T., Eds., Lecture Notes in Computer Science, Springer, 361-378. [Google Scholar] [CrossRef
[9] 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
[10] Jin, Y., Ye, W., Yang, W., Yuan, Y. and Tan, R.T. (2024) Des3: Adaptive Attention-Driven Self and Soft Shadow Removal Using Vit Similarity. Proceedings of the AAAI Conference on Artificial Intelligence, 38, 2634-2642. [Google Scholar] [CrossRef
[11] Saharia, C., Chan, W., Chang, H., Lee, C., Ho, J., Salimans, T., et al. (2022) Palette: Image-to-Image Diffusion Models. Special Interest Group on Computer Graphics and Interactive Techniques Conference Proceedings, Vancouver, 7-11 August 2022, 1-10. [Google Scholar] [CrossRef
[12] Lugmayr, A., Danelljan, M., Romero, A., Yu, F., Timofte, R. and Van Gool, L. (2022) RePaint: Inpainting Using Denoising Diffusion Probabilistic Models. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 11461-11471. [Google Scholar] [CrossRef