Efficient shadow removal using LSFormer with DiNA attention and dual-scale gated feedforward network
摘要
Shadow removal, a pivotal task in computer vision, significantly impacts subsequent processing tasks such as image segmentation and object detection. To achieve efficient shadow removal with minimal computational overhead and model size, this paper presents LSFormer, a lightweight network. LSFormer introduces the DiNA attention mechanism to model contextual relationships between shadow and non-shadow regions. Furthermore, it proposes a dual-scale gated enhancement feedforward network (DsGeFF) to effectively improve removal accuracy while reducing computational cost. To preserve shadow edges and texture details, a structure loss function is employed based on the Pearson correlation coefficient. Experimental results on the ISTD+ and SRD datasets show that, compared to ShadowFormer, LSFormer reduces the computational load from 63.1 GFLOPs to 20.76 GFLOPs and the number of parameters from 11.4M to 4.52M, while improving the PSNR on the ISTD+ dataset from 35.46 to 36.00. This method achieves a well-balanced trade-off between performance and efficiency, surpassing existing mainstream models and demonstrating strong practical applications.