Iterative defogging method and system for real world image

By introducing an iterative decoding framework and high-quality priors in real-world image defog removal, the problems of insufficient generalization ability and unsatisfactory defog removal effect in the existing technology are solved, and a higher quality and more stable defog removal effect is achieved.

CN119809979AActive Publication Date: 2025-04-11NANKAI UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411993661.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-11
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The prior art has problems such as insufficient generalization ability and unsatisfactory defog removal in real-world image defog removal, especially in dense haze areas.

Method used

A iterative defogging method for real-world images is proposed, combining generation ability and high-quality priors to improve the generalization ability of the model through iterative methods. The specific steps include acquiring the haze image, extracting the fused image features through a pre-trained encoder, and iterating iteratively using the code predictor and the code evaluator until it completes the iteration conditions, obtaining the defogging image encoding sequence, and obtaining the defogging image through the decoder.

Benefits of technology

A better iterative fog removal effect is achieved, and the restored image has less color shift, higher image quality and more significant fog removal effect is improved, improving the generalization ability of the model and the stability and accuracy of the fog removal process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119809979A_ABST
    Figure CN119809979A_ABST
Patent Text Reader

Abstract

The invention discloses a real world image-oriented iterative defogging method and system, and belongs to the technical field of image defogging. Comprising the following steps: inputting a haze image into a pre-trained encoder for processing, and extracting fused image features; the image is processed through a code predictor, and an image coding sequence is determined; evaluating an image coding sequence through a code evaluator under the guidance of a quality sequence generated by an encoder in pre-training, updating a fused image feature based on an evaluation result, and inputting the fused image feature into a code predictor; the processing process of the code predictor and the code evaluator is cycled until iteration is completed, and a defogged image coding sequence is obtained; and the corresponding defogged image features are input into a decoder for processing, and a defogged image is obtained in combination with the multi-scale image features generated in the processing process of the encoder. The generation capability and the high-quality prior are combined, and the generalization capability of the model is improved through iteration. The problems that an existing defogging algorithm is poor in performance on a real-world haze image, and the defogging performance needs to be improved are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image defogging, and in particular to an iterative defogging method and system for real-world images. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] Single Image Dehazing aims to restore clear, haze-free images from haze images. Early dehazing methods mainly restore images by estimating the parameters of the imaging model. However, these methods based on hand-designed priors often lack sufficient generalization capabilities and cannot adapt to different scenes, resulting in poor results. With the development of deep learning, data-driven methods have achieved remarkable results. DehazeNet, Aod-Net, etc. are inspired by scattering models, but when the scene does not conform to the ideal physical model, the dehazing effect is still not ideal. Another type of method, FFA-Net, Dehamer, etc., directly uses the network to restore clear images, but due to the domain gap between synthetic data and real data, these models often perform poorly on real-world haze images.

[0004] In the study of real-world image dehazing, existing methods can be roughly divided into domain adaptation-based methods, generative adversarial network (GAN)-based methods, and deep prior-based methods, but the following problems still exist:

[0005] (1) Domain adaptation-based methods use domain adaptation techniques to narrow the gap between synthetic and real domains. They usually perform well on synthetic datasets, but have poor generalization ability on real haze images.

[0006] (2) Different from supervised learning methods, GAN-based methods use unpaired clear and hazy images to learn dehazing mappings. Although they can generate clearer and more natural images, they often produce unnatural haze, which further affects the dehazing performance.

[0007] (3) Some methods introduce hand-crafted priors into the network framework or loss function, however, these methods still have difficulty overcoming their inherent limitations. In recent years, the use of high-quality priors based on VQGAN has achieved significant advantages in image restoration, but traditional one-shot prediction algorithms still perform poorly in dense haze areas. Summary of the invention

[0008] In order to address the deficiencies of the prior art, the present invention provides an iterative dehazing method, system, electronic device, computer-readable storage medium and computer program product for real-world images, which combines generation capability and high-quality priors and improves the generalization ability of the model through an iterative approach.

[0009] In a first aspect, the present invention provides an iterative defogging method for real-world images;

[0010] An iterative dehazing method for real-world images, comprising:

[0011] Obtain a haze image, input the haze image into a pre-trained encoder for processing, and extract fusion image features;

[0012] The fused image features are processed by a code predictor, and an image coding sequence is determined using the output distribution of the code predictor; the image coding sequence is evaluated by a code evaluator guided by a quality sequence generated by the encoder during the pre-training process, and the fused image features are updated based on the evaluation results and input into the code predictor; the processing of the code predictor and the code evaluator is circulated until the iterative conditions are met to obtain a defogging image coding sequence;

[0013] The dehazed image features corresponding to the dehazed image coding sequence are input into the decoder for processing, and the dehazed image is obtained by combining the multi-scale image features generated during the encoder processing.

[0014] In some implementations, inputting the haze image into a pre-trained encoder for processing and extracting fused image features includes:

[0015] Input the haze image into the pre-trained encoder to obtain the initial image features;

[0016] Determine a mask matrix by initialization, and combine the initial image features and the quantized features based on the mask matrix to obtain fused image features;

[0017] The quantized features are generated by pre-training an encoder.

[0018] In some embodiments, the image coding sequence is evaluated by a code evaluator, and the fused image features are updated based on the evaluation results as follows: the image coding sequence is input into a trained code evaluator, an output probability is obtained, and a two-dimensional mask matrix is ​​updated according to the output probability; and the fused image features are updated based on the two-dimensional mask matrix.

[0019] In some embodiments, the code predictor is trained by a cross entropy loss function, and the code evaluator is trained by a binary cross entropy loss function.

[0020] In some implementations, pre-training the encoder specifically includes: inputting the image block into the encoder for processing, obtaining latent space features and replacing each item in the latent space features with a codeword in a dictionary closest to it, obtaining quantized features and corresponding quality sequences;

[0021] The resolution of the image block is smaller than that of the haze image.

[0022] In some embodiments, the dehazed image features corresponding to the dehazed image coding sequence are input into the decoder for processing, and the dehazed image is obtained by combining the multi-scale image features generated during the encoder processing. Specifically, the dehazed image features and the multi-scale image features are fused, the dehazed image features are updated and input into the decoder for processing, and the dehazed image is obtained.

[0023] In a second aspect, the present invention provides an iterative defogging system for real-world images;

[0024] An iterative dehazing system for real-world images, comprising:

[0025] The acquisition module is configured to: acquire a haze image, input the haze image into a pre-trained encoder for processing, and extract fusion image features;

[0026] The iterative defogging module is configured as follows: processing the fused image features through a code predictor, and determining an image coding sequence using the output distribution of the code predictor; evaluating the image coding sequence through a code evaluator guided by a quality sequence generated by the encoder during the pre-training process, updating the fused image features based on the evaluation results and inputting them into the code predictor; looping the processing of the code predictor and the code evaluator until the iterative conditions are completed to obtain a defogging image coding sequence; inputting the defogging image features corresponding to the defogging image coding sequence into a decoder for processing, and obtaining a defogging image in combination with the multi-scale image features generated during the encoder processing.

[0027] In a third aspect, the present invention provides an electronic device;

[0028] An electronic device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-mentioned iterative defogging method for real-world images.

[0029] In a fourth aspect, the present invention provides a computer-readable storage medium;

[0030] A computer-readable storage medium stores a computer program / instruction thereon, which, when executed by a processor, implements the steps of the above-mentioned iterative defogging method for real-world images.

[0031] In a fifth aspect, the present invention provides a computer program product;

[0032] A computer program product comprises a computer program / instruction, which implements the steps of the above-mentioned iterative defogging method for real-world images when executed by a processor.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] 1. The technical solution provided by the present invention proposes a novel iterative decoding defogging framework, which uses the high-quality encoding obtained from the previous rounds of iterations as clues to guide the encoder to predict subsequent encoding, thereby achieving better iterative defogging effect; the restored image has less color cast, higher image quality and more significant defogging effect.

[0035] 2. The technical solution provided by the present invention introduces a code evaluator for evaluating the interdependence in the encoder output and selecting which codes should be retained or rejected during the iterative decoding process, thereby guiding subsequent predictions; improving the consistency between the selected codes and avoiding the accumulation of errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0037] Figure 1 A schematic diagram of a flow chart of an iterative defogging method for real-world images provided by an embodiment of the present invention;

[0038] Figure 2 An example diagram showing the difference between using a code predictor and not using the component in an iteration process according to an embodiment of the present invention;

[0039] Figure 3 An exemplary diagram showing the difference between using a code evaluator and not using the component in an iteration process according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0041] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0042] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0043] Embodiment 1

[0044] Existing dehazing algorithms usually rely on ideal hypothetical prior information, which makes them ineffective in actual scenarios and have limitations when applied to real-world images. The dehazing performance needs to be improved. Deep learning methods have made significant progress through data-driven approaches, but when faced with complex real-world scenes, training data usually relies on ideal physical models and is difficult to adapt to different dehazing scenarios.

[0045] Therefore, this embodiment provides an iterative defogging method for real-world images, which performs iterative defogging from easy to difficult, thereby improving the overall accuracy and stability of the defogging process.

[0046] Next, combine Figure 1-Figure 3 , an iterative defogging method for real-world images disclosed in this embodiment is described in detail. The iterative defogging method for real-world images includes the following steps:

[0047] S1. Obtain a haze image, input the haze image into a pre-trained encoder for processing, and extract fusion image features.

[0048] Here, the encoder may be the encoder in the VQGAN network, and the decoder described below may be the decoder in the VQGAN network. By pre-training the VQGAN network with high-quality image blocks, the quantized feature Z is obtained. c ∈R m×n×d and the corresponding quality sequence S h , a high-quality prior is introduced.

[0049] As an implementation method, S1 includes:

[0050] S101, obtaining haze image I l , the haze image I lInput the pre-trained encoder for processing, through E L (I l ) Get the initial image feature Z l , and initialize a binary mask matrix M t .

[0051] At this time, M t All items in are 1, t=1.

[0052] In this embodiment, the encoder includes one convolutional layer (input channel = 3, output channel = 64, kernel size = 4), two convolutional blocks and one convolutional layer (input channel = 256, output channel = 256, kernel size = 1) connected in sequence; wherein each convolutional block includes one convolutional layer with a stride of 2 and two residual blocks connected in sequence.

[0053] In the encoder, the haze image I l In the process of processing, after the above convolution block containing a convolution layer with a step size of 2, image features F of different scales are obtained. e .

[0054] S102, the binary mask matrix M t Applied to the initial image feature Z l and the quantitative feature Z c And perform weighted averaging to obtain the fused image feature Z t , expressed as:

[0055] Z t =Z l ⊙M t +Z c ⊙(1-M t ).

[0057] It should be noted here that, in the subsequent iteration process, t traverses from 1 to T, where T is a set custom value. In this embodiment, T is set to 8.

[0058] S2, fusion image feature Z t Input the trained code predictor and use the probability distribution p output by the code predictor θ , the coding sequence with the highest probability is taken as the final image coding sequence S; it is expressed as:

[0059] S = argmax(p θ ).

[0060] The input of the code predictor is a vector of shape (H / 4, W / 4, 256), and the output is a vector of shape (H / 4, W / 4, 1024); the code predictor includes 4 RSTB modules (Residual Swin Transformer blocks), layer normalization (LayerNorm) and linear layer (Linear) connected in sequence. The window size, dimension, number of multi-heads and depth of the RSTB module are 8, 256, 8 and 6 respectively. The dimension of layer normalization is 256, the dimension of input features of linear layer is 256 and the dimension of output features is 1024.

[0061] S3. Guided by the quality sequence (high-quality image coding sequence) generated by the encoder during the pre-training process, the image coding sequence is evaluated and updated through the trained code evaluator, and the image features corresponding to the updated image coding sequence are input into the trained code predictor.

[0062] The processing process (S102-S4) of the cyclic code predictor and the code evaluator is repeated until the iteration condition is completed, and the last updated image coding sequence is used as the defogging image coding sequence to execute S4.

[0063] In S2, a high-quality image coding sequence is obtained. However, the relationship between these codes is not considered. Therefore, in this step, a code estimator is introduced. to evaluate whether each code should be accepted.

[0064] The input of the code evaluator is a vector of shape (H / 4, W / 4, 256), and the output is a vector of shape (H / 4, W / 4, 1024). The code evaluator consists of two RSTB modules connected in sequence, one layer normalization and one linear layer. The RSTB module has a window size of 8, a dimension of 256, a multi-head number of 8, a depth of 6, a layer normalization dimension of 256, an input feature dimension of the linear layer of 256, and an output feature dimension of 1024.

[0065] Specifically, the image coding sequence S is input into the code estimator, and the output probability The one with the highest probability The codes are set to 1 and the rest are set to 0, generating a binary mask matrix M t+1 , where γ(·) is the cosine function; using the binary mask matrix M t+1 Update the mask matrix in S102, converting the initial image feature Z l and the quantitative feature Z c Average weighted fusion, update the corresponding fused image feature Z t .

[0066] S4. Input the defogging image features corresponding to the defogging image coding sequence into the decoder for processing, and combine the multi-scale image features generated during the encoder processing to obtain the defogging image.

[0067] In this embodiment, the decoder includes one convolutional layer (input channel = 256, output channel = 256, kernel size = 4), a 2x upsampling block, a convolution block, a 2x upsampling block, a convolution block, and one convolutional layer (input channel = 64, output channel = 3, kernel size = 3) connected in sequence, wherein each convolutional block includes one convolutional layer with a stride of 2 and two residual blocks connected in sequence.

[0068] Specifically, first, the defogging image coding sequence is coded and searched in the dictionary C, and the corresponding codeword is found in the dictionary C to form the corresponding defogging image feature vector; then, the defogging image feature vector is input into the decoder for processing, and after the above-mentioned upsampling block, the defogging image feature maps F of different scales are obtained respectively. d ; Then the dehazed image feature map F is transformed through the SFT module d The image features F of the corresponding scale generated during the encoder processing e Fusion to obtain updated dehazed image features Finally, the dehazed image features of different scales are updated Input the decoder, perform feature fusion at all different scales of the decoder, and output the dehazed image. Updated dehazed image features It is expressed as:

[0069]

[0070] Based on this, by combining the features of high-quality images and low-quality images, a gradual decoding strategy is adopted to effectively improve the image dehazing effect; the dehazing process first focuses on relatively clear areas and gradually transitions to more challenging areas, thereby improving the stability and accuracy of the dehazing process.

[0071] Furthermore, before executing S1, it also includes: training the VQGAN network with the training set and training the code predictor and the code evaluator. The specific process is as follows:

[0072] Step 1: Use a large-scale dataset containing high-resolution image patches to pre-train VQGAN to learn the dictionary (Codebook). The specific process is as follows:

[0073] (1) The high-resolution image block I h ∈R H×W×3 The encoder processes the high-resolution image block I h ∈R H×W×3 Converted to latent space feature Zh , expressed as:

[0074] Z h =E H (I h )∈R m×n×d ;

[0075] In the formula, E H represents the encoder, and d represents the size of the dictionary embedding vector.

[0076] (2) The latent space feature Z h Perform nearest neighbor matching with dictionary C and convert Z h Each item in is replaced by the codeword in the dictionary C that is closest to it, and the quantitative feature Z is obtained. c ∈R m×n×d and the corresponding quality sequence S h , where S h Refers to the serial number in the dictionary corresponding to the encoding in the quantitative feature; it is expressed as:

[0077] Z c (i,j)=argmin{c k ∈C}∥Z h (i,j)-c k ∥2; S h (i,j)=k when Z c (i,j)=c k ;

[0078] In the formula, i, j represent Z c The coordinates of the vector.

[0079] (3) Through decoder D H The quantized feature Z c Decoded as I rec To reconstruct the image I h , expressed as:

[0080] I rec =D H (Z c ).

[0081] Synthetic image data is generated through the DIV2K dataset and the Flickr2K dataset as a training set for training the dehazing network; the synthetic image data includes simulations of various real-world low-light, color deviation and other degradation factors in order to better handle complex dehazing tasks.

[0082] Step 2: Fix the model parameters of the decoder and dictionary in the pre-trained VQGAN and train the code predictor. Specifically:

[0083] (1) Input the training set into the encoder for processing to obtain the initial image feature Zl and the quantitative feature Z c (2) Determine the binary mask matrix M by random sampling t , the binary mask matrix M t Applied to the initial image feature Z l and the quantitative feature Z c And perform weighted averaging to obtain the fused image feature Z t , expressed as:

[0084] Z t =Z l ⊙M t +Z c ⊙(1-M t ).

[0086] Here, the mask ratio (number of elements) is determined by the following formula: Among them, γ(r) is the cosine function, and r is a random number sampled from Uniform(0,1].

[0087] (3) Z t Input the code predictor and get the probability distribution p of the code predictor output θ

[0088] In this embodiment, a dynamic mask matrix is ​​introduced during the training process to randomly block part of the image area, thereby improving the generalization ability of the network and the defogging effect; the sampling of the mask matrix is ​​based on a scheduling function generated by random numbers to ensure the diversity and challenge of different training stages. θ In the training process, the cross entropy loss function L is used θ To train G θ , the loss function is expressed as:

[0089]

[0090] In the code predictor G θ During the training, the model parameters of the decoder and dictionary in the pre-trained VQGAN are fixed, the training set is input into the encoder and code predictor for processing, and the data processing flow of S1-S2 is executed. θ The code prediction error is updated using the gradient descent method. θ The parameter θ is:

[0091] Step 3: Fix the parameters of the pre-trained VQGAN network and the parameters of the trained code predictor, and train the code evaluator using the training set.

[0092] In this embodiment, the binary cross entropy loss function is used to align the code evaluator Training is performed, expressed as:

[0093]

[0094] Specifically, the image coding sequence S is input into the code estimator, and the output probability Represents each code and quality sequence S in S h To check whether each code in S is consistent with the quality sequence S h If they are not consistent, they are rejected; otherwise, they are accepted; use M=(S≠S h ) generates a mask label M to supervise the learning of the estimator.

[0095] In the training process of the code evaluator, the parameters of the pre-trained VQGAN network and the parameters of the trained code predictor are fixed, the training set is input into the encoder, code predictor and code evaluator for processing, and the data processing flow of S1-S4 is executed; according to the loss function, the parameters φ of the code evaluator are updated using the gradient descent method, that is:

[0096] Different from the actual application, in the training process of the code evaluator, the sequence S is resampled from pθ. In order to enable the code evaluator to accurately evaluate various situations of the code predictor output, in this embodiment, a sampling temperature is introduced to enhance the sampling diversity of the code predictor, which is expressed as:

[0097]

[0098] Among them, Temp is set to 2.

[0099] A probability distribution with temperature sampling is adopted to increase the diversity of generated codes and the richness of dehazing results.

[0100] In summary, considering that the thin fog area contains more information, while the dense fog area contains less information, this embodiment proposes an innovative iterative decoding defogging framework, which uses the pre-trained VQGAN as a priori and adopts a high-quality Codebook to assist the defogging process; based on the iterative decoding framework, the accuracy and stability of defogging are improved by gradually defogging. The encoder first maps the foggy image to a token. Then, based on the current token, a prediction-evaluation mechanism is used to alternately predict and evaluate high-quality codes to determine which codes need to be retained. As the iterations proceed, the number of retained codes gradually increases until all codes are finally determined. Through this iterative defogging method, a progressive defogging process is achieved, and the quality of the image is gradually improved; in real-world defogging tasks, it surpasses the existing state-of-the-art methods both qualitatively and quantitatively.

[0101] Next, in order to verify the advancedness of the iterative dehazing method for real-world images described in this embodiment, the RTTS, Fattal and URHI datasets were selected as test datasets to test different methods, and MUSIQ, PI, MANIQA, CLIPQIA, Q-ALIGN, TOPIQA and other indicators were used for evaluation.

[0102] Finally, the experimental results show that compared with other dehazing methods, the method described in this embodiment has significant advantages in MUSIQ, PI, MANIQA, CLIPQIA, Q-ALIGN, and TOPIQA indicators, and the restored image has less color deviation, higher image quality, and more significant dehazing effect.

[0103] Embodiment 2

[0104] This embodiment discloses an iterative defogging system for real-world images, including:

[0105] The acquisition module is configured to: acquire a haze image, input the haze image into a pre-trained encoder for processing, and extract fusion image features;

[0106] The iterative defogging module is configured as follows: processing the fused image features through a code predictor, and determining an image coding sequence using the output distribution of the code predictor; evaluating the image coding sequence through a code evaluator guided by a quality sequence generated by the encoder during the pre-training process, updating the fused image features based on the evaluation results and inputting them into the code predictor; looping the processing of the code predictor and the code evaluator until the iterative conditions are completed to obtain a defogging image coding sequence; inputting the defogging image features corresponding to the defogging image coding sequence into a decoder for processing, and obtaining a defogging image in combination with the multi-scale image features generated during the encoder processing.

[0107] It should be noted that the acquisition module and the iterative defogging module correspond to the steps in Embodiment 1, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0108] Embodiment 3

[0109] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the above-mentioned iterative defogging method for real-world images are completed.

[0110] Embodiment 4

[0111] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the above-mentioned iterative defogging method for real-world images are completed.

[0112] Embodiment 5

[0113] Embodiment 5 of the present invention provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned iterative defogging method for real-world images when executed by a processor.

[0114] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0117] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An iterative dehazing method for real-world images, characterized in that: include: Obtain a haze image, input the haze image into a pre-trained encoder for processing, and extract fusion image features; The fused image features are processed by a code predictor, and an image coding sequence is determined using an output distribution of the code predictor; the image coding sequence is evaluated by a code evaluator guided by a quality sequence generated by the encoder during pre-training, and the fused image features are updated based on the evaluation results and input into the code predictor; The processing of the cyclic code predictor and the code evaluator is completed until the iteration condition is completed and the dehazed image coding sequence is obtained; The dehazed image features corresponding to the dehazed image coding sequence are input into the decoder for processing, and the dehazed image is obtained by combining the multi-scale image features generated during the encoder processing.

2. The iterative defogging method for real-world images according to claim 1, characterized in that: The step of inputting the haze image into a pre-trained encoder for processing and extracting fused image features comprises: Input the haze image into the pre-trained encoder to obtain the initial image features; Determine a mask matrix by initialization, and combine the initial image features and the quantized features based on the mask matrix to obtain fused image features; The quantized features are generated by pre-training an encoder.

3. The iterative defogging method for real-world images according to claim 1, characterized in that: The method of evaluating the image coding sequence by a code evaluator and updating the fused image features based on the evaluation results is as follows: inputting the image coding sequence into a trained code evaluator, obtaining an output probability, and updating a two-dimensional mask matrix according to the output probability; and updating the fused image features based on the two-dimensional mask matrix.

4. The iterative defogging method for real-world images according to claim 1, characterized in that: The code predictor is trained by the cross entropy loss function, and the code evaluator is trained by the binary cross entropy loss function.

5. The iterative defogging method for real-world images according to claim 1, characterized in that: The encoder is pre-trained as follows: the image block is input into the encoder for processing, latent space features are obtained, and each item in the latent space features is replaced by a codeword in the dictionary closest to it, and the quantized features and the corresponding quality sequence are obtained; The resolution of the image block is smaller than that of the haze image.

6. The iterative defogging method for real-world images according to claim 1, characterized in that: The defogging image features corresponding to the defogging image coding sequence are input into the decoder for processing, and the defogging image is obtained by combining the multi-scale image features generated in the encoder processing process. Specifically, the defogging image features and the multi-scale image features are fused, the defogging image features are updated and input into the decoder for processing, and the defogging image is obtained.

7. An iterative defogging system for real-world images, characterized in that: include: The acquisition module is configured to: acquire a haze image, input the haze image into a pre-trained encoder for processing, and extract fusion image features; The iterative defogging module is configured to: process the fused image features through a code predictor, determine the image coding sequence using the output distribution of the code predictor; evaluate the image coding sequence through a code evaluator guided by the quality sequence generated by the encoder during the pre-training process, update the fused image features based on the evaluation results and input them into the code predictor; The processing of the cyclic code predictor and the code evaluator is completed until the iteration condition is completed and the dehazed image coding sequence is obtained; The dehazed image features corresponding to the dehazed image coding sequence are input into the decoder for processing, and the dehazed image is obtained by combining the multi-scale image features generated during the encoder processing.

8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the iterative defogging method for real-world images according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the iterative defogging method for real-world images described in any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the iterative defogging method for real-world images described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Image deblurring method and device, equipment, medium and computer program product

    CN115205150A

  • Image defogging method and system based on high-quality coding dictionary prior

    CN116416151A

  • Real world image defogging method

    CN118628402A

  • Utilizing masked autoencoder generative models to extract microscopy representation autoencoder embeddings

    US12119090B1

  • Enhanced image / video quality through artifact evaluation

    US20070206871A1