| Shadows are relatively dark areas formed by light sources obscured by opaque objects.Shadow areas in images suffer from luminance reduction,color distortion,and loss of content details.The presence of shadows degrades the image quality,affects the performance of downstream vision tasks,negatively interferes with research and practical applications,and reduces the usability of images.In addition,the presence of shadows directly deteriorates the visual appearance of an image,making it less desirable for scenarios such as social sharing for aesthetic reasons.Therefore,shadow removal work has considerable academic research value and practical application value.In this thesis,we propose a hybrid structure-based two-way shadow removal network and a cross-domain window self-attention-based shadow boundary optimization network for the recovery of shadow regions and the optimal elimination of boundary traces in images,respectively,based on the analysis of the characteristics of shadows such as reduced brightness,color distortion,the presence of damaged content details,and edge specificity,as well as the problems such as residual shadow boundary traces in existing methods.The hybrid structure-based two-way shadow removal network consists of two parallel networks,which are the Transformer-based L and AB two-branch cross-domain information migration network(Road 1)and the image enhancement and convolution-based shadow region information extraction network(Road 2).The Road I network is used to recover the color and luminance of the shadow region.In this paper,we design a dualbranch structure of luminance and color based on LAB color space to recover the luminance and color information respectively.Besides,we design a ChannelFormer module based on multi-head channel selfattention and a SpatialFormer module based on multi-head spatial selfattention for different stages of the encoder and decoder to migrate the luminance and color of non-shadowed regions at a distance for the restoration of shadowed regions.Road II network is based on image enhancement to enhance the texture and details of shaded regions,and then the enhanced detail information is extracted by a convolutional network.In the Shadow Boundary Optimization Network based on crossdomain window self-attention,a cross-domain window self-attention mechanism is designed to restrict the directed transfer of information in three directions under the guidance of cross-domain coding.These directions include:1)the transfer of information from eroded non-shadow regions to the inflated shadow regions,optimizing the shadow region,especially the shadow edge;2)the mutual transfer of internal information in the non-shadow region,thereby preventing its deterioration;and 3)the mutual transfer of internal information in the shadow region,thus preserving the original content of the shadow region.In addition,due to the special nature of shadow removal,the original content of the shadow area needs to be preserved,and a residual mechanism is used to achieve this.Furthermore,a boundary optimization loss is added and other loss functions are weighted in the boundary area to enhance the optimization effect in the edge area and remove the artifacts in the shadow removal results,making the optimized shadow-free image visually more natural.Finally,the quantitative and qualitative comparisons between the proposed method and other state-of-the-art algorithms are conducted on several datasets,and the best results are obtained.Furthermore,a functional prototype system has been developed based on this algorithm. |