Adaptive image denoising method and device for complex environment and storage medium

By introducing an enhanced hybrid pre-module, a transposed attention mechanism, and a pixel-level gated fusion module into the Transformer architecture, the problem of multi-scale noise suppression in image denoising models under complex environments is solved, achieving efficient image denoising and accurate object detection.

CN122492492APending Publication Date: 2026-07-31WUXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUXI UNIV
Filing Date
2026-05-13
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing image denoising models struggle to adaptively suppress multi-scale rain and snow noise interference while maintaining global modeling capabilities when faced with severe weather noise in complex environments, leading to image degradation and a decline in target detection accuracy.

Method used

A global attention mechanism based on the Transformer architecture is adopted, which combines an enhanced hybrid pre-module, an efficient transposed attention mechanism module, and a pixel-level gating fusion module to enhance the perception of rain and snow stripes of different sizes, optimize the computational complexity of the network, and perform pixel-level feature filtering at skip connections.

Benefits of technology

It significantly improves the ability to remove sparse and fine rain and snow noise, reduces image artifacts and noise residue, enhances the reliability and real-time performance of autonomous driving systems, and ensures the accuracy of target detection and semantic segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492492A_ABST
    Figure CN122492492A_ABST
Patent Text Reader

Abstract

This invention discloses an adaptive image denoising method for complex environments, belonging to the field of image denoising technology for autonomous vehicles. The method includes: acquiring an autonomous vehicle image dataset and preprocessing it; inputting the preprocessed autonomous vehicle image dataset into an image denoising model based on an encoding / decoding architecture for training and evaluation to obtain a pre-trained model; the image denoising model includes an enhanced hybrid pre-processing module, an efficient transposed attention mechanism module, and a pixel-level gated fusion module; inputting the autonomous vehicle image to be processed into the pre-trained model for processing to obtain a denoised image of the autonomous vehicle. This invention can improve the ability to capture subtle high-frequency noise such as rain streaks and snowflakes under complex weather conditions, solving the problem of multi-scale rain and snow noise residue while meeting the real-time requirements of autonomous driving. This invention also discloses an electronic device and storage medium for implementing the above method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an adaptive image denoising method, device, and storage medium, specifically an adaptive image denoising method, device, and storage medium for complex environments, belonging to the field of image processing technology for autonomous vehicles. Background Technology

[0002] While the accuracy of autonomous driving perception systems tends to stabilize in normal scenarios, severe weather remains a significant factor limiting their reliability. Such complex weather noise can cause severe image degradation, such as rain streaks obscuring physical targets, fog reducing global contrast, and snow spots destroying local edge details. This degradation directly leads to a decline in the accuracy and recall of object detection algorithms, resulting in uncontrollable safety hazards.

[0003] While existing image denoising models have made significant progress in restoring certain types of images, they still have obvious limitations when facing real-world complex environmental noise, such as that encountered in autonomous driving. First, improvements based on convolutional neural network (CNN) architectures are inherently limited by the local receptive field of the convolutional kernels. When faced with mixed degradation scenes such as large-area dense fog or high-density rain and snow, they struggle to effectively establish long-range global contextual dependencies, easily leading to large-scale structural distortions in the restored image. Second, while introducing the Transformer architecture can compensate for the lack of global structural modeling, the model's initial perception of high-frequency local features such as fine rain and snow streaks of different sizes is relatively weak in the shallow layers of the network. Furthermore, when performing cross-layer feature interactions, it often lacks a pixel-level precise adaptive filtering mechanism, easily allowing the original noise features extracted by the encoder to be directly passed to the decoder at skip connections, resulting in residual local artifacts in the final denoised image.

[0004] In summary, existing models struggle to adaptively suppress complex multi-scale environmental noise interference while maintaining global modeling capabilities. Summary of the Invention

[0005] To address the issues of high-frequency information loss and multi-scale rain and snow noise residue in images under complex weather conditions, this invention proposes an improved adaptive image denoising method. The method utilizes the global attention mechanism of the Transformer architecture for modeling, and designs an enhanced hybrid pre-module at the encoder front end to improve the network's initial perception capability of rain and snow stripes of different sizes. An efficient transposed attention mechanism module is introduced to optimize the Transformer network, significantly reducing computational complexity while maintaining global modeling capabilities. Finally, a pixel-level gating fusion module is designed at skip connections to adaptively suppress noise interference by learning pixel-level weight masks.

[0006] To achieve the above objectives, this invention provides an adaptive image denoising method for complex environments, comprising the following steps:

[0007] Step 1: Collect image datasets of autonomous vehicles and preprocess them;

[0008] Step 2: Input the preprocessed autonomous vehicle image dataset into the image denoising model based on the codec architecture for training and evaluation to obtain the pre-trained model;

[0009] Step 3: Input the image of the autonomous vehicle to be processed into the pre-trained model for processing to obtain the denoised image of the autonomous vehicle.

[0010] Furthermore, in step 2, the forward propagation process of the image denoising model includes:

[0011] The input image is preprocessed using an enhanced hybrid preprocessor module to obtain shallow features;

[0012] The shallow features are input into the encoder for multi-scale encoding to obtain multi-scale features; wherein, the encoder adopts a dual-stream parallel feature extraction mechanism, with serial Transformer blocks as the main path and Transformer sub-blocks between Transformer blocks as branch paths.

[0013] Multi-scale features are input to the decoder for multi-scale decoding processing to obtain the residual image; wherein, the decoder includes a pixel-level gated fusion module, upsampling and convolutional projection layers; the pixel-level gated fusion module is deployed at the output end of the skip connection between the encoder and the decoder;

[0014] The residual image is superimposed pixel by pixel with the input image to obtain the denoised image.

[0015] Furthermore, the internal processing of the enhanced hybrid front-end module includes:

[0016] The input features are processed using 3×3 convolution and LeakyReLU activation function to obtain shallow features;

[0017] Shallow features are input into a multi-scale parallel perception branch for multi-scale feature extraction and fusion to obtain fused features.

[0018] The fused features are expanded using 1×1 convolution, and the expanded features are divided into two sub-tensors along the channel.

[0019] The two sub-tensors are processed by Hadamard product to obtain gated output features, which are then processed by 3×3 convolution and added to the input features by residual addition to obtain shallow embedding features.

[0020] Furthermore, the Transformer sub-block includes sub-slice embedding and Transformer block; the Transformer block includes layer normalization, efficient transpose attention mechanism module and feedforward neural network.

[0021] Furthermore, the implementation process of the efficient transpose attention mechanism module includes:

[0022] The input features are fed into a hybrid convolutional module for feature processing to obtain enhanced features; the hybrid convolutional module includes 1×1 convolution and 3×3 depthwise convolution.

[0023] The enhanced features are divided into a query matrix and a key matrix along the channel dimension, and a parameter sharing strategy is adopted to reuse the key matrix as the value matrix.

[0024] Attention is calculated on the query matrix, key matrix, and value matrix to obtain aggregated features;

[0025] The aggregated features are sequentially input into the SimpleGate module and a 1×1 convolutional layer for processing to obtain the output features.

[0026] Furthermore, the internal processing of the pixel-level gating fusion module includes:

[0027] The encoder features are concatenated with the decoder upsampled features at the corresponding scale along the channel dimension to obtain the concatenated features;

[0028] The spatial attention distribution of the splicing features is extracted using a bottleneck structure, and a pixel-level mask is generated using the Sigmoid function; the bottleneck structure includes a 1×1 convolution and a GeLU activation function.

[0029] The pixel-level mask is multiplied element-wise with the encoder features, and then added to the decoder upsampled features to obtain the output fused features.

[0030] The present invention also provides an electronic device, including a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method.

[0031] The present invention also provides a storage medium storing a computer program or instructions that, when the computer program or instructions are run on a computer, execute the steps of the method described.

[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0033] 1. The Transformer architecture lacks a convolutional inductive bias module. Initial image patch embedding disrupts local pixel continuity, making it difficult for shallow layers of the network to capture subtle high-frequency degradation features such as rain streaks and snowflakes. Therefore, this invention designs an enhanced hybrid pre-module at the encoder front end. Through multi-scale convolutional parallel branches, it constructs a receptive field adapted to weather degradation at different scales, and uses a parameterless gating mechanism to achieve feature extraction. This module significantly enhances the network's ability to capture subtle rain streaks, discrete snowflake spots, and edge textures, avoiding the irreversible loss of key information caused by initial downsampling. It also introduces local prior information, improving the convergence speed of model training, reducing training costs, and providing a high-quality shallow feature stream for subsequent global context modeling of the encoder. This solves the problem of incomplete denoising caused by missed detection of subtle high-frequency noise in existing models, especially improving the ability to remove sparse, subtle rain and snow noise.

[0034] 2. The standard self-attention mechanism consumes memory in a quadratic manner as the image resolution increases, making it difficult to effectively handle high-resolution inputs for autonomous driving. Furthermore, large-scale weather occlusion is highly dependent on the global receptive field. Therefore, this invention shifts the attention calculation from the spatial domain to the channel domain and introduces a key-value reuse strategy. This design fully preserves the ability to model global context across regions while reducing the number of model parameters and memory consumption, meeting the real-time requirements of autonomous driving systems. It also effectively adapts to long-distance degradation scenarios such as large-area dense fog and large-scale rain curtains, avoiding the large-scale structural distortion and uneven denoising problems caused by the limited receptive field in traditional CNN methods.

[0035] 3. To address the technical problem in traditional skip connections in encoding / decoding architectures that cannot distinguish between noise and effective details in shallow features, leading to the transmission of original noise to the decoding end and artifacts and noise residue in the final image, this invention deploys a pixel-level gated fusion module at all cross-layer feature fusion nodes. This module achieves precise feature selection by generating spatial weight masks through self-learning. This module overcomes the limitations of direct stitching and simple addition fusion methods, dynamically suppressing rain and snow noise features at the pixel level while fully preserving effective structural information such as edges, contours, and traffic signs. It achieves a precise balance between noise suppression and detail preservation, physically blocking the transmission path of shallow original noise to the deep decoding end. This significantly reduces the incidence of rain and snow noise residue and artifacts in the final denoised image, providing reliable input for subsequent core perception tasks in autonomous driving, such as object detection and semantic segmentation. Attached Figure Description

[0036] Figure 1 This is a schematic diagram of the overall model of the present invention;

[0037] Figure 2 This is a schematic diagram of the enhanced hybrid pre-module of the present invention;

[0038] Figure 3 This is a schematic diagram of the structure of the high-efficiency transposed attention mechanism module of the present invention;

[0039] Figure 4 This is a schematic diagram of the pixel-level gating fusion module of the present invention. Detailed Implementation

[0040] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.

[0041] Example 1:

[0042] This embodiment provides an adaptive image denoising method for complex environments, and the specific steps are as follows:

[0043] Step 1: Collect image datasets of autonomous vehicles and preprocess them;

[0044] A complex weather image dataset for autonomous driving was constructed by combining publicly available authoritative datasets with a self-built real-world scene dataset. 9125 pairs of clear-degraded images suitable for the vehicle's perspective were selected from standard datasets such as Rain100, Snow100K, and RESIDE. In the preprocessing stage, image distortion was removed through camera calibration, and all images were uniformly cropped to 512×512 pixels and their pixel values ​​were normalized. The training set was further augmented through random flipping, rotation, brightness and contrast adjustments, and the overlay of gradient-based weather degradation samples. The dataset was first filtered to remove invalid samples such as overexposed or mispaired images, and then randomly divided into training, validation, and test sets in a 7:2:1 ratio to ensure a balanced and non-repeating distribution of scenes, lighting, and weather conditions across sets. An additional 30% of real mixed weather samples were retained in the test set and not used for training and optimization, serving as objective validation of the model's actual generalization ability.

[0045] Step 2: Initialize the model parameters using a Xavier uniform distribution, set the batch size to 8, and the initial learning rate to 2×10. -4 The AdamW optimizer was selected with a weight decay factor of 1×10⁻⁶. -4 The total number of training rounds was set to 200. The loss function adopted was a weighted combination of L1 loss and VGG19-based perceptual loss, which balances pixel-level reconstruction accuracy and image visual detail quality. The model was first pre-trained on a publicly available standard dataset to learn general denoising capabilities. Every two rounds, peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) metrics were calculated on the validation set. An early stopping mechanism was used to avoid overfitting. Finally, the optimal weights from the validation set were selected as the pre-trained model, and its generalization ability was verified using a test set.

[0046] Step 3: The images of the autonomous vehicle to be processed are acquired in real time by an industrial-grade RGB camera mounted on the vehicle, with a resolution of 1920×1080 and a frame rate of 30FPS, fully covering the main driving area in front of the vehicle. During the vehicle's movement, the camera continuously and synchronously acquires images of the road scene ahead. After each frame is acquired, the onboard computing unit immediately performs the same basic preprocessing procedure as in the training phase. The preprocessed image is then input in real time to the pre-trained denoising model deployed on the vehicle. After the model completes single-frame inference, it outputs the corresponding denoised image, which is finally restored to its original resolution.

[0047] like Figure 1 As shown, the image denoising model proposed in this invention adopts an end-to-end encoder-decoder architecture with an overall U-Net symmetrical topology, constructing a nonlinear mapping from the complex and severe weather degradation domain to the clear image domain.

[0048] The overall forward propagation consists of four core stages: shallow feature extraction, multi-scale feature encoding, decoding and recovery, and pixel-level gating reconstruction.

[0049] At the input end, directly embedding image patches into the original image would destroy local continuous textures. Therefore, an enhanced hybrid stem (EHS) is introduced as a preprocessor at the network's beginning. It transforms the raw RGB data in pixel space into shallow features containing high-frequency physical edge details, avoiding irreversible loss of structural information caused by initial downsampling. These shallow features are then fed into an encoder consisting of four Transformer layers. As the network depth increases, the spatial resolution of the feature maps decreases layer by layer, while the channel dimensions expand exponentially, extracting multi-scale semantic information.

[0050] Inside the encoder, the network employs a dual-stream parallel feature extraction mechanism. Serialized Transformer blocks serve as the backbone, handling regular slices to capture long-distance global dependencies and resolve large-scale fog noise. Transformer sub-blocks between Transformer blocks act as branch paths. These sub-blocks are cascaded structures of sub-slice embeddings and Transformer blocks. Sub-slice embeddings focus on mining subtle local features within slices, such as fine rain streaks and snowflakes. By leveraging the complementary advantages of global perspective and local focus, the network achieves comprehensive and precise joint processing of complex degradation phenomena at multiple scales.

[0051] To handle high-resolution inputs in autonomous driving scenarios, both the Transformer block and its sub-blocks within the encoder integrate an efficient transposed attention (EfficientTA) mechanism. This mechanism forces the computation of the attention matrix to shift from the spatial domain to the channel domain. While achieving linear computational complexity and overcoming memory bottlenecks, the network still retains its contextual awareness of global weather degradation.

[0052] In the decoder stage, the encoder's output features are first input into the Transformer decoder for feature semantic decoding and global structure reconstruction. Then, the features output by the Transformer decoder undergo multi-level upsampling and gated fusion processing. To compensate for the fine-grained coordinate information lost during downsampling, skip connections are established between the encoder and the corresponding decoding layer. Traditional direct feature concatenation can lead to shallow noise leakage into deeper layers. At this cross-layer node, the network deploys a pixel-wise gated fusion (PGF) module at the output of the skip connection between the encoder and decoder. The PGF dynamically generates a spatial weight mask, performs pixel-level intervention on the incoming shallow features, suppresses high-frequency degraded coordinates of rain and snow, and preserves the feature fidelity of the background topology. Finally, the decoder aggregates the upsampled features with the skip connection features from the encoder and sends them to the gated fusion module to obtain purified features. After passing through convolutional layers, it outputs a denoised feature map, completing image reconstruction in complex environments.

[0053] The key components of the model proposed in this invention are as follows:

[0054] (1) Enhanced hybrid front-end module

[0055] Standard ViT and its variants typically rely on large stride convolutions or linear projections to perform non-overlapping patch embeddings on the input image. While this operation achieves spatial downsampling to match the computational pooling of the Transformer, it destroys the local continuity between pixels. In severe weather scenes, degradation features such as rain streaks and snow spots often manifest as high-frequency microtextures; the destruction of local geometry directly causes the network to lose these crucial degradation information in shallow layers. The Transformer architecture lacks the translation invariance and local correlation of CNNs, making it difficult for the model to converge autonomously and focus on local high-frequency noise regions in the early stages of training.

[0056] To address the above problems, this invention embeds an EHS module in the front end of the Transformer encoder, such as... Figure 2As shown, this module serves as a priori compensation network for feature extraction, internally constructing long-range residual convolutional units. For different forms of weather degradation, EHS employs multi-scale parallel sensing branches to adapt to diverse receptive fields. Combined with a low-computational-cost parameter-free gating mechanism, the network performs preliminary filtering of high-frequency noise and enhancement of the underlying structure before slicing operations, providing a high-quality shallow feature stream for subsequent global attention interactions.

[0057] Given an input image under severe weather conditions Where H represents the image height, W represents the image width, and the image has 3 channels. To overcome the channel limitations of the original RGB pixels, the first layer of the network consists of a 3×3 convolution and a LeakyReLU activation function, directly performing non-linear dimensionality upscaling on the spatial domain data to extract shallow features containing local edge priors. The forward propagation process can be represented as:

[0058] ,

[0059] in, This represents the LeakyReLU nonlinear activation function. Indicates the kernel size as The convolution operation.

[0060] Real-world weather degradation exhibits significant scale variations, making it difficult for single-sized convolutional kernels to simultaneously accommodate cross-scale features. Therefore, a multi-scale sensing branch is constructed. The first path deploys a single layer. Convolution preserves the most original, minute textures. The second path uses two layers. Concatenate convolution and LeakyReLU activation function.

[0061] Based on the calculation of the receptive field, double layer A concatenation of layers is spatially equivalent to a single layer. Convolution. By decomposing large convolutional kernels, this branch not only significantly compresses the number of model parameters but also introduces deeper nonlinear mapping capabilities. The feature tensors at different receptive field scales in the two paths are aligned in channel and spatial dimensions and summed element-wise. This operation achieves feature-level fusion of multi-scale degradation information without adding extra dimensions. Its discretized expression is as follows:

[0062] ,

[0063] ,

[0064] ,

[0065] in This is a characteristic of the upper branch. As a feature of the lower branch, through parallel design, the module can simultaneously respond to subtle noise in the image, significantly enriching the expressive power of shallow features.

[0066] The fused multi-scale features are mixed with complex texture information from the background. In the feature space, such physical structures are easily fused with rain and snow degradation. To highlight the task-relevant denoising features, the module introduces a parameterless gating mechanism. The input features are processed through 1×1 pointwise convolutions, linearly expanding the channel dimension to twice the original. Subsequently, this high-dimensional tensor is truncated along the channel axis, divided into two sub-tensors X1 and X2. Element-wise multiplication is performed between them. Through internal multiplication calculations of the feature maps, the network reduces redundant background interference with extremely low computational cost, completing the nonlinear purification of the core denoising features. The specific calculation formula is as follows:

[0067] ,

[0068] ,

[0069] in, It represents the Hadamah accumulation. This refers to gated output features. The gating mechanism allows the network to learn... and The correlation is used to suppress noisy regions in the feature map while enhancing high-response structural texture regions.

[0070] After gating modulation, the features Convolution performs channel projection, remapping the discrete, refined information onto the network's pre-defined shallow embedding space, thus aligning multi-path features. The module sets long-span global residual paths at both ends of its computation graph to ensure effective gradient propagation and preserve the low-level information of the original image I. This anchors to real-world weather prior features while ensuring stable backpropagation of low-level gradients to the input. The final output is a shallow feature embedding. The calculation formula is:

[0071] ,

[0072] (2) High-efficiency transposition attention mechanism module

[0073] The input sources for autonomous driving visual perception are typically high-resolution. Directly using the Transformer would generate redundant pixel-level alignment information, directly impacting the model's real-time inference efficiency on edge devices. To address this issue, the encoder is reconstructed and embeds the EfficientTA module, with the module architecture as follows: Figure 3As shown, this module shifts the computational basis of attention weights from a large spatial domain to a relatively constant channel domain. The network synchronously introduces a key-value reuse strategy to reduce linear projection overhead and combines it with a multiplicative interaction method to enhance nonlinear representation. This asymmetric domain transformation design reduces spatial complexity while preserving the network's long-range modeling and perception of global severe weather.

[0074] The EfficientTA module first introduces a hybrid convolutional module for feature generation and locality enhancement. Let the input features be... Where H is the feature height, W is the feature width, and C is the number of channels, a 1×1 convolution is first used for linear fusion and dimensionality enhancement of the channel dimension, followed by a 3×3 depthwise convolution. This achieves feature space mapping while utilizing the 3×3 local receptive field to encode the features at their positions, enhancing the model's sensitivity to edge textures. The generated feature map is segmented along the channel dimension, yielding a query matrix Q and a key matrix K. To further reduce the number of model parameters and memory overhead, the module adopts a parameter sharing strategy, reusing the key matrix K as the value matrix V.

[0075] Building upon this, the algorithm performs cross-channel covariance attention calculation. Unlike multi-head self-attention mechanisms that calculate spatial similarity between pixel pairs, this module captures semantic dependencies between channels. The spatial dimensions of matrices Q and K are flattened and reshaped, and then the transpose of Q and K is multiplied to generate a C×C covariance attention map. This attention map is normalized using an exponential function to encode global correlations between different feature channels. Subsequently, the attention map A is left-multiplied by a reused value matrix V to aggregate global contextual information across the channel dimensions. The calculation formula is as follows:

[0076] ,

[0077] ,

[0078] in, It is a learnable temperature scaling parameter used to dynamically adjust the smoothness of the attention distribution. Aggregated features Including channel information after global interaction, the dimensions are reshaped back. .

[0079] To further enhance the non-linear representation of features, EfficientTA introduces a SimpleGate module after attention computation. The SimpleGate module employs a parameterless implementation: it splits the input feature map in half along the channel dimension and introduces a non-linear transformation through element-wise multiplication of these two feature halves, effectively suppressing redundant channels while preserving high-frequency detail information. Finally, the processed features are passed through a 1×1 convolutional layer to obtain the final output. This mechanism, while maintaining feature expressive power, reduces the overall computational complexity to a linear level by reusing the key-value matrix and simplifying the non-linear layer, effectively addressing the computational bottleneck in high-resolution image processing.

[0080] (3) Pixel-level gating fusion module

[0081] In the U-Net architecture, skip connections are used to compensate for high-frequency spatial details lost during the decoding stage due to downsampling. In severe weather image denoising tasks, while skip connections can assist the encoder in extracting shallow detail features containing the background, they also retain degraded noise such as rain streaks, snowflakes, or fog. Traditional feature fusion methods, such as channel concatenation or simple addition, lack selectivity for feature content, easily leaking noise from the encoding end directly to the decoding end, resulting in artifacts or residual noise in the denoised image. To solve this problem, this invention proposes a PGF module, the specific architecture of which is as follows: Figure 4 As shown.

[0082] The encoder is characterized by The features from the decoder are Where H is the feature height, W is the feature width, and C is the number of channels. It contains a significant amount of untreated weather noise, and Deep processing results in richer and relatively purer semantic information. The PGF module first concatenates the two layers along the channel dimension using tensor stacking, and then uses a bottleneck structure consisting of two 1×1 convolutional layers to extract the spatial attention distribution of the fused features. The first convolutional layer reduces the number of channels from 2C to C, and adds non-linearity through the GeLU activation function. The second convolutional layer generates a multi-channel gated map from the feature map. Subsequently, the Sigmoid activation function normalizes the values ​​of the gated map to the (0,1) interval, generating a pixel-level mask M. The calculation formula is as follows:

[0083] ,

[0084] ,

[0085] in, Indicates channel splicing. For the Sigmoid function, This is the GeLU activation function.

[0086] After obtaining the mask, the module uses a gated residual strategy for feature fusion. The mask M and encoder features... Element-wise multiplication is performed to physically suppress noise regions at the pixel level. The processed encoder features are then combined with the decoder features. The final fused output is obtained by adding the two parts together. The specific calculation formula is as follows:

[0087] .

[0088] This embodiment also provides the experimental procedure of the method, as follows:

[0089] (1) Experimental setup

[0090] To avoid interference caused by differences in hardware computing power and the randomness of parameter tuning, all baseline model comparisons and module ablation experiments in this embodiment use the same hardware and software equipment. Specific experimental configurations are detailed in Table 1, and training parameters are detailed in Table 2.

[0091] Table 1 Experimental Configuration

[0092]

[0093] Table 2 Training Parameters

[0094]

[0095] (2) Evaluation indicators

[0096] To quantify the fidelity of image denoising results under severe weather conditions, PSNR and SSIM were selected as evaluation metrics.

[0097] PSNR focuses on measuring the relative error of digital signals in pixel space. This metric uses mean square error as a benchmark and directly calculates the Euclidean distance difference between the network output tensor and the sharp ground truth value. In perception tasks, an increase in PSNR indicates that global color distortion and high-frequency noise amplitude have been effectively reduced. Given a spatial dimension of... The restored image Compared with reference image Its calculation formula can be expressed as:

[0098] ,

[0099] ,

[0100] in, This represents the maximum value of the color of an image pixel.

[0101] Although PSNR performs well in terms of quantization error, its calculation is based on pixel differences and often fails to accurately reflect the human eye's perception of image structure. Therefore, SSIM is introduced to perform structure verification. This metric jointly measures the degree of restoration of the original scene by the restored image from three local statistical feature domains: brightness, contrast, and structure. The output of SSIM converges to the [0,1] interval. The closer the result is to 1, the better the network suppresses noise and the more accurately it preserves the geometric boundaries of real objects. Its calculation formula is defined as:

[0102] ,

[0103] in, and Representing images respectively and The mean, and Represents variance. Represents covariance, and It is a constant that avoids the denominator being zero.

[0104] In addition to evaluation metrics for measuring image reconstruction fidelity, the lightweight nature and real-time inference capability of denoising algorithms are equally important in real-world visual tasks in complex environments. Therefore, we further introduce multiply-accumulate operations (MACs) and frame rate (frames per second, FPS) as evaluation metrics for model computational complexity and running efficiency.

[0105] MACs focus on evaluating the theoretical time complexity of the forward inference process of a denoising network. This invention uses billions of operations per second (GMACs) as the order of magnitude to intuitively reflect the changes in the underlying hardware computing power overhead when running the algorithm, and to measure the memory and GPU memory usage during model operation and storage. FPS represents the number of image frames that the network can fully process and output per second. The higher the value of this indicator, the shorter the actual forward inference time for a single image.

[0106] (3) Experimental analysis

[0107] To verify the contribution of each module in the model constructed in this invention to the stripping of complex weather noise and the reconstruction of image features, this section conducted a progressive ablation experiment on a mixed weather noise dataset. The meanings of "-" and "√" are that the module is turned off and enabled, respectively. The quantitative results are detailed in Table 3.

[0108] In Table 3, Method A indicates the use of the baseline model, Method B uses the EHS module on the basis of the baseline model, Method C uses the EfficientTA module on the basis of the baseline model, Method D uses the PGF module on the basis of the baseline model, Method E uses both the EHS module and the EfficientTA module on the basis of the baseline model, and Method F uses both the EHS module and the PGF module on the basis of the baseline model.

[0109] Table 3 Algorithm Ablation Experiment

[0110]

[0111] As shown in Table 3, the baseline model has a PSNR of 30.65 dB and a SSIM of 0.936, a GMAC of 6.12, and an FPS of 73.1 frames / s. By introducing the EHS module separately at the front end of the baseline model, the PSNR of the model is improved to 30.8 dB and the SSIM is increased to 0.94. The performance improvement of Scheme B shows that the EHS module can accurately capture high-frequency details with complex geometric shapes such as rain streaks and snow spots in the shallow layer of the network, reducing the disruption of local spatial continuity by the Transformer architecture. However, due to the introduction of multi-scale convolution branches, the computational cost increases to 8.2 GMACs, and the FPS decreases slightly to 70.6 frames / s.

[0112] When the EfficientTA module was introduced into the baseline model, the model's PSNR increased to 30.9 dB, SSIM decreased slightly, computational cost decreased to 5.91 GMACs, and inference speed increased to 74.5 frames / s. EfficientTA achieves low-latency global long-range modeling of atmospheric degradation distribution through channel-domain covariance attention calculation, reducing computational overhead. However, due to the lack of prior constraints on shallow local high-frequency features, the local geometric texture of the restored image is excessively smoothed. The PGF module plays a decisive role in improving image structure fidelity. Scheme D's PSNR and SSIM jumped to 31.1 dB and 0.941, respectively, and due to its lightweight gating mechanism, the computational cost only increased to 6.35 GMACs, with minimal impact on real-time performance. Simultaneously, the introduction of EHS and EfficientTA modules improves the SSIM to 0.942, indicating that the global perception in the channel domain relies on the high-fidelity underlying information provided by EHS. The two modules work together to achieve complementary advantages in global context and local detail features, increasing the feature dimension while reducing the computational cost to 7.99 GMACs, thus verifying the superiority of EfficientTA in controlling computational complexity. Furthermore, PGF is superimposed on top of the fused EHS, improving the metrics to 31.3dB and 0.946, indicating that the PGF module adaptively generates pixel-level spatial weight masks, blocking incompletely filtered-out original environmental noise in the shallow encoder and avoiding leakage of heterogeneous noise and artifact residue. The final adaptive denoising algorithm proposed in this invention achieves PSNR and SSIM of 31.32dB and 0.955, respectively, with a computational cost of 8.22 GMACs and a stable FPS of 70.3 frames / s.

[0113] In summary, the denoising algorithm proposed in this invention can filter out complex weather noise to the greatest extent while transforming pure physical structural features into high-quality prior information.

[0114] Example 2:

[0115] This invention provides an electronic device, including a processor and a memory. The memory stores program instructions for implementing the adaptive image denoising method for complex environments according to Embodiment 1. The processor executes the program instructions stored in the memory to perform adaptive image denoising for complex environments.

[0116] The processor can also be called a Central Processing Unit (CPU). A processor may be an integrated circuit chip with signal processing capabilities. A processor can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0117] The methods described in Embodiment 1 of this invention are applicable to this electronic device embodiment. The specific functions implemented by this electronic device embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0118] Example 3:

[0119] This embodiment provides a storage medium storing a computer program or instructions capable of implementing the above-described adaptive image denoising method for complex environments. When the computer program or instructions are run on a computer, the steps of the above-described adaptive image denoising method for complex environments are executed.

[0120] The computer program or instructions can be stored in the aforementioned storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.

[0121] The methods described in Embodiment 1 of this invention are all applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0122] This invention provides an adaptive image denoising method, device, and storage medium for complex environments. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.

Claims

1. An adaptive image denoising method for complex environments, characterized in that, Includes the following steps: Step 1: Collect image datasets of autonomous vehicles and preprocess them; Step 2: Input the preprocessed autonomous vehicle image dataset into the image denoising model based on the codec architecture for training and evaluation to obtain the pre-trained model; Step 3: Input the image of the autonomous vehicle to be processed into the pre-trained model for processing to obtain the denoised image of the autonomous vehicle.

2. The adaptive image denoising method for complex environments according to claim 1, characterized in that, In step 2, the forward propagation process of the image denoising model includes: The input image is preprocessed using an enhanced hybrid preprocessor module to obtain shallow features; The shallow features are input into the encoder for multi-scale encoding to obtain multi-scale features; wherein, the encoder adopts a dual-stream parallel feature extraction mechanism, with serial Transformer blocks as the main path and Transformer sub-blocks between Transformer blocks as branch paths. Multi-scale features are input to the decoder for multi-scale decoding processing to obtain a residual image; wherein, the decoder includes a pixel-level gated fusion module, upsampling and convolutional projection layers; the pixel-level gated fusion module is deployed at the output end of the skip connection between the encoder and the decoder; The residual image is superimposed pixel by pixel with the input image to obtain the denoised image.

3. The adaptive image denoising method for complex environments according to claim 2, characterized in that, The internal processing of the enhanced hybrid front-end module includes: The input features are processed using 3×3 convolution and LeakyReLU activation function to obtain shallow features; Shallow features are input into a multi-scale parallel perception branch for multi-scale feature extraction and fusion to obtain fused features. The fused features are expanded using 1×1 convolution, and the expanded features are divided into two sub-tensors along the channel. The two sub-tensors are processed by Hadamard product to obtain gated output features, which are then processed by 3×3 convolution and added to the input features by residual addition to obtain shallow embedding features.

4. The adaptive image denoising method for complex environments according to claim 2, characterized in that, The Transformer sub-block includes sub-slice embedding and Transformer block; the Transformer block includes layer normalization, efficient transpose attention mechanism module and feedforward neural network.

5. The adaptive image denoising method for complex environments according to claim 4, characterized in that, The internal processing of the efficient transposed attention mechanism module includes: The input features are fed into a hybrid convolutional module for feature processing to obtain enhanced features; the hybrid convolutional module includes 1×1 convolution and 3×3 depthwise convolution. The enhanced features are divided into a query matrix and a key matrix along the channel dimension, and a parameter sharing strategy is adopted to reuse the key matrix as the value matrix; Attention is calculated on the query matrix, key matrix, and value matrix to obtain aggregated features; The aggregated features are sequentially input into a simple gating module and a 1×1 convolutional layer for processing to obtain the output features.

6. The adaptive image denoising method for complex environments according to claim 2, characterized in that, The internal processing of the pixel-level gated fusion module includes: The encoder features are concatenated with the decoder upsampled features at the corresponding scale along the channel dimension to obtain the concatenated features; The spatial attention distribution of the splicing features is extracted using a bottleneck structure, and a pixel-level mask is generated using the Sigmoid function; the bottleneck structure includes a 1×1 convolution and a GeLU activation function. The pixel-level mask is multiplied element-wise with the encoder features, and then added to the decoder upsampled features to obtain the output fused features.

7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the adaptive image denoising method for complex environments as described in any one of claims 1 to 6.

8. A storage medium, characterized in that, The device stores a computer program or instructions that, when run on a computer, execute the steps of the adaptive image denoising method for complex environments as described in any one of claims 1 to 6.