Real scene severe weather image restoration method based on visual language model

By adopting semi-supervised learning of the visual language model and teacher-student network structure in severe weather image restoration, combined with pseudo-label and weather cue learning, the problems of insufficient generalization ability and neglect of semantic context in the existing technology are solved, and a better implementation is achieved. High-quality severe weather image restoration.

CN118537264AActive Publication Date: 2024-08-23SHANGHAI ARTIFICIAL INTELLIGENCE INNOVATION CENT

Patent Information

Application Number
CN202410454101.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2024-08-23
Estimated Expiration
2044-04-16

AI Technical Summary

Technical Problem

Existing severe weather image restoration techniques exhibit performance gaps and semantic context neglect in real-world applications, resulting in insufficient generalization capabilities and low restoration quality.

Method used

It adopts semi-supervised learning and teacher-student network structure based on visual language model, and trains by combining labeled synthetic images and unlabeled real-world images. It uses pseudo-labels, weather cue learning and semantic regularization loss to improve the model's performance in harsh environments. Image restoration performance under weather conditions.

Benefits of technology

It significantly improves the model's generalization ability and image recovery quality under real-world severe weather conditions, improves image clarity and semantic recovery capabilities, and enhances adaptability and accuracy under diverse weather conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537264A
    Figure CN118537264A
Patent Text Reader

Abstract

The invention relates to a visual language model-based real scene severe weather image restoration method, which adopts a novel image restoration framework based on semi-supervision and a teacher-student network, and utilizes a visual language model to enhance the image restoration performance under a real world severe weather condition. Compared with the prior art, the real world image is directly used as unmarked data, and the image restoration model is trained through the supervision signal provided by the visual language model. The problem of domain difference is solved, and the accuracy and effect of image restoration are improved by evaluating the definition and semantic information of the image. An effective training strategy is further introduced, the calculation burden is relieved, and the superiority of the method in the aspect of image restoration in severe weather in the real world compared with the prior art is shown through qualitative and quantitative comparison.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer vision and artificial intelligence, and in particular to a method for restoring a real-scene severe weather image based on a visual language model. Background Art

[0002] Images captured under adverse weather conditions are usually affected by various factors, such as raindrops, haze, and snowflakes, which can significantly degrade the quality of the images. Image restoration under adverse weather conditions is an important research direction in the field of computer vision, which aims to restore the clarity and visibility of images through various algorithms. Traditional methods usually focus on a single weather phenomenon (such as rain removal, fog removal, or snow removal) and use specific algorithms to process images captured under specific weather conditions. In recent years, researchers have tried to develop integrated solutions to handle image restoration problems under multiple adverse weather conditions through a single model. Although these methods have shown certain results on synthetic datasets, their generalization ability is limited in real-world application scenarios due to the significant domain difference between training data and actual application scenarios.

[0003] Some existing technologies use a single model to handle image restoration under multiple severe weather conditions, and achieve image restoration under different severe weather conditions through joint training and unified model weights. In addition, some methods attempt to handle image restoration under multiple weather conditions through techniques such as knowledge distillation and contrastive learning. Although these methods have made progress in image restoration under multiple severe weather conditions, they generally ignore the semantic context of the image, and most methods still rely on synthetic data for training, which limits their effectiveness in real-world applications.

[0004] In summary, there are two major problems in existing bad weather image restoration technologies: first, most existing methods are trained based on synthetic data, resulting in significant performance gaps when processing real-world scenes; second, these methods often ignore the semantic context of the scene while restoring image clarity, and fail to fully utilize the semantic information of the image to improve the restoration quality. Due to these limitations, existing technologies are difficult to effectively cope with complex and bad weather conditions in the real world, thus affecting the practicality and accuracy of image restoration models in key applications such as urban monitoring and autonomous driving. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a real scene severe weather image restoration method based on a visual language model to improve the image restoration performance in real world scenes under various severe weather conditions.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] One aspect of the present invention provides a method for restoring a real-scene severe weather image based on a visual language model, wherein a pre-trained image restoration framework is used to process an input image to achieve image restoration, wherein the training process of the image restoration framework includes:

[0008] Obtain labeled severe weather image samples and input them into the student network, based on the restored images and corresponding labels, and calculate the supervision loss;

[0009] Obtain unlabeled severe weather image samples and input them into the teacher network and the student network respectively, perform visibility evaluation using a visual language model based on the image restored by the student network, and calculate the pseudo-label loss based on the pseudo-label and the image restored by the student network.

[0010] Based on the image restored by the student network, the corresponding image embedding is calculated using the pre-trained CLIP model, and the weather prompt learning loss is calculated based on the image embedding and the text embedding of the preset sunny weather prompt vector.

[0011] Based on the image restored by the student network and the scene description of the preset unlabeled bad weather image samples under good weather conditions, the semantic regularization loss is calculated.

[0012] Compute the feature similarity loss used to align the restored images from the student network, the pseudo-labels, and the unlabeled severe weather image samples;

[0013] Based on the supervision loss, pseudo label loss, weather prompt learning loss, semantic regularization loss and feature similarity loss, the comprehensive loss is calculated to realize the training of the image restoration framework.

[0014] As a preferred technical solution, the pseudo-label generation process includes:

[0015] Before training, the visual language model is used to score the visibility of unlabeled severe weather image samples and generate pseudo labels;

[0016] During the training process, the image restored by the student network is scored for visibility using a visual language model. If the score is higher than the visibility score of the corresponding unlabeled severe weather image sample, the pseudo label is updated.

[0017] As a preferred technical solution, the pseudo-label loss The calculation is done using the following formula:

[0018]

[0019] in, They respectively represent the score and pseudo label of the visibility evaluation of the image restored by the student network using the visual language model, represents the appearance loss function.

[0020] As a preferred technical solution, the training process of the CLIP model includes:

[0021] Construct weather cue vectors for capturing imaging features related to weather conditions under four weather conditions: clear, rainy, foggy and snowy.

[0022] A weather prompt vector is initialized in the embedding space of the text encoder of the CLIP model, and reference image embeddings are extracted through the image encoder of the CLIP model using real images under different weather conditions, so as to train the CLIP model with the goal of minimizing weather classification loss.

[0023] As a preferred technical solution, the weather prompts learning loss The calculation is done using the following formula:

[0024]

[0025] Among them, cos(·,·) represents cosine similarity, Text embeddings of weather prompt vectors for four weather conditions: sunny, rainy, foggy, and snowy. Represents the image after the student network is restored Embedding.

[0026] As a preferred technical solution, the process of obtaining the scene description of the unlabeled severe weather image sample under good weather conditions includes:

[0027] For unlabeled severe weather image samples, another visual language model is used to generate negative scene descriptions describing the weather conditions of the images, and the corresponding positive scene descriptions are converted based on the negative scene descriptions.

[0028] As a preferred technical solution, the semantic regularization loss The calculation is done using the following formula:

[0029]

[0030] Among them, cos(·,·) represents cosine similarity, Represent the embeddings of the positive and negative scene descriptions of the image weather conditions, respectively. Represents the image after the student network is restored Embedding.

[0031] As a preferred technical solution, the comprehensive loss The calculation is done using the following formula:

[0032]

[0033] in, They are supervision loss, pseudo label loss, weather prompt learning loss, semantic regularization loss, and feature similarity loss. w1, w2, w3, and w4 are weighted parameters.

[0034] Another aspect of the present invention provides an electronic device, comprising: one or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the aforementioned real-scene severe weather image restoration method based on a visual language model.

[0035] Another aspect of the present invention provides a computer-readable storage medium comprising one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the aforementioned real-scene severe weather image restoration method based on a visual language model.

[0036] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0037] (1) Strong model generalization ability: By introducing an image restoration framework based on semi-supervised learning and a teacher-student network structure, and combining labeled synthetic images with unlabeled real-world images for training, the model's generalization ability under severe weather conditions in the real world is significantly improved. This solves or partially solves the problem of insufficient generalization ability caused by the existing technology's reliance on synthetic data training, enabling the model to more accurately restore severe weather images in the real world.

[0038] (2) Image restoration has strong adaptability under different weather conditions: The present invention adopts a weather prompt learning method to provide specific weather condition prompts to the visual language model, and trains the model to accurately identify and respond to image features under various weather conditions. This not only improves the restoration quality of image clarity, but also enhances the adaptability and accuracy of the model under diverse weather conditions.

[0039] (3) Strong image semantic restoration capability: The present invention implements the training of the image restoration framework based on description-assisted semantic enhancement. By converting the negative description of severe weather images into positive scene descriptions, the semantic restoration process of the image is guided. While maintaining the visual clarity of the image, the semantic content of the image distorted by weather-related noise is effectively restored, ensuring that the restored image is not only visually close to the ideal state, but also more realistic and accurate in content, which is crucial for improving the performance of downstream tasks such as object detection and semantic segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a schematic diagram of an image restoration framework in an embodiment;

[0041] Figure 2 A schematic diagram of image visibility evaluation in an embodiment;

[0042] Figure 3 A schematic diagram of weather prompt learning in the embodiment;

[0043] Figure 4 The figure is a schematic diagram for describing auxiliary semantic enhancement in the embodiment. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0045] Example 1

[0046] The existing bad weather image restoration technology has the following main disadvantages:

[0047] (1) Insufficient generalization ability: Most existing methods are trained mainly on synthetic data, which results in a significant performance gap when processing severe weather images in real-world scenarios. This method is difficult to adapt to the changing real-world conditions, limiting its practicality.

[0048] (2) Ignoring semantic information: Existing technologies have made some progress in improving the visual clarity of images, but often ignore the semantic context of restored images. This results in that although the image looks clearer, the restored image may not accurately reflect the true intention and content of the scene, affecting the comprehensiveness of the image restoration quality.

[0049] (3) Lack of effective training mechanism for real-world data: Since most existing methods rely on synthetic data, they lack effective training mechanisms for real-world data. This limits their effectiveness in practical applications because there are obvious differences between synthetic data and real-world data.

[0050] Therefore, existing methods are usually trained on synthetic images and often suffer from insufficient generalization ability when dealing with images under real-world severe weather conditions, while often ignoring weather-related semantic context, resulting in limited performance.

[0051] In view of the above shortcomings, this embodiment provides a real-scene severe weather image restoration method based on a visual language model, which adopts an image restoration framework based on semi-supervised learning and a teacher-student learning network, and uses a visual language model to improve the image restoration performance in real-world scenes under various severe weather conditions, aiming to make up for these shortcomings of the existing technology.

[0052] See also Figure 1 is a schematic diagram of the training process of the image restoration framework, which includes a trainable student network (i.e. Figure 1 The restoration network (student) in Figure 1 The teacher network is the exponential moving average of the student network. During training, the labeled data (i.e., the labeled severe weather image samples) are input into the student network, and the restored images (i.e., Figure 1 The restored values ​​(with labels) in the image are used to calculate the supervised loss. In addition, the unlabeled data (i.e., unlabeled severe weather image samples) are input into the student network and the teacher network to obtain the restored values ​​(student) and restored values ​​(teacher), respectively. Based on the restored values ​​(teacher), a visual language model is used to evaluate visibility, update the pseudo-label database, and calculate the pseudo-label loss with the restored values ​​(student). Using another visual language model, the weather cue learning loss and the semantic regularization loss (i.e., Figure 1 Finally, the parameters of the student network are trained based on the previously calculated supervision loss, pseudo-label loss, weather cue learning loss, and semantic regularization loss. The framework uses multiple visual language models (VLMs) to improve the clarity and semantic information of the image while removing weather-related noise.

[0053] This method focuses on the following aspects:

[0054] (1) Image Assessment and Pseudo-Labeling: By introducing a visual language model to comprehensively evaluate images in bad weather, this technology does not rely on traditional labeled data training. By generating high-quality pseudo labels, unlabeled real-world images can be effectively utilized, thereby improving the generalization ability and recovery performance of the model in real scenes.

[0055] To ensure high-quality pseudo-labels, a pseudo-label database is built to evaluate the restoration of severe weather images by leveraging the zero-shot capability of large visual language models. Subsequently, clear real images can be used for model training without pairing.

[0056] Image Evaluation: For real severe weather images and the corresponding predictions of weather removal methods, a key issue is how to evaluate the quality of restored images. Existing low-level image quality assessment methods mainly focus on technical distortions, including noise, blur, and compression artifacts. However, there is a case where images affected by severe weather, although free from common noise interference, have their visibility greatly reduced due to rain, fog, and snow noise. Therefore, it is particularly important to find an effective method to automatically evaluate the quality of images in the context of removing severe weather noise. This method uses a visual language model to provide prompts based on weather-related image quality issues, and quantifies the response of the visual language model into a numerical score.

[0057] like Figure 2 The figure shows a schematic diagram of image visibility evaluation. First, a conversion template is designed to ask the visual language model for its evaluation of the image. Then, a five-level rating system in the mean opinion score (MOS) study is adopted, namely, excellent, good, medium, poor, and very poor, corresponding to scores from one to five. After that, the rating r based on the visual language model is calculated by using Softmax vlm , the probabilities predicted by the visual language model over these five vocabulary tokens are converted into numerical scores. Thus, we obtain a visibility evaluation for each restored image.

[0058] Pseudo-label generation: For unlabeled severe weather image samples Assign and update pseudo labels based on image evaluation based on visual language model Select ideal pseudo-labeled images that do not contain weather-related artifacts The study found vlm Ability to obtain better pseudo-labels with fewer weather-related artifacts.

[0059] Initially, a pseudo-label database is constructed to store the current best pseudo-labels for unlabeled images. During model training, the visual language model is evaluated based on the score of image visibility, and the model's predictions and recorded pseudo-labels are evaluated. If the model achieves a better restoration effect, that is, the image restored by the student network obtains a higher quality score, the image restored by the student network is used as the updated ideal pseudo-label image, and the pseudo-label database is updated accordingly. In practice, the predictions of the teacher network are used for comparison, which is an exponential moving average of the student network. Finally, the pseudo-label loss of the online model is calculated using the updated pseudo-labels: in and are the predictions and corresponding pseudo labels, is an appearance loss of any type, such as

[0060] (2) Weather Prompt Learning: Using the weather prompt learning method, the visual language model is given specific weather condition prompts to train the model to accurately identify and respond to image features under various weather conditions. This not only improves the quality of image clarity restoration, but also enhances the adaptability and accuracy of the model under diverse weather conditions.

[0061] Leveraging the rich knowledge embedded in a large pre-trained visual language model, our framework is able to understand the concepts of images under favorable and unfavorable weather conditions. In particular, we expect the CLIP model to be able to identify the weather conditions of an image, such as sunny, rainy, foggy, or snowy. Subsequently, the learned concept of “clarity” is used to guide model learning to achieve clear restoration. To enhance CLIP’s ability to accurately distinguish weather conditions in multiple scenarios, a cue learning approach is used to obtain cue embeddings for image features for each weather condition, such as Figure 3 As shown in the figure, (a) is a schematic diagram of the cue representation learning process, and (b) is a schematic diagram of the restoration model optimization process. It should be noted that specific weather cues are used for learning in this method. As an alternative, more diverse weather condition cues can be introduced, or dynamically generated cues can be used to adapt to a wider range of weather scenarios and image features.

[0062] Hint Embedding Learning: See Figure 3 In (a), the CLIP model integrates image and text encoders in a shared feature space and demonstrates excellent performance in visual classification of natural language. Instead of relying on labor-intensive and error-prone prompt engineering, such as hand-crafted text prompts such as "raining" or "a photo of rain", we use a set of four weather prompts {t c ,t r ,t h ,t s} as a learnable vector. These different contextual cues capture the imaging features relevant to each weather condition.

[0063] Initialize weather reminder In the embedding space of the CLIP text encoder. At the same time, real images y under different weather conditions (sunny, rainy, foggy, snowy) are collected to extract reference image embeddings through the CLIP image encoder. The training goal is to minimize the classification loss, i.e., the cross entropy loss, by classifying weather cues into their respective weather categories c: p(c=i|y)=σ(z i ), σ represents the Softmax function, and cos(·,·) represents the cos similarity.

[0064] Restoration model optimization: see Figure 3 (b) in Fig. 1 uses the knowledge gained from the learned weather cues to guide the training of the restoration model to generate images with enhanced clarity. Specifically, during the restoration model optimization stage, the weather cue learning loss Maximize the model prediction to restore the image (i.e., the predicted output of the student network, corresponding to Figure 1 Image embedding of the restored value (Student) Text embed with sunny weather reminder The similarity between .

[0065]

[0066] The knowledge gained from the learned weather cues guides the training of the restoration model to generate images with better clarity. In this stage, the restored image is maximized by maximizing the model's predicted The similarity between the image embedding of and the text embedding of the clear weather prompt to optimize the weather prompt learning loss

[0067] In preliminary studies, only The model's predictions are optimized to reduce weather-related artifacts, but the resulting images exhibit significant noise. It is assumed that there is a feasible solution in the space of minimizing the weather cue learning loss. To address this issue and enhance the regularization of the model learning, a feature similarity loss is used. To compare the model's predictions with the pseudo labels y ps and input x u Alignment. This method uses the Depth Anything visual encoder for feature extraction to ensure robustness in a variety of scenarios.

[0068] (3) Description-assist Semantic Enhancement: By leveraging the text generation capability of the visual language model, the negative descriptions of bad weather images are converted into positive scene descriptions to guide the semantic restoration process of the image. This highlights that while maintaining the visual clarity of the image, the semantic content of the image can also be effectively restored, ensuring that the restored image is not only visually close to the ideal state, but also more realistic and accurate in content.

[0069] Restoring images under severe weather conditions requires not only improving image clarity, but also restoring image semantics distorted by weather-related noise, which is crucial to improving the effectiveness of downstream tasks. Existing image restoration methods trained on synthetic data often ignore the potential of restoring image semantics. Therefore, in this method, we introduce a method that leverages the image-text understanding capabilities of a large visual language model to enhance the semantics of severe weather image restoration.

[0070] When restoring images with impaired quality, the task becomes challenging due to the inherently ill-characterized nature of image restoration tasks. In contrast, describing the appearance and content of severe weather images using natural language is relatively straightforward. In this approach, visual language models (VLMs) are first used to provide natural language descriptions of severe weather images that contain rich semantic information about the scene and weather conditions. Figure 4 As shown in the figure, (a) is the semantic loss calculation process, and (b) is the negative description-positive description conversion process. For a given input image, VLM is used to generate a (negative) caption describing the weather conditions of the image. For example, "A person is walking along the street in the heavy rain..." describes a scene containing the object "person" in rainy weather. The description also provides additional environmental context, such as the surrounding environment "street". This textual information, together with the image, provides a more intuitive high-level understanding of the scene.

[0071] Subsequently, the negative scene descriptions d are associated with the quality-impaired images under bad weather conditions. neg Converted to a pseudo-legible representation. Generate a positive description corresponding to the restored image by prompting the Large Language Model (LLMs) pos For example, given the negative description of bad weather above, we can imagine its positive, clear restored image, such as, “The weather looks good. A person is walking…” Intuitively, d pos and d neg There should be similar descriptions of image content such as objects and environment, but different descriptions of weather and visibility, i.e. good weather and bad weather. pos and d neg Customized for a specific image. To do this, see Figure 4 (b) Using large VLMs, such as LLaVA, to generate d neg . Then, by prompting LLMs, such as Llama, to generate d pos .

[0072] The model training incorporates semantic-aware regularization to encourage predictions to be consistent with positive descriptions indicating good weather conditions. Given positive and negative descriptions, a description-assisted semantic regularization loss is constructed.

[0073]

[0074] It should be noted that the semantic enhancement assisted by the description in this method can be further expanded through more complex natural language processing techniques, such as introducing sentiment analysis to evaluate the impact of weather on the scene atmosphere, or using knowledge graphs to enrich the semantic understanding of image content.

[0075] In initial experiments, we observed that LLMs occasionally have difficulty generating content-invariant descriptions of weather changes. To address this issue, we manually labeled some examples of negative to positive description transitions and introduced them into the context learning method. Finally, the total loss is the supervised appearance loss Semi-supervised pseudo-label loss Weather Tips Loss Description-assisted semantic loss and feature similarity loss A weighted combination of where w1,w2,w3,w4 are weighted parameters used to balance the loss value:

[0076]

[0077] Based on the above comprehensive loss Implement the network parameter update of the student network. It should be noted that the loss function is not fixed in the above formula. Alternative solutions include exploring new loss function combinations or automatic methods to adjust the weights of loss items to achieve more optimized training results.

[0078] The combination of the above technologies not only significantly improves the quality of image restoration under severe weather conditions, but also ensures the accuracy and richness of semantic information in the image restoration process, so that this method shows superior performance in both image clarity and semantic restoration, fully meeting the needs of high-quality image restoration in real-world applications.

[0079] During the prediction process, the pre-trained student network is used to process the input real-scene severe weather images to obtain the restored images.

[0080] In order to verify the effectiveness of this method, feasibility verification was carried out through experiments and user research, and the results showed the superiority and practicality of this technical solution. Specifically:

[0081] Quantitative comparison: Our method is compared with several state-of-the-art all-around bad weather image restoration methods, including Restormer, TransWeather, TKL, WeatherDiff, WGWS-Net, MWDT, PromptIR, and DA-CLIP. Multiple no-reference image quality evaluation metrics are used for quantitative evaluation, including NIMA, MUSIQ, CLIP-IQA, LIQE, and Q-Align, as well as the proposed visual language model-based image visibility assessment method VLM-Vis. Our method ranks first on average across all image quality assessment metrics and performs best in almost all weather conditions. In addition, our method achieves the best VLM-Vis scores under different weather conditions. These results demonstrate the superiority of our method on real data over existing state-of-the-art bad weather image restoration methods, which mainly focus on synthetic data evaluation.

[0082] Qualitative comparison: A qualitative evaluation is conducted on a real-world evaluation dataset. Compared with other methods, our method is more effective in processing real-world severe weather images, especially in reducing rain, fog, and snow artifacts. It is worth noting that our method effectively removes fog effects in rainy and snowy scenes, significantly improving image visibility.

[0083] User Study: A user study was conducted to evaluate the visual quality. Ten real-world images were randomly selected for each weather scenario for comparison. A total of 32 participants were invited for the evaluation, half of whom had relevant image processing experience. Two factors were considered, namely, visibility and quality of the image, focusing on the degree of removal of weather-related artifacts and the authenticity of the restored image. Overall, the proposed method showed a clear advantage over other competing methods in terms of visibility and quality under different weather conditions.

[0084] In summary, through a series of experiments and user studies, this method has demonstrated its feasibility and effectiveness in improving the image restoration performance under adverse weather conditions, especially in improving image clarity, semantic restoration, and its superiority in real-world application scenarios.

[0085] In summary, compared with the prior art, this method has at least one of the following advantages:

[0086] (1) Improved generalization ability: The semi-supervised learning framework used uses labeled synthetic images and unlabeled real-world images. By combining labeled synthetic images and unlabeled real-world images for training, the model's generalization ability and image restoration performance under real-world severe weather conditions are significantly improved. This solves or partially solves the problem of insufficient generalization ability caused by the existing technology relying on synthetic data training, allowing the model to more accurately restore severe weather images in the real world.

[0087] (2) Ability to remove weather-related noise: By learning specific weather condition cue embeddings through the visual language model, the model’s ability to recognize and process image features under different weather conditions is enhanced, thereby improving image clarity and the effect of removing weather-related noise.

[0088] (3) Enhanced image semantic restoration: The visual language model is used to generate natural language descriptions of severe weather images and convert them into positive descriptions of clear weather conditions to guide the image semantic restoration process, effectively restoring the image semantic content distorted by weather-related noise. This is often overlooked in existing technologies, especially in preserving and restoring the semantic information of images while restoring image clarity, which is crucial for improving the performance of downstream tasks such as object detection and semantic segmentation.

[0089] (4) Optimizing training efficiency and effect: Through image evaluation and pseudo-label generation technology, unlabeled real-world images can be effectively used for model training. At the same time, through iterative training and model optimization strategies, the model parameters are continuously fine-tuned to further improve the quality and accuracy of the restored images.

[0090] (5) Improve user experience: By improving the clarity and semantic accuracy of the image, the visual quality of the restored image is significantly improved, providing users with a more satisfactory visual experience.

[0091] In summary, through its unique technical solution, this method not only technically solves the limitations of the existing technology, but also brings significant improvements in application effects, including improved efficiency, reduced costs, and enhanced user experience, showing superior performance and application value over existing technologies.

[0092] It should be noted that although specific visual language models (such as CLIP and LLaVA) are used in this method, other existing or future developed visual language models can be considered as alternatives to adapt to different image restoration requirements and optimization objectives.

[0093] This method is not limited to bad weather image restoration, but can also be used for:

[0094] In other types of image restoration tasks: In addition to severe weather image restoration, this technical solution can also be applied to other types of image restoration tasks, such as low-light image enhancement, image denoising, super-resolution, etc.

[0095] Video restoration and enhancement: This technical solution is extended to the video field to restore and enhance videos captured under adverse weather conditions to improve video quality and visibility.

[0096] Augmented Reality (AR): In AR applications, improving the visual quality and realism of the virtual environment is a major challenge. This technical solution can be used to enhance the image quality in the environment and provide a more immersive user experience.

[0097] Example 2

[0098] This embodiment provides an electronic device, including: one or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the real scene severe weather image restoration method based on the visual language model as described in Example 1.

[0099] Example 3

[0100] This embodiment provides a computer-readable storage medium, including one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the real-scene severe weather image restoration method based on a visual language model as described in Example 1.

[0101] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for restoring a real scene severe weather image based on a visual language model, characterized in that: The input image is processed using a pre-trained image restoration framework to restore the image, wherein the training process of the image restoration framework includes: Obtain labeled severe weather image samples and input them into the student network, and calculate the supervision loss based on the restored images and corresponding labels; Obtain unlabeled severe weather image samples and input them into the teacher network and the student network respectively, perform visibility evaluation using a visual language model based on the image restored by the student network, and calculate the pseudo-label loss based on the pseudo-label and the image restored by the student network. Based on the image restored by the student network, the corresponding image embedding is calculated using the pre-trained CLIP model, and the weather prompt learning loss is calculated based on the image embedding and the text embedding of the preset sunny weather prompt vector. Based on the image restored by the student network and the scene description of the preset unlabeled bad weather image samples under good weather conditions, the semantic regularization loss is calculated. Compute the feature similarity loss used to align the restored images from the student network, the pseudo-labels, and the unlabeled severe weather image samples; Based on the supervision loss, pseudo label loss, weather prompt learning loss, semantic regularization loss and feature similarity loss, the comprehensive loss is calculated to realize the training of the image restoration framework.

2. According to claim 1, a method for restoring a real scene severe weather image based on a visual language model is characterized in that: The pseudo-label generation process includes: Before training, the visual language model is used to score the visibility of unlabeled severe weather image samples and generate pseudo labels; During the training process, the image restored by the student network is scored for visibility using a visual language model. If the score is higher than the visibility score of the corresponding unlabeled severe weather image sample, the pseudo label is updated.

3. The method for restoring a real scene severe weather image based on a visual language model according to claim 1, characterized in that: The pseudo-label loss The calculation is done using the following formula: in, They respectively represent the score and pseudo label of the visibility evaluation of the image restored by the student network using the visual language model, represents the appearance loss function.

4. The method for restoring a real scene severe weather image based on a visual language model according to claim 1, characterized in that: The training process of the CLIP model includes: Construct weather cue vectors for capturing imaging features related to weather conditions under four weather conditions: clear, rainy, foggy and snowy. A weather prompt vector is initialized in the embedding space of the text encoder of the CLIP model, and reference image embeddings are extracted through the image encoder of the CLIP model using real images under different weather conditions, so as to train the CLIP model with the goal of minimizing weather classification loss.

5. The method for restoring a real scene severe weather image based on a visual language model according to claim 1, characterized in that: Weather Tips for Learning Loss The calculation is done using the following formula: Among them, cos(·,·) represents cosine similarity, Text embeddings of weather prompt vectors for four weather conditions: sunny, rainy, foggy, and snowy. Represents the image after the student network is restored Embedding.

6. The method for restoring a real scene severe weather image based on a visual language model according to claim 1, characterized in that: The process of obtaining the scene description of the unlabeled bad weather image sample under good weather conditions includes: For unlabeled severe weather image samples, another visual language model is used to generate negative scene descriptions describing the weather conditions of the images, and the corresponding positive scene descriptions are converted based on the negative scene descriptions.

7. The method for restoring a real scene severe weather image based on a visual language model according to claim 1, characterized in that: The semantic regularization loss The calculation is done using the following formula: Among them, cos(·,·) represents cosine similarity, Represent the embeddings of the positive and negative scene descriptions of the image weather conditions, respectively. Represents the image after the student network is restored Embedding.

8. The method for restoring a real scene severe weather image based on a visual language model according to claim 1, characterized in that: The comprehensive loss The calculation is done using the following formula: in, They are supervision loss, pseudo label loss, weather prompt learning loss, semantic regularization loss, and feature similarity loss. w1, w2, w3, and w4 are weighted parameters.

9. An electronic device, characterized in that: include: One or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the real scene severe weather image restoration method based on the visual language model as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: It includes one or more programs for execution by one or more processors of an electronic device, and the one or more programs include instructions for executing the real scene severe weather image restoration method based on a visual language model as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Image restoration method under various severe weather conditions

    CN116681615A

  • Non-ideal supervision-based severe weather image restoration system

    CN117391969A

  • Sand and dust image restoration method based on visual attention mechanism

    CN117689548A

  • Mutual learning-based semi-supervised medical image segmentation method and system

    WO2023116635A1

Cited By

  • Image restoration method and device, electronic equipment and storage medium

    CN119251072A

  • Image restoration method and related equipment

    CN119313577A

  • Model training method, image perception method, device and related equipment

    CN120526292A

  • Mine complex environment content understanding-based less-label quality evaluation method and system

    CN120526428A

  • Zero-sample semantic segmentation map construction method combining road visual language model and dynamic object

    CN120747503A