An image dehalo method based on spatial prior guidance and gain map prediction
Patent Information
- Application Number
- CN202610812993.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-09-01
AI Technical Summary
[0005]有鉴于此,本发明提供了一种基于空间先验引导与增益图预测的图像去光晕方法,解决现有去光晕方法易误删关键光源、非光晕区域易偏色变暗、复杂非均匀光晕处理效果差、模型泛化能力不足的技术问题,在强效抑制光晕的同时,完整保留图像语义信息,实现局部精准的光晕抑制
1.本发明避开了现有深度学习方法先抹除再重建或直接生成背景图层的传统路径,创新性地将物理启发式的伽马校正逻辑引入神经网络,通过预测亮度增益图实现光晕的局部亮度校正,而非直接抹除光源区域,在强效抑制光晕的同时,完整保留了路灯、车灯等关键真实光源,避免破坏图像的语义信息,解决了现有模型易误删光源、多光源场景光源丢失的问题;
Smart Images

Figure CN122675686A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically to an image dehalo method based on spatial prior guidance and gain map prediction. Background Technology
[0002] In complex nighttime lighting environments, vehicle headlights, streetlights, and various artificial high-intensity light sources, after being scattered by the medium, easily produce bright halos or radial spots in images. Furthermore, vehicle lenses, mobile phone cameras, and drone cameras are easily stained with dust, fingerprints, water droplets, and other contaminants, further exacerbating halo interference in images. These phenomena lead to localized overexposure, loss of detail, reduced contrast, and blurred object edges, severely impacting the accuracy and reliability of nighttime surveillance, autonomous driving perception, and target recognition systems. Therefore, researching methods to suppress halos can provide clearer, more informative images for various visual applications, effectively improving the accuracy of subsequent visual model detection and recognition, and enhancing system reliability and effectiveness in fields such as security and transportation.
[0003] Existing mainstream halo suppression methods can be mainly divided into three categories. The first category is end-to-end training methods based on deep learning, including supervised and unsupervised learning. Supervised learning methods rely on pairs of "halo-free" data for model training. They first reconstruct halo-free images to remove halos and light sources, and then restore the light sources to the image in the post-processing step. Unsupervised learning methods do not require paired datasets. They separate the halo layer and background layer through iterative training of two independent networks, and then perform dark light enhancement processing on the background layer to achieve the effects of light effect suppression and background layer enhancement. The second category is based on the physical principles of optical imaging. It establishes an atmospheric scattering model to model the halo formation process in nighttime images, using methods such as Gaussian kernels to simulate the light scattering process, restoring a clear scene from the image, and thus eliminating halo effects. The third category is general image enhancement algorithms, such as traditional local gamma correction methods. This method is not designed specifically for halo elimination tasks. It typically analyzes the local brightness characteristics of the image and adaptively adjusts the gamma value to improve local contrast and enhance the visual effect of the image. It is often used in high dynamic range (HDR) compression. In addition, there is the classic dark channel prior dehazing method, which estimates global atmospheric light and transmittance based on prior assumptions derived from statistical observations to obtain a dehazed image. This method is mainly used for dehazing and is not designed for halo effects.
[0004] In existing halo suppression methods, supervised end-to-end training methods based on deep learning heavily rely on high-quality paired datasets. However, halo images from real-world scenes are difficult to acquire, while synthetic data lacks realism. This results in poor model generalization ability, easily removing key real light sources such as streetlights and car lights, thus destroying the semantic information of the image. For deep learning methods that first remove halos from the image and then recover the light sources through post-processing, in multi-light source scenes, they often retain only the brightest light source while losing others, making it difficult to recover all light sources. Unsupervised light effect suppression methods based on deep learning are not specifically designed for halo features. When suppressing light effects and enhancing dark areas, due to the lack of accurate localization of the physical characteristics of halos, the stripped light effect layer often responds to the entire image rather than just the halo area. Therefore, while suppressing light effects, it easily leads to overall image darkening and color cast, and even post-processing to enhance the dark areas does not yield good results. A physical principle-based modeling method for the generation mechanism of realistic halos is theoretically rigorous; however, the solution process is cumbersome and time-consuming. When dealing with complex and non-uniform halo distributions, the restoration effect is often limited due to the difficulty in accurately estimating model parameters. Furthermore, because local processing of the halo region is not possible, the image may exhibit overall color cast. General image enhancement algorithms lack mechanisms for recognizing and suppressing halo distribution characteristics. If directly applied to halo scenes, they will not have a significant halo suppression effect and may even incorrectly boost the brightness of halo edges, resulting in a negative "halo diffusion" effect. Therefore, providing an image halo removal method based on spatial prior guidance and gain map prediction is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the present invention provides an image dehalo method based on spatial prior guidance and gain map prediction, which solves the technical problems of existing dehalo methods such as easy deletion of key light sources, easy color cast and darkening of non-halo areas, poor processing effect of complex non-uniform halos, and insufficient model generalization ability. While effectively suppressing halos, it completely preserves the semantic information of the image and achieves localized and accurate halo suppression.
[0006] To achieve the above objectives, the present invention provides the following technical solution: An image dehalo method based on spatial prior guidance and gain map prediction includes the following steps: S1. Obtain the geometric boundary of the halo region in the original halo image, convert the geometric boundary into a halo spatial mask, and use the halo spatial mask as the supervision signal of the network mask branch. S2. Calculate the halo suppression ground truth map for each original image. Based on the halo suppression ground truth map and the brightness channel of the original image, calculate the gain ground truth map and use the gain ground truth map as the supervision signal for the network gain branch. S3. Construct a dual-branch deep neural network based on an encoder-decoder structure. The image brightness channel is used as input, and the network mask branch outputs a predicted halo spatial mask; the network gain branch outputs a predicted brightness gain map. S4. Construct a regionally differentiated composite loss function and iteratively train the dual-branch deep neural network to obtain the halo-removing model. S5. Input the brightness channel of the halo image to be processed into the halo removal model, output the predicted halo spatial mask and the predicted brightness gain map, perform fusion correction on the original brightness channel, and stitch the corrected brightness channel with the original chroma channel to obtain the halo removal image.
[0007] Optionally, in S1, the geometric boundary is transformed into a halo space mask as follows: The geometric boundary of the halo region is transformed into a binary mask, and the binary mask is then subjected to Gaussian weighted smoothing. ; In the formula, For the halo space mask, For binary masking, The variance is Gaussian convolution kernel.
[0008] Optionally, the geometric boundary of the halo region can be transformed into a binary mask as follows: For rectangular geometric bounds, defined by the coordinates of the top left and bottom right corners, the corresponding pixel value in the binarized mask is 1 if any pixel in the image satisfies the rectangular coordinate range, otherwise it is 0. For elliptical and circular geometric bounds, defined by the center point, major semi-axis, and minor semi-axis, the corresponding pixel value in the binarized mask is 1 if any pixel in the image satisfies the elliptical geometric equation, otherwise it is 0.
[0009] Optionally, S2 is as follows: S21. Apply a Gaussian blur function to the brightness channel Y of the original image. Calculate the local features of each pixel to obtain the local average brightness. Calculate the local standard deviation And normalize it; S22. Dynamically calculate the brightness adjustment factor for each pixel using a power function. : ; In the formula, To adjust the intensity, The power exponent. It is the minimum value. The normalized brightness; S23. Dynamically calculate the contrast adjustment factor for each pixel using the maximum value function. : ; In the formula, C is the target contrast value, and C is the normalized contrast. S24. Combine the brightness adjustment factor and contrast adjustment factor to obtain the local corrected gamma value. : ; S25, Apply halo space mask As a weight and locally corrected gamma value The fusion yields an adaptive gamma map. The true value map of halo suppression was obtained through gamma correction. : ; ; S26. Based on the truth map of halo suppression The gain truth map is calculated by comparing it with the original image's brightness channel Y. : ; In the formula, The pixel coordinates are represented, and the ground truth map of gain is used as a monitoring signal for the network gain branch.
[0010] Optionally, the dual-branch deep neural network in S3 adopts the U-Net architecture, which extracts multi-scale features through encoder downsampling, restores image resolution through decoder upsampling, and realizes feature concatenation between the encoding and decoding layers through skip connections; in the network decoding stage, a deep supervision output node is set to output the intermediate layer temporary mask and temporary gain map.
[0011] Optional, the composite loss function in S4 Specifically: ; In the formula, Spatial masking loss represents the absolute average error between the predicted mask and the ground truth mask. For deep mask loss, True value of gain The brightness gain loss in the halo region, for The corresponding deep gain loss, True value of gain The brightness gain loss of the pixels, for The corresponding deep gain loss, To predict the loss between the image and the real image with halo suppression, In order to perceive loss, , , , , These are the weighting coefficients for the corresponding items.
[0012] Optionally, for the deep supervision signal output in the network structure, the spatial mask ground truth can be used. with the true value of gain Perform downsampling to ensure its size matches the intermediate layer output, using the same method as... , , Using the same calculation method, the error between the intermediate layer prediction result and the scaled true value is calculated separately, and denoted as the deep mask loss. With deep gain map loss , .
[0013] Optional, , , , , , Use of standards loss, , Using a variant of Smooth based on exponential transformation Loss, first the predicted value with truth value Perform exponential mapping processing separately, the formula is as follows: and , To adjust the intensity factor, Smooth is calculated for the transformed value. loss: ; Smooth The loss is penalized linearly when the difference is large, and squared when the difference is small.
[0014] As can be seen from the above technical solution, compared with the prior art, the present invention provides an image dehalo method based on spatial prior guidance and gain map prediction, which has the following beneficial effects: 1. This invention avoids the traditional path of existing deep learning methods that first erase and then reconstruct or directly generate background layers. It innovatively introduces physically inspired gamma correction logic into the neural network, and achieves local brightness correction of the halo by predicting the brightness gain map, instead of directly erasing the light source area. While effectively suppressing the halo, it completely preserves key real light sources such as street lights and car lights, avoids destroying the semantic information of the image, and solves the problems of existing models that easily delete light sources and lose light sources in multi-light source scenes. 2. This invention designs a dual-branch prediction architecture, which synchronously outputs the halo spatial mask and brightness gain map through a spatial prior guided network, ensuring that brightness adjustment only applies to the identified halo distribution area. The background area retains its original attributes under the constraint of the fusion formula, achieving localized and accurate halo suppression. This avoids the problem of darkening and color shifting in non-halo areas caused by the full-image response of unsupervised methods, and requires no additional post-processing steps. 3. This invention designs a region-differentiated composite loss function for complex and non-uniformly distributed halo features, adopts different loss supervision strategies for halo regions and background regions, and combines deep supervision strategies to significantly improve the accuracy of halo positioning and the accuracy of brightness darkening ratio. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 This is a flowchart of the image dehalo method based on spatial prior guidance and gain map prediction of the present invention; Figure 2 For the present invention and A comparison curve chart; Figure 3 This is a schematic diagram of the dual-branch deep neural network structure of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] This invention discloses an image dehalo method based on spatial prior guidance and gain map prediction, such as... Figure 1 As shown, it includes the following steps: S1. Obtain the geometric boundary of the halo region in the original halo image, convert the geometric boundary into a halo spatial mask, and use the halo spatial mask as a supervision signal for the network mask branch. This signal guides the network to learn how to simulate and calculate the probability distribution of the halo region from the original pixel information. S2. Calculate the halo suppression ground truth map for each original image. Based on the halo suppression ground truth map and the brightness channel of the original image, calculate the gain ground truth map. Use the gain ground truth map as the supervision signal of the network gain branch to characterize the nonlinear brightness mapping relationship that the model needs to learn. S3. Construct a dual-branch deep neural network based on an encoder-decoder structure. The image brightness channel is used as input, and the network mask branch outputs a predicted halo spatial mask; the network gain branch outputs a predicted brightness gain map. S4. Construct a regionally differentiated composite loss function and iteratively train the dual-branch deep neural network to obtain the halo-removing model. S5. Input the brightness channel of the halo image to be processed into the halo removal model, output the predicted halo spatial mask and the predicted brightness gain map, perform fusion correction on the original brightness channel, and stitch the corrected brightness channel with the original chroma channel to obtain the halo removal image.
[0019] Furthermore, in S1, the geometric boundary is transformed into a halo space mask as follows: The geometric boundary of the halo region is transformed into a binary mask, and the binary mask is then subjected to Gaussian weighted smoothing. ; In the formula, For the halo space mask, For binary masking, The variance is Gaussian convolution kernel.
[0020] In this embodiment of the invention, a graphical interactive interface (such as a QT-based annotation tool) is used to obtain the geometric boundaries of the halo region in the original image for the user. It supports a variety of geometric shapes, including but not limited to rectangles, circles, and ellipses, to adapt to different forms of light source diffusion halo shapes. These shapes can be freely rotated according to the user's needs.
[0021] Furthermore, the geometric boundary of the halo region is transformed into a binary mask as follows: For geometric boundary determination of a rectangle, the coordinates of the upper left corner are used. Definition of the lower right corner coordinates Any pixel in the image When the rectangular coordinate range is satisfied, the corresponding pixel value of the binarized mask is 1; otherwise, it is 0. The specific coordinate range is as follows: ; For geometric boundary conditions of ellipses and circles, the boundary is determined through the center point. Long half shaft Definition of the short semi-axis In an image, if any pixel satisfies the elliptic geometric equation, the corresponding pixel value in the binarization mask is 1; otherwise, it is 0. The specific elliptic geometric equation is as follows: .
[0022] Furthermore, S2 specifically refers to: S21. Apply a Gaussian blur function to the brightness channel Y of the original image. In this embodiment, the Gaussian kernel is set as... Calculate the local features of each pixel to obtain the local average brightness. Calculate the local standard deviation And normalize it; In this embodiment of the invention, the calculation formula is specifically as follows: ; ; ; ; S22. Dynamically calculate the brightness adjustment factor for each pixel using a power function. : ; In the formula, To adjust the intensity, The power exponent. It is the minimum value. The normalized brightness; In this embodiment of the invention, the adjustment intensity is set to 1.1, the power exponent is set to 1.3, and the minimum value can be set to... . Figure 2 for and The comparison curves show that The slope is greater than in the medium brightness range. The slope of the halo, or the brightness adjustment factor, increases the contrast between the brightness ranges while ensuring the dynamic range.
[0023] S23. Low contrast is often a typical characteristic of halo areas; therefore, the contrast adjustment factor for each pixel is dynamically calculated using a maximum value function. : ; In the formula, Here, C represents the target contrast value. Below this contrast level, further processing is required. C is the normalized contrast value. S24. Combine the brightness adjustment factor and contrast adjustment factor to obtain the local corrected gamma value. : ; S25, Apply halo space mask As a weight and locally corrected gamma value The fusion yields an adaptive gamma map. The true value map of halo suppression was obtained through gamma correction. : ; ; S26. Based on the truth map of halo suppression The gain truth map is calculated by comparing it with the original image's brightness channel Y. : ; In the formula, The pixel coordinates are represented, and the ground truth map of gain is used as a monitoring signal for the network gain branch.
[0024] Furthermore, such as Figure 3 As shown, the dual-branch deep neural network in S3 adopts the U-Net architecture. It extracts multi-scale features through encoder downsampling, restores image resolution through decoder upsampling, and realizes feature concatenation between the encoding and decoding layers through skip connections. In order to improve the training effect, a deep supervision output node is set in the network decoding stage to output the intermediate layer temporary mask and temporary gain map, which helps the model to better learn the overall contour and brightness distribution of the halo.
[0025] The network branching structure enables the model to simultaneously determine the specific location of the halo and the degree to which each pixel needs to be darkened, thereby achieving precise halo processing, such as... Figure 3 The thick arrows indicate convolution operations, and the thin arrows indicate feature concatenation operations. The model takes the Y channel of the YUV image as input, and the final output layer outputs a dimensionless array. The data tensor has one channel corresponding to the halo space mask output by branch one, and the other channel corresponding to the brightness gain map output by branch two.
[0026] After obtaining the halo spatial mask and brightness gain map from the model's predicted output, the modified image Y channel The mathematical formula is as follows: ; in, This represents a pixel-wise multiplication operation. Concatenating this image with the original U and V channels of the image yields the final halo-suppressed image predicted by the model. .
[0027] Furthermore, the composite loss function in S4 Specifically: ; In the formula, Spatial masking loss represents the absolute average error between the predicted mask and the ground truth mask. For deep mask loss, True value of gain The brightness gain loss in the halo region, for The corresponding deep gain loss, True value of gain The brightness gain loss of the pixels, for The corresponding deep gain loss, To predict the loss between the image and the real image with halo suppression, In order to perceive loss, , , , , These are the weighting coefficients for the corresponding terms. Due to the different characteristics of halo areas (which need to be darkened) and background areas (which do not need to be darkened) in the image, the supervision of the gain map is divided into... and Two parts.
[0028] Furthermore, for the deep supervision signal output in the network structure, the spatial mask ground truth is... with the true value of gain Perform downsampling to ensure its size matches the intermediate layer output, using the same method as... , , Using the same calculation method, the error between the intermediate layer prediction result and the scaled true value is calculated separately, and denoted as the deep mask loss. With deep gain map loss , .
[0029] Furthermore, , , , , , Use of standards loss, , Using a variant of Smooth based on exponential transformation Loss, first the predicted value with truth value Perform exponential mapping processing separately, the formula is as follows: and , To adjust the intensity factor, in this embodiment, a value of 10.0 is used. This transformation can amplify subtle differences in brightness adjustment. The smoothness is calculated based on the transformed value. loss: ; Smooth The loss is penalized linearly when the difference is large, and squared when the difference is small.
[0030] In this embodiment of the invention, spatial mask loss The formula used to monitor the localization accuracy of network branch one is: ; in N The number of pixels in the training samples is minimized to enable the network to identify halo-covered areas in the image, providing accurate spatial weights for subsequent local fusion. The calculation formula is: ; in The number of pixels in the background region of the training samples is calculated. The difference forces the brightness adjustment coefficient of the background area to remain at 1, which ensures that the model will not darken the brightness of normal backgrounds such as trees and buildings when processing halos; To ensure that the final image after halo removal achieves ideal results at both the pixel and visual perception levels, the loss between the predicted image and the ground image with halo suppression is calculated. This is used to constrain the numerical consistency between the two at each pixel, and the calculation formula is: ; Perceptual loss is a loss function based on neural network features. It measures the similarity of images by comparing the differences between the output image and the ground truth in high-level feature maps. It can better capture the semantic information of images, making the model's output image more consistent with human visual perception. In this embodiment of the invention, a pre-trained VGG-19 network is used as the feature extractor. To simultaneously capture both low-level texture (such as edges) and high-level semantics (such as overall brightness distribution), the VGG-19 feature extraction layer is divided into 5 consecutive feature slices, with corresponding network depth indices of [insert indices here]. The loss calculation formula is: ; in, These are the stage numbers of the feature patches, corresponding to five depth indices. For example, when... hour, This indicates the extraction of output features from the second layer of the VGG network; when hour, This indicates that the output features of the 7th layer of the VGG network are extracted, and so on. For the first In this embodiment, the weight coefficients for all five layers are set to 0.2. Represents the norm.
[0031] The image data processed by this invention is not limited to RGB format; the input can be directly in YUV format without conversion to RGB and back to YUV. The algorithm can be applied directly to the Y channel. In addition, the input data can also be RAW domain data or a single-channel grayscale image. The U-Net network can be replaced with other types of deep convolutional neural networks, and the number of network layers, the size of each layer, the number of channels, the kernel size, and the activation function type can all be flexibly adjusted.
[0032] In this invention, the power function used to construct the brightness adjustment factor and the maximum value function used to construct the contrast adjustment factor can be replaced with other mapping methods such as piecewise functions and lookup table mapping methods as needed.
[0033] This embodiment of the invention selects the Y channel in the YUV color space for processing, but this method is also applicable to other color spaces that include a luminance component, such as the L channel of HSL. Similarly, this algorithm can also be applied directly to the three channels in the RGB color space and then weighted and fused.
[0034] The composite loss function used in the embodiments of this invention can be added, removed, or replaced according to training requirements. For example, the L1 loss function can be replaced with the L2 loss function, structural similarity loss, or adversarial loss. Simultaneously, the number of layers in the deep supervision mechanism and the weight allocation of each layer can also be adjusted to focus on feature learning at different resolutions.
[0035] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0036] Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image halo removal method based on spatial prior guidance and gain map prediction, characterized in that, Includes the following steps: S1. Obtain the geometric boundary of the halo region in the original halo image, convert the geometric boundary into a halo spatial mask, and use the halo spatial mask as the supervision signal of the network mask branch. S2. Calculate the halo suppression ground truth map for each original image. Based on the halo suppression ground truth map and the brightness channel of the original image, calculate the gain ground truth map and use the gain ground truth map as the supervision signal for the network gain branch. S3. Construct a dual-branch deep neural network based on an encoder-decoder structure, with the image brightness channel as input and the network mask branch outputting the predicted halo spatial mask. Network gain branch output predicted brightness gain plot; S4. Construct a regionally differentiated composite loss function and iteratively train the dual-branch deep neural network to obtain the halo-removing model. S5. Input the brightness channel of the halo image to be processed into the halo removal model, output the predicted halo spatial mask and the predicted brightness gain map, perform fusion correction on the original brightness channel, and stitch the corrected brightness channel with the original chroma channel to obtain the halo removal image.
2. The image dehalo method based on spatial prior guidance and gain map prediction according to claim 1, characterized in that, In S1, the geometric bound is transformed into a halo space mask as follows: The geometric boundary of the halo region is transformed into a binary mask, and the binary mask is then subjected to Gaussian weighted smoothing. ; In the formula, For the halo space mask, For binary masking, The variance is Gaussian convolution kernel.
3. The image dehalo method based on spatial prior guidance and gain map prediction according to claim 2, characterized in that, The geometric boundary of the halo region is transformed into a binary mask as follows: For rectangular geometric bounds, defined by the coordinates of the top left and bottom right corners, the corresponding pixel value in the binarized mask is 1 if any pixel in the image satisfies the rectangular coordinate range, otherwise it is 0. For elliptical and circular geometric bounds, defined by the center point, major semi-axis, and minor semi-axis, the corresponding pixel value in the binarized mask is 1 if any pixel in the image satisfies the elliptical geometric equation, otherwise it is 0.
4. The image dehalo method based on spatial prior guidance and gain map prediction according to claim 1, characterized in that, S2 specifically refers to: S21. Apply a Gaussian blur function to the brightness channel Y of the original image. Calculate the local features of each pixel to obtain the local average brightness. Calculate the local standard deviation And normalize it; S22. Dynamically calculate the brightness adjustment factor for each pixel using a power function. : ; In the formula, To adjust the intensity, The power exponent. It is the minimum value. The normalized brightness; S23. Dynamically calculate the contrast adjustment factor for each pixel using the maximum value function. : ; In the formula, C is the target contrast value, and C is the normalized contrast. S24. Combine the brightness adjustment factor and contrast adjustment factor to obtain the local corrected gamma value. : ; S25, Apply halo space mask As a weight and locally corrected gamma value The fusion yields an adaptive gamma map. The true value map of halo suppression was obtained through gamma correction. : ; ; S26. Based on the truth map of halo suppression The gain truth map is calculated by comparing it with the original image's brightness channel Y. : ; In the formula, The pixel coordinates are represented, and the ground truth map of gain is used as a monitoring signal for the network gain branch.
5. The image dehalo method based on spatial prior guidance and gain map prediction according to claim 1, characterized in that, The dual-branch deep neural network in S3 adopts the U-Net architecture, which extracts multi-scale features through encoder downsampling, restores image resolution through decoder upsampling, and realizes feature concatenation between the encoding and decoding layers through skip connections; in the network decoding stage, a deep supervision output node is set to output the intermediate layer temporary mask and temporary gain map.
6. The image dehalo method based on spatial prior guidance and gain map prediction according to claim 1, characterized in that, Composite loss function in S4 Specifically: ; In the formula, Spatial masking loss represents the absolute average error between the predicted mask and the ground truth mask. For deep mask loss, True value of gain The brightness gain loss in the halo region, for The corresponding deep gain loss, True value of gain The brightness gain loss of the pixels, for The corresponding deep gain loss, To predict the loss between the image and the real image with halo suppression, In order to perceive loss, , , , , These are the weighting coefficients for the corresponding items.
7. The image dehalo method based on spatial prior guidance and gain map prediction according to claim 6, characterized in that, For the deep supervision signal output in the network structure, the spatial mask ground truth is... with the true value of gain Perform downsampling to ensure its size matches the intermediate layer output, using the same method as... , , Using the same calculation method, the error between the intermediate layer prediction result and the scaled true value is calculated separately, and denoted as the deep mask loss. With deep gain map loss , .
8. The image dehalo method based on spatial prior guidance and gain map prediction according to claim 6, characterized in that, , , , , , Use of standards loss, , Using a variant of Smooth based on exponential transformation Loss, first the predicted value with truth value Perform exponential mapping processing separately, the formula is as follows: and , To adjust the intensity factor, Smooth is calculated for the transformed value. loss: ; Smooth The loss is penalized linearly when the difference is large, and squared when the difference is small.