Image defogging method and system
Patent Information
- Application Number
- CN202611090554.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-08-18
AI Technical Summary
(1)基于Transformer的方法(代表如 Restormer、Dehamer、FSNet):通过自注意力机制建模长距离依赖,恢复质量高,但参数量与计算量均显著偏大(例如Dehamer 132.5M参数、Restormer 26.1M参数、FSNet 110.5G MACs),难以部署于边缘设备和实时系统
[0015] The beneficial effect of the above further scheme is that it constructs bidirectional correction candidates through ON and OFF branches, and uses contrast gating. g Spatial weights w Adaptive fusion explicitly models and corrects the bidirectional degradation of overexposed bright areas and underexposed dark areas in foggy areas, effectively reducing brightness shift and color distortion in dense fog scenes and improving contrast and color fidelity; this module is plug-and-play and can be mounted on the coarse RGB prediction image output of the decoder at various scales.
Smart Images

Figure CN122597236A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing, and particularly relates to an image dehazing method and system. Background Technology
[0002] Image dehazing is a crucial preprocessing step in low-level vision tasks, significantly impacting the stability of downstream tasks such as autonomous driving, surveillance, and remote sensing. Existing image dehazing methods are mainly divided into two categories: (1) Transformer-based methods (such as Restormer, Dehamer, and FSNet): These methods model long-distance dependencies through self-attention mechanisms, resulting in high recovery quality. However, the number of parameters and computational cost are significantly large (e.g., Dehamer has 132.5M parameters, Restormer has 26.1M parameters, and FSNet has 110.5G MACs), making them difficult to deploy on edge devices and real-time systems.
[0003] (2) CNN-based methods (such as FFA-Net and AODNet): have relatively small number of parameters and fast inference speed, but have limited local receptive fields, making it difficult to model spatial non-uniformity (such as non-uniform fog and dense fog) degradation, insufficient restoration of structural details, and obvious color shift.
[0004] The shortcomings of existing technology: ① It is difficult to balance computational resources and recovery quality; there is a lack of methods that are both lightweight and highly accurate. ② Ordinary deformable convolution predicts the offset only from the input features and lacks geometric priors. In dehazing tasks, it is prone to training instability and sampling position deviation, resulting in structural breakage. ③ Existing methods lack explicit modeling capabilities for the bidirectional degradation of "overexposed bright areas" and "underexposed dark areas" in foggy areas, and are prone to brightness shift and color distortion in dense fog areas; ④ Cross-scale jump connections, under severe degradation, are prone to amplifying fog noise and injecting it into the decoder, leading to structural breakage or texture contamination. Summary of the Invention
[0005] To address the aforementioned shortcomings in existing technologies, this invention provides an image dehazing method and system that, while ensuring restoration quality, reduces the number of parameters and computational load to less than half that of similar Transformer methods, and significantly improves the stability of structure and color restoration in complex scenes such as dense fog and non-uniform fog.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: an image dehazing method, comprising the following steps: S1. Input the degraded image and process it to obtain a multi-scale image; S2. Construct an image dehazing model and input multi-scale images into the image dehazing model to obtain the dehazed image.
[0007] The beneficial effects of this invention are as follows: This invention uses a U-Net encoder-decoder architecture as its backbone, integrating three major modules: differential prior deformable convolution, antagonistic feature modulation, and cross-stage fusion. While ensuring restoration quality, it significantly reduces the number of parameters and computational load—approximately 7.07M parameters and approximately 46.91G MACs, representing reductions of approximately 46% and 58% respectively compared to similar methods like FSNet (13M / 110.5G), achieving a balance between lightweight design and high accuracy. It achieves a PSNR of 42.60dB / SSIM 0.997 on synthetic indoor fog (SOTS-Indoor) and a PSNR of 18.12dB / SSIM 0.682 on realistic dense fog (Dense-Haze), both superior to comparable methods such as FSNet. Furthermore, through bidirectional correction using orientation-aware geometric priors and contrast-aware features, it significantly improves the stability of structure and color restoration in complex scenes such as dense fog and non-homogeneous fog, effectively mitigating structural breakage, brightness shift, and color distortion.
[0008] Furthermore, the expression for the loss function of the image dehazing model is as follows: ; ; ; ; ; in, Represents the loss function. Indicates spatial reconstruction loss. The weighting coefficients representing the frequency domain consistency loss. This represents the frequency domain consistency loss. Indicates scale index. Represents a scale set, Indicates the first Scale-based loss weights =1 / | |, Indicates defogging output The two-dimensional discrete Fourier spectrum, Represents the true image at the corresponding scale The two-dimensional discrete Fourier spectrum, The decoder is in the first Coarse dehazing prediction image output by scale. Indicates the first The amount of residual refinement output by the scale-antagonistic feature modulation module. The decoder is in the first Defogging output at scale, Represents the ground truth image at the corresponding scale. This represents the 2D Discrete Fourier Transform.
[0009] The beneficial effects of the above-mentioned further scheme are: introducing frequency domain consistency loss in addition to spatial domain reconstruction loss, constraining amplitude and phase simultaneously on the two-dimensional discrete Fourier spectrum, so that the model can enhance high-frequency structure and global color consistency while maintaining pixel-level fidelity, and suppress texture blurring and color shift common in foggy areas; multi-scale weighted supervision further ensures consistent convergence of coarse and fine scale outputs.
[0010] Furthermore, the image dehazing model includes: The differential prior deformable convolution module is used to utilize the differential prior-guided deformable convolutional offset fusion mechanism to use the four sets of complementary directional differential responses calculated as structured offset priors and dynamically weighted and fused with the predicted offsets according to content-aware weights. The antagonistic feature modulation module is used to acquire a single-scale coarse RGB prediction image and, based on the dynamic weighted fusion result, obtains residual fusion features by outputting images at different scales. The differential prior deformable convolution module is embedded before the reference-guided deformable convolution offset prediction branch of the antagonistic feature modulation module. The residual fusion features, after projection alignment, participate in the fusion of the cross-stage fusion module as a third type of information source. The cross-stage fusion module is used to perform gain modulation and cross-stage fusion based on residual fusion features and multi-scale image features to obtain fused features.
[0011] The beneficial effects of the above-mentioned further scheme are as follows: the three modules of differential prior, antagonistic modulation and cross-stage fusion each perform their own functions and cooperate with each other, namely injecting geometric prior for offset prediction, performing contrast correction for bidirectional degradation and suppressing cross-scale noise injection; the ablation experiment on Dense-Haze real fog shows that the baseline of the three modules is improved step by step relative to the removal of the three (PSNR 16.70dB), and the complete model achieves a cumulative gain of about +1.13dB (17.83dB in ablation configuration), which verifies the effectiveness of the module combination.
[0012] Furthermore, the deformable convolutional offset fusion mechanism guided by differential priors uses four sets of complementary directional differential responses as structured offset priors, and dynamically weights and fuses them with the predicted offsets according to content-aware weights, including: Given input features Using a deformable convolutional offset fusion mechanism guided by differential priors, four sets of complementary directional differential responses are calculated, including central difference, anti-angle difference, horizontal difference, and vertical difference. The four complementary directional difference responses are fused using lightweight convolution to generate a structured offset prior. ; Structured offset prior The predicted offset is weighted according to content awareness. Dynamic weighted fusion yields the predicted offset. : ; in, Indicates the predicted offset. This indicates that the prediction branch is derived from the input features by deformable convolutional offset. The predicted traditional offset, This indicates the content-aware weight.
[0013] The beneficial effects of the above-mentioned further scheme are as follows: using the four-directional differences of center, anti-angle, horizontal and vertical as structured offset priors, and dynamically fusing them with the input prediction offset according to the content-aware weights (α,β), injects directional-aware geometric constraints into deformable convolutions, overcoming the problems of sampling position deviation, training instability and structural breakage caused by the lack of priors in ordinary deformable convolutions; and the four-directional difference convolutions can be reparameterized and merged into a single 3×3 standard convolution during the inference stage, with zero additional inference overhead compared to ordinary deformable convolutions.
[0014] Furthermore, the step of acquiring a single-scale coarse RGB prediction image and, based on the dynamic weighted fusion result, obtaining residual fusion features by outputting refined images at different scales includes: Based on the multi-scale coarse RGB prediction image, a single-scale coarse RGB prediction image is obtained, wherein the multi-scale coarse RGB prediction image is obtained through decoder processing; Input single-scale coarse RGB prediction image x Construct two complementary correction branches: ; ; in, Indicates the ON branch. Indicates the OFF branch. MaxPool This represents the max pooling operation; The following formula is used to concatenate the two correction branches by applying a 3×3 depthwise convolution: ; ; in, This represents the contrast features obtained after the ON branch undergoes a 3×3 depthwise convolution. DWConv Represents depthwise convolution. This represents the contrast feature obtained after the OFF branch is convolved with a depth of 3×3. The splicing result is input into a lightweight gated network, which outputs spatial weights. w Simultaneously calculate contrast gating g ; Based on spatial weights w and contrast gating g , obtain reference features : ; With reference features As a guiding signal, based on the predicted offset Reference-guided deformable convolutions are applied to the correction branches respectively to obtain refined candidate features. and refine candidate features ; Will By splicing along the channels, the spatial weights of the three channels are obtained. W : ; in, , and Both represent spatial weights. and These represent the ON initial modified branch features and the OFF initial modified branch features before deformation refinement, respectively; Based on refined candidate features Refine candidate features and three-channel spatial weights W The residual fusion characteristics were obtained. : .
[0015] The beneficial effect of the above further scheme is that it constructs bidirectional correction candidates through ON and OFF branches, and uses contrast gating. g Spatial weights w Adaptive fusion explicitly models and corrects the bidirectional degradation of overexposed bright areas and underexposed dark areas in foggy areas, effectively reducing brightness shift and color distortion in dense fog scenes and improving contrast and color fidelity; this module is plug-and-play and can be mounted on the coarse RGB prediction image output of the decoder at various scales.
[0016] Furthermore, the residual-based fusion, gain modulation, and cross-stage fusion to obtain fusion features include: The gating graph is learned by utilizing the gain mechanism to study the residual fusion features. Selective enhancement or suppression of noise is performed in the residual form; For decoder number s In this stage, multi-scale features are used as encoder skip features. And record the upsampling decoding feature as ; Based on jump features With upsampling decoding features Cross-stage fusion features were calculated. Among them, cross-stage integration characteristics The input is fed to the decoder for decoding processing to obtain a multi-scale coarse RGB prediction image. Gain modulation units (MABs) are additionally placed in the bottleneck layer and the decoding stage to stabilize the coarse-scale features. ; ; in, Indicates the first s Gating of the stage gain modulation unit (MAB) This represents a 1×1 projection. Indicates the first s The cross-stage integration characteristics of the phases This represents the cross-stage fusion characteristics after being gated by the gain modulation unit; When the decoder simultaneously sends back the residual fusion features output by the antagonistic feature modulation module, the coarse RGB prediction image is reconstructed and fused and expanded to obtain the fusion features. : ; in, This represents the feature obtained by projection alignment of residual fusion features.
[0017] The beneficial effects of the above-mentioned further scheme are: based on 1×1 projection and channel stitching, the gain modulation unit (MAB) self-learning gating is introduced to selectively enhance effective information and suppress noise in the residual form, avoiding structural breakage and texture pollution caused by the amplification of fog noise injected into the decoder under severe degradation of cross-scale jump connections; and the antagonistic modulation module reconstruction map can be optionally introduced as a third type of information source to participate in cross-stage fusion, stabilizing the cross-scale information flow.
[0018] The present invention also provides an image dehazing system, comprising: The first processing module is used to input the degraded image and process it to obtain a multi-scale image; The second processing module is used to construct an image dehazing model and input multi-scale images into the image dehazing model to obtain the dehazed image.
[0019] The beneficial effects of the present invention are as follows: corresponding to the above methods, any of the above method schemes can be executed and the same beneficial effects of lightweight, high precision and robust recovery of complex fog scenes can be achieved; each of its functional units can be flexibly implemented in hardware, software or a combination of hardware and software, which is convenient for deployment in edge devices and real-time systems. Attached Figure Description
[0020] Figure 1 This is a flowchart of the method of the present invention.
[0021] Figure 2 This is a schematic diagram of the system structure of the present invention. Detailed Implementation
[0022] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0023] Example 1 Before describing the present invention, the following terms shall be explained: The ON branch represents the direct input branch, i.e., the input image itself; the OFF branch represents the local inverse contrast map, i.e., the 3×3 max pooling result of the input image minus the input image.
[0024] like Figure 1 As shown, the present invention provides an image dehazing method, the implementation of which is as follows: S1. Input the degraded image and process it to obtain a multi-scale image; S2. Construct an image dehazing model and input multi-scale images into the image dehazing model to obtain the dehazed image.
[0025] In this embodiment, the overall processing flow is as follows: Input degraded image Where B represents the batch size, 3 represents the RGB channels, and H / W represents the image height and width. Represents the real number field, that is, the real number tensor space where the image and features reside: The degraded image is downsampled step by step (e.g., bilinear interpolation, scaling ratio 0.5) to obtain multi-scale images of the original, 1 / 2 and 1 / 4 spatial scales, which are then input into the image dehazing model. The encoder downsamples step by step to obtain multi-scale features at three spatial scales: 1 / 4, 1 / 2, and 1. These multi-scale features are the features obtained by downsampling at each stage of the U-Net encoder (corresponding to the three spatial scales of 1 / 4, 1 / 2, and 1). They are then used by three main modules in the subsequent decoding path: the differential prior deformable convolution module, the antagonistic feature modulation module, and the cross-stage fusion module. The decoder performs symmetrical upsampling, with each stage involving cross-scale fusion via a cross-stage fusion module (CSF) and a gain modulation unit (MAB). In the cross-stage fusion module (CSF), multi-scale features are used as encoder skip features. At each stage of the decoder, and with upsampling decoding features The process involves splicing, 1×1 projection, and then gating and fusion by a gain modulation unit. Resolution is restored by upsampling at each stage; The decoder outputs coarse RGB prediction images z_(1 / 4), z_(1 / 2), and z_1 at three scales; The predictions at each scale are refined by an antagonistic feature modulation module to obtain a refined image. _(1 / 4) _(1 / 2) and _1; In the antagonistic feature modulation module (OFMM), the coarse RGB prediction images z_s fused at three scales of 1 / 4, 1 / 2 and 1 are respectively fed into the antagonistic feature modulation module for contrast-aware bidirectional thinning; Among them, the differential prior deformable convolution module (DP) provides a structured directional prior for the offset prediction of the reference-guided deformable convolution in the antagonistic feature modulation module (embedded before its offset prediction branch).
[0026] Multi-scale outputs participate in spatial and frequency domain dual-domain loss supervision, and the final output is the dehazed image.
[0027] In this embodiment, the image dehazing model includes: The differential prior deformable convolution module is used to utilize the differential prior-guided deformable convolutional offset fusion mechanism to use the four sets of complementary directional differential responses calculated as structured offset priors and dynamically weighted and fused with the predicted offsets according to content-aware weights. The antagonistic feature modulation module is used to acquire a single-scale coarse RGB prediction image and, based on the dynamic weighted fusion result, obtains residual fusion features by outputting images at different scales. The differential prior deformable convolution module is embedded before the reference-guided deformable convolution offset prediction branch of the antagonistic feature modulation module. The residual fusion features, after projection alignment, participate in the fusion of the cross-stage fusion module as a third type of information source. The cross-stage fusion module is used to perform gain modulation and cross-stage fusion based on residual fusion features and multi-scale image features to obtain fusion features, and reconstruct the dehazed image based on the fusion features. The fusion features are intermediate features, which are then reconstructed into RGB predictions by the decoder output head, refined by the antagonistic feature modulation module, and superimposed to obtain the dehazed image.
[0028] In this embodiment, the present invention proposes an image dehazing model CVF-Net (Convergent Visual Front-end Network), which is based on the U-Net encoder-decoder backbone and integrates three core modules: (1) Differential Prior Deformable Convolution (DP) module provides orientation-aware prior for deformable convolution offset prediction; (2) Opponent Feature Modulation Module (OFMM), which is mounted on the multi-scale coarse RGB prediction image output of the decoder, performs bidirectional contrast-sensing correction; (3) Cross-Stage Fusion (CSF) + Mixed Attention Block (MAB) suppresses noise and stabilizes cross-scale information flow at each stage of the decoder.
[0029] In this embodiment, a deformable convolutional offset fusion mechanism guided by differential priors is used. Four sets of complementary directional differential responses are calculated as structured offset priors and dynamically weighted and fused with the predicted offsets according to content-aware weights. This includes: Given input features Using a deformable convolutional offset fusion mechanism guided by differential priors, four sets of complementary directional differential responses are calculated, including central difference, anti-angle difference, horizontal difference, and vertical difference. The four complementary directional difference responses are fused using lightweight convolution to generate a structured offset prior. ; Structured offset prior The predicted offset is weighted according to content awareness. Dynamic weighted fusion yields the predicted offset. .
[0030] In this embodiment, the differential prior deformable convolutional module (DP) is used as an independent module in conjunction with the offset prediction branch of the deformable convolution. Given fused features , CThe input features represent the number of channels; the differential prior deformable convolution module calculates four sets of complementary directional differential responses; Inside the reference-guided deformable convolution, the current branch input (ON branch is a single-scale coarse RGB prediction image, OFF branch is its local anti-contrast map) is compared with reference features. It is obtained by splicing along the channel and reducing the dimension by 1×1 projection.
[0031] Central Difference (CD): Based on the learning kernel K Subtracting the product of the sum of its weights and the center pixel is equivalent to: ; Highlighting information about the central and surrounding areas, and strengthening local contrasts. Among these, This indicates that the learnable convolutional kernel is located at... The weight of the position, Represents the neighborhood of the center pixel N The sum of all weights within.
[0032] Anti-Diagonal Difference (AD): Defines anti-diagonal permutation The output weights are: ; Capture anti-angle asymmetric signals across the structure. Among them, θ This represents the anti-angle suppression intensity coefficient, which defaults to 1.0. Indicates permutation by opposite angle Later located Weight at each location.
[0033] Horizontal Difference (HD): ; Emphasize the horizontal edges. Among them, Indicates that in the same row, located at The kernel weights of the adjacent positions on the right.
[0034] Vertical Difference (VD): ; Emphasize the vertical edges. Among them, Indicates that in the same column, located at The kernel weights of the adjacent positions below.
[0035] Four-directional response (That is, after rearranging and differentiating the learnable convolutional kernel using the aforementioned four operators—central difference, anti-angle difference, horizontal difference, and vertical difference—the input features are processed accordingly.) The four sets of directional difference responses obtained by convolution are fused using lightweight convolution to generate a structured offset prior. The final offset is fused by content-aware weights: ; in, Indicates the predicted offset. This indicates that the prediction branch is derived from the input features by deformable convolutional offset. The predicted traditional offset, The content-aware weights are dynamically predicted by a small weight generation network based on local image features. Indicates the central difference directional response. Indicates the anti-angle differential direction response. Indicates the horizontal differential directional response. This represents the response in the vertical differential direction.
[0036] Key property: The four-directional differential convolutions can be reparameterized and merged into a single 3×3 standard convolution during the inference phase, with zero additional inference overhead compared to ordinary deformable convolutions.
[0037] In this embodiment, a single-scale coarse RGB prediction image is used. x (This single-scale coarse RGB prediction image) x The coarse RGB prediction image z_s output by the decoder at a certain scale is used to obtain reference features by outputting refined images at different scales. ,include: Based on the multi-scale coarse RGB prediction image, a single-scale coarse RGB prediction image is obtained, wherein the multi-scale coarse RGB prediction image is obtained through decoder processing; Input single-scale coarse RGB prediction image x Construct two complementary correction branches: ; ; in, Indicates the ON branch (direct input branch). This indicates the OFF branch (local anti-contrast plot). MaxPool This represents the max pooling operation; The following formula is used to concatenate the two correction branches by applying a 3×3 depthwise convolution: ; ; in, This represents the contrast features obtained after the ON branch undergoes a 3×3 depthwise convolution, where DWConv represents depthwise convolution. The contrast features obtained after the OFF branch undergoes a 3×3 depthwise convolution are represented. The concatenated result is input into a lightweight gating network, which outputs spatial weights. w Simultaneously calculate contrast gating g ; Based on spatial weights w and contrast gating g , obtain reference features : ; With reference features As a guiding signal, based on the predicted offset Reference-guided deformable convolutions are applied to the correction branches respectively to obtain refined candidate features. and refine candidate features ; Will By splicing along the channels, the spatial weights of the three channels are obtained. W : ; in, , and Both represent spatial weights. and These represent the ON initial modified branch features and the OFF initial modified branch features before deformation refinement, respectively; Based on refined candidate features Refine candidate features and three-channel spatial weights W The residual fusion characteristics were obtained. .
[0038] In this embodiment, the Antagonistic Feature Modulation Module (OFMM) is a plug-and-play refinement module, and the input is a single-scale coarse RGB prediction image. The output is the refinement results at different sizes. This module consists of four sub-steps: (1) ON / OFF branch initialization: Construct two complementary correction branches: ; ; The OFF branch, or local contrast map, has a more significant value in dark / underexposed areas suppressed by local maxima, forming a complementary correction direction to the ON branch.
[0039] (2) Contrast-perceptual fusion: Apply 3×3 depthwise convolutions to both branches respectively: ; ; The two components are concatenated and fed into a lightweight gating network to output spatial weights. Simultaneously calculate contrast gating ( σ (Representing the Sigmoid function). Final fusion reference features. for: ; This fusion adaptively balances brightening / darkening correction while preserving local contrast. This represents the contrast features obtained after the ON branch undergoes a 3×3 depthwise convolution. This represents the contrast feature obtained after the OFF branch is convolved with a depth of 3×3.
[0040] (3) Reference-guided deformable convolution (RGDConv): using reference features As a guiding signal, reference-guided deformable convolutions are applied to the ON and OFF branches respectively: splicing and 1x1 projection: ,in, Indicates ON / OFF branch and reference feature Guided features obtained by 1×1 projection after stitching; offset prediction: (K = 3, where K represents the kernel size of the deformable convolution (i.e., a 3×3 sampling grid)); optional predictive modulation mask m With per-channel color offset Used for amplitude control and color adjustment; bilinear sampling + rearrangement + projection back to 3 channels to obtain refined candidates. , (Note: When used in conjunction with the differential prior deformable convolution module, the predicted offset...) Structured offset priors provided by the fusion differential prior deformable convolution module ).
[0041] (4) Adaptive Opponent Modulator: ... Concatenated along the channel dimension (9 channels in total), using: ① Grouped convolution (groups=3, 9→48 channels, ReLU activation); ② Focus_cross attention (lightweight cross-pooling attention, FCCA): with multiple radii r One-dimensional pooling is performed along the row and column directions for each of the ∈ {1,2,3,…} (pooling kernel). k = 4 r+1); Weights with different radii are dynamically generated by global average pooling and fully connected layers, and the results of row pooling and column pooling are weighted and fused to obtain a feature map with enhanced spatial attention; ③ Scale unification and squeeze-and-excitation (SE) channel recalibration: The feature map is bilinearly resampled to a fixed resolution (e.g., 64×64), and after channel recalibration by the SE module, it is upsampled back to the original resolution; ④ Output layer (3×3 convolution → 24 channels, 1×1 convolution → 3 channels, Sigmoid activation) to obtain three-channel spatial weights. .
[0042] Final residual fusion: .
[0043] In this embodiment, based on residual fusion, gain modulation and cross-stage fusion are performed to obtain fusion features, including: The gating graph is learned by utilizing the gain mechanism to study the residual fusion features. Selective enhancement or suppression of noise is performed in the residual form; For decoder number s In this stage, multi-scale features are used as encoder skip features. And record the upsampling decoding feature as ; Based on jump features With upsampling decoding features Cross-stage fusion features were calculated. Among them, cross-stage integration characteristics The input is fed to the decoder for decoding processing to obtain a multi-scale coarse RGB prediction image. Gain modulation units (MABs) are additionally placed in the bottleneck layer and the decoding stage to stabilize the coarse-scale features. ; ; in, This indicates the gating of the gain modulation unit MAB in the s-th stage. This indicates a 1×1 projection (channel alignment and compression). This represents the cross-stage fusion characteristics of stage s. This represents the cross-stage fusion characteristics after being gated by the gain modulation unit; When the decoder simultaneously sends back the residual fusion features output by the antagonistic feature modulation module, the coarse RGB prediction image is reconstructed and fused and expanded to obtain the fusion features. : ; in, This represents the feature obtained by projection alignment of residual fusion features.
[0044] In this embodiment, the gain modulation unit (MAB) learns a gating graph G(X) ∈ (0, 1) for the residual fusion features, and selectively enhances or suppresses them in the residual form. ; in, This indicates the output characteristics after gain modulation. This represents element-wise multiplication; the gated graph G(X) is implemented by shallow convolution + Sigmoid, keeping the input space and channel dimension unchanged.
[0045] In this embodiment, CSF cross-stage fusion: for the decoder... s In this stage, multi-scale features serve as encoder skip features. And record the upsampling decoding features : ; ; Where [·; ·] indicates channel splicing, This represents a 1×1 projection (channel alignment and compression). This indicates the gain modulation unit (MAB) gated at this stage, and the cross-stage fusion characteristics. The input is further refined into the corresponding decoding block. Gain modulation units (MABs) are added in the bottleneck layer and the decoding stage to stabilize coarse-scale features.
[0046] Triple-source RCSF extension (optional): When the decoder simultaneously sends back the antagonistic feature modulation module to reconstruct RGB, the fusion extension is as follows: .
[0047] in, Represent the fusion feature, and based on the fusion feature Reconstruct the dehazed image.
[0048] In this embodiment, at three scales Summary of residuals: ; Spatial reconstruction loss: ; in, =1 / | |
[0049] Frequency domain consistency loss (constraining both amplitude and phase simultaneously on a 2D discrete Fourier spectrum): ; Total loss: ; ; in, Represents the loss function. Indicates spatial reconstruction loss. The weighting coefficient representing the frequency domain consistency loss is set to 0.1. This represents the frequency domain consistency loss. This indicates a scale index, used to identify different spatial scales. Let the scale set be {1, 1 / 2, 1 / 4}. Indicates the first Scale-based loss weights =1 / | |, Indicates defogging output The two-dimensional discrete Fourier spectrum, Represents the true image at the corresponding scale The two-dimensional discrete Fourier spectrum, The decoder is in the first Coarse dehazing prediction image output by scale. Indicates the first The amount of residual refinement output by the scale-antagonistic feature modulation module. The decoder is in the first Defogging output at scale, Represents the ground truth image at the corresponding scale. This represents the 2D Discrete Fourier Transform.
[0050] In this embodiment, the directional difference set can be extended to any directional gradient operator or adjustable directional filter; the α / β weight generator can be replaced with any small MLP / CNN; the differential prior-guided deformable convolutional offset fusion mechanism can be extended to tasks that require geometrically perceptual offset, such as super-resolution, denoising, and object detection.
[0051] In this embodiment, the OFF branch can be replaced with min-pooling or other local statistical constructs; the fusion weight generation network can be replaced with MLP / ordinary convolution; reference features The contrast gate construction supports other forms (normalized difference, Tanh modulation, etc.); it is suitable for any low-level visual task that requires contrast correction for bidirectional degradation (brightness / darkness).
[0052] In this embodiment, the gated graph It can be replaced with any gating form (SE, Gated Conv, Squeeze-Excite, etc.); the third source can be generalized to any lightweight encoded backhaul reconstruction feature.
[0053] The images involved in this invention can be surveillance images, images collected by autonomous driving, and remote sensing images, etc. For example, a degraded surveillance image is input and processed to obtain a multi-scale image; an image dehazing model is constructed and the multi-scale image is input into the image dehazing model to obtain a dehazed surveillance image.
[0054] Example 2 like Figure 2 As shown, the present invention provides an image dehazing system for performing the image dehazing method described in Embodiment 1, comprising: The first processing module is used to input the degraded image and process it to obtain a multi-scale image; The second processing module is used to construct an image dehazing model and input multi-scale images into the image dehazing model to obtain the dehazed image.
[0055] like Figure 2 The image dehazing system provided in the illustrated embodiment can perform the technical solution shown in the image dehazing method of the above-described method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.
[0056] In this embodiment, the functional units can be divided according to the image dehazing method. For example, each function can be divided into its own functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this invention is illustrative and represents only a logical division; in actual implementation, other division methods may be used.
[0057] In this embodiment, the image dehazing system, in order to realize the principle and beneficial effects of the image dehazing method, includes hardware structures and / or software modules corresponding to the execution of various functions. Those skilled in the art should readily recognize that, in conjunction with the illustrative units and algorithm steps described in the embodiments disclosed in this invention, the present invention can be implemented in hardware and / or a combination of hardware and computer software. Whether a function is executed by hardware or computer software depends on the specific application and design constraints of the technical solution. Different methods can be used to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
Claims
1. An image dehazing method, characterized in that, Includes the following steps: S1. Input the degraded image and process it to obtain a multi-scale image; S2. Construct an image dehazing model and input multi-scale images into the image dehazing model to obtain the dehazed image; Image dehazing models include: The differential prior deformable convolution module is used to utilize the differential prior-guided deformable convolutional offset fusion mechanism to use the four sets of complementary directional differential responses calculated as structured offset priors and dynamically weighted and fused with the predicted offsets according to content-aware weights. The antagonistic feature modulation module is used to acquire a single-scale coarse RGB prediction image and, based on the dynamic weighted fusion result, obtains residual fusion features by outputting images at different scales. The differential prior deformable convolution module is embedded before the reference-guided deformable convolution offset prediction branch of the antagonistic feature modulation module. The residual fusion features, after projection alignment, participate in the fusion of the cross-stage fusion module as a third type of information source. The cross-stage fusion module is used to perform gain modulation and cross-stage fusion based on residual fusion features and multi-scale image features to obtain fusion features, and reconstruct the dehazed image based on the fusion features.
2. The image dehazing method according to claim 1, characterized in that, The deformable convolutional offset fusion mechanism guided by differential priors uses four sets of complementary directional differential responses as structured offset priors, and dynamically weights and fuses them with the predicted offsets according to content-aware weights, including: Given input features Using a deformable convolutional offset fusion mechanism guided by differential priors, four sets of complementary directional differential responses are calculated, including central difference, anti-angle difference, horizontal difference, and vertical difference. The four complementary directional difference responses are fused using lightweight convolution to generate a structured offset prior. ; Structured offset prior Content-aware offset compared to the predicted offset Dynamic weighted fusion yields the predicted offset. : ; in, Indicates the predicted offset. This indicates that the prediction branch is derived from the input features by deformable convolutional offset. The predicted traditional offset, This indicates the content-aware weight.
3. The image dehazing method according to claim 2, characterized in that, The process of acquiring a single-scale coarse RGB prediction image and, based on the dynamic weighted fusion result, obtaining residual fusion features by outputting refined images at different scales includes: Based on the multi-scale coarse RGB prediction image, a single-scale coarse RGB prediction image is obtained, wherein the multi-scale coarse RGB prediction image is obtained through decoder processing; Input single-scale coarse RGB prediction image x Construct two complementary correction branches: ; ; in, Indicates the ON branch. Indicates the OFF branch. MaxPool This represents the max pooling operation; The following formula is used to concatenate the two correction branches by applying a 3×3 depthwise convolution: ; ; in, This represents the contrast features obtained after the ON branch undergoes a 3×3 depthwise convolution. DWConv Represents depthwise convolution. This represents the contrast feature obtained after the OFF branch is convolved with a depth of 3×3. The splicing result is input into a lightweight gated network, which outputs spatial weights. w Simultaneously calculate contrast gating g ; Based on spatial weights w and contrast gating g , obtain reference features : ; With reference features As a guiding signal, based on the predicted offset Reference-guided deformable convolutions are applied to the correction branches respectively to obtain refined candidate features. and refine candidate features ; Will By splicing along the channels, the spatial weights of the three channels are obtained. W : ; in, , and Both represent spatial weights. and These represent the ON initial modified branch features and the OFF initial modified branch features before deformation refinement, respectively; Based on refined candidate features Refine candidate features and three-channel spatial weights W The residual fusion characteristics were obtained. : 。 4. The image dehazing method according to claim 1, characterized in that, The residual-based fusion, gain modulation, and cross-stage fusion are performed to obtain fusion features, including: The gating graph is learned by utilizing the gain mechanism to study the residual fusion features. Selective enhancement or suppression of noise is performed in the residual form; For decoder number s In this stage, multi-scale features are used as encoder skip features. And record the upsampling decoding feature as ; Based on jump features With upsampling decoding features Cross-stage fusion features were calculated. Among them, cross-stage integration characteristics The input is fed to the decoder for decoding processing to obtain a multi-scale coarse RGB prediction image. Gain modulation units (MABs) are additionally placed in the bottleneck layer and the decoding stage to stabilize the coarse-scale features. ; ; in, Indicates the first s Gating of the stage gain modulation unit (MAB) This represents a 1×1 projection. Indicates the first s The cross-stage integration characteristics of the phases This represents the cross-stage fusion characteristics after being gated by the gain modulation unit; When the decoder simultaneously sends back the residual fusion features output by the antagonistic feature modulation module, the coarse RGB prediction image is reconstructed and fused and expanded to obtain the fusion features. : ; in, This represents the feature obtained by projection alignment of residual fusion features; Based on fusion characteristics Reconstruct the dehazed image.
5. The image dehazing method according to claim 2, characterized in that, The expression for the loss function of the image dehazing model is as follows: ; ; ; ; ; in, Represents the loss function. Indicates spatial reconstruction loss. The weighting coefficients represent the frequency domain consistency loss. This represents the frequency domain consistency loss. Indicates scale index. Represents a scale set, Indicates the first Scale-based loss weights =1 / | |, Indicates defogging output The two-dimensional discrete Fourier spectrum, Represents the true image at the corresponding scale The two-dimensional discrete Fourier spectrum, The decoder is in the first The coarse dehazing prediction image output by scale. Indicates the first The amount of residual refinement output by the scale-antagonistic feature modulation module. The decoder is in the first Defogging output at scale, Represents the ground truth image at the corresponding scale. This represents the 2D Discrete Fourier Transform.
6. An image dehazing system for performing the image dehazing method according to any one of claims 1-5, characterized in that, include: The first processing module is used to input the degraded image and process it to obtain a multi-scale image; The second processing module is used to construct an image dehazing model and input multi-scale images into the image dehazing model to obtain the dehazed image.