Image processing method and image processing model training method

By performing downsampling and Gaussian blur processing on new photos to generate degraded images, it solves the problem of difficulty in obtaining training samples of old photos in the existing technology, and achieves efficient repair and model training of old photos.

CN113689341BActive Publication Date: 2024-08-23BOE TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010421169.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-18
Publication Date
2024-08-23
Estimated Expiration
2040-05-18

AI Technical Summary

Technical Problem

It is difficult to obtain training samples of old photos with existing technology, which limits the application of machine learning in old photo processing technology.

Method used

By performing downsampling and Gaussian blur processing on new photos, a degraded image that approximates the effect of old photos is generated, a mathematical relationship between old photos and new photos is established, training samples are provided for machine learning, and image processing models are trained.

Benefits of technology

It achieves efficient repair of old photos, improves the efficiency and effect of repair, and provides effective training samples and models for old photo processing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113689341B
    Figure CN113689341B
Patent Text Reader

Abstract

The present application provides an image processing method and a training method for an image processing model. The image processing method includes: obtaining a first original image to be processed; performing downsampling processing and Gaussian blur processing on the first original image in sequence according to the configured downsampling processing path and Gaussian blur parameters to obtain a first degraded image. The present application can add blur, noise and other degradation factors to new photos to obtain a degraded image that approximates the effect of old photos, establish a mathematical relationship between old photos and new photos, and provide a good training sample for the application of machine learning in old photo restoration technology; based on the training sample, the image processing model used in the old photo restoration technology is trained to obtain an image processing model with strong restoration, and the image processing model is used to restore the old photos, with high restoration efficiency and good restoration effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of digital image processing, and in particular to an image processing method and a training method for an image processing model. Background Art

[0002] Using machine learning for image processing has always been an important branch of image processing and is also a technological hotspot that has developed very rapidly in recent years.

[0003] Image processing based on machine learning methods usually requires paired images as training samples (training sets). The current method of collecting training samples is mainly to use different devices to take a group of images (including high-quality high-resolution images and low-quality low-resolution images, where high and low are relative concepts) under exactly the same external conditions (scene, time, location, shooting angle, etc.), and then obtain the data set through a small amount of post-processing (such as image alignment and cropping).

[0004] When machine learning technology is applied to the processing of old photos, the training samples usually need to include high-quality and high-resolution new photos and corresponding low-quality and low-resolution old photos. However, due to the specific meaning of old photos, it is impossible to obtain training samples through this method, which greatly limits the application of machine learning in the field of old photo processing technology. Summary of the invention

[0005] In view of the shortcomings of existing methods, this application proposes an image processing method and an image processing model training method to solve the technical problem that the existing technology is unable to obtain training samples, which limits the application of machine learning in the field of old photo processing technology.

[0006] In a first aspect, an embodiment of the present application provides an image processing method, comprising:

[0007] Acquire a first original image to be processed;

[0008] According to the configured downsampling processing path and Gaussian blur parameters, downsampling processing and Gaussian blur processing are sequentially performed on the first original image to obtain a first degraded image;

[0009] The downsampling process path includes multiple sampling steps, and the Gaussian blur parameters include: Gaussian kernel size, horizontal variance and vertical variance.

[0010] In a second aspect, an embodiment of the present application provides a method for training an image processing model, comprising:

[0011] Using the plurality of first original images and the plurality of degraded images corresponding to the plurality of first original images as training data sets, training the image processing model so that the loss function of the image processing model converges;

[0012] The degraded image is obtained by processing the first original image according to the image processing method provided in the first aspect of the embodiment of the present application.

[0013] In a third aspect, an embodiment of the present application provides an image processing device, including:

[0014] Memory;

[0015] A processor, electrically connected to the memory;

[0016] The memory stores a computer program, and the computer program is executed by the processor to implement at least one of the following methods: the image processing method provided in the first aspect of the embodiment of the present application, and the training method of the image processing model provided in the second aspect of the embodiment of the present application.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements at least one of the following methods: the image processing method provided in the first aspect of the embodiment of the present application, and the training method of the image processing model provided in the second aspect of the embodiment of the present application.

[0018] The technical solution provided in the embodiments of the present application has at least the following beneficial effects:

[0019] The embodiments of the present application can add various degradation factors such as blur and noise to new photos (i.e., high-quality and high-resolution photos) to obtain degraded images that are close to the effect of old photos, establish a mathematical relationship between old photos and new photos, and provide better training samples for the application of machine learning in old photo restoration technology; based on the training samples, the image processing model used in the old photo restoration technology is trained to obtain an image processing model with stronger restoration effect, and the image processing model is used to restore the old photos with high restoration efficiency and better restoration effect.

[0020] Additional aspects and advantages of the present application will be partially given in the following description, which will become apparent from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0022] Figure 1 A flowchart of an image processing method provided in an embodiment of the present application;

[0023] Figure 2 A schematic diagram of an expanded flow chart of an optional implementation of the image processing method provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of a first original image in an embodiment of the present application;

[0025] Figure 4 Based on Figure 2 The image processing method shown is Figure 3 Schematic diagram of a degraded image obtained after processing the image shown;

[0026] Figure 5 A flowchart of another image processing method provided in an embodiment of the present application;

[0027] Figure 6 is a schematic diagram of a second original image in an embodiment of the present application;

[0028] Figure 7 Based on Figure 5 The image processing method shown is Figure 6 A schematic diagram of an image obtained after the image shown is processed;

[0029] Figure 8 A schematic diagram of the structural framework of an image processing device provided in an embodiment of the present application;

[0030] Fig. 9 A schematic diagram of the structural framework of another image processing device provided in an embodiment of the present application;

[0031] Fig.10 A schematic diagram of the structural framework of an image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] The present application is described in detail below, and examples of embodiments of the present application are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar components or components with the same or similar functions. In addition, if the detailed description of the known technology is unnecessary for the features of the present application shown, it will be omitted. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0033] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0034] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0035] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments.

[0036] The present application embodiment provides an image processing method, such as Figure 1 As shown, the image processing method includes:

[0037] S101, obtaining a first original image to be processed.

[0038] Optionally, the first original image is a high-quality and high-resolution image.

[0039] In an optional embodiment, high (high quality or high resolution) and low (low quality or low resolution) are relative concepts. The first original image is a high-quality and high-resolution image relative to the processed image, that is, the image quality and resolution of the former are respectively higher than the image quality and resolution of the latter; wherein, image quality can be characterized by clarity, the higher the clarity, the higher the image quality, and high quality is also high clarity.

[0040] In another optional embodiment, high and low can be determined based on a preset threshold or a common or customized reference value in the art; for the preset threshold, a situation above the threshold is high, and a situation below the threshold is low; for the reference value, in one example, a resolution of 512×512 can be used as a high resolution, and a resolution of 64×64 can be used as a low resolution.

[0041] S102 : According to the configured downsampling processing path and Gaussian blur parameters, downsampling processing and Gaussian blur processing are sequentially performed on the first original image to obtain a first degraded image.

[0042] The downsampling process path includes multiple sampling steps, and the Gaussian blur parameters include: Gaussian kernel size, horizontal variance and vertical variance.

[0043] Optionally, the downsampling processing path includes the following three sampling steps: a sampling step based on Bicubic (bicubic interpolation algorithm), a sampling step based on Bilinear (bilinear interpolation algorithm), and a sampling step based on Lanczos algorithm; the sampling ratio of each sampling step in the downsampling processing path is within a first ratio range; the first ratio range can be determined according to actual needs or empirical values, for example, it can be set to a range greater than 0 and less than 1.

[0044] In one example, the configurations of the sampling ratios and sampling methods in the three sampling steps in the downsampling processing path are shown in Table 1.

[0045] Table 1

[0046] step Sampling rate Sampling method 1 0.5 Bicubic 2 0.5 Bilinear 3 0.25 Lanczos

[0047] In this configuration, the downsampling process path is: 0.5 times sampling using the Bicubic method in the first sampling step, 0.5 times sampling using the Bilinear method in the second sampling step, and 0.25 times sampling using the Lanczos method in the third sampling step.

[0048] Optionally, the sampling method adopted in each sampling step in the downsampling processing path can be any one of Bicubic (bicubic interpolation algorithm), Bilinear (bilinear interpolation algorithm) and Lanczos, or other algorithms known in the art that can achieve downsampling; each sampling step can adopt the same sampling method or different downsampling methods.

[0049] The downsampling process of the embodiment of the present application can reduce the resolution of the first original image, thereby obtaining a high-quality low-resolution image with the same image quality as the first original image but lower resolution than the first original image.

[0050] Optionally, in the Gaussian blur processing, the values ​​of the Gaussian kernel size, the horizontal variance, and the vertical variance are determined according to the following method:

[0051] A parameter is randomly selected from the preset Gaussian kernel parameter range, horizontal variance range, and vertical variance range as the Gaussian kernel size, horizontal variance, and vertical variance, respectively.

[0052] The Gaussian kernel parameter range, the horizontal variance range, and the vertical variance range can all be determined according to actual needs or empirical values. For example, the Gaussian parameter range can be [5, 7, 9, 11, 13, ..., 31]. The random selection method can make the Gaussian blur of the first degraded image obtained by multiple processings maintain a certain difference. When the first degraded image is used as a training sample, the diversity of the training samples can be maintained.

[0053] After the Gaussian blur processing of the embodiment of the present application, Gaussian blur can be added to the high-quality low-resolution image after the downsampling processing to obtain a first degraded image, and the resolution of the first degraded image is the same as that of the high-quality low-resolution image after the downsampling processing.

[0054] Optionally, the image processing method provided in the embodiment of the present application further includes: performing Gaussian noise processing on the first degraded image according to configured Gaussian noise parameters to obtain a second degraded image; the Gaussian noise parameters include a mean and a standard deviation.

[0055] Optionally, the mean and standard deviation may be randomly selected based on a preset mean range and standard deviation range, respectively, in the following manner:

[0056] mean=normal(ave mean ,var mean ) Expression (1)

[0057] std=normal(ave std ,var std ) Expression (2)

[0058] In expressions (1) and (2), mean represents the mean of the Gaussian noise parameters, std represents the standard deviation of the Gaussian noise parameters, and ave mean Indicates the mean of each value within the preset mean range, var mean Indicates the variance of each value within the preset mean range, ave std Represents the mean of each value within the preset standard deviation range, var std Indicates the variance of each value within the preset standard deviation range, normal() represents the normal distribution function, normal(ave mean ,var mean ) means returning a value that follows the mean ave mean and variance var mean A value of the normal distribution, normal(ave std ,var std ) means returning a value that follows the mean ave std and variance var std A value from a normal distribution.

[0059] After the Gaussian noise processing of the embodiment of the present application, Gaussian noise may be added to the first degraded image to obtain a second degraded image, and the resolution of the second degraded image is the same as that of the first degraded image.

[0060] The Gaussian noise parameters are determined by the above-mentioned random selection method, so that the Gaussian noise of the obtained second degraded image can maintain a certain difference. When the second degraded image is used as a training sample, the diversity of the training samples can be maintained.

[0061] Optionally, the image processing method provided in an embodiment of the present application further includes: performing Gaussian noise processing on the second degraded image according to a configured scaling blur processing path to obtain a third degraded image; the scaling blur processing path includes the following three sampling steps: a sampling step based on a Bicubic algorithm, a sampling step based on a Bilinear algorithm, and a sampling step based on a Lanczos algorithm; the sampling ratio of each sampling step in the scaling blur processing path is within the second ratio range.

[0062] Optionally, the second magnification range may be determined according to actual needs or empirical values. For example, it may be set to a range greater than 0, or a range greater than 0 and not greater than 16.

[0063] In one example, the configurations of the sampling ratios and sampling methods in the three sampling steps in the zoom blur processing path are shown in Table 2.

[0064] Table 2

[0065] step Sampling rate Sampling method 1 0.5 Bicubic 2 2 Bilinear 3 0.25 Lanczos

[0066] In this configuration, the scale blur processing path is: 0.5 times sampling using the Bicubic method in the first sampling step, 2 times sampling using the Bilinear method in the second sampling step, and 0.25 times sampling using the Lanczos method in the third sampling step.

[0067] Optionally, the sampling method adopted in each sampling step in the scaling blur processing path can be any one of Bicubic, Bilinear and Lanczos, or other algorithms known in the art that can implement the scaling blur processing in the embodiment of the present application; each sampling step can adopt the same sampling method or different sampling methods.

[0068] After the scaling blur processing of the embodiment of the present application, scaling blur may be added to the second degraded image to obtain a third degraded image, and the resolution of the third degraded image is the same as that of the second degraded image.

[0069] Optionally, the image processing method provided in the embodiment of the present application further includes: performing compression noise processing on the third degraded image according to configured compression noise parameters to obtain a fourth degraded image.

[0070] Optionally, the compression noise parameter comprises a coding quality coefficient.

[0071] Optionally, performing compression noise processing on the third degraded image according to the configured compression noise parameters includes: performing image encoding, such as JPEG encoding, on pixels of the third degraded image according to the encoding quality coefficient.

[0072] Optionally, the encoding quality coefficient may be randomly selected based on a preset coefficient range.

[0073] In an optional implementation, the encoding quality coefficient is determined by:

[0074] Q jepg =normal(ave q ,var q )Expression (3)

[0075] In expression (3), Q jepg Indicates the coding quality coefficient, ave q Indicates the mean of the values ​​within the preset coefficient range, var q Indicates the variance of each value within the preset coefficient range, normal() represents the normal distribution function, normal(ave q ,var q ) means returning a value that follows the mean ave q and variance var q A value from a normal distribution.

[0076] The above coefficient range can be determined through experiments based on the shooting time, equipment, distribution and transfer process of the first original image.

[0077] After the compression noise processing of the embodiment of the present application, compression noise may be added to the third degraded image to obtain a fourth degraded image; the resolution of the fourth degraded image is the same as that of the third degraded image.

[0078] An optional implementation of the image processing method provided in the present application is as follows: Figure 2 As shown, the first original image, i.e., the high-quality and high-resolution image, is processed in sequence as follows:

[0079] Based on the downsampling processing path, the first original image is downsampled to obtain a high-quality low-resolution image; based on the Gaussian blur parameter, Gaussian blur is added to the high-quality low-resolution image through Gaussian blur processing to obtain a low-resolution image containing blur (i.e., a first degraded image); based on the Gaussian noise parameter, Gaussian noise is added to the low-resolution image after blurring through Gaussian noise processing to obtain a low-resolution image with blur and Gaussian noise added (i.e., a second degraded image); based on the scaling blur processing path, scaling blur is added to the low-resolution image with blur and Gaussian noise added through scaling blur processing to obtain a low-resolution image with multiple blurs (including Gaussian blur and scaling blur) and Gaussian noise added (i.e., a third degraded image); based on the compression noise parameter, compression noise is added to the low-resolution image with multiple blurs and Gaussian noise added through compression noise processing to obtain and output a low-resolution image with multiple blurs, Gaussian noise and compression noise added (i.e., a fourth degraded image).

[0080] In one example, an input high-quality high-resolution image such as Figure 3 As shown, after Figure 2 The fourth degraded image obtained by the processing shown in FIG. Figure 4 As shown by Figure 3 and Figure 4 It can be seen that the above-mentioned image processing method provided in the embodiment of the present application can obtain images with effects close to those of old photos, providing better training samples for the restoration of old photos.

[0081] Based on the same inventive concept, an embodiment of the present application provides a training method for an image processing model, the training method comprising:

[0082] The plurality of first original images and the plurality of degraded images corresponding to the plurality of first original images are used as training data sets to train the image processing model so that the loss function of the image processing model converges.

[0083] The degraded image is obtained by processing the first original image according to the image processing method provided in the aforementioned embodiment of the present application, and the degraded image may be any one of the aforementioned first degraded image, second degraded image, third degraded image and fourth degraded image.

[0084] Based on the same inventive concept, the present application embodiment provides another image processing method, such as Figure 5 As shown, the image processing method includes:

[0085] S501, obtaining a second original image to be processed.

[0086] Optionally, the second original image is a low-quality and low-resolution image, specifically, it may be an old photo from a specific era, or a photo with low image quality and resolution (for example, both are lower than corresponding thresholds).

[0087] S502, inputting the second original image into the image processing model, and obtaining a processed image based on the output of the image processing model.

[0088] The image processing model is obtained by training using the image processing model training method provided in the embodiment of the present application.

[0089] Use Figure 5 The image processing method shown in FIG. 1 can repair the low-quality and low-resolution second original image to obtain a high-quality and high-resolution image. Figure 6 The second original image shown in Figure 5 The image processing method shown in FIG. 1 is used to process the image. The processed image is as follows: Figure 7 As shown, Figure 6 compared to, Figure 7 The image quality and image resolution are greatly improved.

[0090] The application of the image processing method and the image processing model training method provided in the embodiments of the present application can at least achieve the following beneficial effects:

[0091] The embodiments of the present application can add various degradation factors such as blur and noise to new photos (i.e., high-quality and high-resolution photos) to obtain degraded images that are close to the effect of old photos, establish a mathematical relationship between old photos and new photos, and provide better training samples for the application of machine learning in old photo restoration technology; based on the training samples, the image processing model used in the old photo restoration technology is trained to obtain an image processing model with stronger restoration effect, and the image processing model is used to restore the old photos with high restoration efficiency and better restoration effect.

[0092] Based on the same inventive concept, an image processing device provided in an embodiment of the present application is as follows: Figure 8 As shown, the image processing device includes: a first image acquisition module 801 and a first image processing module 802.

[0093] The first image acquisition module 801 is used to acquire a first original image to be processed.

[0094] The first image processing module 802 is used to perform downsampling processing and Gaussian blur processing on the first original image in sequence according to the configured downsampling processing path and Gaussian blur parameters to obtain a first degraded image; the downsampling processing path includes multiple sampling steps, and the Gaussian blur parameters include: Gaussian kernel size, horizontal variance and vertical variance.

[0095] Optionally, the first image processing module 802 includes a down-sampling unit and a Gaussian blur unit.

[0096] The downsampling unit is used to perform downsampling processing on the first original image according to the configured downsampling processing path; the Gaussian blur unit is used to perform Gaussian blur processing on the image obtained after the downsampling processing according to the configured Gaussian blur parameters to obtain a first degraded image.

[0097] Optionally, the first image processing module 802 further includes a Gaussian noise unit; the Gaussian noise unit is used to: perform Gaussian noise processing on the first degraded image according to configured Gaussian noise parameters to obtain a second degraded image; the Gaussian noise parameters include a mean and a standard deviation.

[0098] Optionally, the first image processing module 802 also includes a scaling blur unit; the scaling blur unit is used to: perform Gaussian noise processing on the second degraded image according to a configured scaling blur processing path to obtain a third degraded image; the scaling blur processing path includes multiple sampling steps, and the sampling ratio of each sampling step in the scaling blur processing path is within the second ratio range.

[0099] Optionally, the first image processing module 802 further includes a compression noise unit; the compression noise unit is configured to: perform compression noise processing on the third degraded image according to configured compression noise parameters to obtain a fourth degraded image.

[0100] Optionally, the noise compression unit is specifically configured to: perform image encoding on pixels of the third degraded image according to the encoding quality coefficient.

[0101] Based on the same inventive concept, an embodiment of the present application provides a training device for an image processing model, and the training device includes: an image training module.

[0102] The image training module is used to use the multiple first original images and the multiple degraded images corresponding to the multiple first original images as training data sets to train the image processing model so that the loss function of the image processing model converges.

[0103] The degraded image is obtained by processing the first original image according to the image processing method provided in the embodiment of the present application.

[0104] Based on the same inventive concept, an image processing device provided in an embodiment of the present application is as follows: Fig. 9 As shown, the image processing device includes: a second image acquisition module 901 and a second image processing module 902 .

[0105] The second image acquisition module 901 is used to acquire a second original image to be processed.

[0106] The second image processing module 902 is used to input the second original image into the image processing model, and obtain a processed image based on the output of the image processing model.

[0107] The image processing model is obtained by training using the image processing model training method provided in the embodiment of the present application.

[0108] The various devices provided in the embodiments of the present application can correspondingly execute the various methods provided in the embodiments of the present application, and the implementation principles are similar. The contents not shown in detail in the various devices can be referred to the aforementioned embodiments and will not be repeated here.

[0109] Based on the same inventive concept, an embodiment of the present application provides an image processing device, which includes: a memory and a processor, and the memory is electrically connected to the processor.

[0110] A computer program is stored in the memory, and the computer program is executed by the processor to implement at least one of the following methods provided in the embodiments of the present application: any image processing method and a training method for an image processing model.

[0111] Those skilled in the art will appreciate that the image processing device provided by the embodiments of the present application can be specially designed and manufactured for the desired purpose, or can also include known devices in a general-purpose computer. These devices have computer programs stored therein, which are selectively activated or reconstructed. Such a computer program can be stored in a device (e.g., computer) readable medium or in a medium suitable for storing electronic instructions and coupled to any type of bus respectively.

[0112] In an optional embodiment, the present application provides an image processing device, such as Fig.10 As shown, the image processing device 1000 includes: a memory 1001 and a processor 1002 , and the memory 1001 and the processor 1002 are electrically connected, such as connected via a bus 1003 .

[0113] Optionally, the memory 1001 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 1002. The processor 1002 is used to execute the application code stored in the memory 1001 to implement at least one of the following methods provided in the embodiments of the present application: any image processing method and image processing model training method.

[0114] The memory 1001 may be a ROM (Read-Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read-Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0115] Processor 1002 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1002 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0116] The bus 1003 may include a path to transmit information between the above components. The bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0117] Optionally, the image processing device 1000 may further include a transceiver 1004. The transceiver 1004 may be used for receiving and sending signals. The transceiver 1004 may allow the image processing device 1000 to communicate with other devices wirelessly or by wire to exchange data. It should be noted that in actual applications, the transceiver 1004 is not limited to one.

[0118] Optionally, the image processing device 1000 may further include an input unit 1005. The input unit 1005 may be used to receive input digital, character, image and / or sound information, or generate key signal input related to user settings and function control of the electronic device 1000. The input unit 1005 may include, but is not limited to, one or more of a touch screen, a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, a camera, a microphone, etc.

[0119] Optionally, the image processing device 1000 may further include an output unit 1006. The output unit 1006 may be used to output or display information processed by the processor 1002. The output unit 1006 may include but is not limited to one or more of a display device, a speaker, a vibration device, and the like.

[0120] Although Fig.10 The image processing apparatus 1000 having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0121] The image processing device provided in the embodiment of the present application has the same inventive concept as the embodiments described above. The contents not shown in detail in the image processing device can be referred to the embodiments described above and will not be repeated here.

[0122] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements at least one of the following methods provided in the embodiment of the present application: any image processing method and image processing model training method.

[0123] The computer readable medium includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM, RAM, EPROM (Erasable Programmable Read-Only Memory), EEPROM, flash memory, magnetic card or optical card. In other words, the readable medium includes any medium that can store or transmit information in a readable form by a device (e.g., a computer).

[0124] The computer-readable storage medium provided in the embodiment of the present application has the same inventive concept as the embodiments described above. The contents not shown in detail in the computer-readable storage medium can be referred to the embodiments described above and will not be repeated here.

[0125] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, altered, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted.

[0126] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0127] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0128] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An image processing method, characterized in that: include: Acquire a first original image to be processed; According to the configured downsampling processing path and Gaussian blur parameters, downsampling processing and Gaussian blur processing are sequentially performed on the first original image to obtain a first degraded image; The downsampling processing path includes a plurality of sampling steps, and the Gaussian blur parameters include: Gaussian kernel size, horizontal variance and vertical variance; The image processing method further comprises: Performing Gaussian noise processing on the first degraded image according to the configured Gaussian noise parameters to obtain a second degraded image; The Gaussian noise parameters include mean and standard deviation; According to the configured scaling blur processing path, performing Gaussian noise processing on the second degraded image to obtain a third degraded image; The zoom blur processing path includes the following three sampling steps: a sampling step based on a bicubic interpolation algorithm, a sampling step based on a bilinear interpolation algorithm, and a sampling step based on a Lanczos algorithm; The sampling magnification of each sampling step in the scaling blur processing path is within a second magnification range; performing compression noise processing on the third degraded image according to the configured compression noise parameters to obtain a fourth degraded image; Wherein, the compression noise parameter includes a coding quality coefficient; The performing compression noise processing on the third degraded image according to the configured compression noise parameters includes: performing image encoding on pixels of the third degraded image according to the encoding quality coefficient; The coding quality coefficient is determined in the following way: Q jepg =normal(bird q ,var q ) Q jepg Indicates the coding quality coefficient, ave q Indicates the mean of the values ​​within the preset coefficient range, var q Indicates the variance of each value within the preset coefficient range, normal() represents the normal distribution function, normal(ave q ,var q ) means returning a value that follows the mean ave q and variance var q A value from a normal distribution.

2. The image processing method according to claim 1, characterized in that: The downsampling processing path includes the following three sampling steps: a sampling step based on a bicubic interpolation algorithm, a sampling step based on a bilinear interpolation algorithm, and a sampling step based on a Lanczos algorithm; The sampling magnification of each of the sampling steps in the down-sampling processing path is within a first magnification range.

3. A training method for an image processing model, characterized in that: include: Using a plurality of first original images and a plurality of degraded images corresponding to the plurality of first original images as training data sets, training an image processing model so that a loss function of the image processing model converges; The degraded image is obtained by processing the first original image according to the image processing method according to any one of claims 1 to 2.

4. An image processing device, characterized in that: include: Memory; A processor, electrically connected to the memory; The memory stores a computer program, and the computer program is executed by the processor to implement at least one of the following methods: the image processing method described in any one of claims 1 to 2, and the training method of the image processing model described in claim 3.

5. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, at least one of the following methods is implemented: the image processing method described in any one of claims 1 to 2, and the image processing model training method described in claim 3.