Model training and image processing method, device, equipment and computer-readable medium

By cascading training of the image deblurring network and the image super-resolution network, the problem of poor output quality of the image super-resolution network is solved, and higher quality image super-resolution effects are achieved.

CN112488947BActive Publication Date: 2025-09-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011403478.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-04
Publication Date
2025-09-05
Estimated Expiration
2041-05-16

AI Technical Summary

Technical Problem

The existing image super-resolution network has poor output quality during the prediction process because the image deblurring network and the image super-resolution network are trained independently and have different input distributions.

Method used

A cascade training method is adopted, in which the output of the image deblurring network is directly used to train the image super-resolution network, ensuring that the input distribution is consistent with that during the training process.

Benefits of technology

Improved the output quality of the image super-resolution network during the prediction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112488947B_ABST
    Figure CN112488947B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a model training method, apparatus, electronic device, and computer-readable medium. A specific implementation of the method includes: obtaining a first batch of training samples, each first training sample in the first batch of training samples includes a first original blurred image and a first super-resolved clear image corresponding to the first original blurred image; inputting the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; and using the first predicted clear image and the first super-resolved clear image in the first batch of training samples to train an image super-resolved network. This implementation improves the output quality of the image super-resolved network during the prediction process by cascading training of the image deblurring network and the image super-resolved network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to model training and image processing methods, devices, equipment, and computer-readable media. Background Art

[0002] In the field of image processing using artificial intelligence (AI), a blurred image is often first fed into an image deblurring network to obtain a predicted clear image. This predicted clear image is then fed into an image super-resolution network to obtain a predicted super-resolved clear image. However, image super-resolution networks trained using related technologies often exhibit suboptimal output quality during the prediction process. Summary of the Invention

[0003] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] Some embodiments of the present disclosure provide model training methods, devices, equipment, and computer-readable media.

[0005] In a first aspect, some embodiments of the present disclosure provide a model training method, which includes: obtaining a first batch of training samples, each first training sample in the above-mentioned first batch of training samples includes a first original blurred image and a first super-resolved clear image corresponding to the above-mentioned first original blurred image; inputting the above-mentioned first original blurred image in the above-mentioned first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; using the above-mentioned first predicted clear image and the above-mentioned first super-resolved clear image in the above-mentioned first batch of training samples to train an image super-resolved network.

[0006] In a second aspect, some embodiments of the present disclosure provide an image processing method, which includes: inputting a target image into an image deblurring network to obtain a clear image, wherein the above-mentioned image deblurring network is generated by the image deblurring network training method in any embodiment of the present disclosure; inputting the above-mentioned clear image into an image super-resolution network to obtain a super-resolved clear image, wherein the above-mentioned image super-resolution network is generated by the image super-resolution network training method in any embodiment of the present disclosure.

[0007] In a third aspect, some embodiments of the present disclosure provide a model training device, comprising: a first acquisition unit, configured to acquire a first batch of training samples, each first training sample in the first batch of training samples comprising a first original blurred image and a first super-resolved clear image corresponding to the first original blurred image; a first input unit, configured to input the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; and a first training unit, configured to train an image super-resolved network using the first predicted clear image and the first super-resolved clear image in the first batch of training samples.

[0008] In a fourth aspect, some embodiments of the present disclosure provide an image processing device, comprising: a second input unit, configured to input the target image into an image deblurring network to obtain a clear image, wherein the above-mentioned image deblurring network is generated by the image deblurring network training method in any embodiment of the present disclosure; a third input unit, configured to input the above-mentioned clear image into an image super-resolution network to obtain a super-resolved clear image, wherein the above-mentioned image super-resolution network is generated by the image super-resolution network training method in any embodiment of the present disclosure.

[0009] In a fifth aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0010] In a sixth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.

[0011] One of the aforementioned embodiments of the present disclosure has the following beneficial effect: it improves the output quality of the image super-resolution network during the prediction process. Specifically, the inventors discovered that the reason why the image super-resolution network trained using related techniques has poor output quality during the prediction process is that related techniques train the image deblurring network and the image super-resolution network independently. That is, during the training process, the input to the image super-resolution network does not include the output of the image deblurring network, but rather samples from other sources. There is a distribution difference between these samples from other sources and the output of the image deblurring network, which results in poor output quality during the prediction process of the image super-resolution network trained using the above method. Based on this, the present solution proposes a training method for cascading the image deblurring network and the image super-resolution network. Specifically, the output of the image deblurring network during training is directly used to train the image super-resolution network, without using samples from other sources to train the image super-resolution network. In this cascade training, the input to the image super-resolution network during both the prediction and training processes is the output of the image dehazing network. In other words, the input distribution of the image super-resolution network during prediction and training is more consistent. This improves the output quality of the above-mentioned image super-resolution network during the prediction process. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0013] Figure 1 is a schematic diagram of an application scenario of the model training method in some embodiments of the present disclosure;

[0014] Figure 2 is a schematic diagram of an application scenario of the image processing method of some embodiments of the present disclosure;

[0015] Figure 3 is a flowchart of some embodiments of the model training method according to the present disclosure;

[0016] Figure 4 is a flowchart of some embodiments of the image processing method according to the present disclosure;

[0017] Figure 5 is a flowchart of other embodiments of the model training method according to the present disclosure;

[0018] Figure 6 is a schematic structural diagram of some embodiments of the model training device according to the present disclosure;

[0019] Figure 7is a schematic structural diagram of some embodiments of the image processing device according to the present disclosure;

[0020] Figure 8 It is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0021] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0022] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.

[0023] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0024] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0025] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0026] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0027] Figure 1 A schematic diagram showing an application scenario in which the model training method of some embodiments of the present disclosure can be applied.

[0028] exist Figure 1In the illustrated application scenario, computing device 101 may first obtain a first batch of training samples 102. Each first training sample in first batch 102 includes a first original blurred image and a first super-resolved image corresponding to the first original blurred image. Subsequently, the first original blurred image in the first batch of training samples is input into a pre-trained image deblurring network 103 to obtain a predicted clear image 104. Finally, the predicted clear image 104 and the super-resolved clear image in the training samples are used to train an image super-resolved network 105.

[0029] It should be noted that the computing device 101 can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or electronic devices, or as a single server or a single electronic device. When the computing device is software, it can be implemented as multiple software or software modules, for example, to provide distributed services, or as a single software or software module. This is not specifically limited here.

[0030] It should be understood that Figure 1 The number of computing devices 101 in FIG. 1 is merely illustrative and any number of computing devices 101 may be provided according to implementation requirements.

[0031] Further references Figure 2 , Figure 2 A schematic diagram shows an application scenario in which the image processing methods of some embodiments of the present disclosure can be applied.

[0032] exist Figure 2 In the application scenario shown, first, the computing device 201 may input the target image 202 into the image deblurring network 203 to obtain a clear image 204. Thereafter, the clear image 204 is input into the image super-resolution network 205 to obtain a super-resolved clear image 206.

[0033] It should be noted that the computing device 201 can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or electronic devices, or as a single server or a single electronic device. When the computing device is software, it can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. This is not specifically limited here.

[0034] It should be understood that Figure 2 The number of computing devices 201 in FIG. 2 is merely illustrative and any number of computing devices 201 may be provided according to implementation requirements.

[0035] Continue to refer Figure 3, shows a process 300 of some embodiments of the model training method according to the present disclosure. The model training method includes the following steps:

[0036] Step 301: Obtain the first batch of training samples.

[0037] In some embodiments, each first training sample in the first batch of training samples includes a first original blurred image and a first super-resolved image corresponding to the first original blurred image.

[0038] The first original blurred image may be an image with a contrast lower than a preset contrast threshold and a number of pixels lower than a preset threshold of the number of pixels.

[0039] In some embodiments, the first super-resolution image may be an image having the same content as the first original blurred image, a contrast higher than or equal to the preset contrast threshold, and a number of pixels higher than or equal to the preset pixel number threshold.

[0040] In some embodiments, the execution entity of the model training method (e.g. Figure 1 The computing device shown in FIG. 1 may obtain the first batch of training samples via a wired connection or a wireless connection. It should be noted that the wireless connection may include, but is not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultrawideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0041] Step 302: Input the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a predicted clear image.

[0042] In some embodiments, the image deblurring network can be a network of any structure with image feature extraction capabilities. As examples, the image deblurring network can include, but is not limited to, at least one of the following: GCANet (Gated Context Aggregation Network), DehazeNet (dehazing network), domain-adaptive image dehazing network, and Gated Fusion Network (threshold fusion network).

[0043] Step 303: Use the first predicted clear image and the first super-resolved clear image in the first batch of training samples to train an image super-resolved network.

[0044] In some embodiments, the image super-resolution network may be a network of any structure that has the function of improving image resolution. As an example, the image super-resolution network may include but is not limited to a Super-Resolution Convolutional Neural Network (Super-Resolution Convolutional Neural Network), a Pixel to Pixel GAN ​​(Pixel-Based Generative Adversarial Network), etc.

[0045] In some embodiments, the execution entity may train an image super-resolution network using the first predicted clear image and the first super-resolved clear image in the first batch of training samples through the following steps:

[0046] Step 1: Input the first predicted clear image into the image super-resolution network to obtain a first predicted super-resolution clear image.

[0047] Step 2: Analyze and compare the first predicted super-resolution image with the first super-resolution image to obtain a first comparison result.

[0048] As an example, the execution entity may first determine a first difference between each pixel value in the first predicted super-resolved image and the corresponding pixel value in the first super-resolved image to obtain a plurality of first differences. Thereafter, the first comparison result may be determined as the sum of the absolute values ​​of the plurality of first differences.

[0049] Step three: determining a first loss value of the first predicted super-resolved image according to the first comparison result.

[0050] As an example, the execution entity may determine a result of taking a logarithm of the first comparison result as the first loss value.

[0051] As another example, the execution entity may also directly determine the first comparison result as the first loss value.

[0052] Step 4: In response to determining that the image super-resolution network has not been trained, adjust the parameters of the image super-resolution network.

[0053] In some embodiments, the execution entity may determine whether the image super-resolution network has been trained by determining whether the current number of training times is greater than a first preset number threshold.

[0054] In some embodiments, the execution entity may also determine whether the image super-resolution network is trained by determining whether the first loss value is less than a first preset loss value threshold.

[0055] Some embodiments of the present disclosure provide methods that improve the output quality of the image super-resolution network during the prediction process by cascading training of the image deblurring network and the image super-resolution network.

[0056] Continue to refer Figure 4 , shows a process 400 of some embodiments of the image processing method according to the present disclosure. The image processing method comprises the following steps:

[0057] Step 401: Input the target image into the image deblurring network to obtain a clear image.

[0058] The above-mentioned image deblurring network is generated by the image deblurring network training method in any embodiment of the present disclosure.

[0059] In step 402, the clear image is input into an image super-resolution network to obtain a super-resolved clear image, wherein the image super-resolution network is generated by the image super-resolution network training method in any embodiment of the present disclosure.

[0060] Further references Figure 5 , which shows a process 500 of another embodiment of the model training method. The process 500 of the model training method includes the following steps:

[0061] Step 501: Acquire a first batch of training samples, where each first training sample in the first batch of training samples includes a first original blurred image and a first super-resolved image corresponding to the first original blurred image.

[0062] Step 502: Input the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a predicted clear image.

[0063] Step 503: Use the first predicted clear image and the first super-resolved clear image in the first batch of training samples to train an image super-resolved network.

[0064] In some embodiments, the specific implementation of steps 501-503 and the technical effects thereof can be referred to in Figure 3 Steps 301-303 in the corresponding embodiment are not described again here.

[0065] Step 504 : Acquire a second batch of training samples, where each second training sample in the second batch of training samples includes a second original blurred image and a second super-resolved image corresponding to the second original blurred image.

[0066] In some embodiments, the second original blurred image may be an image having a contrast lower than a preset contrast threshold and a number of pixels lower than a preset pixel number threshold.

[0067] In some embodiments, the second super-resolved image may be an image having the same content as the second original blurred image, a contrast ratio greater than or equal to the preset contrast threshold, and a number of pixels greater than or equal to the preset pixel number threshold.

[0068] In some embodiments, the execution entity of the model training method (e.g. Figure 1 The computing device shown in FIG. 1 may obtain the second batch of training samples via a wired connection or a wireless connection. It should be noted that the wireless connection may include, but is not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0069] Step 505: Use the second batch of training samples to train the image deblurring network.

[0070] In some embodiments, the execution entity may train the image deblurring network using the second batch of training samples through the following steps:

[0071] Step 1: Input the second original blurred image in the second batch of training samples into the image deblurring network to obtain a second predicted clear image.

[0072] Step 2: Input the second predicted clear image into the image super-resolution network to obtain a second predicted super-resolution clear image.

[0073] Step three: Analyze and compare the second predicted super-resolution image with the second super-resolution image in the second batch of training samples to obtain a second comparison result.

[0074] As an example, the execution entity may first determine a second difference between each pixel value in the second predicted super-resolved image and the corresponding pixel value in the second super-resolved image to obtain a plurality of second differences. Thereafter, the second comparison result may be determined as the sum of the absolute values ​​of the plurality of second differences.

[0075] Step three: determining a second loss value of the second predicted super-resolved image according to the second comparison result.

[0076] As an example, the execution entity may determine a result of taking a logarithm of the second comparison result as the second loss value.

[0077] As another example, the execution entity may also directly determine the second comparison result as the second loss value.

[0078] Step 4: In response to determining that the image deblurring network has not been trained, adjust parameters in the image deblurring network.

[0079] In some embodiments, the execution entity may determine whether the image deblurring network has been trained by determining whether the number of training times is greater than a second preset number threshold.

[0080] In some embodiments, the execution entity may further determine whether the image deblurring network is trained by determining whether the second loss value is less than a preset threshold of the second loss value.

[0081] Step 506 : Obtain a third batch of training samples, where each third training sample in the third batch of training samples includes a third original blurred image and a third super-resolved image corresponding to the third original blurred image.

[0082] In some embodiments, the third original blurred image may be an image having a contrast lower than a preset contrast threshold and a number of pixels lower than a preset pixel number threshold.

[0083] In some embodiments, the third super-resolved image may be an image having the same content as the third original blurred image, a contrast ratio greater than or equal to the preset contrast threshold, and a number of pixels greater than or equal to the preset pixel number threshold.

[0084] In some embodiments, the execution entity of the model training method (e.g. Figure 1 The computing device shown in FIG. 1 may obtain the third batch of training samples via a wired connection or a wireless connection. It should be noted that the wireless connection may include, but is not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0085] Step 507: Use the third batch of training samples to train the image deblurring network and the image super-resolution network.

[0086] In some embodiments, the execution entity may use the third batch of training samples to train the image deblurring network and the image super-resolution network through the following steps:

[0087] Step 1: Input the third original blurred image in the third batch of training samples into the image deblurring network to obtain a third predicted clear image.

[0088] Step 2: Input the third predicted clear image into the image super-resolution network to obtain a third predicted super-resolution clear image.

[0089] Step three: analyzing and comparing the third predicted super-resolution image with the third super-resolution image in the third batch of training samples to obtain a third comparison result.

[0090] As an example, the execution entity may first determine a third difference between each pixel value in the third predicted super-resolved image and the corresponding pixel value in the third super-resolved image to obtain a plurality of third differences. Thereafter, the third comparison result may be determined as the sum of the absolute values ​​of the plurality of third differences.

[0091] Step three: determining a third loss value of the third predicted super-resolved image according to the third comparison result.

[0092] As an example, the execution entity may determine a result of taking a logarithm of the third comparison result as the third loss value.

[0093] As another example, the execution entity may also directly determine the third comparison result as the third loss value.

[0094] Step 4: In response to determining that the image deblurring network and the image super-resolution network have not been trained, adjust the parameters of the image deblurring network and the image super-resolution network.

[0095] In some embodiments, the execution entity may determine whether the image deblurring network and the image super-resolution network have been trained by determining whether the current number of training times is greater than a third preset number threshold.

[0096] In some embodiments, the execution entity may also determine whether the image deblurring network and the image super-resolution network are trained by determining whether the third loss value is less than a preset threshold value of the third loss value.

[0097] from Figure 5 It can be seen that Figure 3 Compared with the description of some corresponding embodiments, Figure 5 In the model training method described in process 500 of some corresponding embodiments, a second batch of training samples is obtained to train the image deblurring network separately, resulting in a higher-quality image deblurring network. On this basis, a third batch of training samples is obtained to simultaneously train the image deblurring network and the image super-resolution network. This further improves the cascaded prediction performance of the image deblurring network and the image super-resolution network.

[0098] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a model training device. These device embodiments are similar to Figure 3Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0099] like Figure 6 As shown, the model training apparatus 600 of some embodiments includes: a first acquisition unit 601, a first input unit 602, and a first training unit 603. The first acquisition unit 601 is configured to acquire a first batch of training samples, wherein each first training sample in the first batch of training samples includes a first original blurred image and a first super-resolved clear image corresponding to the first original blurred image; the first input unit 602 is configured to input the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; and the first training unit 603 is configured to train the image super-resolved network using the first predicted clear image and the first super-resolved clear image in the first batch of training samples.

[0100] In an optional implementation of some embodiments, the device also includes: a second acquisition unit, configured to acquire a second batch of training samples, each second training sample in the above second batch of training samples includes a second original blurred image and a second super-resolved clear image corresponding to the above second original blurred image; a second training unit, configured to use the above second batch of training samples to train the above image deblurring network.

[0101] In an optional implementation of some embodiments, the device also includes: a third acquisition unit, configured to acquire a third batch of training samples, each third training sample in the above third batch of training samples includes a third original blurred image and a third super-resolved clear image corresponding to the above third original blurred image; a third training unit, configured to use the above third batch of training samples to train the above image deblurring network and the above image super-resolved network.

[0102] It is understood that the units described in the device 600 are similar to those in the reference Figure 3 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 600 and the units included therein, and will not be repeated here.

[0103] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an image processing device. These device embodiments are similar to Figure 4 The device can be applied to various electronic devices.

[0104] like Figure 7As shown, the model training device 700 of some embodiments includes: a second input unit 701 and a third input unit 702. The second input unit 701 is configured to input the target image into the image deblurring network to obtain a clear image, wherein the image deblurring network is generated by the image deblurring network training method in any embodiment of the present disclosure; the third input unit 702 is configured to input the clear image into the image super-resolution network to obtain a super-resolved clear image, wherein the image super-resolution network is generated by the image super-resolution network training method in any embodiment of the present disclosure.

[0105] Reference below Figure 8 , which shows an electronic device (eg, Figure 1 The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0106] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0107] Typically, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 8 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0108] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.

[0109] It should be noted that the computer-readable medium described in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0110] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0111] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a first batch of training samples, each first training sample in the first batch of training samples includes a first original blurred image and a first super-resolved clear image corresponding to the first original blurred image; inputs the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; and trains the image super-resolved network using the first predicted clear image and the first super-resolved clear image in the first batch of training samples.

[0112] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0114] The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor includes a first acquisition unit, a first input unit, and a first training unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the first acquisition unit may also be described as a "unit for acquiring the first batch of training samples."

[0115] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0116] According to one or more embodiments of the present disclosure, a model training method is provided, comprising: obtaining a first batch of training samples, each first training sample in the first batch of training samples comprising a first original blurred image and a first super-resolved clear image corresponding to the first original blurred image; inputting the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; and training an image super-resolved network using the first predicted clear image and the first super-resolved clear image in the first batch of training samples.

[0117] According to one or more embodiments of the present disclosure, the method further includes: obtaining a second batch of training samples, each second training sample in the second batch of training samples including a second original blurred image and a second super-resolved clear image corresponding to the second original blurred image; and using the second batch of training samples to train the image deblurring network.

[0118] According to one or more embodiments of the present disclosure, the method further includes: obtaining a third batch of training samples, each third training sample in the third batch of training samples including a third original blurred image and a third super-resolved clear image corresponding to the third original blurred image; and using the third batch of training samples to train the image deblurring network and the image super-resolved network.

[0119] According to one or more embodiments of the present disclosure, an image processing method is provided, comprising: inputting a target image into an image deblurring network to obtain a clear image, wherein the image deblurring network is generated by the image deblurring network training method in any embodiment of the present disclosure; and inputting the clear image into an image super-resolution network to obtain a super-resolved clear image, wherein the image super-resolution network is generated by the image super-resolution network training method in any embodiment of the present disclosure.

[0120] According to one or more embodiments of the present disclosure, a model training device is provided, comprising: a first acquisition unit, configured to acquire a first batch of training samples, each first training sample in the first batch of training samples comprising a first original blurred image and a first super-resolved clear image corresponding to the first original blurred image; a first input unit, configured to input the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; and a first training unit, configured to train an image super-resolved network using the first predicted clear image and the first super-resolved clear image in the first batch of training samples.

[0121] According to one or more embodiments of the present disclosure, the apparatus further includes: a second acquisition unit configured to acquire a second batch of training samples, each second training sample in the second batch of training samples including a second original blurred image and a second super-resolved clear image corresponding to the second original blurred image; and a second training unit configured to train the image deblurring network using the second batch of training samples.

[0122] According to one or more embodiments of the present disclosure, the apparatus further includes: a third acquisition unit configured to acquire a third batch of training samples, each third training sample in the third batch of training samples including a third original blurred image and a third super-resolved clear image corresponding to the third original blurred image; and a third training unit configured to train the image deblurring network and the image super-resolved network using the third batch of training samples.

[0123] According to one or more embodiments of the present disclosure, an image processing device is provided, comprising: a second input unit, configured to input a target image into an image deblurring network to obtain a clear image, wherein the image deblurring network is generated by the image deblurring network training method in any embodiment of the present disclosure; and a third input unit, configured to input the clear image into an image super-resolution network to obtain a super-resolved clear image, wherein the image super-resolution network is generated by the image super-resolution network training method in any embodiment of the present disclosure.

[0124] According to one or more embodiments of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above methods.

[0125] According to one or more embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, any of the above methods is implemented.

[0126] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A model training method, comprising: Acquire a first batch of training samples, where each first training sample in the first batch of training samples includes a first original blurred image and a first super-resolved image corresponding to the first original blurred image; Inputting the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; Training an image super-resolution network using the first predicted clear image and the first super-resolution clear image in the first batch of training samples; The image deblurring network is a network with an image feature extraction function, and the image super-resolution network is a network with an image resolution improvement function. The method further comprises: Acquire a second batch of training samples, where each second training sample in the second batch of training samples includes a second original blurred image and a second super-resolved image corresponding to the second original blurred image; Using the second batch of training samples to train the image deblurring network; The method further comprises: Acquire a third batch of training samples, where each third training sample in the third batch of training samples includes a third original blurred image and a third super-resolved image corresponding to the third original blurred image; Using the third batch of training samples, training the image deblurring network and the image super-resolution network; The step of training an image super-resolution network using the first predicted clear image and the first super-resolution clear image in the first batch of training samples includes: Inputting the first predicted clear image into the image super-resolution network to obtain a first predicted super-resolution clear image; Analyze and compare the first predicted super-resolved image with the first super-resolved image to obtain a first comparison result; Determining a first loss value of the first predicted super-resolved image according to the first comparison result; Determining whether the image super-resolution network is trained by determining whether the first loss value is less than a first preset loss value threshold; In response to determining that the image super-resolution network has not been trained, adjusting parameters in the image super-resolution network; The analyzing and comparing the first predicted super-resolution image with the first super-resolution image to obtain a first comparison result includes: determining a first difference between each pixel value in the first predicted super-resolved image and a corresponding pixel value in the first super-resolved image to obtain a plurality of first difference values; determining a sum of the absolute values ​​of the plurality of first differences as the first comparison result; The determining a first loss value of the first predicted super-resolved image according to the first comparison result includes: A result of taking the logarithm of the first comparison result is determined as the first loss value.

2. An image processing method, comprising: Inputting the target image into an image deblurring network to obtain a clear image, wherein the image deblurring network is generated by the method according to claim 1; Inputting the clear image into an image super-resolution network to obtain a super-resolved clear image, wherein the image super-resolution network is generated by the method according to claim 1; The image deblurring network is a network with an image feature extraction function, and the image super-resolution network is a network with an image resolution improvement function.

3. A model training device comprising: A first acquiring unit is configured to acquire a first batch of training samples, where each first training sample in the first batch of training samples includes a first original blurred image and a first super-resolved clear image corresponding to the first original blurred image; A first input unit is configured to input the first original blurred image in the first batch of training samples into a pre-trained image deblurring network to obtain a first predicted clear image; A first training unit is configured to train an image super-resolution network using the first predicted clear image and the first super-resolved clear image in the first batch of training samples; The image deblurring network is a network with an image feature extraction function, and the image super-resolution network is a network with an image resolution improvement function. Wherein, the device further comprises: A second acquiring unit is configured to acquire a second batch of training samples, each second training sample in the second batch of training samples includes a second original blurred image and a second super-resolved clear image corresponding to the second original blurred image; a second training unit, configured to train the image deblurring network using the second batch of training samples; Wherein, the device further includes: A third acquiring unit is configured to acquire a third batch of training samples, where each third training sample in the third batch of training samples includes a third original blurred image and a third super-resolved clear image corresponding to the third original blurred image; A third training unit is configured to train the image deblurring network and the image super-resolution network using the third batch of training samples; The first training unit includes: an input subunit, configured to input the first predicted clear image into the image super-resolution network to obtain a first predicted super-resolved clear image; an analyzing and comparing subunit, configured to analyze and compare the first predicted super-resolved image with the first super-resolved image to obtain a first comparison result; A first loss value determining subunit is configured to determine a first loss value of the first predicted super-resolved image according to the first comparison result; a training completion judgment subunit, configured to determine whether the image super-resolution network is trained by determining whether the first loss value is less than a first preset loss value threshold; a parameter adjustment subunit, configured to adjust parameters in the image super-resolution network in response to determining that the image super-resolution network has not been trained; The analysis and comparison subunit is specifically configured to: determining a first difference between each pixel value in the first predicted super-resolved image and a corresponding pixel value in the first super-resolved image to obtain a plurality of first difference values; determining a sum of the absolute values ​​of the plurality of first differences as the first comparison result; The first loss value determining subunit is specifically configured to: A result of taking the logarithm of the first comparison result is determined as the first loss value.

4. An image processing device comprising: A second input unit is configured to input the target image into an image deblurring network to obtain a clear image, wherein the image deblurring network is generated by the method according to claim 1; a third input unit, configured to input the clear image into an image super-resolution network to obtain a super-resolved clear image, wherein the image super-resolution network is generated by the method according to claim 1; The image deblurring network is a network with an image feature extraction function, and the image super-resolution network is a network with an image resolution improvement function.

5. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to claim 1 or claim 2.

6. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to claim 1 or claim 2 is implemented.

Citation Information

Patent Citations

  • Face recognition model training method and device, face recognition method and device, equipment and storage medium

    CN110543815A

  • Image super-resolution model training and processing method and device, equipment and medium

    CN111553840A