Wavelet attention shadow removal method based on soft prior guidance
By employing a wavelet attention-based shadow removal method guided by soft priors, and utilizing wavelet transform and the gray-world assumption, the problem of illumination reconstruction and texture preservation in complex natural scenes is solved, achieving efficient shadow removal results that are suitable for autonomous driving and intelligent monitoring.
Patent Information
- Application Number
- CN202511145747.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-12-09
AI Technical Summary
Existing shadow removal methods have shortcomings in terms of mask dependence and frequency domain feature utilization, making it difficult to achieve high-precision lighting reconstruction and texture preservation in shadow areas under complex natural scenes. Furthermore, traditional methods suffer from unstable iterative inference and difficulty in obtaining masks in practical applications.
We adopt a wavelet attention-based shadow removal method guided by soft priors. By establishing a probabilistic soft prior model of brightness perception and combining it with the multi-scale feature decoupling and reconstruction mechanism in the wavelet domain, we construct a shadow removal framework that is co-optimized in the frequency domain and spatial domain. We use wavelet transform to decouple image features in the frequency domain and perform illumination correction, and combine the gray-scale world hypothesis to perform cross-domain illumination correction.
It achieves high-quality removal of shadow areas, improves image visual quality, and maintains texture details and lighting consistency, making it suitable for practical applications such as autonomous driving and intelligent monitoring.
Smart Images

Figure CN121095086A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image processing, and particularly relates to a wavelet attention shadow removal method based on soft prior guidance. BACKGROUND
[0002] In the field of computer vision and image processing, shadow is a local low-illumination area formed on the imaging plane due to the blocking of light propagation by an opaque object, and its existence can cause the image quality to decrease, seriously affecting the performance of key tasks such as three-dimensional reconstruction, target detection and visual tracking. Shadow removal, as an important task in the field of image restoration, the core challenge lies in achieving two key goals simultaneously: one is to accurately reconstruct the illumination of the shadow area, so that it forms a natural illumination transition with the surrounding non-shadow area; the other is to completely preserve the texture details and structural features of the original scene in the illumination correction process, avoiding the generation of boundary artifacts or information loss.
[0003] Traditional shadow removal methods are based on physical illumination models, and such methods usually have strong dependence on prior assumptions such as scene geometry, light source distribution, etc., which severely limits their generalization ability in complex natural scenes. Shadow removal methods based on deep learning learn the robust feature representation of the shadow area from a large number of shadow-no shadow sample pairs, and some works further introduce shadow masks as spatial priors to improve the positioning accuracy of the shadow area. However, although such methods have achieved certain improvement in image quality evaluation indicators, they still face two essential limitations: first, high-precision shadow masks are often difficult to obtain in practical applications; second, the randomness and complexity of shadow distribution make it difficult for traditional binary masks to accurately depict the gradual transition characteristics of the true shadow edge (especially the half-shadow transition phenomenon in soft shadow areas). Although existing generative methods based on diffusion models avoid explicit mask dependence through implicit modeling, their inherent multi-step iterative reasoning mechanism and unstable training problems severely limit their engineering application value.
[0004] In recent years, frequency domain analysis methods have shown unique advantages in the field of image processing. As a multi-scale analysis tool, wavelet transform can achieve frequency band decomposition and accurate reconstruction of image signals due to its excellent time-frequency localization characteristics and multi-resolution analysis capability, which provides a new solution for feature decoupling in complex vision tasks. Researchers such as Xu et al. introduced wavelet attention mechanism into the low-light image enhancement task, and through the establishment of a collaborative optimization framework of the illumination correction model of low-frequency subbands and the noise suppression mechanism of high-frequency subbands, the feasibility of wavelet domain feature decoupling was fully verified.
[0005] However, the application of wavelet transform in the visual task of shadow removal has not been fully explored. From a theoretical perspective, the low-frequency component of wavelet decomposition encodes the global illumination distribution information of the scene, while the high-frequency component encodes the local texture detail features. This frequency domain feature distribution is highly consistent with the dual requirements of illumination restoration and texture preservation in shadow removal tasks. Therefore, exploring the feature representation mechanism of wavelet transform in shadow removal and constructing a shadow removal framework based on frequency domain feature optimization not only has important theoretical value, but also provides a more reliable technical solution for practical applications. SUMMARY
[0006] In view of the deficiencies of existing shadow removal methods in mask dependence and frequency domain feature utilization, the present application proposes a wavelet attention shadow removal method based on soft prior guidance. By establishing a probabilistic soft prior model of brightness perception and combining the multi-scale feature decoupling and reconstruction mechanism in the wavelet domain, a frequency domain-spatial domain collaborative optimization shadow removal framework is realized. Through frequency domain feature decoupling and soft prior guidance, the visual quality of degraded images can be effectively improved, providing an efficient shadow removal solution for practical application scenarios such as autonomous driving and intelligent monitoring.
[0007] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0008] In a first aspect, the present application provides a wavelet attention shadow removal method based on soft prior guidance, which is realized by an image processing model. The image processing model includes a feature decoupling network, a soft mask generation network, a shadow removal network, and an illumination correction network. The method includes:
[0009] Step 1, obtaining a to-be-processed image; the to-be-processed image includes a shadow area;
[0010] Step 2, inputting the to-be-processed image into the feature decoupling network for wavelet attention-based multi-band feature decoupling, decomposing the to-be-processed image into one low-frequency component subband representing illumination information and three high-frequency component subbands representing texture details, and concatenating the low-frequency component subband and the high-frequency component subbands to obtain a multi-band concatenated feature map;
[0011] Step 3, inputting the multi-band concatenated feature map into the soft mask generation network to obtain a probabilistic soft mask estimation result consistent with the spatial dimensions of the multi-band concatenated feature map by a probabilistic soft mask generation method based on brightness statistics;
[0012] Step 4, inputting the multi-band concatenated feature map into the shadow removal network to realize illumination restoration and detail enhancement of the shadow area based on the soft prior guidance information provided by the probabilistic soft mask estimation result, and obtaining a frequency domain shadow removal result;
[0013] Step 5: Input the frequency domain shadow removal result into the illumination correction network to perform cross-domain illumination correction based on the gray-scale world assumption, optimize the global illumination consistency of the frequency domain shadow restoration result in the spatial domain, and output a shadow-free image.
[0014] Furthermore, the feature decoupling network includes a wavelet attention transform module and a residual module; step 2 operates on the encoding stage, specifically including: firstly, using multi-scale wavelet features to transform the input feature map corresponding to the image to be processed. Decomposed into low-frequency component characteristics that characterize illumination properties and horizontal high-frequency component features containing texture details Vertical high-frequency component characteristics and diagonal high frequency component characteristics Then, the multi-band spliced feature map is obtained by splicing along the channel dimension. ;in, This represents the height of the input feature map. This represents the width of the input feature map. The input feature map has the number of channels. The wavelet attention transformation module achieves adaptive feature decoupling and dynamic weighting of each frequency band through learnable convolution. The residual module ensures stable gradient propagation and effective preservation of original features by connecting the input and output features.
[0015] Further, in step 2, the frequency domain decomposition of the input feature map is achieved using a 4th-order Daubechies wavelet basis function; the wavelet attention transformation module consists of a wavelet spatial attention submodule and a dual-branch channel attention submodule, which learn feature weights of different frequencies from the spatial dimension and the channel dimension, respectively; wherein, the wavelet spatial attention submodule adopts an adaptive convolution kernel strategy, dynamically designing the convolution size according to the characteristics of each frequency band to achieve feature enhancement in the spatial dimension; the dual-branch channel attention submodule learns cross-channel dependencies by combining 1×1 convolution with parallel global max pooling and average pooling paths; the residual module adds the weighted features to the features processed by the convolutional subnetwork element-wise through identity mapping to maintain the stability of gradient propagation and improve feature representation ability.
[0016] Furthermore, step 3 operates in the decoding stage, specifically including: for the multi-band splicing feature map input to the soft mask generation network... First, its low-frequency features are separated to obtain the brightness feature map. The convolutional subnetwork learns an adaptive segmentation threshold for the shadow region and background environment in the scene; then, based on the adaptive segmentation threshold, the multi-band spliced feature map is... The image is divided into high-brightness and low-brightness regions, and a sigmoid function with differentiated slope parameters is used for nonlinear mapping to transform the brightness features of pixels into continuously differentiable shadow confidence. Based on this, cross-channel feature interaction and recalibration are introduced, and the final output is a feature map stitched together with the multi-band image. Spatial dimension consistent probabilistic soft mask estimation results .
[0017] Furthermore, in step 3, the probabilistic soft mask generation method achieves continuous probability prediction of shadow regions by establishing a nonlinear mapping model based on brightness statistics. Specifically, this includes: firstly, using a convolutional subnetwork to dynamically calculate an adaptive segmentation threshold. , ∈[0,1], and based on adaptive segmentation threshold The input multi-band stitched feature map is divided into low-brightness and high-brightness regions; for each pixel in the low-brightness region, an adaptive segmentation threshold is used. With minimum brightness arithmetic mean A nonlinear transformation is performed using the center of symmetry of the Sigmoid function, and the first slope parameter is used. First scale factor and the first translation factor Limit the output probability to the interval [0.5, 1]. >0; For each pixel in the high-brightness region, use an adaptive segmentation threshold. With maximum brightness arithmetic mean A nonlinear transformation is performed using the center of symmetry of the Sigmoid function, and the second slope parameter is used. Second scale factor Second translation factor Limit the output probability to the interval [0, 0.5]. >0.
[0018] Furthermore, the shadow removal network includes a frequency band adaptive weighting module, a residual module, and a wavelet inverse transform attention module; step 4 operates in the decoding stage, specifically including: for the multi-frequency band stitched feature map input to the shadow removal network... First, the frequency band adaptive weighting module independently learns and fuses the attention weights of features in each frequency band. Then, the learnable convolutional sub-network in the residual module further improves the feature representation capability. Next, the inverse discrete wavelet transform is used to reconstruct the frequency domain features into the spatial domain. At the same time, the skip connection mechanism is used to fuse feature information of the corresponding scale in the encoding stage to maintain the consistency of multi-level context. Finally, the frequency domain shadow removal result is obtained. Among them, the frequency band adaptive weighting module achieves differentiated enhancement of illumination components and texture features by fusing the soft prior guidance information with multi-frequency band features; the wavelet inverse transform attention module adopts a dynamic weight learning strategy to optimize features of each frequency band and perform cross-domain transformation; the residual module maintains the same structural design as the encoding stage and is used for input-output fusion of feature maps.
[0019] Furthermore, in step 4, the frequency band adaptive weighting module first performs spatial adaptive modulation on the probabilistic soft mask estimation results and the features of each frequency band, and then uses a frequency band-specific convolutional attention subnetwork to learn the repair weight coefficients of each frequency band; the wavelet inverse transform attention module adopts a structural design symmetrical to the wavelet feature decomposition stage, integrates the wavelet spatial attention mechanism and the dual-branch channel attention mechanism, and is used to refine the optimized frequency band features, and realize spatial domain reconstruction through discrete wavelet inverse transform.
[0020] Furthermore, step 5 applies to the post-processing stage of the network, specifically including: processing the frequency domain shadow removal results input to the illumination correction network. First, the global and local illumination features are extracted. Then, based on the gray-world assumption, the illumination compensation matrix between the global and local illumination features is calculated to achieve global illumination correction. Finally, a channel attention mechanism is used to adaptively adjust the correction result, resulting in an output feature map with the same dimension as the input features. The final shadowless image is then output through a convolutional mapping.
[0021] Furthermore, the illumination correction network is implemented through a cross-domain illumination alignment module; in step 5, the cross-domain illumination alignment module, based on the gray-world assumption, utilizes the prior physical knowledge that the average reflectance of object surfaces in natural scenes tends to neutral gray to construct a learnable color balance mechanism, specifically including: firstly, calculating the input frequency domain shadow removal result... The average values of each channel are used to obtain the global illumination characteristics of the scene. Next, a cascaded structure of 3×3 spatial convolution and 1×1 point convolution is used, combined with the LeakyReLU activation function, to learn local illumination features. and calculate and Global illumination correction is achieved using an illumination compensation matrix between the layers; then, adaptive correction weights in the channel dimension are learned using a network block containing batch normalization, LeakyReLU activation function, and two-layer 1×1 convolution. This is used to further optimize the correction results and obtain the output feature map. Finally, through convolution mapping, the final shadowless image is output.
[0022] In a second aspect, the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned soft-prior guided wavelet attention shadow removal method.
[0023] The present application has the following beneficial effects:
[0024] (1) The present application proposes a multi-scale wavelet analysis framework based on U-Net, which realizes the frequency domain decoupling of image features through discrete wavelet transform, decomposes the complex shadow removal task into two sub-tasks of low-frequency subspace light recovery and high-frequency subspace texture preservation, and realizes the collaborative optimization of lighting and details.
[0025] (2) The present application proposes a probabilistic soft prior modeling method based on brightness statistics, which uses a double Sigmoid function with differentiated slopes to construct a continuous and differentiable probability space, breaking through the representation bottleneck of traditional binary masks in the transition area of shadow edges, and providing independent repair guidance for each frequency band feature.
[0026] (3) The present application proposes a cross-domain light correction method based on the gray world assumption, which uses the traditional color constancy theory to establish a learnable color balance mechanism, designs a global-local light compensation network and an adaptive optimization module of channel attention weight, and ensures the light consistency of the frequency domain repair result in the spatial domain.
[0027] (4) The present application uses joint optimization of frequency domain features and spatial domain features to maintain the lightweight of the algorithm while achieving high-quality shadow removal of the degraded image. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 The flowchart of the soft-prior guided wavelet attention shadow removal method of the present application.
[0029] Figure 2 The network architecture diagram of the soft-prior guided wavelet attention shadow removal method of an embodiment of the present application.
[0030] Figure 3 The experimental result diagram of the soft-prior guided wavelet attention shadow removal method of the present application; wherein, Figure 3 A is an input image with shadow; Figure 3 B is the probabilistic soft mask estimation result; Figure 3 C is the real shadow-free image; Figure 3 D is the shadow-free image obtained by using the method of the present application. DETAILED DESCRIPTION
[0031] The application will be further described below in conjunction with the accompanying drawings and embodiments.
[0032] The term "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations.
[0033] In addition, for the purpose of better illustrating the present application, numerous specific details are given in the following detailed description. One skilled in the relevant art will recognize that the application can be practiced without one or more of the specific details, or with other methods, components, and circuits. In some instances, well-known methods, components, and circuits have not been described in detail in order to avoid obscuring the application.
[0034] Based on the multi-scale analysis characteristics of wavelet transform, the frequency domain decoupling framework of image signal is constructed by using the 4th order Daubechies wavelet basis function (DB4). The input image is decomposed into four frequency band components with complementary characteristics, i.e. low frequency sub-band (LL), horizontal high frequency sub-band (HL), vertical high frequency sub-band (LH) and diagonal high frequency sub-band (HH), by using the accurate filter design. The LL encodes the global illumination and color distribution characteristics of the image, the HL represents the vertical edge information, the LH extracts the horizontal detail characteristics, and the HH contains the texture details and noise components. The DB4 wavelet can realize more accurate frequency band separation in the frequency domain decomposition process by virtue of its 4th order compact support characteristics and 2nd order vanishing moment advantages, effectively suppresses the frequency band aliasing phenomenon, and can maintain more complete structure information in multi-level decomposition, thereby providing an ideal frequency domain representation basis for the illumination-texture feature separation of the shadow area. The image decomposition process based on the DB4 wavelet basis can be represented by the following formula:
[0035] ;
[0036] ;
[0037] wherein, represents the input image, and represent the intermediate decomposition results in the horizontal and vertical directions, respectively; and represent the row and column convolutions, respectively, and and are the filter coefficients of DB4, which are:
[0038] ;
[0039] ;
[0040] The image reconstruction process can be represented as:
[0041] ;
[0042] wherein, denotes the reconstructed input image, and denote the intermediate reconstruction results in horizontal and vertical directions respectively; ↑2 denotes 2 times up-sampling, and are the reconstruction filter coefficients, i.e. the time-domain inverse of the decomposition filter coefficients, which are respectively:
[0043] ;
[0044] ;
[0045] The wavelet domain decomposition and reconstruction of the input image can be realized by using the above formula.
[0046] The application also introduces a cross-domain illumination correction algorithm based on the gray world assumption, which is used to ensure the color consistency in the process of converting the frequency domain processing result to the spatial domain. The core theory of the gray world assumption is that in a natural scene with sufficient color diversity, the average reflectivity of each color channel should converge to a neutral gray balance point. Specifically, when the scene satisfies the color distribution balance condition, the global statistical mean of the red (R), green (G) and blue (B) channels will be approximately equal (i.e. R≈G≈B). Based on this assumption, the illumination correction network of the application adopts a learnable channel gain adjustment mechanism, which effectively alleviates the local color distortion problem that may occur in the shadow repair area by implementing dynamic color balance compensation on the frequency domain reconstruction result, and finally outputs a visual optimization result with global illumination consistency.
[0047] Specifically, for the input image , first calculate the mean of each channel:
[0048] ;
[0049] wherein, , , denote the mean of the red, green and blue channels respectively, and denote the height and width of the input image respectively. The correction coefficient of each channel is calculated by the optimization formula as shown below:
[0050] ;
[0051] wherein, , , correction coefficients of red, green and blue channels respectively, an arithmetic mean of three channels, and its calculation formula is:
[0052] ;
[0053] The final color correction process is realized based on the following formula:
[0054] ;
[0055] wherein, , , respectively represent the pixel values of red, green and blue channels before correction, , , respectively represent the pixel values of red, green and blue channels after correction.
[0056] By introducing such a post-processing correction mechanism, effective spatial compensation can be performed on the frequency domain processing result, thereby ensuring that the final repair result maintains high naturalness and realism at the visual perception level.
[0057] The application realizes end-to-end shadow removal through an image processing model, and the image processing model adopts an improved U-Net four-layer encoder-decoder architecture, including a feature decoupling network, a soft mask generation network, a shadow removal network and an illumination correction network. Figure 1 A flowchart of the wavelet attention shadow removal method based on soft prior guidance of the application is shown as shown in Figure 1 The method comprises the following steps:
[0058] Step 1, obtaining a to-be-processed image (i.e., an input image in Figure 1 The to-be-processed image includes a shadow area.
[0059] Step 2, based on wavelet attention multi-band feature decoupling, realizing through a feature decoupling network:
[0060] The to-be-processed image is input into the feature decoupling network for wavelet attention multi-band feature decoupling, the to-be-processed image is decomposed into one low-frequency component subband representing illumination information and three high-frequency component subbands representing texture details, and the low-frequency component subband and the high-frequency component subbands are spliced to obtain a multi-band spliced feature map.
[0061] Exemplarily, the feature decoupling network comprises a wavelet attention transformation module and a residual module; step 2 acts on the encoding stage, and specifically comprises:
[0062] Firstly, the input feature map corresponding to the input image is decomposed into low-frequency component features representing illumination characteristics and high-frequency component features representing texture characteristics by using multi-scale wavelet features. The low-frequency component features and the high-frequency component features are spliced to obtain a multi-band spliced feature map. and horizontal direction high-frequency component features containing texture details , vertical direction high-frequency component features and diagonal high-frequency component features , and then a multi-band splicing feature map is obtained by splicing in the channel dimension ; wherein, represents the height of the input feature map, represents the width of the input feature map, represents the number of channels of the input feature map; the wavelet attention transformation module realizes adaptive feature decoupling and dynamic weighting of each frequency band through a learnable convolution, and the residual module realizes stable gradient propagation and effective preservation of original features by connecting input and output features.
[0063] Exemplarily, in step 2, a 4th order Daubechies wavelet basis function is used to realize frequency domain decomposition of the input feature map, because its 2nd order vanishing moment characteristic can obtain better frequency band separation effect than Haar wavelet in complex texture and gradual illumination scenes.
[0064] Exemplarily, the wavelet attention transformation module is composed of a wavelet spatial attention sub-module and a double-branch channel attention sub-module, which respectively learn feature weights of different frequencies from the spatial dimension and the channel dimension; wherein the wavelet spatial attention sub-module adopts an adaptive convolution kernel strategy to dynamically design the convolution size according to the characteristics of each frequency band to realize feature enhancement in the spatial dimension; the double-branch channel attention sub-module learns cross-channel dependency through parallel global max-pooling and average-pooling paths combined with 1x1 convolution. The residual module adds the weighted features and the features processed by the convolutional subnetwork element by element through an identity mapping to maintain the stability of gradient propagation and improve the feature expression ability.
[0065] Step 2 realizes feature decoupling through the synergistic effect of the wavelet attention transformation module and the residual module. This feature decoupling method based on wavelet multi-scale analysis characteristics effectively decomposes the illumination features and texture features of the image through frequency band separation and attention weighting mechanism, providing an accurate frequency domain feature representation basis for subsequent shadow removal.
[0066] Step 3, probability soft mask generation based on brightness statistics, is realized through a soft mask generation network:
[0067] The multi-band splicing feature map obtained in step 2 is input into the soft mask generation network, and a probability soft mask estimation result consistent with the spatial dimension of the multi-band splicing feature map is obtained through the probability soft mask generation method based on brightness statistics.
[0068] Exemplarily, step 3 acts on the decoding stage, which specifically includes:
[0069] For the multi-band spliced feature map of the input soft mask generation network First, its low-frequency features are separated to obtain the brightness feature map. The convolutional subnetwork is used to learn an adaptive segmentation threshold between the shadow region and the background environment in the scene; then, based on this adaptive segmentation threshold, the multi-band feature map is stitched together. The image is divided into high-brightness and low-brightness regions, and a sigmoid function with differentiated slope parameters is used for nonlinear mapping to transform the brightness features of pixels into continuously differentiable shadow confidence. Based on this, cross-channel feature interaction and recalibration are introduced, and the final output is a multi-band stitched feature map. Spatial dimension consistent probabilistic soft mask estimation results .
[0070] Step 3 achieves soft prior estimation of shadow regions by modeling the pixel-by-pixel classification task as a probability distribution prediction task based on brightness features. This soft mask generation mechanism based on brightness statistics provides prior guidance information with clear probabilistic interpretation for subsequent shadow removal by establishing a nonlinear mapping relationship between brightness features and shadow probabilities.
[0071] For example, in step 3, the probabilistic soft mask generation method achieves continuous probability prediction of the shadow region by establishing a nonlinear mapping model based on brightness statistics, specifically including:
[0072] First, a convolutional network is used to dynamically calculate the adaptive segmentation threshold. , ∈[0,1], and based on adaptive segmentation threshold The input multi-band stitched feature map is divided into low-brightness regions and high-brightness regions;
[0073] For each pixel in the low-brightness region, an adaptive segmentation threshold is used. With minimum brightness arithmetic mean A nonlinear transformation is performed using the center of symmetry of the Sigmoid function, and the first slope parameter is learned. ( >0) Controls the steepness of the decision boundary (slope parameter) The larger the value, the steeper the decision boundary (when combined with the first scale factor). and the first translation factor Limit the output probability to the interval [0.5, 1];
[0074] For each pixel in the high-brightness region, an adaptive segmentation threshold is used. With maximum brightness arithmetic mean asymmetric center of the Sigmoid function and through a second slope parameter >0), a second scale factor and a second translation factor limits the output probability to the interval [0, 0.5].
[0075] Compared with the discretization processing of the traditional binary mask, step 3 establishes a continuous and derivable mapping between the brightness value and the shadow probability through the differential double-slope Sigmoid function, providing a differentiable prior guide for subsequent band-adaptive repair.
[0076] Step 4, shadow removal based on soft prior guide, is implemented through a shadow removal network:
[0077] The multi-band splicing feature map obtained in step 2 is input into the shadow removal network, and based on the soft prior guide information provided by the probabilistic soft mask estimation result obtained in step 3, the shadow area is implemented to realize the illumination repair and detail enhancement, and the frequency domain shadow removal result is obtained.
[0078] Exemplarily, the shadow removal network includes a band-adaptive weighting module, a residual module, and a wavelet inverse transform attention module. Step 4 acts on the decoding stage, specifically including:
[0079] For the multi-band splicing feature map input into the shadow removal network , first, the band-adaptive weighting module is used to independently learn the attention weights of each frequency band feature and fuse them, then the convolutional subnetwork in the residual module is used to further improve the feature representation capability, and then the discrete wavelet inverse transform is used to realize the reconstruction of the frequency domain feature to the spatial domain, while the corresponding scale feature information in the encoding stage is fused through the skip connection mechanism to maintain the consistency of the multi-level context, and finally the frequency domain shadow removal result is obtained; wherein the band-adaptive weighting module realizes the differential enhancement of the illumination component and the texture feature by fusing the soft prior guide information and the multi-band feature; the wavelet inverse transform attention module adopts a dynamic weight learning strategy to realize the optimization and cross-domain conversion of each frequency band feature; the residual module maintains the same structure design as the encoding stage for the input and output fusion of the feature map.
[0080] Step 4 realizes the illumination repair and detail enhancement of the shadow area through the band-adaptive weighting module, the residual module, and the wavelet inverse transform attention module. Under the guidance of the soft prior, the shadow removal network realizes the collaborative optimization of low-frequency illumination correction and high-frequency texture detail recovery through the frequency-by-frequency adaptive hierarchical processing mechanism.
[0081] Exemplarily, in step 4, the frequency band adaptive weighting module first spatially adaptively modulates the soft prior probability map (i.e., the probabilistic soft mask estimation result) with the frequency band features, and then learns the repair weight coefficients of each frequency band by using a frequency band-specific convolution attention subnetwork; the wavelet inverse transform attention module adopts a structure design symmetrical to the wavelet feature decomposition stage, integrates a wavelet spatial attention mechanism and a double-branch channel attention mechanism, is used for fine processing of the optimized frequency band features, and realizes spatial domain reconstruction through a discrete wavelet inverse transform.
[0082] The shadow removal based on the soft prior realizes the collaborative optimization of illumination correction and texture detail enhancement by constructing a soft mask guided frequency band specific repair framework. The frequency division repair mechanism based on frequency band independence realizes differentiated processing paths for illumination features and texture features, while ensuring accurate repair of low-frequency illumination and effectively maintaining the detail fidelity of high-frequency texture.
[0083] Step 5, cross-domain illumination correction based on the gray world assumption, is realized by an illumination correction network.
[0084] The frequency domain shadow removal result obtained in step 4 is input into the illumination correction network for cross-domain illumination correction based on the gray world assumption, to optimize the global illumination consistency of the frequency domain shadow repair result in the spatial domain, and output a shadow-free image (i.e., the output image in Figure 1 ).
[0085] Exemplarily, the illumination correction network is realized by a cross-domain illumination alignment module. Step 5 specifically includes:
[0086] For the frequency domain shadow removal result input into the illumination correction network, first, the global illumination feature and the local illumination feature are extracted; then, based on the gray world assumption, the illumination compensation matrix between the global illumination feature and the local illumination feature is calculated to realize global illumination correction; finally, the channel attention mechanism is used to adaptively adjust the correction result to obtain an output feature map consistent with the input feature dimension, and the final shadow-free image is output through convolution mapping.
[0087] The cross-domain illumination alignment module, as a post-processing module of the network, realizes the global illumination consistency optimization of the shadow removal result by establishing a mapping relationship between the frequency domain processing result and the spatial domain illumination characteristics. Step 5 combines the frequency domain result and the spatial domain illumination characteristics to optimize the local illumination anomaly while maintaining the color space distribution characteristics of the original image, ensuring the natural consistency of the frequency domain processing result in the spatial domain visual perception.
[0088] For example, in step 5, the cross-domain lighting alignment module based on the gray-scale world hypothesis utilizes the prior physical knowledge that the average reflectance of object surfaces in natural scenes tends to neutral gray to construct a learnable color balance mechanism, specifically including:
[0089] First, the frequency domain shadow removal result is calculated. The average values of each channel are used to obtain the global illumination characteristics of the scene. Next, a cascaded structure of 3×3 spatial convolution and 1×1 point convolution is used, combined with the LeakyReLU activation function, to learn local illumination features. and calculate and Global illumination correction is achieved using an illumination compensation matrix between the layers; then, adaptive correction weights in the channel dimension are learned using a network block containing batch normalization, LeakyReLU activation function, and two-layer 1×1 convolution. This is used to further optimize the correction results and obtain the output feature map. Finally, through convolution mapping, the final shadowless image is output.
[0090] Furthermore, step 5 introduces residual connections to fuse the correction results with the original features, which not only preserves the spatial information of the original features but also achieves joint optimization in the frequency and spatial domains, further ensuring the consistency of illumination between the repaired area and the background environment.
[0091] This application presents a wavelet attention-based shadow removal method guided by soft priors. First, it employs discrete wavelet transform to perform multi-level frequency domain decomposition on the input image, accurately separating low-frequency components representing global illumination characteristics from high-frequency components containing local details. Then, it constructs a continuously differentiable soft prior probability model based on brightness statistical characteristics, achieving smooth prediction of shadow regions through a parameterized double sigmoid function. Next, it designs a frequency-adaptive feature inpainting module to independently optimize high- and low-frequency features under soft prior guidance. Finally, it introduces cross-domain illumination correction based on the gray-world hypothesis, establishing a mapping relationship between global and local illumination features to ensure the consistency of illumination in the spatial domain across the frequency domain processing results. This application uses unsupervised soft prior modeling to achieve probabilistic representation of shadow regions. Combining the frequency-band decoupling characteristics of the wavelet domain with pixel-level optimization in the spatial domain, it significantly improves the robustness and visual quality of shadow removal while maintaining a lightweight model, providing a feasible technical solution for shadow removal in practical applications such as autonomous driving and intelligent monitoring.
[0092] The following examples illustrate the wavelet attention shadow removal method based on soft prior guidance of this application in detail.
[0093] Figure 2This paper illustrates the network architecture of a wavelet attention-based shadow removal method based on soft prior guidance according to an embodiment of this application. The structures of the wavelet attention transformation module, residual module, frequency band adaptive weighting module, wavelet inverse transform attention module, and cross-domain illumination alignment module are shown below. Figure 2 As shown; where the numbers under each module represent the channel dimensions of the feature map. This method mainly includes the following steps:
[0094] (1) Multi-band feature decoupling based on wavelet attention. This step is applied to the coding stage. Through the synergistic effect of the multi-scale wavelet attention transformation module and the residual module, the adaptive decomposition and feature enhancement of the input image in the frequency domain space are realized, effectively decoupling the low-frequency components that characterize the global illumination characteristics and the high-frequency components that characterize the local texture details.
[0095] Specifically, firstly, a 4th-order Daubechies wavelet basis function is used to perform discrete wavelet transform on the input image, decomposing it into four frequency band components with orthogonal frequency characteristics (i.e., LL, LH, HL, and HH, carrying low-frequency illumination and color information, horizontal high-frequency edge features, vertical high-frequency edge features, and diagonal high-frequency texture and noise, respectively). Then, a dual-branch attention mechanism is introduced, including a spatial attention branch that independently learns the local importance weights of each frequency band, and a channel attention branch that establishes global correlation modeling across frequency bands, thereby achieving hierarchical weight optimization of multi-frequency band features. Finally, a residual connection mechanism is introduced to adaptively integrate the output features of the wavelet attention transform module, further enhancing the discriminative expressive power of the features and providing richer frequency domain feature support for subsequent decoding and reconstruction tasks.
[0096] This step can be summarized by the following formula:
[0097] ;
[0098] in, Indicates the first Wavelet decomposition, and They represent the first Input and output feature maps of wavelet decomposition. , , These represent the height, width, and number of channels of the input feature map, respectively. This represents the wavelet attention transform module. This represents the residual module.
[0099] (2) Probabilistic soft mask generation based on brightness statistics. This step is applied to the decoding stage. By constructing a continuously differentiable shadow confidence distribution model, a refined representation of the shadow region is achieved.
[0100] Specifically, the method first extracts low-frequency components representing global illumination characteristics from the input multi-band stitched features to obtain a brightness feature map. Then, a feature learning network consisting of max-pooling layers, pointwise convolutional layers, ReLU activation functions, and a sigmoid function adaptively learns the scene illumination distribution features and determines the optimal shadow-environment segmentation threshold (i.e., adaptive segmentation threshold). Subsequently, a two-branch sigmoid function with differentiated slope parameters is used to continuously map pixel brightness values to shadow confidence scores within the [0,1] interval. The high-slope branch handles regions below the threshold (i.e., low-brightness regions), while the low-slope branch handles regions above the threshold (i.e., high-brightness regions). Finally, a learnable pointwise convolutional layer refines the probability distribution, generating a probabilistic soft mask estimation result with spatial dimensions consistent with the input multi-band stitched features. Compared to traditional binary hard masks, the soft mask generated by this method can accurately represent the intensity gradient changes in shadow regions, especially effectively capturing the gradual transition characteristics of shadow edges, providing soft prior guidance with rich spatial information for subsequent shadow removal tasks.
[0101] This probabilistic modeling process (i.e., the process of establishing a nonlinear mapping model based on brightness statistics) is achieved through the following formula:
[0102] ;
[0103] in, Indicates the input number of the first... Multi-band splicing feature map, Indicates the output of the first Level-wise soft mask prior (i.e., probabilistic soft mask estimation result). Indicates the adaptive segmentation threshold. express The minimum brightness value in the middle. express The maximum brightness in the range, for and The arithmetic mean, for and The arithmetic mean, , , These represent the first slope parameter, the first scale factor, and the first translation factor, respectively. , , These represent the second slope parameter, the second scale factor, and the second translation factor, respectively. This represents the Sigmoid function.
[0104] (3) Shadow removal based on soft prior guidance. This step is applied to the decoding stage and achieves frequency domain restoration of image degradation areas through multi-module collaborative processing.
[0105] Specifically, the multi-band stitched feature map is first input into the frequency band adaptive weighting module. A sub-network composed of convolutional layers and the LeakyReLU activation function is used to spatially modulate and adaptively weight the soft prior guidance information and frequency sub-band features. Next, a residual module architecture symmetrical to the encoding stage is used to enhance the expressive power of the features through nonlinear transformation while preserving the original feature information. Finally, a wavelet inverse transform attention module, combining spatial and channel attention mechanisms, is used to independently refine and enhance the features of the four frequency bands (LL, LH, HL, and HH). The frequency domain features are then reconstructed into the spatial domain through a discrete wavelet inverse transform of a 4th-order Daubechies wavelet basis. Furthermore, a skip connection mechanism is introduced in this step to fuse features of the same scale from the encoding stage, fully mining multi-scale contextual information, and finally outputting the frequency domain shadow removal result.
[0106] This step can be summarized by the following formula:
[0107] ;
[0108] in, , , , They represent the first Multi-band splicing feature map The low-frequency component characteristics, horizontal high-frequency component characteristics, vertical high-frequency component characteristics, and diagonal high-frequency component characteristics, i.e. ; This indicates a frequency band adaptive weighting module. This represents the channel splicing function. Represents the residual module. This represents the inverse wavelet transform attention module. Indicates the first Inverse wavelet transform, Indicates the first Level input soft mask, This represents element-wise multiplication. Indicates the first Frequency domain shadow removal result of wavelet inverse transform output.
[0109] (4) Cross-domain illumination correction based on the gray-world hypothesis. This step is applied to the post-processing stage of the network and aims to optimize the global illumination consistency of the frequency domain restoration results in the spatial domain.
[0110] Specifically, this method first employs a dual-path feature extraction mechanism. On one hand, it uses statistical calculations to obtain the global brightness distribution features (i.e., global illumination features) of the input image across the RGB three channels. On the other hand, it utilizes a lightweight convolutional sub-network to extract the illumination characteristics of local regions (i.e., local illumination features), thereby establishing a complete scene illumination representation. Then, based on the gray-scale world assumption, a brightness gain compensation matrix (i.e., illumination compensation matrix) is constructed to achieve global illumination correction. Finally, a channel attention mechanism is introduced to spatially adaptively fine-tune the correction results, generating an optimized feature map with consistent illumination. This correction method, by establishing an illumination mapping relationship between the frequency domain and the spatial domain, can effectively eliminate illumination deviations that may be introduced during the frequency domain conversion process, improving the consistency of the repaired result with the real shadowless image in terms of color distribution and brightness characteristics.
[0111] This step can be summarized by the following formula:
[0112] ;
[0113] in, This represents the final frequency domain shadow removal result. This represents the final output feature map (the final shadowless image obtained after convolution mapping). This represents the channel attention weights (i.e., adaptive correction weights). and These represent global illumination features and local illumination features, respectively. This represents element-wise multiplication. It is a minimal constant introduced to ensure numerical stability.
[0114] The overall processing flow of the wavelet attention-based shadow removal method based on soft prior guidance in this application can be summarized as follows: For the input degraded shadow image, a multi-layer wavelet attention coding network is first used to decompose it into low-frequency components representing the global illumination distribution and high-frequency components containing local detail features. Then, the optimal threshold is estimated using global brightness, and a double sigmoid function with differentiated slope parameters is used to transform the multi-band stitched feature map into a continuously differentiable probabilistic soft prior. Subsequently, in the decoding stage, the soft prior and multi-scale features are dynamically modulated and weighted, and a wavelet inverse transform attention module is used to achieve high-fidelity reconstruction from frequency domain features to the spatial domain. Finally, cross-domain illumination correction based on the gray-world hypothesis is used to further adjust the global illumination to ensure the consistency of cross-frequency processing results. After convolutional mapping, a high-quality shadow-free image is output. The method in this application is suitable for application scenarios with high image quality requirements, such as autonomous driving environmental perception, intelligent surveillance video enhancement, and remote sensing image analysis.
[0115] The training process of the image processing model in this application is described below.
[0116] This application employs a data-driven approach, therefore requiring the preparation of sufficient paired shadow-free datasets with ample scene diversity. Specifically, the training data should cover different indoor and outdoor scenes and include various shadow morphologies (including different sizes, types, and intensities) to ensure the model possesses cross-scene generalization ability and robust performance.
[0117] The image processing model in this application adopts a multi-objective optimization strategy during training, and guides the model learning through three complementary regularization constraints: pixel-level reconstruction regularization, structural similarity regularization, and semantic similarity regularization.
[0118] Pixel-level reconstruction regularization employs L2 norm loss, ensuring accurate restoration of image color and brightness by minimizing the Euclidean distance between the predicted result and the true shadow-free image. Pixel-level reconstruction regularization term The calculation formula is:
[0119] ;
[0120] in, This indicates that a shadowed image is input into the image processing model to obtain a shadowless image. This represents the actual shadowless image corresponding to the image with shadow. This represents the L2 norm.
[0121] Structural similarity regularization, based on the perceptual characteristics of the human visual system, comprehensively evaluates the brightness consistency, contrast similarity, and structural correlation of an image through the structural similarity index SSIM(·)∈[0,1], ensuring the preservation of local structure and texture details. The structural similarity regularization term... The calculation formula is:
[0122] ;
[0123] in, express and Structural similarity.
[0124] Semantic similarity regularization is implemented based on perceptual loss, utilizing the feature mapping function of a pre-trained VGG16 network (ReLU3_3 layer). High-level semantic features are extracted, and semantic consistency is maintained through L2 distance in the deep feature space. Semantic similarity regularization term. The calculation formula is:
[0125] ;
[0126] in, and They represent and High-level semantic features.
[0127] The final composite regularization term used is a weighted average of the three regularization terms mentioned above. The total loss function of the image processing model. The calculation formula is:
[0128] ;
[0129] in, , , These are the optimization weight coefficients for the three types of losses, used to control the relative importance of different constraint terms. This multi-level regularization constraint design effectively ensures balanced optimization of the model across the three dimensions of pixel-level accuracy, structural detail preservation, and semantic consistency.
[0130] This application employs the following experimental configuration for model training: input images are uniformly scaled to a resolution of 320×320 pixels, the batch size is set to 8, and training is conducted for 400 epochs on an NVIDIA RTX A5000 GPU hardware platform. The learning strategy uses the AdamW algorithm, with the following hyperparameter configuration: a weight decay coefficient set to 1×10⁻⁶. -6 The momentum parameter is set to (0.9, 0.999), and the initial learning rate is set to... All experiments strictly followed the above parameter configurations during the model training process.
[0131] Figure 3 The experimental results of the wavelet attention shadow removal method based on soft prior guidance proposed in this application are shown in the figure; where, Figure 3 In the image, A represents the input image with a shadow. Figure 3 In the middle, B represents the probabilistic soft mask estimation result; Figure 3 C represents a true image without shadows; Figure 3 Image D is a shadow-free image obtained using the method of this application. Experimental results demonstrate the effectiveness of the shadow removal method proposed in this application.
[0132] Through analysis Figure 3 The experimental results lead to the following conclusions: First, from Figure 3 As shown in Figure D, the image processed by the method of this application exhibits good global illumination consistency. The shadow areas and the background environment show a natural transition in terms of texture detail and visual perception, without obvious boundary artifacts or color distortion. This indicates that the method of this application has a significant advantage in improving the quality of shadow removal. Furthermore, compared with... Figure 3 D (output of the method in this application) and Figure 3The comparison of the two images (real, shadow-free images) reveals a high degree of consistency in key visual elements such as illumination distribution and texture details, fully validating the advantages of the proposed method in terms of shadow removal accuracy. Furthermore, Figure 3 The probabilistic soft mask visualization result shown in B (where the color gradient from blue to red corresponds to a continuous change in shadow confidence from low to high) and The correspondence analysis of the original degraded image shown in Figure A demonstrates that the soft prior model constructed by the method in this application not only achieves a clear distinction between shadow and non-shadow regions, but also exhibits a gradual transition characteristic of the probability change of its shadow boundary that conforms to physical laws. This phenomenon strongly confirms that the probabilistic soft prior modeling method proposed in this application can accurately capture the shadow distribution characteristics in the image, providing reliable guiding information for subsequent frequency domain feature restoration. These experimental results systematically demonstrate the effectiveness and reliability of the method in this application from both visual quality and physical accuracy perspectives.
[0133] This application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the above-described wavelet attention shadow removal method based on soft prior guidance.
[0134] The contents not described in detail in this application specification are prior art known to those skilled in the art.
[0135] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit this application. The above descriptions are exemplary and not exhaustive. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A wavelet attention-based shadow removal method guided by soft priors, characterized in that, The method is implemented through an image processing model; the image processing model includes a feature decoupling network, a soft mask generation network, a shadow removal network, and an illumination correction network; the method includes: Step 1: Obtain the image to be processed; the image to be processed includes shaded areas; Step 2: Input the image to be processed into the feature decoupling network to perform multi-band feature decoupling based on wavelet attention. Decompose the image to be processed into one low-frequency component sub-band representing illumination information and three high-frequency component sub-bands representing texture details. Then, stitch the low-frequency component sub-band and the high-frequency component sub-band together to obtain a multi-band stitched feature map. Step 3: Input the multi-band stitched feature map into the soft mask generation network, and obtain the probabilistic soft mask estimation result with the same spatial dimension as the multi-band stitched feature map by using the probabilistic soft mask generation method based on brightness statistics. Step 4: Input the multi-band stitched feature map into the shadow removal network. Based on the soft prior guidance information provided by the probabilistic soft mask estimation result, realize the illumination restoration and detail enhancement of the shadow area to obtain the frequency domain shadow removal result. Step 5: Input the frequency domain shadow removal result into the illumination correction network to perform cross-domain illumination correction based on the gray-scale world assumption, optimize the global illumination consistency of the frequency domain shadow restoration result in the spatial domain, and output a shadow-free image.
2. The method according to claim 1, characterized in that, The feature decoupling network includes a wavelet attention transform module and a residual module; step 2 operates in the encoding stage and specifically includes: First, multi-scale wavelet features are used to extract the input feature map corresponding to the image to be processed. Decomposed into low-frequency component characteristics that characterize illumination properties and horizontal high-frequency component features containing texture details Vertical high-frequency component characteristics and diagonal high frequency component characteristics Then, the multi-band spliced feature map is obtained by splicing along the channel dimension. ;in, This represents the height of the input feature map. This represents the width of the input feature map. The input feature map has the number of channels. The wavelet attention transformation module achieves adaptive feature decoupling and dynamic weighting of each frequency band through learnable convolution. The residual module ensures stable gradient propagation and effective preservation of original features by connecting the input and output features.
3. The method according to claim 2, characterized in that, In step 2, the frequency domain decomposition of the input feature map is achieved using a 4th-order Daubechies wavelet basis function. The wavelet attention transformation module consists of a wavelet spatial attention submodule and a dual-branch channel attention submodule, which learn feature weights for different frequencies from the spatial and channel dimensions, respectively. The wavelet spatial attention submodule adopts an adaptive convolution kernel strategy, dynamically designing the convolution size according to the characteristics of each frequency band to achieve feature enhancement in the spatial dimension. The dual-branch channel attention submodule learns cross-channel dependencies by combining parallel global max pooling and average pooling paths with 1×1 convolution. The residual module adds the weighted features to the features processed by the convolutional subnetwork element-wise through identity mapping to maintain the stability of gradient propagation and improve feature representation ability.
4. The method according to claim 3, characterized in that, Step 3 applies to the decoding stage and specifically includes: For the multi-band splicing feature map input to the soft mask generation network First, its low-frequency features are separated to obtain the brightness feature map. The convolutional subnetwork learns an adaptive segmentation threshold for the shadow region and background environment in the scene; then, based on the adaptive segmentation threshold, the multi-band spliced feature map is... The image is divided into high-brightness and low-brightness regions, and a sigmoid function with differentiated slope parameters is used for nonlinear mapping to transform the brightness features of pixels into continuously differentiable shadow confidence. Based on this, cross-channel feature interaction and recalibration are introduced, and the final output is a feature map stitched together with the multi-band image. Spatial dimension consistent probabilistic soft mask estimation results .
5. The method according to claim 4, characterized in that, In step 3, the probabilistic soft mask generation method achieves continuous probability prediction of shadow areas by establishing a nonlinear mapping model based on brightness statistics, specifically including: First, a convolutional network is used to dynamically calculate the adaptive segmentation threshold. , ∈[0,1], and based on adaptive segmentation threshold The input multi-band stitched feature map is divided into low-brightness regions and high-brightness regions; For each pixel in the low-brightness region, an adaptive segmentation threshold is used. With minimum brightness arithmetic mean A nonlinear transformation is performed using the center of symmetry of the Sigmoid function, and the first slope parameter is used. First scale factor and the first translation factor Limit the output probability to the interval [0.5, 1]. >0; For each pixel in the high-brightness region, an adaptive segmentation threshold is used. With maximum brightness arithmetic mean A nonlinear transformation is performed using the center of symmetry of the Sigmoid function, and the second slope parameter is used. Second scale factor Second translation factor Limit the output probability to the interval [0, 0.5]. >
0.
6. The method according to claim 5, characterized in that, The shadow removal network includes a frequency band adaptive weighting module, a residual module, and a wavelet inverse transform attention module; Step 4 applies to the decoding stage and specifically includes: For the multi-band splicing feature map input to the shadow removal network First, the frequency band adaptive weighting module independently learns and fuses the attention weights of features in each frequency band. Then, the learnable convolutional sub-network in the residual module further improves the feature representation capability. Next, the inverse discrete wavelet transform is used to reconstruct the frequency domain features into the spatial domain. At the same time, the skip connection mechanism is used to fuse feature information of the corresponding scale in the encoding stage to maintain the consistency of multi-level context. Finally, the frequency domain shadow removal result is obtained. Among them, the frequency band adaptive weighting module achieves differentiated enhancement of illumination components and texture features by fusing the soft prior guidance information with multi-frequency band features; the wavelet inverse transform attention module adopts a dynamic weight learning strategy to optimize features of each frequency band and perform cross-domain transformation; the residual module maintains the same structural design as the encoding stage and is used for input-output fusion of feature maps.
7. The method according to claim 6, characterized in that, In step 4, the frequency band adaptive weighting module first performs spatial adaptive modulation on the probabilistic soft mask estimation results and the features of each frequency band, and then uses a frequency band-specific convolutional attention sub-network to learn the repair weight coefficients of each frequency band; the wavelet inverse transform attention module adopts a structural design symmetrical to the wavelet feature decomposition stage, integrates the wavelet spatial attention mechanism and the dual-branch channel attention mechanism, and is used to refine the optimized frequency band features and realize spatial domain reconstruction through discrete wavelet inverse transform.
8. The method according to claim 7, characterized in that, Step 5 applies to the post-processing stage of the network and specifically includes: For the frequency domain shadow removal results input to the illumination correction network First, the global and local illumination features are extracted. Then, based on the gray-world assumption, the illumination compensation matrix between the global and local illumination features is calculated to achieve global illumination correction. Finally, a channel attention mechanism is used to adaptively adjust the correction result, resulting in an output feature map with the same dimension as the input features. The final shadowless image is then output through a convolutional mapping.
9. The method according to claim 8, characterized in that, The illumination correction network is implemented through a cross-domain illumination alignment module; in step 5, the cross-domain illumination alignment module, based on the gray-world assumption, utilizes the prior physical knowledge that the average reflectivity of object surfaces in natural scenes tends to neutral gray to construct a learnable color balance mechanism, specifically including: First, the frequency domain shadow removal result is calculated. The average values of each channel are used to obtain the global illumination characteristics of the scene. Next, a cascaded structure of 3×3 spatial convolution and 1×1 point convolution is used, combined with the LeakyReLU activation function, to learn local illumination features. and calculate and Global illumination correction is achieved using an illumination compensation matrix between the layers; then, adaptive correction weights in the channel dimension are learned using a network block containing batch normalization, LeakyReLU activation function, and two-layer 1×1 convolution. This is used to further optimize the correction results and obtain the output feature map. Finally, through convolution mapping, the final shadowless image is output.
10. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by the one or more processors, the one or more processors implement the wavelet attention shadow removal method based on soft prior guidance as described in any one of claims 1-9.
Citation Information
Cited By
Image diffusion enhancement method and system based on decoupling guidance and reprojection refining
CN121616477A
Low-illumination image enhancement method and device based on wavelet frequency domain residual quotient learning
CN121921183A
