A method for generating a defogged infrared image based on collaborative decoding and feature fusion
Patent Information
- Application Number
- CN202610696982.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-20
- Publication Date
- 2026-08-28
AI Technical Summary
但在雾、霾等恶劣天气下,可见光图像质量不稳定,直接影响红外仿真效果,成为技术应用瓶颈
本发明通过构建一个共享编码器与双分支解码器协同工作的网络架构,并在解码层间嵌入动态特征交互模块,实现了去雾与红外仿真任务的深度融合与相互促进;该方法能够在单次前向传播中直接从有雾可见光图像同步生成高质量的去雾图像和高保真红外仿真图像,有效避免了传统串联流程中的误差累积问题,提升了在雾霾等恶劣天气下仿真结果的真实性与可靠性;同时,网络具备良好的场景自适应能力,能够应对不同浓度与分布的雾霾干扰,增强系统整体鲁棒性,其轻量化结构也便于在无人机、车载设备等资源受限的嵌入式平台中部署,为复杂气象条件下的全天候视觉感知提供了一种高效可靠的解决方案。
Smart Images

Figure CN122656883A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically a method for generating dehazed infrared images based on collaborative decoding and feature fusion. Background Technology
[0002] Infrared image simulation technology has significant application value in fields such as military reconnaissance, UAV sensing, and autonomous driving, effectively reducing the cost of acquiring real infrared data and improving the efficiency of algorithm testing and system verification. However, under adverse weather conditions such as fog and haze, the quality of visible light images is unstable, directly affecting the infrared simulation effect and becoming a bottleneck in the application of this technology.
[0003] To address this issue, existing technologies often employ a sequential process of "dehazing first, then simulation": first, foggy visible light images are processed using deep learning-based image dehazing techniques to obtain clear images; then, deep learning image translation models such as generative adversarial networks are used to convert the clear images into infrared simulation images. While this process provides a feasible path, it has significant drawbacks: first, errors accumulate and lack coordination, as the sequential structure causes dehazing errors to be directly transmitted to the simulation stage, with no real-time feature interaction or feedback between the two tasks; second, the simulation lacks realism, as the generated pseudo-infrared images lack the physical characteristics of real infrared data, such as thermal radiation distribution and noise patterns, resulting in distributional deviations from real images and affecting the reliability of downstream tasks. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to propose a method for generating dehazed infrared images based on collaborative decoding and feature fusion, comprising: Step 1: Acquire visible light images and real infrared images, and then construct a foggy visible light image. The foggy visible light image, the visible light image, and the real infrared image constitute training samples, and multiple training samples constitute a training sample set. Step 2: Input the hazy visible light image into the infrared generation model to obtain a grayscale infrared simulation image and a hazy-free visible light image, as well as enhanced dehazing feature maps and enhanced infrared feature maps at all resolutions; Step 3: Calculate the total loss value based on the haze-free visible light image, visible light image, grayscale infrared simulation image, real infrared image, and enhanced dehazing feature maps and enhanced infrared feature maps of all resolutions; Step 4: Iterate and update the gradients of the learnable parameters in the infrared generation model multiple times based on the total loss value to obtain the trained infrared generation model; Step 5: Input the foggy visible light image to be processed into the trained infrared generation model to obtain a fog-free visible light image.
[0005] Optionally, step 1, which involves constructing a foggy visible light image, includes: By applying atmospheric light A and transmittance t(x) to the visible light image J(x) using an atmospheric scattering model, a hazy visible light image I(x) is obtained. This is achieved through the following formula: I(x) = J(x)t(x) + A(1-t(x)); Optionally, the infrared generation model includes a shared encoder, a collaborative decoder, and a feature fusion module.
[0006] Optionally, step 2 specifically includes: Step 2.1: Process the hazy visible light image using a shared encoder to obtain multiple dehazing coded feature maps; Step 2.2: Input all dehazing encoded feature maps into the collaborative decoder and feature fusion module to obtain grayscale infrared simulation images and haze-free visible light images, as well as enhanced dehazing feature maps and enhanced infrared feature maps at all resolutions.
[0007] Optionally, step 2.1 specifically includes: The hazy visible light image is passed through multiple encoding stages in sequence. In each encoding stage, it passes through a convolutional layer, an activation function layer, and a batch normalization layer in sequence. Each encoding stage outputs a dehazing encoded feature map.
[0008] Optionally, step 2.2 specifically includes: The dehazed encoded feature map output from the last encoding stage is convolved with the transpose of the first convolution kernel to obtain an upsampled dehazed feature map. Then, a dehazed encoded feature map with the same resolution as the upsampled dehazed feature map is added element-wise to this upsampled dehazed feature map to obtain the dehazed fused feature map F. d ; The infrared coded feature map output from the last encoding stage is convolved with the transpose of the second convolution kernel to obtain an upsampled infrared feature map. Then, an infrared coded feature map with the same resolution as the upsampled infrared feature map is added element-wise to this upsampled infrared feature map via skip connections to obtain the infrared fused feature map F. ir ; F d and F ir Input the feature fusion module to obtain enhanced dehazing feature maps and enhanced infrared feature maps; The enhanced dehazing feature map and the enhanced infrared feature map are respectively applied to the activation function layer and the batch normalization layer to obtain the dehazing branch feature map and the infrared branch feature map; The dehazed branch feature map is returned to perform the transposed convolution of the first convolution kernel, and the infrared branch feature map is returned to perform the transposed convolution of the second convolution kernel. This process continues until the resolution of the upsampled dehazed feature map and the resolution of the upsampled infrared feature map are the same as the resolution of the dehazed encoded feature map output from the first encoding stage. Then, the corresponding dehazed branch feature map is used as the final dehazed feature map, and the corresponding infrared branch feature map is used as the final infrared feature map. At the same time, enhanced dehazed feature maps and enhanced infrared feature maps of all resolutions are obtained. The final infrared feature map is passed through a convolutional layer and a Tanh activation function to output a grayscale infrared simulation image. The final dehazed feature map is then passed through a convolutional layer and a Sigmoid activation function to obtain a haze-free visible light image.
[0009] Optionally, the F d and F ir The input feature fusion module produces enhanced dehazing feature maps and enhanced infrared feature maps, including: For F respectively d and F ir Apply a 1×1 convolutional layer to generate dehazed projection features F d ' and infrared projection features F ir ' ; F d ' As a query vector, F ir ' Simultaneously serving as both key and value vectors, attention weights are calculated to obtain the infrared feature-guided contextual features C. d ; F ir ' As a query vector, F d ' Simultaneously serving as both key and value vectors, attention weights are calculated to obtain the contextual features C guided by the dehazing features. ir ; F d ' F ir ' C d and C ir The feature maps are fused to obtain the enhanced dehazing feature map F. d_enhanced and enhanced infrared feature map F ir_enhanced Specifically, this is achieved through the following formula: F d_enhanced =σ(W g [F d ' C d ])⊙C d + F d' ; F ir_enhanced =σ(W g [F ir ' C ir ])⊙C ir + F ir ' ; Among them, W g σ is a learnable linear transformation, σ is the Sigmoid activation function, ⊙ represents element-wise multiplication, and [·] represents the concatenation operation.
[0010] Optionally, step 3 specifically includes: Step 3.1: Calculate the smoothing L1 loss L based on the haze-free visible light image and the visible light image. smoothL1 Multi-scale structural similarity loss L MS-SSIM and perceived loss L perc The adversarial loss L is calculated based on the haze-free visible light image. adv_G , for L smoothL1 L MS-SSIM、 L perc and L adv_G We obtain the loss value L for the defogging task by weighted summation. dehaze Specifically, it is expressed by the following formula: L dehaze =α1×L smoothL1 +α2×L MS-SSIM +α3×L adv_G +α4× L perc ; Among them, α1, α2, α3, and α4 are hyperparameters; Step 3.2: Calculate the L1 loss L based on the grayscale infrared simulation image and the real infrared image. L1 and SSIM loss L SSIM The generator loss L of infrared adversarial loss is calculated based on grayscale infrared simulation images. adv_G_ir , for L L1、 L SSIM and L adv_G_ir Weighted summation yields the loss L of the infrared simulation task. ir Specifically, it is expressed by the following formula: L ir =η1×L L1 +η2×L SSIM +η3×L adv_G_ir ; Where η1, η2, and η3 are hyperparameters; Step 3.3: Calculate the feature fusion consistency loss L based on the enhanced dehazed feature maps and enhanced infrared feature maps at all resolutions.fusion Specifically, it is calculated using the following formula: ; Where C, H, and W represent the number of channels, height, and width, respectively. This indicates that the number of channels is c The height is h, Width is w Enhanced dehazing feature map, This indicates that the number of channels is c The height is h Width is w Enhanced infrared signature map; Step 3.4: For L dehaze L ir and L fusion We perform a weighted summation to obtain the total loss value L. total Specifically, it is expressed by the following formula: L total =λ1×L dehaze +λ2×L ir +λ3×L fusion ; Wherein, λ1, λ2, and λ3 are the weighting coefficients for balancing the losses of each item.
[0011] The beneficial effects of adopting the above technical solution are as follows: This invention achieves deep integration and mutual promotion of dehazing and infrared simulation tasks by constructing a network architecture in which a shared encoder and a dual-branch decoder work together, and embedding a dynamic feature interaction module between the decoding layers. This method can directly and synchronously generate high-quality dehazed images and high-fidelity infrared simulation images from foggy visible light images in a single forward propagation, effectively avoiding the error accumulation problem in traditional serial processes and improving the realism and reliability of simulation results under severe weather conditions such as fog and haze. Simultaneously, the network has good scene adaptability, can cope with fog and haze interference of different concentrations and distributions, enhances the overall robustness of the system, and its lightweight structure facilitates deployment in resource-constrained embedded platforms such as UAVs and vehicle-mounted equipment, providing an efficient and reliable solution for all-weather visual perception under complex weather conditions. Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating a method for generating dehazed infrared images based on collaborative decoding and feature fusion in an embodiment of the present invention. Figure 2 This is a structural diagram of the feature fusion module in an embodiment of the present invention. Detailed Implementation
[0013] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0014] To address the problems of error accumulation, poor task coordination, and insufficient simulation realism in existing serial dehazing infrared simulation methods, this invention provides a dehazing infrared image generation method based on collaborative decoding and feature fusion, combining... Figure 1 This may include the following steps: Step 1: Acquire visible light images and real infrared images, and then construct a foggy visible light image. The foggy visible light image, the visible light image, and the real infrared image constitute training samples, and multiple training samples constitute a training sample set. Obtain visible light and true infrared images. Apply different concentrations of atmospheric light A and transmittance t(x) to the visible light image J(x) using an atmospheric scattering model to obtain a hazy visible light image I(x). This is achieved through the following formula: I(x) = J(x)t(x) + A(1-t(x)); The training samples consist of foggy visible light images, visible light images, and real infrared images. Multiple training samples form a training sample set, thus creating a synthetic training set with controllable size and perfect alignment.
[0015] In its specific implementation, this invention uses the publicly available dataset FLIR Thermal ADAS to apply different concentrations of atmospheric light and transmittance to clear visible light images using a physical synthesis method based on an atmospheric scattering model, thereby obtaining foggy visible light images and thus constructing a "triple" aligned dataset.
[0016] Step 2: Input the foggy visible light image into the infrared generation model to obtain a grayscale infrared simulation image and a fog-free visible light image, as well as enhanced defogging feature maps and enhanced infrared feature maps at all resolutions; the infrared generation model includes a shared encoder, a collaborative decoder, and a feature fusion module; Step 2.1: Process the hazy visible light image using a shared encoder to obtain multiple dehazing coded feature maps; The hazy visible light image is passed through multiple encoding stages in sequence. In each encoding stage, it passes through a convolutional layer, an activation function layer, and a batch normalization layer in sequence. Each encoding stage outputs a dehazing encoded feature map. The output contains a set of feature maps from all levels, which constitute the multi-scale shared feature pyramid required by the subsequent co-encoder. Shallow features retain more details and edge information, while deep features encode more global semantic content. These multi-scale shared features are provided to the corresponding upsampling levels in the co-encoder through skip connections to supplement details and reconstruct the structure.
[0017] Among them, convolutional layers are used for feature extraction, activation function layers are used to introduce non-linear expressive power, and batch normalization layers are used for training convergence and improving stability.
[0018] During the encoding process, by setting the stride of each stage to 2, the network progressively downsamples the input image, thereby reducing the spatial resolution layer by layer. At the same time, the number of feature channels increases step by step to capture multi-level feature information from local texture to global semantics. Thus, the shared encoder extracts multi-scale feature maps arranged by resolution from the hazy visible light image, where the highest resolution feature map retains spatial detail information and the lowest resolution feature map retains stronger semantic information.
[0019] Step 2.2: Input all dehazing encoded feature maps into the collaborative decoder and feature fusion module to obtain grayscale infrared simulation images and haze-free visible light images, as well as enhanced dehazing feature maps and enhanced infrared feature maps at all resolutions; The feature fusion module is embedded between the corresponding layers of the dehazing decoding branch and the infrared generation decoding branch of the collaborative decoder. It receives the current layer feature maps from the dehazing branch and the current layer feature maps from the infrared generation branch as input, performs independent projection transformations on the two branch feature maps, mapping them to a common feature space suitable for feature interaction, resulting in projected dehazing features and projected infrared features. Then, bidirectional cross-attention calculation is performed: in one direction, using the projected dehazing features as the query and the projected infrared features as the key and value, an infrared feature-weighted dehazing context feature is generated; in the other direction, using the projected infrared features as the query and the projected dehazing features as the key and value, an infrared feature-weighted dehazing context feature is generated. Next, through a learnable gating function, the generated context feature and the original projected feature are adaptively fused to obtain enhanced dehazing features and infrared features, respectively. Finally, these enhanced features are fed back to their respective original decoding branches to replace the original features for subsequent decoding, specifically including: The dehazed encoded feature map output from the last encoding stage is convolved with the transpose of the first convolution kernel to obtain the upsampled dehazed feature map. The upsampled dehazed feature map and the dehazed encoded feature map with the same resolution are added element-wise to obtain the dehazed fused feature map. The dehazed encoded feature map output from the last encoding stage is convolved with the transpose of the first convolution kernel to obtain an upsampled dehazed feature map. Then, a dehazed encoded feature map with the same resolution as the upsampled dehazed feature map is added element-wise to this upsampled dehazed feature map to obtain the dehazed fused feature map F. d ; The infrared coded feature map output from the last encoding stage is convolved with the transpose of the second convolution kernel to obtain an upsampled infrared feature map. Then, an infrared coded feature map with the same resolution as the upsampled infrared feature map is added element-wise to this upsampled infrared feature map via skip connections to obtain the infrared fused feature map F. ir ; F d and F ir Input the feature fusion module to obtain enhanced dehazing feature maps and enhanced infrared feature maps; Combination Figure 2 Specifically, for F d ∈R H×W×C and F ir ∈R H×W×C Apply a 1×1 convolutional layer to generate dehazed projection features F d ' and infrared projection features F ir ' Where H refers to the height of the feature map, i.e., the number of rows; W refers to the width of the feature map, i.e., the number of columns; and C refers to the number of channels in the feature map. F d ' As a query vector, F ir ' Simultaneously serving as both key and value vectors, attention weights are calculated to obtain the infrared feature-guided contextual features C. d ; F ir ' As a query vector, F d ' Simultaneously serving as both key and value vectors, attention weights are calculated to obtain the contextual features C guided by the dehazing features. ir Specifically, this is achieved through the following formula: ; ; Attention weights are calculated using the scaled dot product attention formula. ; Where Q is the query matrix, K is the key matrix, and V is the value matrix, QK T For the dot product similarity of query and key, d k The dimensions of the key and query vector, used as a scaling factor. This is applied to each row of the similarity matrix to obtain the attention weight matrix; F d ' F ir ' C d and C irThe feature maps are fused to obtain the enhanced dehazing feature map F. d_enhanced and enhanced infrared feature map F ir_enhanced Specifically, this is achieved through the following formula: F d_enhanced =σ(W g [F d ' C d ])⊙C d + F d ' ; F ir_enhanced =σ(W g [F ir ' C ir ])⊙C ir + F ir ' ; Among them, W g For learnable linear transformations, σ is the Sigmoid activation function, ⊙ represents element-wise multiplication, and [·] represents concatenation operation; The enhanced dehazing feature map and the enhanced infrared feature map are respectively applied to the activation function layer and the batch normalization layer to obtain the dehazing branch feature map and the infrared branch feature map; The dehazed branch feature map is returned to perform the transposed convolution of the first convolution kernel, and the infrared branch feature map is returned to perform the transposed convolution of the second convolution kernel. This process continues until the resolution of the upsampled dehazed feature map and the resolution of the upsampled infrared feature map are the same as the resolution of the dehazed encoded feature map output from the first encoding stage. Then, the corresponding dehazed branch feature map is used as the final dehazed feature map, and the corresponding infrared branch feature map is used as the final infrared feature map. At the same time, enhanced dehazed feature maps and enhanced infrared feature maps of all resolutions are obtained. The final infrared feature map is sequentially passed through convolutional layers and a Tanh activation function to output a grayscale infrared simulation image. The convolutional layers compress the number of channels to a single channel, and the Tanh activation function is Tanh(x) = e^(-x / x). x +e -x Pixel values are normalized to the range [-1, 1]. The final dehazed feature map is then passed sequentially through convolutional layers and a sigmoid activation function to obtain a hazy visible light image. The convolutional layers expand the number of channels to three to correspond to the RGB color image, and the sigmoid activation function... Normalize pixel values to the range [0,1].
[0020] Step 3: Calculate the total loss value based on the haze-free visible light image, visible light image, grayscale infrared simulation image, real infrared image, and enhanced dehazing feature maps and enhanced infrared feature maps of all resolutions; Step 3.1: Calculate the smoothing L1 loss L based on the haze-free visible light image and the visible light image. smoothL1 Multi-scale structural similarity loss L MS-SSIM and perceived loss L perc The adversarial loss L is calculated based on the haze-free visible light image. adv_G , for L smoothL1 L MS-SSIM、 L perc and L adv_G We obtain the loss value L for the defogging task by weighted summation. dehaze Specifically, it is expressed by the following formula: L dehaze =α1×L smoothL1 +α2×L MS-SSIM +α3×L adv_G +α4× L perc ; Among them, α1, α2, α3, and α4 are hyperparameters; Step 3.2: Calculate the L1 loss L based on the grayscale infrared simulation image and the real infrared image. L1 and SSIM loss L SSIM The generator loss L of infrared adversarial loss is calculated based on grayscale infrared simulation images. adv_G_ir , for L L1、 L SSIM and L adv_G_ir Weighted summation yields the loss L of the infrared simulation task. ir Specifically, it is expressed by the following formula: L ir =η1×L L1 +η2×L SSIM +η3×L adv_G_ir ; Where η1, η2, and η3 are hyperparameters; Step 3.3: Calculate the feature fusion consistency loss L based on the enhanced dehazed feature maps and enhanced infrared feature maps at all resolutions. fusion Specifically, it is calculated using the following formula: ; Where C, H, and W represent the number of channels, height, and width, respectively. This indicates that the number of channels is c The height is h, Width is w Enhanced dehazing feature map, This indicates that the number of channels is c The height is h Width is w Enhanced infrared signature map; Step 3.4: For L dehaze Lir and L fusion We perform a weighted summation to obtain the total loss value L. total Specifically, it is expressed by the following formula: L total =λ1×L dehaze +λ2×L ir +λ3×L fusion ; Where λ1, λ2, and λ3 are the weighting coefficients for balancing the losses of each item; Step 4: Iterate and update the gradients of the learnable parameters in the infrared generation model multiple times based on the total loss value to obtain the trained infrared generation model; In each training iteration, the total loss value is calculated and the gradient of the total loss value with respect to all learnable parameters in the infrared generative model (including the shared encoder, co-encoder, and feature fusion module) is calculated using the backpropagation algorithm. Then, the optimizer is used to update all parameters in an integrated manner based on these gradients until the training converges. Step 5: Input the foggy visible light image to be processed into the trained infrared generation model to obtain a fog-free visible light image.
[0021] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for generating dehazed infrared images based on collaborative decoding and feature fusion, characterized in that, include: Step 1: Acquire visible light images and real infrared images, and then construct a foggy visible light image. The foggy visible light image, the visible light image, and the real infrared image constitute training samples, and multiple training samples constitute a training sample set. Step 2: Input the hazy visible light image into the infrared generation model to obtain a grayscale infrared simulation image and a hazy-free visible light image, as well as enhanced dehazing feature maps and enhanced infrared feature maps at all resolutions; Step 3: Calculate the total loss value based on the haze-free visible light image, visible light image, grayscale infrared simulation image, real infrared image, and enhanced dehazing feature maps and enhanced infrared feature maps of all resolutions; Step 4: Iterate and update the gradients of the learnable parameters in the infrared generation model multiple times based on the total loss value to obtain the trained infrared generation model; Step 5: Input the foggy visible light image to be processed into the trained infrared generation model to obtain a fog-free visible light image.
2. The method for generating dehazed infrared images based on collaborative decoding and feature fusion according to claim 1, characterized in that, Step 1, which involves constructing a hazy visible light image, includes: By applying atmospheric light A and transmittance t(x) to the visible light image J(x) using an atmospheric scattering model, a hazy visible light image I(x) is obtained. This is achieved through the following formula: I(x)=J(x)t(x)+A(1-t(x)).
3. The method for generating dehazed infrared images based on collaborative decoding and feature fusion according to claim 1, characterized in that, The infrared generation model includes a shared encoder, a collaborative decoder, and a feature fusion module.
4. The method for generating dehazed infrared images based on collaborative decoding and feature fusion according to claim 3, characterized in that, Step 2 specifically includes: Step 2.1: Process the hazy visible light image using a shared encoder to obtain multiple dehazing coded feature maps; Step 2.2: Input all dehazing encoded feature maps into the collaborative decoder and feature fusion module to obtain grayscale infrared simulation images and haze-free visible light images, as well as enhanced dehazing feature maps and enhanced infrared feature maps at all resolutions.
5. The method for generating dehazed infrared images based on collaborative decoding and feature fusion according to claim 4, characterized in that, Step 2.1 specifically includes: The hazy visible light image is passed through multiple encoding stages in sequence. In each encoding stage, it passes through a convolutional layer, an activation function layer, and a batch normalization layer in sequence. Each encoding stage outputs a dehazing encoded feature map.
6. The method for generating dehazed infrared images based on collaborative decoding and feature fusion according to claim 5, characterized in that, Step 2.2 specifically includes: The dehazed encoded feature map output from the last encoding stage is convolved with the transpose of the first convolution kernel to obtain an upsampled dehazed feature map. Then, a dehazed encoded feature map with the same resolution as the upsampled dehazed feature map is added element-wise to this upsampled dehazed feature map to obtain the dehazed fused feature map F. d ; The infrared coded feature map output from the last encoding stage is convolved with the transpose of the second convolution kernel to obtain an upsampled infrared feature map. Then, an infrared coded feature map with the same resolution as the upsampled infrared feature map is added element-wise to this upsampled infrared feature map via skip connections to obtain the infrared fused feature map F. ir ; F d and F ir Input the feature fusion module to obtain enhanced dehazing feature maps and enhanced infrared feature maps; The enhanced dehazing feature map and the enhanced infrared feature map are respectively applied to the activation function layer and the batch normalization layer to obtain the dehazing branch feature map and the infrared branch feature map; The dehazed branch feature map is returned to perform the transposed convolution of the first convolution kernel, and the infrared branch feature map is returned to perform the transposed convolution of the second convolution kernel. This process continues until the resolution of the upsampled dehazed feature map and the resolution of the upsampled infrared feature map are the same as the resolution of the dehazed encoded feature map output from the first encoding stage. Then, the corresponding dehazed branch feature map is used as the final dehazed feature map, and the corresponding infrared branch feature map is used as the final infrared feature map. At the same time, enhanced dehazed feature maps and enhanced infrared feature maps of all resolutions are obtained. The final infrared feature map is passed through a convolutional layer and a Tanh activation function to output a grayscale infrared simulation image. The final dehazed feature map is then passed through a convolutional layer and a Sigmoid activation function to obtain a haze-free visible light image.
7. The method for generating dehazed infrared images based on collaborative decoding and feature fusion according to claim 6, characterized in that, The F d and F ir The input feature fusion module produces enhanced dehazing feature maps and enhanced infrared feature maps, including: For F respectively d and F ir Apply a 1×1 convolutional layer to generate dehazed projection features F d ' and infrared projection features F ir ' ; F d ' As a query vector, F ir ' Simultaneously serving as both key and value vectors, attention weights are calculated to obtain the infrared feature-guided contextual features C. d ; F ir ' As a query vector, F d ' Simultaneously serving as both key and value vectors, attention weights are calculated to obtain the contextual features C guided by the dehazing features. ir ; F d ' F ir ' C d and C ir The feature maps are fused to obtain the enhanced dehazing feature map F. d_enhanced and enhanced infrared feature map F ir_enhanced Specifically, this is achieved through the following formula: F d_enhanced =σ(W g [F d ' ,C d ])⊙C d + F d ' ; F ir_enhanced =σ(W g [F ir ' ,C ir ])⊙C ir + F ir ' ; Among them, W g σ is a learnable linear transformation, σ is the Sigmoid activation function, ⊙ represents element-wise multiplication, and [·] represents the concatenation operation.
8. The method for generating dehazed infrared images based on collaborative decoding and feature fusion according to claim 1, characterized in that, Step 3 specifically includes: Step 3.1: Calculate the smoothing L1 loss L based on the haze-free visible light image and the visible light image. smoothL1 Multi-scale structural similarity loss L MS-SSIM and perceived loss L perc The adversarial loss L is calculated based on the haze-free visible light image. adv_G , for L smoothL1 L MS-SSIM、 L perc and L adv_G We obtain the loss value L for the defogging task by weighted summation. dehaze Specifically, it is expressed by the following formula: L dehaze =α1×L smoothL1 +α2×L MS-SSIM +α3×L adv_G +α4× L perc ; Among them, α1, α2, α3, and α4 are hyperparameters; Step 3.2: Calculate the L1 loss L based on the grayscale infrared simulation image and the real infrared image. L1 and SSIM loss L SSIM The generator loss L of infrared adversarial loss is calculated based on grayscale infrared simulation images. adv_G_ir , for L L1、 L SSIM and L adv_G_ir Weighted summation yields the loss L of the infrared simulation task. ir Specifically, it is expressed by the following formula: L ir =η1×L L1 +η2×L SSIM +η3×L adv_G_ir ; Where η1, η2, and η3 are hyperparameters; Step 3.3: Calculate the feature fusion consistency loss L based on the enhanced dehazed feature maps and enhanced infrared feature maps at all resolutions. fusion Specifically, it is calculated using the following formula: ; Where C, H, and W represent the number of channels, height, and width, respectively. This indicates that the number of channels is c The height is h, Width is w Enhanced dehazing feature map, This indicates that the number of channels is c The height is h Width is w Enhanced infrared signature map; Step 3.4: For L dehaze L ir and L fusion We perform a weighted summation to obtain the total loss value L. total Specifically, it is expressed by the following formula: L total =λ1×L dehaze +λ2×L ir +λ3×L fusion ; Wherein, λ1, λ2, and λ3 are the weighting coefficients for balancing the losses of each item.