Image processing method, weather image restoration method, and image data processing method

By using the preset mapping relationship to map the initial image and reconstruct the sample image set, the problem of 'forgetting' in the image processing model during the training process is solved, achieving more efficient image processing and reducing storage costs.

WO2024212997A1PCT designated stage expired Publication Date: 2024-10-17HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD

Patent Information

Application Number
PCT/CN2024/086998
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-14
Filing Date
2024-04-10
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

Existing image processing models are prone to 'forgetting' during the training process, causing the model to lose comprehensiveness and accuracy in new training tasks. Moreover, due to the need to store a large number of historical images in advance, data storage costs are increased and processing efficiency is reduced. .

Method used

By using the preset mapping relationship to map the initial image and reconstruct the sample image set, it avoids storing a large number of historical images in advance and enables the image processing model to learn current knowledge in the current training task and memorize historical knowledge at the same time.

Benefits of technology

It reduces storage costs, improves the comprehensiveness and accuracy of the image processing model, improves training efficiency, and avoids the model's 'forgetting' phenomenon in new tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024086998_17102024_PF_FP_ABST
    Figure CN2024086998_17102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present description are an image processing method, a weather image restoration method, and an image data processing method. The image processing method comprises: acquiring an image to be processed; and inputting said image into an image processing model, so as to obtain a target image, wherein the image processing model is obtained by means of performing training by using a sample image set, which is obtained by means of performing image mapping on at least one initial image in an initial image set by using a preset mapping relationship, the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used for training the image processing model in advance. On the basis of a predetermined mapping relationship between a historical source image and a historical target image, features of a historical image are restored, the storage of a large number of historical images is avoided, and a sample image set that includes the current knowledge and historical knowledge is obtained for training an image processing model, thereby ensuring the comprehensiveness and accuracy of image processing, reducing the storage cost, and improving the processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing, weather image restoration, and image data processing methods

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 14, 2023, with application number 202310419136.5 and invention name “Image processing, weather image restoration and image data processing method”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of this specification relate to the field of computer technology, and in particular to an image processing method. Background Art

[0003] Image processing models are primarily trained using sample image sets. Models continuously learn and update their functionality through iterative training, but new training often causes historical knowledge to be forgotten. Therefore, by sampling historical images and adding them to the current training sample image set, the sample image set is reconstructed, allowing for more comprehensive and accurate model training. This allows the trained image processing model to learn current knowledge while also retaining historical knowledge, resulting in a more comprehensive and accurate image processing model.

[0004] However, sampling historical images and reconstructing the current training sample image set requires pre-storing a large number of historical images. Given the huge number of training samples for the image processing model, pre-storing and always retaining a large number of historical images increases the storage cost of the data and reduces processing efficiency. Therefore, a comprehensive, accurate, low-storage-cost and efficient image processing method is urgently needed.

[0005] Summary of the Invention

[0006] In view of this, embodiments of this specification provide an image processing method. One or more embodiments of this specification also relate to another image processing method, a weather image restoration method, an image data processing method, an image processing device, another image processing device, a weather image restoration device, an image data processing device, a computing device, a computer-readable storage medium, and a computer program to address technical deficiencies in related technologies.

[0007] According to a first aspect of an embodiment of this specification, there is provided an image processing method, comprising: acquiring an image to be processed; inputting the image to be processed into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, the sample image set is obtained by performing image mapping on at least one initial image in an initial image set using a preset mapping relationship, the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model.

[0008] According to a second aspect of an embodiment of this specification, there is provided an image processing method, which is applied to a server, and includes: receiving an image processing request sent by a client, wherein the image processing request carries an image to be processed; inputting the image to be processed into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model; and feeding back the target image to the client so that the client renders the target image.

[0009] According to a third aspect of the embodiments of this specification, a weather image restoration method is provided, including: obtaining a weather image to be restored; inputting the weather image to be restored into an image restoration model to obtain a target weather image, wherein the image restoration model is trained using a sample weather image set, and the sample weather image set is obtained by performing image mapping on at least one initial sample weather image in the initial weather image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between historical source weather images and historical target weather images, and the historical source weather images and historical target weather images are used to pre-train the image restoration model.

[0010] According to a fourth aspect of the embodiments of this specification, there is provided an image data processing method, which is applied to a cloud-side device, and includes: obtaining an initial image set, wherein the initial image set includes multiple initial images; using a preset mapping relationship, performing image mapping on at least one initial image in the initial image set to obtain a sample image set, wherein the initial image is an initial source image or an initial target image; using the sample image set, training an image processing model to obtain a trained image processing model; and sending model parameters of the trained image processing model to an end-side device.

[0011] According to a fifth aspect of the embodiments of this specification, an image processing device is provided, including: a first acquisition module, configured to acquire an image to be processed; a first processing module, configured to input the image to be processed into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model.

[0012] According to the sixth aspect of the embodiments of this specification, there is provided an image processing device, which is applied to a server, and includes: a receiving module, configured to receive an image processing request sent by a client, wherein the image processing request carries an image to be processed; a second processing module, configured to input the image to be processed into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model; and a feedback module, configured to feed back the target image to the client, so that the client renders the target image.

[0013] According to the seventh aspect of the embodiments of this specification, a weather image restoration device is provided, including: a second acquisition module, configured to acquire a weather image to be restored; a restoration module, configured to input the weather image to be restored into an image restoration model to obtain a target weather image, wherein the image restoration model is trained using a sample weather image set, and the sample weather image set is obtained by performing image mapping on at least one initial sample weather image in the initial weather image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between historical source weather images and historical target weather images, and the historical source weather images and historical target weather images are used for pre-training the image restoration model.

[0014] According to an eighth aspect of the embodiments of this specification, there is provided an image data processing apparatus, which is applied to a cloud-side device and includes: a third acquisition module, configured to acquire an initial image set, wherein the initial image set includes multiple initial images; a mapping module, configured to perform image mapping on at least one initial image in the initial image set using a preset mapping relationship to obtain a sample image set, wherein the initial image is an initial source image or an initial target image; a first training module, configured to train an image processing model using the sample image set to obtain a trained image processing model; and a sending module, configured to send model parameters of the trained image processing model to an end-side device.

[0015] According to the ninth aspect of the embodiments of this specification, a computing device is provided, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned image processing method, weather image repair method or image data processing method.

[0016] According to the tenth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned image processing, weather image restoration or image data processing method.

[0017] According to the eleventh aspect of the embodiments of this specification, a computer program is provided, wherein, when the computer program is executed in a computer, the computer is caused to perform the steps of the above-mentioned image processing, weather image restoration or image data processing method. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in this application and should not be construed as limiting the scope of this application.

[0019] FIG1 shows a flowchart of an image processing method provided by an embodiment of this specification.

[0020] FIG2 shows a flowchart of another image processing method provided by an embodiment of this specification.

[0021] FIG3 shows a flow chart of a weather image restoration method provided by an embodiment of this specification.

[0022] FIG4 shows a flowchart of an image data processing method provided by an embodiment of this specification.

[0023] FIG5 shows a flow chart of an image processing method provided by an embodiment of this specification.

[0024] FIG6 shows a schematic diagram of a front-end interface of an image processing method provided by an embodiment of this specification.

[0025] FIG7 shows a flowchart of a processing process of an image processing method for restoring road images in severe weather conditions, provided by one embodiment of this specification.

[0026] FIG8 shows a schematic structural diagram of an image processing device provided by an embodiment of this specification.

[0027] FIG9 shows a schematic structural diagram of another image processing device provided by an embodiment of this specification.

[0028] FIG10 shows a schematic structural diagram of a weather image restoration device provided by an embodiment of this specification.

[0029] FIG11 shows a schematic structural diagram of an image data processing device provided by an embodiment of this specification.

[0030] FIG12 shows a structural block diagram of a computing device provided in one embodiment of this specification. DETAILED DESCRIPTION

[0031] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0032] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0033] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0034] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0035] First, the terms involved in one or more embodiments of this specification are explained.

[0036] Bayes Theorem: A probability conversion law used to describe the relationship between two conditional probabilities, specifically P(A|B)=P(B|A)*P(A) / P(B).

[0037] Gaussian distribution: Also known as normal distribution, if the random variable X follows a normal distribution with mathematical expectation μ and variance σ², denoted as N(μ, σ²). Its probability density function is: The expected value μ of the normal distribution determines its location, and its standard deviation σ determines the distribution's amplitude. When μ = 0 and σ = 1, the normal distribution is called the standard normal distribution.

[0038] Laplace Approximation: Use a Gaussian distribution to approximate a complex distribution. The solution process is the process of finding the expectation μ and variance σ2 of the normal distribution.

[0039] Monte Carlo Method: Also known as statistical simulation or statistical experiment, this method is a numerical simulation method that studies probabilistic phenomena. It is a computational method that uses sampling surveys to obtain statistical values ​​to estimate unknown characteristic quantities.

[0040] Jensen's Inequality: An inequality that describes the relationship between the value of an integral of a convex function and the value of the integral of a convex function.

[0041] Fisher Information Matrix: The Fisher Information Matrix generalizes the Fisher Information Quantity from a single parameter to multiple parameters. The Fisher Information Quantity represents the average amount of information that a sample of a random variable can provide about the state parameter in a certain sense.

[0042] CNN (Convolutional Neural Networks): A multi-convolutional neural network model with forward propagation and backpropagation.

[0043] VAE (Variational Auto-Encoder) model: a probabilistic model based on variational inference (Variational Inference, Variational Bayesian Methods), a neural network model with image generation capabilities.

[0044] GAN (Generative Adversarial Network) model: A neural network model for image generation, consisting of a generator and a discriminator. By training the generator and discriminator alternately, a highly accurate generator is obtained to generate images.

[0045] Diffusion model: an image generation model that uses a forward process (noise addition) and a backward process (denoising).

[0046] Currently, image processing models are trained by learning from a large number of historical images, and then using the generated empirical knowledge to guide the training of image processing models. However, effectively learning knowledge in a manner similar to human learning remains difficult. In particular, when training image processing models on a new training task using a completely new set of sample images, the image processing models can experience "forgetting" after continuous learning. This means that the image processing models learn current knowledge from the new sample image set, but this knowledge interferes with previously learned historical knowledge. This "forgetting" phenomenon is similar to human forgetting, but the degree of forgetting exceeds that of humans. As a result, image processing models trained on new tasks lose comprehensiveness and accuracy. For example, if an image processing model is used for image restoration, the i-th training round tests the model's restoration capabilities for rainy images, while the i+1th training round tests the model's restoration capabilities for snowy images. The i+1th training round interferes with the model's restoration capabilities for rainy images.

[0047] To address the "forgetting" problem in image processing models, it's necessary to reconstruct the sample image set for each training task, ensuring that the trained image processing model not only "learns" the current knowledge in the current training task but also "reviews and consolidates" historical knowledge. However, there are currently two approaches to addressing this "forgetting" phenomenon in image processing models. One approach is to construct a new sample image set from all historical images and current images. For example, if there are 1 million historical images and 100,000 current images, these 1.1 million images can be used to construct the sample image set for the current training task. This approach consumes a significant amount of time, resulting in inefficient model training. Another approach is to sample historical images and mix them with current images to create the sample image set for the current training task, which is then used to train the image processing model. For example, if there are 1 million historical images, 50,000 images can be sampled from these, and there are 100,000 current images. These 150,000 images can be used to construct the sample image set for the current training task. In this way, as subsequent model functions are continuously updated, the number of historical images that need to be pre-stored continues to increase, and a large number of historical images need to be stored all the time for updating future new functions, which increases the storage cost of data and reduces processing efficiency.

[0048] In response to the above problems, this specification provides an image processing method. This specification also involves another image processing method, a weather image repair method, an image data processing method, an image processing device, another image processing device, a weather image repair device, an image data processing device, a computing device, a computer-readable storage medium and a computer program, which are described in detail one by one in the following embodiments.

[0049] Referring to FIG. 1 , FIG. 1 shows a flow chart of an image processing method provided according to an embodiment of the present specification, including the following specific steps 102 to 104 .

[0050] Step 102: Acquire an image to be processed.

[0051] The embodiments of this specification are applied to clients and / or servers of applications, web pages, or mini-programs with image processing capabilities. Such clients and / or servers are equipped with image processing models to implement these image processing functions. These image processing functions include, but are not limited to, image restoration, image super-resolution, image denoising, and image style transfer.

[0052] The image to be processed is a visual image to be processed. It can be a real image captured by an image acquisition device, such as a photo, a video frame, a remote sensing image, etc., or it can be an artificially generated image, such as a picture, an animation, etc. It can also be a virtual image generated by an image generation algorithm, such as a picture, an animation, etc., which is not limited here.

[0053] Obtaining the image to be processed can involve receiving the image to be processed from a client, for example, receiving the image to be processed uploaded by a user through an application front-end interface on a mobile terminal. Alternatively, the image to be processed can be obtained from an image database, including local and remote databases, such as open source databases and cloud databases, where video images of area A recorded over the past 24 hours are obtained from the cloud database. Alternatively, the image to be processed can be received from an image acquisition device, for example, image sensors in four locations on a car sending captured images to a server-side application for image stitching in an onboard computer, where the server-side stitches the captured images from the four locations to obtain an image of the car's surroundings. This is not limited to the examples provided herein.

[0054] Exemplarily, 100 road images ARoad.Image_j (j∈[1, 100]) of Road A in rainy weather within 24 hours are obtained from a local database, where the 100 road images are photos of Road A within 24 hours.

[0055] Obtaining the image to be processed provides an image basis for subsequent image processing.

[0056] Step 104: Input the image to be processed into the image processing model to obtain the target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model.

[0057] Image processing models are neural network models with image processing capabilities. These models are categorized by processing function, including but not limited to image restoration models, image super-resolution models, image denoising models, and image style transfer models. Model structure also includes but is not limited to CNN models, VAE models, GAN models, and Diffusion models. Image processing models are those trained using the current training task. The current training task is the training task that resulted in the current image processing model. Historical training tasks are the training tasks for image processing models that occurred before the current training task.

[0058] The target image is a visual image obtained by performing image processing on the image to be processed. For example, if the image to be processed is a low-resolution visual image and the image processing is image super-resolution, the target image is a high-resolution visual image. For example, if the image to be processed contains an anime-style image and the image processing is style transfer recognition, the target image is a realistic style image.

[0059] The sample image set is a collection of reconstructed sample images for the current training task. The sample image set includes multiple sample images. Sample images are target sample images for the current training task. Based on image source, sample images are divided into initial images for the current training task and historical feature images obtained through image mapping. Initial images are the initial sample images for the current training task. Historical feature images are mapped images that contain features from historical images and can be considered a type of generated sample image. For example, a sample image set contains 100,000 initial images. Image mapping is performed on 40,000 of these initial images, resulting in 40,000 historical feature images. The resulting sample image set consists of 60,000 initial images and 40,000 historical feature images. Based on image function, sample images are divided into sample source images and sample target images corresponding to the sample source images. Sample source images are training sample images for the current training task. Sample target images are labeled sample images for the current training task. The sample source image is used as input into the image processing model in the current training task to obtain the corresponding predicted image. Based on the sample target image and the predicted image, a loss value is determined to adjust the model parameters of the image processing model. The sample image set can be understood as a comprehensive and accurate knowledge set that includes both current and historical knowledge.

[0060] The historical source images and historical target images are historical images from the historical image set. The historical source images are training sample images from the historical training tasks. The historical target images are labeled sample images from the historical training tasks. The historical source images are input into the image processing model during the historical training tasks to obtain the historical predicted images corresponding to the historical source images. Based on the historical target images and the historical predicted images, a loss value is determined to adjust the model parameters of the image processing model.

[0061] The preset mapping relationship is the mapping relationship between the historical source image and the historical target image, which is a quantifiable feature mapping relationship. For example, the image feature of the historical source image is X, and the image feature of the historical target image is Y. but Characterized as a preset mapping relationship, image mapping can be understood as a way of converting image features, and a preset mapping relationship can be understood as a quantifiable feature conversion function. Moreover, the preset mapping relationship is a directional mapping relationship, and the inverse mapping of the preset mapping relationship is also a preset mapping relationship. For example, the image feature of the historical source image is X, and the image feature of the historical target image is Y. It also represents the preset mapping relationship. For example, the historical source image is a low-resolution visual image, the historical target image is a high-resolution visual image, and the function of predicting the chromaticity value of each pixel is If realized, and The preset mapping relationship can be pre-extracted or extracted during image processing. During the current training task, if the preset mapping relationship is pre-extracted, the preset mapping relationship is read from the hard disk and written to the memory cache. During the current training task, if the preset mapping relationship is extracted during image processing, the extracted preset mapping relationship is written to the memory cache.

[0062] The image to be processed is input into the image processing model to obtain the target image. The specific method is: the image to be processed is input into the image processing model, and image processing is performed on the image to be processed to obtain the target image.

[0063] Exemplarily, 100 road images ARoad.Image_j (j∈[1, 100]) are input into the image restoration model, and image restoration is performed on the 100 road images of road A to obtain 100 road restoration images ARoad.TargetImage_j (j∈[1, 100]) of road A with raindrops removed from the images.

[0064] In an embodiment of the present specification, an image to be processed is obtained, and the image to be processed is input into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model. Based on the pre-determined preset mapping relationship between the historical source image and the historical target image, the pre-storage of a large number of historical images is avoided. In the process of training the image processing model, the features of the historical images are restored using the preset mapping relationship, and a sample image set containing current knowledge and historical knowledge is obtained. The image processing model is trained to obtain a more comprehensive and accurate image processing model, which reduces storage costs and improves processing efficiency while ensuring the comprehensiveness and accuracy of image processing.

[0065] In one embodiment of the present specification, before step 104, the following specific steps are also included: obtaining an initial image set, wherein the initial image set includes multiple initial images; using a preset mapping relationship, performing image mapping on at least one initial image in the initial image set to obtain a sample image set, wherein the initial image is an initial source image or an initial target image; using the sample image set, training an image processing model to obtain a trained image processing model.

[0066] The initial image set is a collection of initial sample images for the current training task. The initial image set includes multiple initial images. These initial images are the initial sample images for the current training task. Based on image function, the initial images are divided into initial source images and initial target images. Initial source images are the initial training sample images for the current training task. Initial target images are the initial labeled sample images for the current training task.

[0067] Obtaining the initial image set involves obtaining initial images from an image library to construct the initial image set. The image library may be an open source image library, a historical project database, or a combination of the two, which is not limited here.

[0068] Using a preset mapping relationship, image mapping is performed on at least one initial image in the initial image set to obtain a sample image set. Specifically, the preset mapping relationship is used to perform image mapping on at least one initial image in the initial image set to obtain a historical feature image, and the historical feature image and the initial image that has not been image mapped are determined as the sample image set. In one embodiment, using a preset mapping relationship, image mapping is performed on at least one initial source image in the initial image set to obtain a historical feature target image. Using a preset mapping relationship, image mapping is performed on at least one initial target image in the initial image set to obtain a historical feature source image, and the historical feature source image, the historical feature target image, and the initial image that has not been image mapped are determined as the sample image set. The historical feature image is a mapped image that characterizes the image features of the historical image, including a mapped image that characterizes the image features of the historical source image and a mapped image that characterizes the image features of the historical target image. It should be noted that the characterized image features are overall image features that characterize each historical training task, not image features of a specific historical image. For example, if the historical target image is a denoised historical image, the historical target image features are the overall image features of the denoised image.

[0069] The image processing model is trained using the sample image set to obtain a trained image processing model. Specifically, the image processing model is supervised trained using sample source images and sample target images in the sample image set to obtain a trained image processing model. In one embodiment, the sample source image is input into the image processing model to obtain a predicted image. A loss value is determined based on the predicted image and the sample target image. Model parameters of the image processing model are adjusted based on the loss value. When a preset training end condition is met, the trained image processing model is obtained.

[0070] It should be noted that after completing the training of the image processing model, the sample image set is determined as the historical image set, the mapping relationships between the sample images are extracted, and added to the preset mapping relationship set for storage for subsequent iterative updates.

[0071] For example, 100,000 initial weather images (X i+1 , Y i+1 ), construct the initial weather image set. Using the pre-extracted preset mapping relationship For the 20,000 initial source weather images X in the initial weather image set i+1 Perform image mapping to obtain 20,000 historical feature target weather images Y i ′, using the preset mapping relationship For the 20,000 initial target weather images Y in the initial weather image set i+1Perform image mapping to obtain 20,000 historical feature source weather images X i ′, 20,000 historical feature source weather images X i ′, 20,000 historical feature target weather images Y i ′ and 60,000 initial weather images without image mapping (X i+1 , Y i+1 ) is determined as the sample weather image set. The image restoration model is supervised and trained using the sample source weather images and the sample target weather images in the sample weather image set to obtain a trained image restoration model.

[0072] In the embodiments of the present specification, based on the preset mapping relationship between the historical source image and the historical target image, the pre-storage of a large number of historical images is avoided. In the process of training the image processing model, the preset mapping relationship is used to perform image mapping on at least one initial image in the initial image set, and the features of the historical image are restored. A sample image set containing current knowledge and historical knowledge is obtained, and the image processing model is trained to obtain a more comprehensive and accurate image processing model, which reduces storage costs and improves training efficiency.

[0073] In one embodiment of the present specification, before performing image mapping on at least one initial image in the initial image set using a preset mapping relationship to obtain a sample image set, the following specific steps are also included: obtaining a historical image set, wherein the historical image set includes historical source images and historical target images; extracting the mapping relationship between the historical source image and the historical target image to obtain a preset mapping relationship.

[0074] A historical image set is a collection of historical sample images used for historical training tasks. It includes multiple historical images. Historical images are historical sample images used for historical training tasks. Based on image function, historical images are divided into historical source images and historical target images. Historical source images are historical training sample images from historical training tasks. Historical target images are historical labeled sample images from historical training tasks.

[0075] Obtaining a historical image set involves obtaining historical images that have completed historical training tasks from a historical sample image library for model training, and constructing a historical image set.

[0076] The mapping relationship between the historical source image and the historical target image is extracted to obtain a preset mapping relationship. The specific method is: using the mapping relationship extraction model to extract the feature mapping relationship between the image features of the historical source image and the image features of the historical target image to obtain the preset mapping relationship. Among them, the mapping relationship extraction model is a neural network model with the function of extracting the feature mapping relationship between two image features, which can quantify the mapping relationship between the abstract two images into a feature mapping relationship between image features. It should be noted that due to the differences in historical training tasks, the mapping relationship extraction model corresponds to the historical training tasks. For example, the historical training task of the first stage is to train the snow restoration function of the image processing model, then the mapping relationship extraction model of the first stage corresponds to extracting the mapping relationship between the snow image and the snow restoration image in the historical image.

[0077] It should be noted that in the embodiments of this specification, the extraction of the preset mapping relationship is logically unrelated to the execution of the model training task, that is, the preset mapping relationship can be extracted after the historical training task is completed, and there is no need to execute it in the current training task.

[0078] For example, after extracting the mapping relationship between the historical source image and the historical target image to obtain the preset mapping relationship, the following specific step is also included: storing the preset mapping relationship.

[0079] The preset mapping relationship can be stored on a persistent storage medium such as a hard disk, or on a dynamic storage medium such as memory or cache. The storage size of the preset mapping relationship is much smaller than the storage size of the historical image, and the storage space required is much smaller than the storage space of the historical image, which reduces storage costs and improves training efficiency.

[0080] For example, from the historical sample image library for model training, 10,000 historical weather images that have completed i (i∈[1, i]) historical training tasks are obtained to construct a historical weather image set. The historical source weather image X is extracted using i mapping relationship extraction models. i Image feature Feature_X i and historical target weather image Y i Image feature Feature_Y i The feature mapping relationship between Get i preset mapping relationships

[0081] In the embodiments of this specification, the mapping relationship between the historical source images and the historical target images in the historical image set is extracted to obtain a preset mapping relationship, thereby avoiding the pre-storage of a large number of historical images, reducing storage costs, and improving training efficiency.

[0082] In one embodiment of the present specification, an initial image set includes multiple initial image subsets, each initial image subset includes multiple initial images; using historical image mapping, image mapping is performed on at least one initial image in the initial image set to obtain a sample image set, including the following specific steps: extracting a first preset mapping relationship from the extracted preset mapping relationship; using the first preset mapping relationship, image mapping is performed on at least one initial image in the first initial image subset to obtain a first sample image subset, wherein the first initial image subset is any one of the multiple initial image subsets; returning to execute the step of extracting the first preset mapping relationship from the extracted preset mapping relationship, and constructing a sample image set based on each sample image subset.

[0083] The training task is generally divided into multiple training subtasks and implemented through multi-batch iterative training. The sample image set needs to be divided into multiple sample image subsets, and a training subtask is implemented using one sample image subset.

[0084] The sample image subset is a subset of the sample image set corresponding to a training subtask in the current training task.

[0085] A first preset mapping relationship is extracted from the extracted preset mapping relationships, specifically by randomly extracting the first preset mapping relationship from the extracted preset mapping relationships. In one embodiment, random extraction is achieved using a mapping selector, which can balance the extracted preset mapping relationships. For example, if the preset mapping relationship corresponding to the third historical training task is extracted the first time, the preset mapping relationship corresponding to the third historical training task is not extracted the second time, thereby ensuring data balance in the sample image set.

[0086] Using a first preset mapping relationship, image mapping is performed on at least one initial image in the first initial image subset to obtain a first sample image subset. Specifically, the first preset mapping relationship is used to perform image mapping on at least one initial image in the first initial image subset to obtain a historical feature image, and the historical feature image and the initial image that has not been image mapped are determined as the first sample image subset. In one embodiment, using the first preset mapping relationship, image mapping is performed on at least one first initial source image in the first initial image subset to obtain a first historical feature target image. Using the first preset mapping relationship, image mapping is performed on at least one first initial target image in the first initial image set to obtain a first historical feature source image. The first historical feature source image, the first historical feature target image, and the first initial image that has not been image mapped are determined as the first sample image subset.

[0087] Based on each sample image subset, a sample image set is constructed. Specifically, the sample image subsets are filtered based on their information content to construct the sample image set. By filtering the sample image subsets, a larger amount of information, i.e., a richer sample image subset, is included in the current training task, achieving more effective model training.

[0088] For example, the i preset mapping relationships extracted are In the random sampling, the first preset mapping relationship is obtained Using the first preset mapping relationship, the 20 initial source weather images X in the first initial weather image subset are mapped to the random The image is mapped to obtain 20 first historical characteristic target weather images Y random ', using the first preset mapping relationship, the 20 initial target weather images Y in the first initial weather image subset random The image is mapped to obtain 20 first historical feature source weather images X random ', determine the 20 first historical feature source weather images, the 20 first historical feature target weather images and the 60 first initial weather images without image mapping as the first sample weather image subset, and return to execute the i preset mapping relationships obtained from the extraction In the random sampling, the first preset mapping relationship is obtained Based on the information amount of the 1000 sample weather image subsets, the 1000 sample weather image subsets are screened to construct a sample weather image set.

[0089] In the embodiments of this specification, by iteratively extracting the first preset mapping relationship, image mapping is performed on each initial image subset to obtain a corresponding sample image subset, which is used to construct a sample image set, thereby ensuring that a more comprehensive and accurate sample image set is obtained, and ensuring that a more comprehensive and accurate image processing model is trained.

[0090] In one embodiment of the present specification, a sample image set is constructed based on each sample image subset, including the following specific steps: calculating the information amount of each sample image subset; when the information amount of the sample image subset reaches a preset threshold, adding the sample image subset to the sample image set to obtain the sample image set.

[0091] The information content of a sample image subset represents the difference in the image distribution of sample images in the sample image subset. The higher the difference between each sample image in the sample image subset, the higher the information content. For example, a sample image subset contains current knowledge and 10 kinds of historical knowledge (through the preset mapping relationship corresponding to 10 historical training tasks, image mapping is performed to obtain historical feature images), and another sample image subset contains current knowledge and 2 kinds of historical knowledge (through the preset mapping relationship corresponding to 2 historical training tasks, image mapping is performed to obtain historical feature images). The information content of the former is higher than that of the latter. The higher the information content, the more abundant the sample image subset contains, and the better training effect of the image processing model can be achieved. The information content can be obtained by calculating the information entropy ( P i The probability of a sample image of any type can also be calculated by maximum likelihood estimation (LLD = f D (x1, x2, ..., x n |θ), θ is the distribution parameter, x1, x2,…, x n is the sampling value, f D () is the assumed probability density function), which is not limited here.

[0092] The preset threshold is a pre-set threshold for judging the difference of image distribution, and can be a statistical value of the information content of each sample image subset, including but not limited to: mean, standard deviation and variance.

[0093] The information content of each sample image subset is calculated, specifically in the following manner: based on the image distribution of each sample image subset, the information content of each sample image subset is calculated.

[0094] For example, when the information amount of the sample image subset does not reach a preset threshold, the sample image subset is screened out.

[0095] For example, based on the image distribution of 1000 sample weather image subsets (P i , i∈[1,1000]), calculate the information content of each sample weather image subset (HM i , i∈[1,1000]). When the information content of the sample weather image subsets reaches the information content mean E(HM) and the information content standard deviation σ, the sample weather image subsets are added to the sample weather image set. When the information content of the sample weather image subsets does not reach the preset threshold, the sample weather image subsets are screened out to obtain the sample weather image set.

[0096] In the embodiments of this specification, the amount of information of each sample sub-image is calculated, and the amount of information of each sample image subset is compared with a preset threshold. If the threshold is met, the information is added to the sample image set, so that the sample image set is constructed more accurately, so that the sample image set contains richer sample images, thereby improving the comprehensiveness and accuracy of the sample image set, improving the training effect of the image processing model, and obtaining a more comprehensive and accurate image processing model.

[0097] In one embodiment of the present specification, calculating the information amount of each sample image subset includes the following specific steps: calculating the first information amount of the initial image subset corresponding to each sample image subset; calculating the second information amount of each sample image subset;

[0098] The information amount of each sample image subset is calculated based on the first information amount and the second information amount.

[0099] The sample image subset contains current knowledge and historical knowledge. It is necessary to consider the amount of information it contains before image mapping and the amount of information it contains after image mapping, and then calculate the information content of the sample image subset.

[0100] The first information amount of the initial image subset corresponding to each sample image subset is the difference in image distribution of the initial image subset corresponding to the sample image subset before image mapping. The specific calculation formula is shown in Formula 1:

[0101] in, is the first information amount of the initial image subset corresponding to the sample image subset in the i-th training task, For a given memory, the memory is iteratively updated based on the reconstruction of the sample image subset. The specific formula for the update is shown in Formula 2. is the initial source image in the initial image subset in the i-th training task, is the initial target image in the initial image subset in the i-th training task, is the sample source image in the memory in the i-th training task, is the sample target image in the memory in the i-th training task.

[0102] Among them, θ i is the model parameter of the image processing model trained for the i-th training task, θ i-1 are the model parameters of the image processing model obtained by training the i-1th training task, are multiple sample image subsets corresponding to a training task, ψ -1 It is the preset mapping relationship.

[0103] The data distribution itself will gradually generalize concepts to new domains (the initial images that complete image mapping) without forgetting the image distribution of past initial images at any moment, allowing the image processing model to continuously learn updated current knowledge and historical knowledge.

[0104] The second information amount of the sample image subset is the difference in image distribution of the sample image subset after image mapping. The specific calculation formula is shown in Formula 3:

[0105] in, is the second information of the sample image subset in the i-th training task, H i is the image processing model obtained by training the i-th training task, ψ -1 It is the preset mapping relationship.

[0106] Based on the first information amount and the second information amount, the information amount of each sample image subset is calculated. Specifically, the first information amount and the second information amount are weighted to obtain the information amount of each sample image subset. The specific calculation formula is shown in Formula 4:

[0107] in, is the information content of the sample image subset in the i-th training task, is the information entropy, and η represents the proportion of the initial image of the image mapping to the sample image subset. This weight parameter weighs the image distribution between the initial image and the historical feature image. Based on the Qinsheng inequality, Formula 4 can be rewritten as Formula 5:

[0108] in, Represents the mathematical expectation. θ i Represents the image processing model H obtained by training the i-th training task i , a part of the initial images in the current training task are image mapped to obtain historical feature images, avoiding preserving the features of the initial image itself.

[0109] For example, using Formula 1, the first information amount (L1) of the initial weather image subset corresponding to the 1000 sample weather image subsets is calculated. i , i∈[1,1000]), using Formula 3, calculate the second information volume (L2 i , i∈[1,1000]), and using Formula 5, the first information amount L1 and the second information amount L2 are weighted to obtain the information amount of each sample weather image subset (HM i , i∈[1,1000]).

[0110] In the embodiments of this specification, the first amount of information and the second amount of information are utilized, fully considering the image distribution of the initial image and the initial image after image mapping (historical feature image), and a more accurate amount of information is calculated, thereby ensuring the comprehensiveness and accuracy of the subsequently determined sample image set.

[0111] In one embodiment of the present specification, an image processing model is trained using a sample image set to obtain a trained image processing model, including the following specific steps: dividing the sample image set into multiple sample image groups; extracting a first sample image group from the multiple sample image groups, wherein the first sample image group is any one of the multiple sample image groups, and the first sample image group includes a first source image and a first target image; inputting the first source image into the image processing model to obtain a first predicted image; calculating a loss value based on the first target image and the first predicted image; adjusting model parameters of the image processing model based on the loss value, returning to execute extracting the first sample image group from the multiple sample image groups, and obtaining a trained image processing model when a preset training end condition is met.

[0112] The current training task includes multiple training subtasks, which are iteratively executed to implement iterative training of the image processing model. The sample image group is the training sample of a training subtask in the current training task, including at least one sample image subset.

[0113] The first source image is a training sample image of the sample image group in the current training subtask. The first target image is a labeled sample image of the sample image group in the current training subtask. The first predicted image is a predicted image corresponding to the first source image obtained by the image processing model in the current training subtask.

[0114] The preset training end conditions are pre-set judgment conditions for the end of training, including but not limited to: a preset number of iterations, a preset loss value threshold and a preset model convergence condition.

[0115] Based on the loss value, the model parameters of the image processing model are adjusted. Specifically, based on the loss value, the model parameters of the image processing model are adjusted using the gradient descent method.

[0116] Exemplarily, the sample weather image set is divided into i sample weather image groups, and a first sample weather image group is extracted from the i sample weather image groups, the first sample weather image group including a first source weather image and a first target weather image, the first source weather image is input into the image restoration model to obtain a first predicted weather image, and a loss value is calculated based on the first target weather image and the first predicted weather image, and based on the loss value, the model parameters of the image restoration model are adjusted using the gradient descent method, and the execution is returned to extract the first sample weather image group from multiple sample weather image groups, and when the preset model convergence conditions are met, a trained image restoration model is obtained.

[0117] In the embodiments of this specification, the image processing model is trained using multiple batches of sample image groups, thereby improving the training effect of the model.

[0118] In one embodiment of the present specification, model parameters of an image processing model are adjusted based on a loss value, including the following specific steps: determining initial model parameters of the image processing model based on the image distribution of historical images in a historical image set; adjusting the initial model parameters based on the loss value to obtain image processing model parameters, and adding a first sample image group to the historical image set.

[0119] In the embodiments of this specification, after each training subtask is completed, the historical image can be updated. To avoid the storage and processing of historical images, a parameter isolation mechanism is used to change the data transmission effect of the synapse (any training subtask), maximizing the preservation of historical knowledge, that is, preserving the image distribution of historical images. Specifically, each training subtask restores the parameters of the image processing model based on the current image distribution, relying solely on the parameters of the image processing model corresponding to the historical training subtask, eliminating the need for additional historical images. This allows the image processing model to learn both current knowledge and historical knowledge.

[0120] The loss value can be considered as a method of finding the optimal model parameters based on all known images. Based on this, the Bayesian theorem can be used to transform the calculation of the loss value, as shown in Formula 6:

[0121] in, are all source images and target images (including initial images, historical images, and sample images), and θ is the model parameter of the image processing model. is the image distribution probability of the source image and the target image, and log p(θ) is the prior probability of the model parameters that can match all training tasks.

[0122] The sample image set is decomposed into n sample image groups: The loss value calculation in the i-th training task is derived as shown in Formula 7:

[0123] Among them, represents the image distribution of the i-th training task, Represents the image distribution of the previous i-1 training tasks. The image distribution probability of the i-th task is a constant, given the model parameters of the i-th task The logarithmic probability of obtaining the image distribution of the i-th task is equal to the initial loss value.

[0124] in addition, is a posterior probability distribution term, which contains the information of all images in the previous training task and is difficult to calculate. It can be approximated as a Gaussian distribution using the diagonal Laplace approximation. The mean is The parameters of the model are the Fisher information matrix corresponding to the variance of the model parameters. With this approximation, the optimization problem of reducing plasticity can be defined as: To approximate, the synaptic transmission is distributed from the historical image Change to current image distribution Expressed as formula 8:

[0125] in, yes The probability density function, that is, p(θ|D past ).

[0126] For example, based on the distribution of sample weather images in the historical weather image set, the initial model parameter θ of the image processing model is determined. i-1 , based on the loss value, the initial model parameters θ i-1 Adjust to get the image processing model parameter θ i , adding the first sample weather image group to the historical weather image set.

[0127] In the embodiments of this specification, the associative learning method using mapping relationship restoration and parameter isolation as the medium enables the image processing model to have the ability to associate historical training tasks with current training tasks. It can restore the experiential knowledge of historical tasks based on current sample images without relying on historical images, adaptively and continuously learn current tasks and retain knowledge of historical tasks, thereby improving the accuracy of the loss value and further improving the comprehensiveness and accuracy of the trained image processing model.

[0128] In one embodiment of the present specification, adding the first sample image group to the historical image set includes the following specific steps: comparing each sample image in the first sample image group with each historical image in the historical image set, removing redundant sample images in the first sample image group; and adding the first sample image group to the historical image set.

[0129] The image sets of different training tasks are not completely independent. In order to deal with the conflict of image distribution in the mixed sample image set, given the prior information of the mixed sample In the case of Approximately For formula 7 Rewrite it as shown in Formula 9:

[0130] in, and Represent the initial source image in the current training task, the initial image in the current training task and the historical feature source image and the historical feature target image. Image distribution Represents the image distribution of the sample image set The Monte Carlo method is used to characterize the true image distribution of the sample image set that the image processing model will learn. Combined with the parameter isolation of the above embodiment, the new trade-off weights are kept balanced.

[0131] Exemplarily, each sample weather image in the first sample weather image group is compared with each historical weather image in the historical weather image set, redundant sample weather images in the first sample weather image group are removed, and the first sample weather image group is added to the historical weather image set.

[0132] In the embodiments of this specification, by removing redundant sample images, conflicts in image distribution are avoided, the accuracy of the loss value is improved, and the training effect of the image processing model is improved.

[0133] Referring to FIG. 2 , FIG. 2 shows a flowchart of another image processing method provided according to an embodiment of the present specification. The method is applied to a server and includes the following specific steps 202 to 206 .

[0134] Step 202: Receive an image processing request sent by a client, wherein the image processing request carries an image to be processed.

[0135] Step 204: Input the image to be processed into the image processing model to obtain the target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model.

[0136] Step 206: Feedback the target image to the client, so that the client renders the target image.

[0137] The embodiments of this specification are applied to a server-side application, webpage, or mini-program with image processing capabilities. Such a server-side application deploys an image processing model to implement these image processing functions. These image processing functions include, but are not limited to, image restoration, image super-resolution, image denoising, and image style transfer. A network connection is established between the client and server, establishing a data link for data transmission. The server-side application is equipped with greater storage space and computing power.

[0138] The specific implementation method of image rendering is to use a renderer.

[0139] Step 204 in the embodiment of this specification is consistent with step 104 in the embodiment of FIG. 1 , and has been described in detail, so it will not be repeated here.

[0140] In an embodiment of the present specification, an image processing request sent by a client is received, wherein the image processing request carries an image to be processed, the image to be processed is input into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, the historical source image and the historical target image are used to pre-train the image processing model, and the target image is fed back to the client so that the client can render the target image. Based on the pre-determined preset mapping relationship between the historical source image and the historical target image, the pre-storage of a large number of historical images is avoided. During the training of the image processing model, the features of the historical images are restored using the preset mapping relationship, and a sample image set containing current knowledge and historical knowledge is obtained. The image processing model is trained to obtain a more comprehensive and accurate image processing model. While ensuring the comprehensiveness and accuracy of image processing, storage costs are reduced and processing efficiency is improved. Image processing is implemented on the server and rendered on the client, reducing the client's computing power and storage costs and improving the user experience.

[0141] 3 , which shows a flow chart of a weather image restoration method according to an embodiment of the present specification, including the following specific steps 302 to 304 .

[0142] Step 302: Acquire the weather image to be restored.

[0143] Step 304: Input the weather image to be repaired into the image repair model to obtain the target weather image, wherein the image repair model is trained using a sample weather image set, and the sample weather image set is obtained by performing image mapping on at least one initial sample weather image in the initial weather image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between historical source weather images and historical target weather images, and the historical source weather images and historical target weather images are used to pre-train the image repair model.

[0144] The weather image to be restored is a weather visual image to be restored, for example, a road video under bad weather conditions. The target weather image is a weather visual image obtained by performing image restoration on the weather image to be restored.

[0145] Image restoration models are neural network models with image restoration capabilities. They are classified into three categories based on their structure: CNN models, VAE models, GAN models, and Diffusion models. Image restoration models are trained using the current training task.

[0146] The embodiment of this specification and the embodiment of FIG. 1 are based on the same inventive concept. Step 302 and step 304 have been described in detail with reference to step 102 and step 104 in the embodiment of FIG. 1 , and will not be repeated here.

[0147] In an embodiment of the present specification, a weather image to be repaired is obtained, and the weather image to be repaired is input into an image repair model to obtain a target weather image, wherein the image repair model is trained using a sample weather image set, and the sample weather image set is obtained by performing image mapping on at least one initial sample weather image in the initial weather image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source weather image and a historical target weather image, and the historical source weather image and the historical target weather image are used to pre-train the image repair model. Based on the preset mapping relationship between the historical source weather image and the historical target weather image, the pre-storage of a large number of historical weather images is avoided. In the process of training the image repair model, the features of the historical weather images are restored using the preset mapping relationship, and a sample weather image set containing current knowledge and historical knowledge is obtained. The image repair model is trained to obtain a more comprehensive and accurate image repair model. While ensuring the comprehensiveness and accuracy of weather image repair, the storage cost is reduced and the efficiency of weather image repair is improved.

[0148] Referring to FIG. 4 , FIG. 4 shows a flowchart of an image data processing method provided according to an embodiment of the present specification. The method is applied to a cloud-side device and includes the following specific steps 402 to 408 .

[0149] Step 402: Acquire an initial image set, wherein the initial image set includes a plurality of initial images.

[0150] Step 404: performing image mapping on at least one initial image in the initial image set using a preset mapping relationship to obtain a sample image set, wherein the initial image is an initial source image or an initial target image.

[0151] Step 406: Use the sample image set to train the image processing model to obtain a trained image processing model.

[0152] Step 408: Send the model parameters of the trained image processing model to the end-side device.

[0153] The embodiments of this specification apply to cloud-side devices with model training capabilities. Cloud-side devices are network cloud devices that provide model training capabilities and are virtual devices. Device-side devices are physical devices that provide image processing capabilities. A network connection is established between the device and the cloud-side device, establishing a data link for data transmission. Cloud-side devices have higher computing power than device-side devices.

[0154] In the embodiment of this specification, steps 402 to 406 have been described in detail in the embodiment of FIG. 1 above and will not be repeated here.

[0155] In an embodiment of the present specification, an initial image set is obtained, wherein the initial image set includes multiple initial images, and a preset mapping relationship is used to perform image mapping on at least one initial image in the initial image set to obtain a sample image set, wherein the initial image is an initial source image or an initial target image. The sample image set is used to train an image processing model to obtain a trained image processing model, and the model parameters of the trained image processing model are sent to an end-side device. Based on a preset mapping relationship between a predetermined historical source image and a historical target image, pre-storage of a large number of historical images is avoided. In the process of training the image processing model, image mapping is performed on at least one initial image in the initial image set using the preset mapping relationship, and the features of the historical image are restored to obtain a sample image set containing current knowledge and historical knowledge. The image processing model is trained to obtain a more comprehensive and accurate image processing model, thereby reducing storage costs and improving training efficiency. At the same time, model training is implemented through cloud-side devices, reducing the computing power cost of the client and improving the efficiency of model training.

[0156] FIG5 shows a flow chart of an image processing method provided by an embodiment of the present specification. As shown in FIG5: in the continuous learning process of the image processing model, data streams are continuously acquired to implement iteration of training tasks. In the historical training task i, the corresponding preset mapping relationship i is extracted, and the preset mapping relationship i is jointly stored for use in the current training task i+1. In the current training task i+1, the corresponding preset mapping relationship i+1 is extracted. For example, in the current training task i+1, the preset mapping relationship extraction is performed on the historical source image and the historical target image in the historical image set: the historical image set of the historical training task 1 includes the historical source image 1 and the historical target image 1, and the mapping relationship extraction model of the first stage is used to extract the preset mapping relationship 1, ..., the historical image set of the historical training task i includes the historical source image i and the historical target image i, and the mapping relationship extraction model of the i-th stage is used to extract the preset mapping relationship i. The extracted preset mapping relationship is written into the memory buffer. Obtain an initial image set for the current training task i+1, which includes an initial source image i+1 and an initial target image i+1. Use a mapping selector to randomly extract a preset mapping relationship from the preset mapping relationships, perform image mapping on the initial source image i+1 and the initial target image i+1, and obtain a sample image set for the current training task i+1, which includes a sample source image i+1 and a sample target image i+1. Use the sample image set for the current training task i+1 to train the image processing model.

[0157] Figure 6 shows a schematic diagram of the front-end interface of an image processing method provided by an embodiment of the present specification. As shown in Figure 6: the front-end interface of the application with image processing function includes a first interface, a second interface and a third interface, and each interface is converted through interaction. The application has the functions of weather image repair, image super-resolution and adding filters. Various functions are realized by pre-configuring multiple training tasks of the image processing model in the application. In the first interface of the front-end interface, there are provided a "Load Weather Image" control, an image preview area, a "Weather Image Repair" control, an "Image Super-Resolution" control and an "Add Filter" control. The user loads the weather image to be repaired by clicking the "Load Weather Image" control, and renders the weather image to be repaired in the image preview area. The user then clicks the "Weather Image Repair" control to enter the second interface. The second interface features various weather restoration controls: "Rainy," "Snowy," "Dust," "Fog," "Sunburst," and "Return." Each control implements various weather image restoration functions within the image processing model's weather restoration capabilities. These functions are implemented through multiple pre-trained tasks for the image processing model configured in the application. By selecting the "Rainy" control, the user performs rainy weather restoration on the image to be restored and enters the third interface. The third interface includes an image preview area, a "Download," a "Copy," and a "Return" control. The target weather image after rainy weather restoration is rendered in the image preview area, and users can select different controls to implement corresponding functions.

[0158] The image processing method provided herein will be further described below, using the application of the image processing method for road image restoration in severe weather as an example, with reference to FIG7 . FIG7 illustrates a flowchart of the processing process of an image processing method for road image restoration in severe weather, provided in accordance with one embodiment of this specification, including the following specific steps 702 through 720 .

[0159] Step 702: Acquire a historical road image set, extract and store a mapping relationship between a historical road source image and a historical road target image, and obtain a preset mapping relationship.

[0160] Step 704: Acquire an initial road image set.

[0161] Step 706: Extract a first preset mapping relationship from the extracted and stored preset mapping relationships.

[0162] Step 708: Using the first preset mapping relationship, perform image mapping on at least one initial road image in the first initial road image subset to obtain a first sample road image subset.

[0163] Step 710: Return to the step of extracting the first preset mapping relationship from the extracted and stored preset mapping relationships.

[0164] Step 712: Calculate the first information amount of the initial road image subset corresponding to each sample road image subset, calculate the second information amount of each sample road image subset, and obtain the information amount of each sample road image subset based on the first information amount and the second information amount.

[0165] Step 714: When the information amount of the sample road image subset reaches a preset threshold, the sample road image subset is added to the sample road image set to obtain the sample road image set.

[0166] Step 716: Divide the sample road image set into multiple sample road image groups, extract a first sample road image group from the multiple sample road image groups, input the first source image into the image restoration model to obtain a first predicted image, input the first source image into the image restoration model to obtain a first predicted image, determine initial model parameters of the image restoration model based on the sample image distribution of historical road images in the historical road image set, adjust the initial model parameters based on the loss value to obtain image restoration model parameters, add the first sample image group to the historical road image set, return to execute the extraction of the first sample road image group from the multiple sample road image groups, and obtain a trained image restoration model when the preset training end condition is met.

[0167] Step 718: Acquire an image of the road to be repaired under severe weather conditions.

[0168] Step 720: Input the road image to be repaired into the image repair model to obtain a repaired road image.

[0169] In the embodiments of this specification, a new storage management solution, namely associative memory, is proposed to sustainably realize the reconstruction of sample image sets. Connections are established between different image distributions to preserve historical knowledge in historical images. In the current training task, historical knowledge is learned by using image mapping, so that the sample image set contains a sample image set of current knowledge and historical knowledge, and the image processing model is trained to obtain a more comprehensive and accurate image processing model. In addition, between the historical training task and the current training task, a parameter isolation strategy is used to consolidate and strengthen historical knowledge in the sample image set. On the basis of ensuring the comprehensiveness and accuracy of image processing, the storage cost is reduced and the processing efficiency is improved.

[0170] In one or more embodiments of the present specification, an image to be processed is obtained, and the image to be processed is input into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model. Based on the preset mapping relationship between the historical source image and the historical target image, the pre-storage of a large number of historical images is avoided. In the process of training the image processing model, the features of the historical images are restored using the preset mapping relationship, and a sample image set containing current knowledge and historical knowledge is obtained. The image processing model is trained to obtain a more comprehensive and accurate image processing model, which reduces storage costs and improves processing efficiency while ensuring the comprehensiveness and accuracy of image processing.

[0171] Corresponding to the above-mentioned method embodiments, this specification also provides an embodiment of an image processing device. FIG8 shows a schematic structural diagram of an image processing device provided in one embodiment of this specification. As shown in FIG8 , the device includes: a first acquisition module 802 configured to acquire an image to be processed; a first processing module 804 configured to input the image to be processed into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in an initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model.

[0172] In one embodiment, the device also includes: a training module, configured to obtain an initial image set, wherein the initial image set includes multiple initial images; using a preset mapping relationship, performing image mapping on at least one initial image in the initial image set to obtain a sample image set, wherein the initial image is an initial source image or an initial target image; using the sample image set, training the image processing model to obtain a trained image processing model.

[0173] In one embodiment, the device further includes: an extraction module configured to obtain a historical image set, wherein the historical image set includes historical source images and historical target images; extract a mapping relationship between the historical source images and the historical target images to obtain a preset mapping relationship.

[0174] In one embodiment, the initial image set includes multiple initial image subsets, and each initial image subset includes multiple initial images; correspondingly, the training module is configured to: extract a first preset mapping relationship from the extracted preset mapping relationship; use the first preset mapping relationship to perform image mapping on at least one initial image in the first initial image subset to obtain a first sample image subset, wherein the first initial image subset is any one of the multiple initial image subsets; return to execute the step of extracting the first preset mapping relationship from the extracted preset mapping relationship, and construct a sample image set based on each sample image subset.

[0175] In one embodiment, the training module is configured to: calculate the information content of each sample image subset; when the information content of the sample image subset reaches a preset threshold, add the sample image subset to the sample image set to obtain the sample image set.

[0176] In one embodiment, the training module is configured to: calculate the first information amount of the initial image subset corresponding to each sample image subset; calculate the second information amount of each sample image subset; and calculate the information amount of each sample image subset based on the first information amount and the second information amount.

[0177] In one embodiment, the training module is configured to: divide the sample image set into multiple sample image groups; extract a first sample image group from the multiple sample image groups, wherein the first sample image group is any one of the multiple sample image groups, and the first sample image group includes a first source image and a first target image; input the first source image into the image processing model to obtain a first predicted image; calculate a loss value based on the first target image and the first predicted image; adjust the model parameters of the image processing model based on the loss value, return to execute the extraction of the first sample image group from the multiple sample image groups, and obtain a trained image processing model when the preset training end condition is met.

[0178] In one embodiment, the training module is configured to: determine the initial model parameters of the image processing model based on the image distribution of historical images in the historical image set; adjust the initial model parameters based on the loss value to obtain the image processing model parameters, and add the first sample image group to the historical image set.

[0179] In one embodiment, the training module is configured to: compare each sample image in the first sample image group with each historical image in the historical image set, remove redundant sample images in the first sample image group; and add the first sample image group to the historical image set.

[0180] In an embodiment of the present specification, an image to be processed is obtained, and the image to be processed is input into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model. Based on the pre-determined preset mapping relationship between the historical source image and the historical target image, the pre-storage of a large number of historical images is avoided. In the process of training the image processing model, the features of the historical images are restored using the preset mapping relationship, and a sample image set containing current knowledge and historical knowledge is obtained. The image processing model is trained to obtain a more comprehensive and accurate image processing model, which reduces storage costs and improves processing efficiency while ensuring the comprehensiveness and accuracy of image processing.

[0181] The above is a schematic diagram of an image processing device according to this embodiment. It should be noted that the technical solution of the image processing device and the technical solution of the above-mentioned image processing method are based on the same concept. For details not described in detail in the technical solution of the image processing device, please refer to the description of the technical solution of the above-mentioned image processing method.

[0182] Corresponding to the above-mentioned method embodiment, this specification also provides an embodiment of an image processing device. FIG9 shows a schematic structural diagram of another image processing device provided by one embodiment of this specification. As shown in FIG9 , the device is applied to a server, and the device includes: a receiving module 902, configured to receive an image processing request sent by a client, wherein the image processing request carries an image to be processed; a second processing module 904, configured to input the image to be processed into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model; and a feedback module 906, configured to feed back the target image to the client so that the client can render the target image.

[0183] In an embodiment of the present specification, an image processing request sent by a client is received, wherein the image processing request carries an image to be processed, the image to be processed is input into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, the sample image set is obtained by performing image mapping on at least one initial image in the initial image set using a preset mapping relationship, the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, the historical source image and the historical target image are used to pre-train the image processing model, and the target image is fed back to the client so that the client can render the target image. Based on the pre-determined preset mapping relationship between the historical source image and the historical target image, the pre-storage of a large number of historical images is avoided. During the training of the image processing model, the features of the historical images are restored using the preset mapping relationship, and a sample image set containing current knowledge and historical knowledge is obtained. The image processing model is trained to obtain a more comprehensive and accurate image processing model. While ensuring the comprehensiveness and accuracy of image processing, storage costs are reduced and processing efficiency is improved. Image processing is implemented on the server and rendered on the client, reducing the client's computing power and storage costs and improving the user experience.

[0184] The above is a schematic diagram of an image processing device according to this embodiment. It should be noted that the technical solution of the image processing device and the technical solution of the above-mentioned image processing method are based on the same concept. For details not described in detail in the technical solution of the image processing device, please refer to the description of the technical solution of the above-mentioned image processing method.

[0185] Corresponding to the above-mentioned method embodiments, this specification also provides an embodiment of a weather image restoration device. FIG10 shows a schematic structural diagram of a weather image restoration device provided by one embodiment of this specification. As shown in FIG10 , the device includes: a second acquisition module 1002 configured to acquire a weather image to be restored; and a restoration module 1004 configured to input the weather image to be restored into an image restoration model to obtain a target weather image. The image restoration model is trained using a sample weather image set, which is obtained by performing image mapping on at least one initial sample weather image in an initial weather image set using a preset mapping relationship. The preset mapping relationship is a mapping relationship between historical source weather images and historical target weather images. The historical source weather images and historical target weather images are used to pre-train the image restoration model.

[0186] In an embodiment of the present specification, a weather image to be repaired is obtained, and the weather image to be repaired is input into an image repair model to obtain a target weather image, wherein the image repair model is trained using a sample weather image set, and the sample weather image set is obtained by performing image mapping on at least one initial sample weather image in the initial weather image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source weather image and a historical target weather image, and the historical source weather image and the historical target weather image are used to pre-train the image repair model. Based on the preset mapping relationship between the historical source weather image and the historical target weather image, the pre-storage of a large number of historical weather images is avoided. In the process of training the image repair model, the features of the historical weather images are restored using the preset mapping relationship, and a sample weather image set containing current knowledge and historical knowledge is obtained. The image repair model is trained to obtain a more comprehensive and accurate image repair model. While ensuring the comprehensiveness and accuracy of weather image repair, the storage cost is reduced and the efficiency of weather image repair is improved.

[0187] The above is a schematic diagram of a weather image restoration device according to this embodiment. It should be noted that the technical solution of the weather image restoration device and the technical solution of the aforementioned weather image restoration method are based on the same concept. For details not described in detail in the technical solution of the weather image restoration device, please refer to the description of the technical solution of the aforementioned weather image restoration method.

[0188] Corresponding to the above-mentioned method embodiments, this specification also provides an embodiment of an image data processing device. FIG11 shows a schematic structural diagram of an image data processing device provided by one embodiment of this specification. As shown in FIG11 , the device is applied to a cloud-side device. The device includes: a third acquisition module 1102, configured to acquire an initial image set, wherein the initial image set includes multiple initial images; a mapping module 1104, configured to use a preset mapping relationship to perform image mapping on at least one initial image in the initial image set to obtain a sample image set, wherein the initial image is an initial source image or an initial target image; a training module 1106, configured to use the sample image set to train the image processing model to obtain a trained image processing model; and a sending module 1108, configured to send the model parameters of the trained image processing model to the end-side device.

[0189] In an embodiment of the present specification, an initial image set is obtained, wherein the initial image set includes multiple initial images, and a preset mapping relationship is used to perform image mapping on at least one initial image in the initial image set to obtain a sample image set, wherein the initial image is an initial source image or an initial target image. The sample image set is used to train an image processing model to obtain a trained image processing model, and the model parameters of the trained image processing model are sent to an end-side device. Based on a preset mapping relationship between a predetermined historical source image and a historical target image, pre-storage of a large number of historical images is avoided. In the process of training the image processing model, image mapping is performed on at least one initial image in the initial image set using the preset mapping relationship, and the features of the historical image are restored to obtain a sample image set containing current knowledge and historical knowledge. The image processing model is trained to obtain a more comprehensive and accurate image processing model, thereby reducing storage costs and improving training efficiency. At the same time, model training is implemented through cloud-side devices, reducing the computing power cost of the client and improving the efficiency of model training.

[0190] The above is a schematic diagram of an image data processing device according to this embodiment. It should be noted that the technical solution of this image data processing device and the technical solution of the aforementioned image data processing method are based on the same concept. For details not described in detail in the technical solution of the image data processing device, please refer to the description of the technical solution of the aforementioned image data processing method.

[0191] Figure 12 shows a block diagram of a computing device according to one embodiment of this specification. Components of the computing device 1200 include, but are not limited to, a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 via a bus 1230, and a database 1250 is used to store data.

[0192] The computing device 1200 also includes an access device 1240 that enables the computing device 1200 to communicate via one or more networks 1260. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of network interface (e.g., a network interface controller (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, or a near field communication (NFC) interface.

[0193] In one embodiment of the present specification, the aforementioned components of the computing device 1200 and other components not shown in FIG12 may also be connected to each other, for example, via a bus. It should be understood that the computing device structure block diagram shown in FIG12 is for illustrative purposes only and does not limit the scope of this specification. Those skilled in the art may add or replace other components as needed.

[0194] Computing device 1200 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 1200 may also be a mobile or stationary server.

[0195] The processor 1220 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned image processing method, weather image restoration method, or image data processing method.

[0196] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device is based on the same concept as the technical solutions of the aforementioned image processing method, weather image restoration method, and image data processing method. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solutions of the aforementioned image processing method, weather image restoration method, or image data processing method.

[0197] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned image processing method, weather image restoration method or image data processing method.

[0198] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium is based on the same concept as the technical solutions of the aforementioned image processing method, weather image restoration method, and image data processing method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the aforementioned image processing method, weather image restoration method, or image data processing method.

[0199] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned image processing method, weather image restoration method or image data processing method.

[0200] The above is an illustrative embodiment of a computer program. It should be noted that the technical solution of this computer program is based on the same concept as the technical solutions of the aforementioned image processing method, weather image restoration method, and image data processing method. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solutions of the aforementioned image processing method, weather image restoration method, or image data processing method.

[0201] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0202] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0203] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0204] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0205] The preferred embodiments disclosed above are intended only to help illustrate this specification. The foregoing embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Clearly, numerous modifications and variations are possible based on the content of the embodiments described herein. These embodiments are selected and specifically described herein to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. An image processing method, include: Get the image to be processed; The image to be processed is input into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, and the sample image set is obtained by performing image mapping on at least one initial image in an initial image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model.

2. The method according to claim 1, before inputting the image to be processed into the image processing model to obtain the target image, further comprising: include: Acquire an initial image set, wherein the initial image set includes a plurality of initial images; Using a preset mapping relationship, performing image mapping on at least one initial image in the initial image set to obtain a sample image set, wherein the initial image is an initial source image or an initial target image; The image processing model is trained using the sample image set to obtain a trained image processing model.

3. The method according to claim 2, before performing image mapping on at least one initial image in the initial image set using a preset mapping relationship to obtain a sample image set, further comprising: include: Acquire a historical image set, wherein the historical image set includes a historical source image and a historical target image; A mapping relationship between the historical source image and the historical target image is extracted to obtain a preset mapping relationship.

4. The method according to claim 3, wherein the initial image set comprises a plurality of initial image subsets, each initial image subset comprising a plurality of initial images; The method of using historical image mapping to perform image mapping on at least one initial image in the initial image set to obtain a sample image set includes: Extracting a first preset mapping relationship from the extracted preset mapping relationships; Using the first preset mapping relationship, performing image mapping on at least one initial image in a first initial image subset to obtain a first sample image subset, wherein the first initial image subset is any one of the multiple initial image subsets; Return to the step of extracting the first preset mapping relationship from the extracted preset mapping relationship, and construct a sample image set based on each sample image subset.

5. The method according to claim 4, wherein the sample image set is constructed based on each sample image subset. include: Calculate the information content of each sample image subset; When the information amount of the sample image subset reaches a preset threshold, the sample image subset is added to the sample image set to obtain the sample image set.

6. The method according to claim 5, wherein the information amount of each sample image subset is calculated. include: Calculate the first information amount of the initial image subset corresponding to each sample image subset; Calculating the second information amount of each sample image subset; The information amount of each sample image subset is calculated based on the first information amount and the second information amount.

7. The method according to any one of claims 2 to 6, wherein the image processing model is trained using the sample image set to obtain a trained image processing model, include: dividing the sample image set into a plurality of sample image groups; Extracting a first sample image group from the plurality of sample image groups, wherein the first sample image group is any one of the plurality of sample image groups, and the first sample image group includes a first source image and a first target image; Inputting the first source image into the image processing model to obtain a first predicted image; Calculating a loss value based on the first target image and the first predicted image; Based on the loss value, the model parameters of the image processing model are adjusted, and the step of extracting the first sample image group from the multiple sample image groups is returned to be executed, and when a preset training end condition is met, a trained image processing model is obtained.

8. The method according to claim 7, wherein the model parameters of the image processing model are adjusted based on the loss value. include: Determining initial model parameters of the image processing model based on image distribution of historical images in the historical image set; Based on the loss value, the initial model parameters are adjusted to obtain image processing model parameters, and the first sample image group is added to the historical image set.

9. The method according to claim 8, wherein the first sample image group is added to the historical image collection. include: Comparing each sample image in the first sample image group with each historical image in the historical image set, and removing redundant sample images in the first sample image group; The first sample image group is added to the historical image set.

10. An image processing method, applied to a server, include: Receiving an image processing request sent by a client, wherein the image processing request carries an image to be processed; Inputting the image to be processed into an image processing model to obtain a target image, wherein the image processing model is trained using a sample image set, the sample image set is obtained by performing image mapping on at least one initial image in an initial image set using a preset mapping relationship, the preset mapping relationship is a mapping relationship between a historical source image and a historical target image, and the historical source image and the historical target image are used to pre-train the image processing model; The target image is fed back to the client, so that the client renders the target image.

11. A weather image restoration method, include: Get the weather image to be repaired; The weather image to be repaired is input into an image repair model to obtain a target weather image, wherein the image repair model is trained using a sample weather image set, and the sample weather image set is obtained by performing image mapping on at least one initial sample weather image in an initial weather image set using a preset mapping relationship, and the preset mapping relationship is a mapping relationship between a historical source weather image and a historical target weather image, and the historical source weather images and the historical target weather images are used for pre-training the image repair model.

12. An image data processing method, applied to a cloud-side device, include: Acquire an initial image set, wherein the initial image set includes a plurality of initial images; Using a preset mapping relationship, performing image mapping on at least one initial image in the initial image set to obtain a sample image set, wherein the initial image is an initial source image or an initial target image; Using the sample image set, training the image processing model to obtain a trained image processing model; The model parameters of the trained image processing model are sent to the terminal device.

13. A computing device, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 12 are implemented.

14. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Image generation method, model training method and apparatus thereof, and electronic device

    CN111105375A

  • Image restoration model training method, image restoration method and device

    CN111724310A

  • Conveyor belt detection method and device and electronic equipment

    CN115713511A

  • Image processing method, weather image restoration method and image data processing method

    CN116596776A

  • Method, apparatus, and electronic device for training neural network model

    US20210374474A1

Cited By

  • Weather identification method, device and equipment based on roadside sensing equipment

    CN119152293A