Image defogging method and system based on multi-scale residual attention

By using a U-Net-structured image dehazing network, combined with multi-scale residual blocks and a hybrid attention mechanism, the problem of preserving details and textures in existing image dehazing methods is solved, achieving efficient fog removal and image quality restoration.

CN122048728APending Publication Date: 2026-05-15TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN UNIVERSITY OF TECHNOLOGY
Filing Date
2026-01-26
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing image dehazing methods struggle to effectively remove fog while preserving image details and textures, especially in complex scenes where they perform poorly.

Method used

An image dehazing network based on the U-Net structure is adopted, which combines multi-scale residual blocks and a hybrid attention mechanism. Through the complementary fusion of encoder and decoder, features are extracted using multi-scale residual blocks, and image details are restored through a feature refinement module. The network is optimized by combining smoothing L1 loss and perceptual loss.

Benefits of technology

It effectively removes fog, restores image clarity and texture, and improves image quality, especially showing advantages in the restoration of high-frequency information such as buildings and vegetation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048728A_ABST
    Figure CN122048728A_ABST
Patent Text Reader

Abstract

The invention discloses an image defogging method and system based on multi-scale residual attention, and the method specifically comprises the steps: inputting a pre-processed foggy image into a network model based on a U-Net architecture, extracting multi-scale features through an encoder, carrying out the processing of a feature refining module, and generating a fogless image through a decoder, and outputting the fogless image. According to the invention, a multi-scale residual block is designed, convolution kernels of different sizes are used to capture features of different scales, and a residual structure and a mixed attention mechanism are introduced to enhance the feature extraction capability. Meanwhile, a feature refining module is introduced to enhance the image detail recovery capability, and smooth L1 loss and perception loss functions are used to optimize the network performance. The method aims at effectively removing the fog in the image and improving the image quality, and is particularly suitable for the fields of intelligent driving, remote monitoring, remote sensing image processing and the like. The method is obviously superior to the prior art in qualitative and quantitative evaluation, fog can be effectively removed, and image detail textures can be recovered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an image dehazing method and system based on multi-scale residual attention. Background Technology

[0002] In numerous fields such as intelligent driving, remote monitoring, and remote sensing image processing, clear images are crucial for accurate analysis and decision-making. However, the presence of fog severely degrades image quality, making images blurry, reducing contrast, and obscuring details and textures. Traditional image dehazing methods primarily rely on histogram equalization, filtering techniques, or atmospheric scattering models. Histogram equalization enhances image contrast by adjusting the grayscale distribution, but its effectiveness in removing fog is limited and may introduce noise. Filtering techniques, such as Gaussian filtering and median filtering, while smoothing images to some extent, tend to lose image detail and are ineffective at removing fog in complex scenes. Atmospheric scattering models model and remove fog based on physical principles, but this method requires a relatively accurate understanding of prior information about the scene and has high computational complexity.

[0003] With the development of deep learning technology, some researchers have attempted to apply it to image dehazing. However, most deep learning-based image dehazing methods have limitations in extracting fog features from images. They often struggle to effectively capture the multi-scale features of fog and the impact of different fog concentrations on the image, frequently resulting in insufficient detail and texture in the dehazed image, failing to meet the needs of practical applications. Therefore, there is an urgent need for an image dehazing method and system that can effectively remove fog from images while preserving image details and texture. Summary of the Invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide an image dehazing method and system based on multi-scale residual attention.

[0005] In a first aspect, the present invention provides an image dehazing method based on multi-scale residual attention, the method being implemented through the following steps: S1: Preprocess the image to be processed, including resizing and normalization, to adapt it to the model's input requirements.

[0006] S2: The preprocessed image is input into the encoder, passing through convolutional layers, multi-scale residual blocks, downsampling layers, and finally outputting multi-level feature maps {F1, F2, F3, F4}, with the resolution decreasing layer by layer and the number of channels increasing.

[0007] S3: Input the highest-level feature map F4 output by the encoder into the feature refinement module to expand the receptive field, capture multi-scale spatial information, and output the refined feature map F4′.

[0008] S4: Input the feature maps {F1, F2, F3} output by the encoder and the refined feature map F4′ of the highest layer output by the feature refinement module into the decoder. The feature maps are gradually reconstructed through upsampling layers, multi-scale residual blocks and convolutional layers, and finally the dehazed image J is output.

[0009] Image dehazing network construction: A U-Net-based image dehazing network is constructed, comprising an encoder, a decoder, and a feature refinement module. The encoder extracts multi-scale features from the image, while the decoder reconstructs the haze-free image based on the feature information provided by the encoder and skip connections. Specifically, the encoder consists of convolutional layers, multi-scale residual blocks (MSRBs), and downsampling layers. The decoder mirrors the encoder structure, consisting of upsampling layers, multi-scale residual blocks, and convolutional layers. Skip connections fuse low-frequency information extracted by the encoder and high-frequency information extracted by the decoder through concatenation, preserving more original information to complete the image dehazing task.

[0010] Multi-scale residual block design: Multi-scale residual blocks are divided into three stages: The first stage processes the initial input feature map using a parallel branching structure. The first branch uses a 3×3 convolutional kernel to extract local fine-grained features, while the second branch uses a 5×5 convolutional kernel to extract mid-range contextual features. The outputs of the two branches are merged through a Concat operation to generate a shallow fused feature map (H×W×2C), which is then fed into the second stage.

[0011] The second stage reuses the dual-branch architecture of the first stage. The convolutional kernels (3×3 and 5×5) have an increased semantic abstraction of the input feature map and an expanded equivalent receptive field, which can capture cross-regional dependencies and thus achieve deep feature extraction. The outputs of the two branches are merged through the Concat operation to generate a deep fusion feature map (H×W×4C) which is then input into the third stage.

[0012] The third stage involves adjusting the number of channels in the feature map using 1×1 convolutions, and then using a hybrid attention mechanism (HA) to identify and enhance important feature information in the feature map.

[0013] Finally, the input of the multi-scale residual block is concatenated with the output of the third stage to obtain the final output of the entire module.

[0014] Introduction of hybrid attention mechanism: A hybrid attention mechanism (HA) is introduced, combining channel attention and pixel attention to enhance the network's ability to recognize features of fog at different concentrations. Specifically: Channel attention: Global average pooling and max pooling are performed on the feature map after the third stage of multi-scale feature extraction and fusion, which is compressed by 1×1 convolution, to obtain statistical features in two channel dimensions. The two statistical features are added together and fed into a channel weight calculation network consisting of two 1×1 convolutional layers and an activation function to output a channel attention weight map. The channel attention weight map is multiplied with the input feature map channel by channel to obtain a weighted feature map.

[0015] Pixel attention: Perform one or more 1×1 convolution operations and activation function processing on the channel-weighted feature map to extract the pixel attention weight map. Multiply the pixel attention weight map with the channel-weighted feature map pixel by pixel to obtain the final output feature map.

[0016] Feature refinement module design: A Feature Refinement Module (FRM) is introduced to enhance the network's ability to recover image details without adding extra parameter burden. Specifically, FRM expands the receptive field by setting three convolutional kernels with different dilation rates (1, 3, and 5), capturing spatial information at different scales and generating three feature maps containing different spatial information. Then, these feature maps are fused into one by dimensionality concatenation, and finally, a 1×1 convolutional kernel is used for dimensionality reduction to expand the receptive field, capture and integrate a wider range of spatial contextual information, thereby enabling more accurate recovery of details in the dehazed image.

[0017] Loss function settings: The network performance is optimized by using smoothed L1 loss and perceptual loss functions as training objectives. Smoothed L1 loss, compared to traditional L1 loss, is more conducive to stable convergence of the network; simultaneously, compared to L2 loss, it avoids the problem of error being over-amplified when the deviation is large. The perceptual loss function is used to evaluate the structural similarity between the dehazed image and the real image, enhancing the network's ability to recover details from the dehazed image. The total loss function is a weighted sum of the smoothed L1 loss and the perceptual loss, making the network output image closer to the haze-free state while accelerating the network's convergence process.

[0018] Secondly, the present invention provides an image dehazing system based on multi-scale residual attention, the system comprising: Preprocessing module: Performs preprocessing on the image to be processed, including resizing and normalization, to adapt it to the model's input requirements.

[0019] Encoder module: The preprocessed image is input into the encoder, passing through convolutional layers, multi-scale residual blocks, downsampling layers, and finally outputting multi-level feature maps {F1, F2, F3, F4}, with the resolution decreasing layer by layer and the number of channels increasing.

[0020] Feature Refinement Module: The highest-level feature map F4 output by the encoder is input into the feature refinement module to expand the receptive field, capture multi-scale spatial information, and output the refined feature map F4′.

[0021] Decoder module: The feature maps {F1, F2, F3} output by the encoder and the refined feature map F4′ of the highest layer output by the feature refinement module are input into the decoder. The feature maps are gradually reconstructed through upsampling layers, multi-scale residual blocks and convolutional layers, and finally the dehazed image J is output.

[0022] Thirdly, the present invention provides an electronic device comprising a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; the display screen is used to display an image generated by the processor, the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the electronic device performs an image dehazing method based on multi-scale residual attention.

[0023] Fourthly, the present invention provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform an image dehazing method based on multi-scale residual attention.

[0024] Fifthly, the present invention provides a computer program product, including a computer program / instructions, which, when executed by a processor, cause the electronic device to perform an image dehazing method based on multi-scale residual attention.

[0025] Compared with the prior art, the beneficial effects of the present invention are: This invention utilizes the parallel multi-branch structure of multi-scale residual blocks (MSRB) to extract features using convolutional kernels of different sizes (3×3 and 5×5), and achieves complementary fusion of multi-scale features through residual connections and concat operations, effectively solving the problem of blurred details caused by the single feature scale in existing methods.

[0026] A hybrid attention mechanism (HA) is introduced, combining a dual weight allocation strategy of channel attention and pixel attention. The channel attention mechanism filters key feature channels through a channel attention weight map, while the pixel attention mechanism assigns different weights to each pixel, highlighting information-dense areas in the image and achieving adaptive feature enhancement / suppression in areas with different fog concentrations. This effectively reduces the color distortion problem caused by mean processing in traditional methods.

[0027] The Feature Refinement Module (FRM) is designed to capture multi-scale spatial context information through parallel dilated convolutional layers with dilation rates of 1, 3, and 5. After fusion, the information is reduced in dimensionality by 1×1 convolution, which expands the receptive field without increasing the number of parameters, making the image edges clearer. It is particularly advantageous in restoring high-frequency information such as building textures and vegetation details.

[0028] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0029] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 This is a diagram showing the processing effect of the present invention in an indoor scene. Detailed Implementation

[0030] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0031] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0032] This method takes a hazy image as input, with the data format being an H×W×3 RGB three-channel matrix. After processing by a dehazing network, it outputs a hazy-free image of the same size. The specific processing flow is as follows: Input fog map I∈[0,255]^{H×W×3} → Normalization I'=I / 255 → Defogging network f(θ) → Output J'=f(I') → Inverse normalization J=J'×255.

[0033] like Figure 1As shown in this embodiment, an image dehazing method and system based on multi-scale residual attention is implemented through the following steps: S1: Preprocess the image to be processed, including resizing and normalization, to adapt it to the model's input requirements.

[0034] S2: The preprocessed image is input into the encoder, passing through convolutional layers, multi-scale residual blocks, downsampling layers, and finally outputting multi-level feature maps {F1, F2, F3, F4}, with the resolution decreasing layer by layer and the number of channels increasing.

[0035] S3: Input the highest-level feature map F4 output by the encoder into the feature refinement module to expand the receptive field, capture multi-scale spatial information, and output the refined feature map F4′.

[0036] S4: Input the feature maps {F1, F2, F3} output by the encoder and the refined feature map F4′ of the highest layer output by the feature refinement module into the decoder. The feature maps are gradually reconstructed through upsampling layers, multi-scale residual blocks and convolutional layers, and finally the dehazed image J is output.

[0037] Model Training Dataset Selection: The RESIDE (Real Single Image Dehazing) dataset is a large-scale benchmark dataset for research and evaluation of single image dehazing algorithms. It consists of synthetic and real-world blurred images, divided into five subsets, each with a different training or evaluation purpose. The main features of the RESIDE dataset are its diverse data sources and image content, and the rich criteria it provides for evaluating dehazing algorithms, including full-reference metrics, no-reference metrics, subjective evaluation, and novel task-driven evaluation.

[0038] The RESIDE dataset consists of the following parts: The Indoor Training Set (ITS) consists of 13,990 synthetic blurred images generated using 1,399 sharp images from the NYU2 and Middlebury stereo databases. Ten blurred images were synthesized from each sharp image, with 13,000 used for training and 990 for validation.

[0039] The Outdoor Training Set (OTS) consists of 72,135 blurred outdoor images, which were synthesized by depth estimation from 2,061 real outdoor images of Beijing's real-time weather.

[0040] Integrated Target Test Set (SOTS): 500 indoor images (not overlapping with the training images) are selected from NYU2 and blurred images are synthesized using the same process as the training data.

[0041] Hybrid Subjective Test Set (HSTS): Includes 10 synthetic outdoor hazy images and 10 real-world hazy images for subjective human assessment.

[0042] Real-world Task-Driven Test Set (RTTS): Contains 4,322 real-world blurred images annotated with object bounding boxes for task-driven evaluation.

[0043] Training data selection: During the training phase, 8970 paired images with a fog concentration of 0.9 were selected from the Outdoor Training Set (OTS) as training data. These images are consistent in fog concentration, which helps the model to learn defogging features under specific fog concentrations more effectively.

[0044] Data preprocessing: Before feeding the data into the network, it needs to be preprocessed. Specifically, this involves randomly cropping the images and uniformly adjusting their resolution to 256×256 pixels. Random cropping increases data diversity, improves the model's generalization ability, and enables the model to perform better dehazing on images of different sizes and content.

[0045] Model building: Building an image dehazing network: An image dehazing network is built based on the U-Net structure. The network includes an encoder, a decoder, and a feature refinement module.

[0046] Encoder Construction: The encoder consists of 3×3 convolutional layers, multi-scale residual blocks (MSRB), and downsampling layers. The convolutional layers and ReLU activation function first extract local features from the input foggy image, generating an initial feature map. Subsequently, the feature map is fed into the MSRB, which uses convolutional kernels of different sizes to capture multi-scale features and adaptively adjusts the weights of features from different regions through a hybrid attention mechanism. Finally, the downsampling layers process the feature map, changing its size and number of channels to suit the needs of subsequent processing.

[0047] Decoder Construction: The decoder is a mirror image of the encoder, consisting of an upsampling layer, MSRB, and convolutional layers. The upsampling layer gradually restores the spatial dimensions of the feature map, the MSRB further processes and fuses the features, and the convolutional layers integrate the features. Finally, by using skip connections, the low-frequency information from the encoder and the high-frequency information from the decoder are fused to complete the reconstruction of the fog-free image.

[0048] Multi-scale Residual Block (MSRB) Construction: The MSRB performs multi-scale feature extraction and fusion in three stages. The first stage processes the initial input feature map using a parallel branching structure. The first branch uses a 3×3 convolutional kernel to extract local fine-grained features, while the second branch uses a 5×5 convolutional kernel to extract mid-range contextual features. The outputs of the two branches are merged using a concat operation to generate a shallow fused feature map (H×W×2C) and fed into the second stage. The second stage reuses the dual-branch architecture of the first stage. Due to the increased semantic abstraction of the input feature map, the convolutional kernels (3×3 and 5×5) have an expanded equivalent receptive field, enabling them to capture cross-regional dependencies and achieve deep feature extraction. The outputs of the two branches are merged using a concat operation to generate a deep fused feature map (H×W×4C) which is then input into the third stage. The third stage compresses the feature channels to C using a 1×1 convolution, and then uses hybrid attention (HA) to identify and enhance important feature information in the feature map. The input of the multi-scale residual block is residually concatenated with the output of the third stage to obtain the final output of the multi-scale residual block.

[0049] Feature Refinement Module (FRM) Construction: To compensate for the loss of detail information during image dehazing, a Feature Refinement Module (FRM) is introduced. The FRM expands the receptive field by setting convolutional kernels with dilation rates of 1, 3, and 5, capturing spatial information at different scales and generating three feature maps. These feature maps are then fused through dimensionality concatenation and dimensionality reduction is performed using a 1×1 convolutional kernel, thereby restoring the details of the dehazed image.

[0050] The composite attention mechanism (HA) is constructed as follows: A channel attention mechanism is introduced. Global average pooling and max pooling are performed on the feature map compressed by the 1×1 convolution in the third stage of multi-scale feature extraction and fusion, respectively, to obtain statistical features in two channel dimensions. These two statistical features are added together and fed into a channel weight calculation network consisting of two 1×1 convolutional layers and an activation function. The output is a channel attention weight map, which filters out important feature channels and suppresses unimportant channels. The channel attention weight map is multiplied with the input feature map channel by channel to obtain a weighted feature map. A pixel attention mechanism is then introduced. One or more 1×1 convolution operations and activation functions are performed on the channel-weighted feature map to extract a pixel attention weight map. Different weights are assigned to each pixel, highlighting information-dense regions. The pixel attention weight map is multiplied with the channel-weighted feature map pixel by pixel to obtain the final output feature map.

[0051] Loss Function Settings: A combination of smoothed L1 loss and perceptual loss is used to optimize the network. Smoothed L1 loss helps the network converge stably and avoids excessive amplification of errors when the deviation is large. Perceptual loss is used to evaluate the similarity between the dehazed image and the actual haze-free image, enhancing the network's ability to recover details. The total loss function is a weighted sum of the two, i.e.:

[0052] Where α and β are the weights of smoothing L1 loss and perceptual loss, respectively. In this embodiment, the weight α of smoothing L1 loss is set to 0.5, and the weight β of perceptual loss is set to 0.01.

[0053] Model training: Training environment configuration: Development was performed using the PyTorch deep learning framework, and model training was conducted on a machine equipped with two NVIDIA RTX3090 24GB GPUs. Powerful computing resources accelerated the model training process and improved training efficiency.

[0054] Algorithm selection: The Adam optimization algorithm is used to adjust the network parameters. The Adam optimization algorithm combines the advantages of the Adagrad and Adadelta algorithms, and can adaptively adjust the learning rate, quickly converging to optimal parameter values ​​during training.

[0055] Training parameter settings: The batch size is set to 6, meaning that the model will process 6 images simultaneously during each training iteration, which can balance training speed and memory consumption to some extent. The initial learning rate is set to 0.001. After every 100 epochs of training, the model's performance is validated, and the learning rate is reduced to one-tenth of its original value. This learning rate decay strategy allows the model to quickly learn the approximate features in the early stages of training. As training progresses, the learning rate is gradually reduced, allowing the model to finely adjust parameters as it approaches the optimal solution, avoiding excessive oscillations.

[0056] Training Process: Preprocessed training data is fed into the pre-built image dehazing network in batches according to batch size. In each training batch, the network performs forward propagation based on the input hazy image, calculates the predicted hazy image, and calculates the loss between the predicted image and the true hazy image according to the loss function. Then, the gradient of the loss value with respect to the network parameters is calculated using the backpropagation algorithm, and the network parameters are updated based on the gradient using the Adam optimization algorithm, so that the loss value gradually decreases. This process is repeated for 500 epochs of training, allowing the model to continuously optimize and gradually learn effective dehazing features and patterns.

[0057] Model testing: Test Dataset Selection: To comprehensively evaluate the model's performance, the SOTS test set (objective test set) was used to evaluate the trained model, and real hazy images from HSTS and RTTS were used to verify the model's performance in real-world scenarios. The SOTS test set can quantitatively evaluate the model's dehazing effect from an objective perspective, while the real images in HSTS (mixed subjective dataset) and RTTS (real test set) are closer to real-world application scenarios and can intuitively verify the model's effectiveness in real-world environments.

[0058] Evaluation metrics calculation: Peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) are used to quantitatively analyze the test results. PSNR measures the peak signal-to-noise ratio between the predicted image and the real haze-free image; a higher value indicates better image quality. SSIM assesses the structural similarity between the predicted image and the real haze-free image; a value closer to 1 indicates higher structural similarity. By calculating these two metrics, the dehazing effect of the model of this invention can be objectively compared with other comparative algorithms.

[0059] Results Analysis: The model of this invention was tested on a test dataset. Experimental results show that the model of this invention performs excellently in both synthetic and real image tests, effectively removing fog from images and restoring image details and textures, demonstrating the effectiveness and superiority of the image dehazing method and system of this invention.

[0060] The partial comparison results of this invention on synthetic data are as follows: Figure 2 As shown.

[0061] from Figure 2 As can be seen from the processing effect images in indoor scenes, this invention can not only effectively remove fog and restore image clarity, but also maintain the texture and color information of the image, achieving optimal processing results in all test scenarios.

[0064] Through the above specific implementation methods, the present invention realizes the construction, training and testing of an image dehazing method and system based on multi-scale residual attention, providing an effective technical solution for solving the image dehazing problem in practical applications.

[0065] The descriptions in this application are merely examples of specific embodiments, intended to illustrate the details of the invention. However, the scope of protection of this application is not limited to these specific embodiments. Any variations or substitutions within the technical scope disclosed in this application should be considered part of the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the specific content of the appended claims.

[0066] In the description of this specification, the terms "connection," "installation," and "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0067] In the description of this specification, the terms "one embodiment," "some embodiments," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0068] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. 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. An image dehazing method based on multi-scale residual attention, characterized in that, The method includes: S1: Preprocess the image to be processed, including resizing and normalization, to adapt it to the model input requirements; S2: Input the preprocessed image into the encoder, pass through convolutional layers, multi-scale residual blocks, downsampling layers, and finally output multi-level feature maps {F1, F2, F3, F4}, with the resolution decreasing layer by layer and the number of channels increasing. S3: Input the highest-level feature map F4 output by the encoder into the feature refinement module to expand the receptive field, capture multi-scale spatial information, and output the refined feature map F4′. S4: Input the feature maps {F1, F2, F3} output by the encoder and the refined feature map F4′ of the highest layer output by the feature refinement module into the decoder. The feature maps are gradually reconstructed through upsampling layers, multi-scale residual blocks and convolutional layers, and finally the dehazed image J is output.

2. The image dehazing method based on multi-scale residual attention according to claim 1, characterized in that, The multi-scale residual block includes: The multi-scale residual block is divided into three stages. The first stage processes the initial input feature map and adopts a parallel branch structure. The first branch uses a 3×3 convolution kernel to extract local fine-grained features, and the second branch uses a 5×5 convolution kernel to extract mid-range context features. The outputs of the two branches are merged through a Concat operation to generate a shallow fused feature map (H×W×2C) and sent to the second stage. The second stage reuses the dual-branch architecture of the first stage. Due to the improved semantic abstraction of the input feature map, the convolution kernels (3×3 and 5×5) have an equivalent receptive field that can capture cross-regional dependencies, thereby achieving deep feature extraction. The outputs of the two branches are merged through a Concat operation to generate a deep fused feature map (H×W×4C) and input to the third stage. The third stage compresses the feature channels to C through a 1×1 convolution and then uses hybrid attention (HA) to identify and enhance important feature information in the feature map. The input of the multi-scale residual block is residually concatenated with the output of the third stage to obtain the final output of the multi-scale residual block.

3. The image dehazing method based on multi-scale residual attention according to claim 2, characterized in that, The hybrid attention mechanism combines channel attention and pixel attention, including: A channel attention mechanism is introduced to perform global average pooling and max pooling on the feature map after the third stage of multi-scale feature extraction and fusion, which is compressed by 1×1 convolution, to obtain statistical features in two channel dimensions. The two statistical features are added together and fed into a channel weight calculation network consisting of two 1×1 convolutional layers and an activation function to output a channel attention weight map. Important feature channels are selected and unimportant channels are suppressed. The channel attention weight map is multiplied with the input feature map channel by channel to obtain a weighted feature map. A pixel attention mechanism is introduced, which performs one or more 1×1 convolution operations and activation function processing on the channel-weighted feature map to extract the pixel attention weight map. Different weights are assigned to each pixel, which can highlight information-dense areas. The pixel attention weight map is multiplied pixel by pixel with the channel-weighted feature map to obtain the final output feature map. The composite attention mechanism enhances the network's response to fog regions of different concentrations in the image and improves image detail recovery by first modeling the channel dimension and then modeling the spatial pixel dimension.

4. The image dehazing method based on multi-scale residual attention according to claim 1, characterized in that, The feature refinement module includes: The receptive field is expanded by setting three convolutional kernels with different dilation rates of 1, 3, and 5, which can capture spatial information at different scales and generate three feature maps containing different spatial information. Then, these feature maps are merged into one by dimensionality concatenation, and finally, a 1×1 convolutional kernel is used for dimensionality reduction.

5. An image dehazing system based on multi-scale residual attention, characterized in that, The system includes: Preprocessing module: Performs preprocessing on the image to be processed, including resizing and normalization, to adapt it to the model input requirements; Encoder module: The preprocessed image is input into the encoder, passing through convolutional layers, multi-scale residual blocks, downsampling layers, and finally outputting multi-level feature maps {F1, F2, F3, F4}, with the resolution decreasing layer by layer and the number of channels increasing. Feature Refinement Module: The highest-level feature map F4 output by the encoder is input into the feature refinement module to expand the receptive field, capture multi-scale spatial information, and output the refined feature map F4′. Decoder module: The feature maps {F1, F2, F3} output by the encoder and the refined feature map F4′ of the highest layer output by the feature refinement module are input into the decoder. The feature maps are gradually reconstructed through upsampling layers, multi-scale residual blocks and convolutional layers, and finally the dehazed image J is output.

6. An electronic device, characterized in that, The electronic device includes a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; the display screen is used to display an image generated by the processor, the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-4.

8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, the electronic device performs the method as described in any one of claims 1-4.