Method, apparatus, computer device and computer program for training an image processing network

The described method trains image processing networks through collaborative super-resolution, enhancement, and sharpening tasks, addressing inverse optimization effects to achieve enhanced image quality and clarity.

JP7566177B2Active Publication Date: 2024-10-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023570432
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-10-12
Filing Date
2022-09-08
Publication Date
2024-10-11
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

Existing image training methods face issues where multiple image models with different optimization tasks can have inverse optimization effects, leading to weakened overall optimization performance due to destructive interference.

Method used

A method and apparatus for training an image processing network that includes obtaining sample image pairs, adjusting resolution, performing super-resolution, image quality enhancement, face reinforcement, and sharpening processes while generating loss functions to update network parameters, ensuring collaborative training without conflicts.

Benefits of technology

The approach enhances the training effectiveness of image processing networks by integrating super-resolution, image quality enhancement, and face sharpening tasks, resulting in improved optimization without task collisions, leading to better overall image quality and clarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007566177000019
    Figure 0007566177000019
  • Figure 0007566177000020
    Figure 0007566177000020
  • Figure 0007566177000021
    Figure 0007566177000021
Patent Text Reader

Abstract

A method for training an image processing network, comprising: a step of obtaining sample super-resolution image data corresponding to low-resolution image data by invoking the image processing network, and combining the high-resolution image data to generate a super-resolution loss function (S102); a step of obtaining first sample augmented image data corresponding to the sample super-resolution image data, and combining the high-resolution image data to generate an image quality loss function (S103); a step of obtaining second sample augmented image data corresponding to the first sample augmented image data, and combining the high-resolution image data to generate a face loss function (S104); a step of obtaining sample sharpened image data corresponding to the second sample augmented image data, and combining the high-resolution image data to generate a sharpening loss function (S105); and a step of updating network parameters of the image processing network based on the super-resolution loss function, the image quality loss function, the face loss function, and the sharpening loss function (S106).
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application was filed with the China Patent Office on October 12, 2021, bearing application number 202111188444.9, and claims priority to a Chinese patent application entitled "Image Processing Network Training Method, Apparatus, Computer Equipment, and Storage Medium", the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the technical field of image processing, and in particular to a method, apparatus, computer device and storage medium for training an image processing network. [Background technology]

[0003] With the continuous development of computer networks, there are more and more scenarios for optimizing images, such as optimizing a certain photo of a user or optimizing an image frame in video data, etc. The image is optimized by training an image model. Summary of the Invention [Problem to be solved by the invention]

[0004] In the related art, when training an image model, multiple image models with different optimization tasks are trained respectively, and then the image is optimized by the multiple image models obtained by training so as to overlap in sequence. However, when optimizing an image by multiple image models, one image model may have a de-optimization effect on another image model, so that the optimization effect between each image model is weakened by each other, and the optimization effect of the image model obtained by training on the image is deteriorated. [Means for solving the problem]

[0005] One aspect of the present application provides a method for training an image processing network, the method comprising: acquiring a sample image pair, the sample image pair including low resolution image data and high resolution image data, the low resolution image data and the high resolution image data having the same image content; Adjusting the resolution of the low-resolution image data to a target resolution by invoking the image processing network to obtain sample super-resolution image data, and generating a super-resolution loss function according to the sample super-resolution image data and the high-resolution image data; performing an image quality enhancement process on the sample super-resolution image data by invoking the image processing network to obtain first sample enhanced image data; and generating an image quality loss function based on the first sample enhanced image data and the high-resolution image data; performing a face enhancement process on a face image in the first sample enhanced image data by invoking the image processing network to obtain a sample face enhancement image; fusing the sample face enhancement image and the first sample enhanced image data to obtain a second sample enhanced image data; and generating a face loss function based on the sample face enhancement image and the face image in the high-resolution image data; performing an image sharpening process on the second sample augmented image data by invoking the image processing network to obtain sample sharpened image data; and generating a sharpening loss function based on the sample sharpened image data and the high-resolution image data; updating network parameters of the image processing network based on the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network.

[0006] One aspect provides a method of image processing, the method comprising: Obtaining super-resolution image data corresponding to the initial image data by invoking the trained image processing network, where the resolution of the super-resolution image data is equal to or greater than the target resolution; performing an image quality enhancement process on the super-resolution image data by invoking the trained image processing network to obtain first enhanced image data; obtaining second augmented image data corresponding to the first augmented image data by invoking the trained image processing network, where if the first augmented image data includes a face image, the second augmented image data is image data obtained after performing face augmentation on the face image in the first augmented image data; The method includes performing an image sharpening process on the second reinforcement image data by invoking the trained image processing network to obtain sharpened image data, and outputting the sharpened image data.

[0007] One aspect provides an apparatus for training an image processing network, the apparatus comprising: a sample acquisition module for acquiring a sample image pair, the sample image pair including low resolution image data and high resolution image data, the low resolution image data and the high resolution image data having the same image content; A calling module adjusts a resolution of the low-resolution image data to a target resolution by calling an image processing network to obtain sample super-resolution image data, and generates a super-resolution loss function according to the sample super-resolution image data and the high-resolution image data, A calling module for performing an image quality enhancement process on the sample super-resolution image data by calling an image processing network to obtain first sample enhanced image data, and generating an image quality loss function based on the first sample enhanced image data and the high-resolution image data, a calling module for calling an image processing network to perform a face enhancement process on a face image in the first sample enhanced image data to obtain a sample face enhancement image, fusing the sample face enhancement image and the first sample enhanced image data to obtain a second sample enhanced image data, and generating a face loss function based on the sample face enhancement image and the face image in the high-resolution image data, A calling module for performing an image sharpening process on the second sample augmented image data by calling an image processing network to obtain sample sharpened image data, and generating a sharpening loss function based on the sample sharpened image data and the high-resolution image data; and an update module for updating network parameters of the image processing network based on the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network.

[0008] One aspect provides an image processing device, the device comprising: A super-resolution calling module obtains super-resolution image data corresponding to the initial image data by calling the trained image processing network, where the resolution of the super-resolution image data is equal to or greater than the target resolution; An image quality enhancement module that performs image quality enhancement processing on the super-resolution image data by invoking the trained image processing network to obtain first enhanced image data; a face reinforcement module that acquires second reinforcement image data corresponding to the first reinforcement image data by invoking the trained image processing network, and when the first reinforcement image data includes a face image, the second reinforcement image data is image data acquired after performing face reinforcement on the face image in the first reinforcement image data; and a sharpening module that performs an image sharpening process on the second reinforcement image data by invoking the trained image processing network to obtain sharpened image data, and outputs the sharpened image data.

[0009] One aspect provides a computing device, including a memory and a processor, the memory having computer readable instructions stored therein, the computer readable instructions, when executed by the processor, causing the processor to perform a method of one aspect of the present application.

[0010] One embodiment provides a non-volatile computer readable storage medium having computer readable instructions stored thereon that, when executed by a processor, cause the processor to perform the method of one embodiment above.

[0011] One aspect provides a computer program product or computer program, the computer program product or computer program including computer readable instructions, the computer readable instructions being stored in a computer readable storage medium, a processor of a computing device reading the computer readable instructions from the computer readable storage medium, and the processor executing the computer readable instructions, causing the computing device to perform a method provided by various possible aspects, such as one aspect above. [Brief description of the drawings]

[0012] In order to more clearly describe the technical solutions of the present application or the prior art, the following briefly introduces the necessary drawings in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings on the premise that they do not make efforts worthy of inventive step. [Figure 1] FIG. 1 is a structural schematic diagram of a network architecture provided by an embodiment of the present application; [Diagram 2] FIG. 1 is a schematic diagram of a network training scenario provided by the present application; [Diagram 3] FIG. 2 is a flow diagram of the method for training an image processing network provided by the present application. [Figure 4] 1 is a structural schematic diagram of an encoding and decoding network provided by the present application; [Diagram 5] FIG. 2 is a structural schematic diagram of a basic unit provided by the present application. [Figure 6] FIG. 1 is a schematic diagram of a scenario for obtaining the loss function provided by the present application. [Figure 7] 1 is a flow diagram of an image processing method provided by the present application; [Figure 8] FIG. 1 is a schematic diagram of a face optimization scenario provided by the present application. [Figure 9] FIG. 1 is a schematic diagram of an image optimization scenario provided by the present application. [Figure 10] FIG. 1 is a schematic diagram of a data push scenario provided by the present application. [Figure 11] FIG. 2 is a structural schematic diagram of the training device for the image processing network provided by the present application; [Figure 12] FIG. 1 is a structural schematic diagram of an image processing device provided by the present application; [Figure 13] FIG. 2 is a structural schematic diagram of a computer device provided by the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] Hereinafter, the technical solutions of the embodiments of the present application are clearly and completely described in conjunction with the drawings of the embodiments of the present application, and obviously, the described embodiments are not all the embodiments but only some of the embodiments of the present application. Based on the embodiments of the present application, on the premise that a person skilled in the art does not make any inventive efforts, all other embodiments obtained fall within the protection scope of the present application.

[0014] Please refer to Fig. 1, which is a structural schematic diagram of a network architecture provided by an embodiment of the present application. As shown in Fig. 1, the network architecture includes a server 200 and a terminal device cluster, and the terminal device cluster includes one or more terminal devices, where the number of terminal devices is not limited. As shown in Fig. 1, the multiple terminal devices specifically include terminal device 100a, terminal device 101a, terminal device 102a, ..., terminal device 103a, and as shown in Fig. 1, the terminal device 100a, terminal device 101a, terminal device 102a, ..., terminal device 103a can all be network-connected with the server 200, so that each terminal device performs data interaction with the server 200 through the network connection.

[0015] The server 200 in Fig. 1 may be an independent physical server, a server cluster or a distributed system consisting of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, safety services, CDN, big data and artificial intelligence platforms. The terminal device may be a smart terminal such as a smartphone, tablet, laptop, desktop computer, smart TV, or in-vehicle terminal. Hereinafter, an embodiment of the present application will be specifically described by taking the communication between the terminal device 100a and the server 200 as an example.

[0016] Please also refer to FIG. 2, which is a schematic diagram of a network training scenario provided by the present application. The above-mentioned terminal device 100a may have an application client, and the server 200 may be a background server of the application client. The server 200 can push video data to the application client. When pushing video data to the application client, the server 200 optimizes the video data before pushing it to the application client. The optimization of video data may refer to the optimization of each image frame contained in the video data. The server 200 optimizes the image frames in the video data through the trained image processing network. The training process of the image processing network can be referred to in the following description.

[0017] The image processing networks that need to be trained include a super-resolution network, an image quality enhancement network, a face enhancement network, and a sharpening network. The server 200 obtains a sample image pair, which includes low-resolution image data and high-resolution image data, and the server 200 inputs the sample image pair into the image processing network, and first performs super-resolution processing (i.e., increases the resolution of the low-resolution image data) on the low-resolution image data by the super-resolution network in the image processing network to obtain sample super-resolution image data, and generates a super-resolution loss function according to the sample super-resolution image data and the high-resolution image data.

[0018] Then, an image quality enhancement process (also called "enhancement process") is performed on the sample super-resolution image data by an image quality enhancement network in the image processing network to obtain first sample enhanced image data, and an image quality loss function is generated using the first sample enhanced image data and the high-resolution image data.

[0019] Next, a face reinforcement network in the image processing network performs face reinforcement on the face image in the first sample reinforced image data to obtain a sample face reinforcement image, and a face loss function is generated based on the sample face reinforcement image and the high-resolution face image in the high-resolution image data, and the sample face reinforcement image and the first sample reinforced image data are merged to generate second sample reinforced image data. For details, please refer to the corresponding description in the embodiment corresponding to Figure 3 below.

[0020] Next, a sharpening process is performed on the second sample supplemented image data by a sharpening network in the image processing network to obtain sample sharpened image data, and a sharpening loss function is generated by the sample sharpened image data and the high-resolution image data.

[0021] In the image processing network, the server 200 transmits the generated super-resolution loss function, image quality loss function, face loss function and sharpening loss function forward, and further updates the network parameters of the network transmitted to the image processing network by the super-resolution loss function, image quality loss function, face loss function and sharpening loss function to obtain a trained image processing network (also called a "trained image processing network"). Then, the trained image processing network optimizes an image, for example, the following initial image data, and the specific process of the optimization can be referred to the related description of the embodiment corresponding to FIG. 7 below.

[0022] In the related art, when training an image model, a plurality of image models having different optimization tasks (such as an image processing task for increasing image resolution, an image processing task for enhancing image quality, an image processing task for enhancing face enhancement effect, etc.) are trained respectively, and a plurality of image models are obtained by independent training, and these independent image models are used to sequentially overlap and optimize an image. However, there is a possibility that the different tasks may have a problem of conflict with each other, that is, when an image is processed by another image model after being correspondingly enhanced by one image model, the overall effect is worse, that is, the image processing tasks of the two image models collide, and this phenomenon is called destructive interference. For example, the image resolution can be increased by optimizing an image by an image model for increasing image resolution, and the image quality can be enhanced by optimizing an image by an image model for enhancing image quality. However, when the image with the increased resolution is further overlapped by the image model for enhancing image quality, the obtained image is distorted, and the overall effect of the image is worse, it indicates that the image processing tasks of the two image models have a conflict.

[0023] According to the model training method provided by the embodiment of the present application, a multi-task joint training framework is provided, from a super-resolution network, an image quality reinforcement network, a face reinforcement network to a sharpening network, in which the joint training framework cascades the super-resolution network, the image quality reinforcement network, the face reinforcement network to the sharpening network. In this way, during the training process, the super-resolution network obtains a super-resolution loss function according to the input sample image pair and the output of its own network; for other networks other than the super-resolution network, the image quality loss function, the face loss function and the sharpening loss function are obtained according to the output of the previous network (i.e., the input of its own network) and the output of its own network, in order, and each loss function includes a respective network parameter; Since each loss function can be transmitted forward in the entire network, the network parameters of each of these networks can be mutually constrained and influenced by each other. Furthermore, the network parameters of the transmitted networks (e.g., super-resolution network, image quality augmentation network, face augmentation network and sharpening network) can be updated to realize the training of correlation, mutual fusion and mutual promotion between the super-resolution network, image quality augmentation network, face augmentation network and sharpening network. In addition, the training effect of each of the trained super-resolution network, image quality augmentation network, face augmentation network and sharpening network is improved. In addition, when images are superimposed and optimized, no collision occurs, and the effect of superimposing and optimizing images of the entire trained network is improved.

[0024] Please refer to FIG. 3, which is a flow diagram of the training method for an image processing network provided by the present application. The execution body in the embodiment of the present application may be one computer device or a computer device cluster consisting of multiple computer devices. The computer device may be a server or a terminal device. Therefore, the execution body in the embodiment of the present application may be a server or a terminal device, or may even be jointly configured by a server and a terminal device. Here, it is taken as an example that the execution body in the embodiment of the present application is a server. As shown in FIG. 3, the method includes the following steps: Step S101: Obtain a sample image pair, where the sample image pair includes low-resolution image data and high-resolution image data, and the low-resolution image data and the high-resolution image data have the same image content.

[0025] In this application, the server obtains a sample image pair, which is an image pair for training an image processing network, and one sample image pair includes one low-resolution image data and one high-resolution image data corresponding to the low-resolution image data. The principle of adopting each sample image pair to train an image processing network is similar, so here, the process of training an image processing network by one sample image pair (hereinafter collectively referred to as a sample image pair) is described as an example, and reference may be made to the description in the following content.

[0026] The low-resolution image data and the high-resolution image data included in the sample image pair are images having the same image content but different image definitions (abbreviated as definitions), and the definition of the low-resolution image data is lower than that of the high-resolution image data. The resolution of the low-resolution image data is smaller than the target resolution, and the resolution of the high-resolution image data is equal to or greater than the target resolution, and the target resolution is set according to an actual application scenario, for example, the target resolution may be 1920*1080.

[0027] The acquisition method of the sample image pair in the embodiments of the present application may be one or more of the following methods. In one embodiment, the server obtains high-resolution sample video data, which is video data for obtaining sample image pairs. Since one video data can include multiple image frames, the high-resolution sample video data may refer to video data in which the resolution of the included image frames is greater than a resolution threshold, and the resolution threshold is set according to an actual application scenario. The sample video data may also refer to video data in which the resolution of the included image frames is greater than the target resolution.

[0028] Therefore, the server performs frame division on the sample video data to obtain a plurality of image frames contained in the sample video data, and the image frames contained in the sample video data are called sample image frames. The server further adopts a target bit rate (the target bit rate is a low bit rate) to perform encoding and decoding processing (i.e., encoding and then decoding) on ​​the sample video data, and the video data after encoding and decoding is called low-quality video data. The image quality of the image frames of the low-quality video data is lower than that of the image frames of the sample video data, that is, the definition of the image frames contained in the low-quality video data is lower than that of the image frames contained in the sample video data. The target bit rate is a bit rate lower than a bit rate threshold, and the bit rate threshold is set according to an actual application scenario, and the target bit rate may be a low bit rate, so that after encoding and decoding the sample video data according to the target bit rate, the image quality of the obtained low-quality video data is poor, and the definition of the image frames contained in the low-quality video data is low.

[0029] The image frames included in the above low-quality video data are called low-quality image frames, the low-quality video data includes low-quality image frames corresponding to each sample image frame, and one sample image frame corresponds to one low-quality image frame. Since the encoding and decoding does not change the resolution of the image frames, the acquired low-quality image frames are actually high-resolution image frames, so the resolution of each low-quality image frame in the low-quality video data is adjusted to be lower, for example, adjusted to be lower than the target resolution, and the low-quality image frames with the resolution adjusted to be lower are called low-resolution image frames, so the server constructs sample image pairs according to each sample image frame and the low-resolution image frames to which the corresponding low-quality image frames belong, and one sample image pair includes one sample image frame and one low-resolution image frame corresponding to the sample image frame (i.e., the image frame acquired after reducing the resolution of the low-quality image frame corresponding to the sample image frame), and the sample image frame included in one sample image pair is one high-resolution image data, and the low-resolution image data included in one sample image pair is one low-resolution image data. Therefore, multiple sample image pairs can be acquired by the above sample video data.

[0030] In one embodiment, similarly, the server obtains sample video data, performs frame division on the sample video data to obtain a plurality of sample image frames included in the sample video data, and then selects a target image frame from the plurality of sample image frames as the above-mentioned high-resolution image data, and performs average fusion processing on the target image frame and adjacent image frames of the target image frame in the plurality of sample image frames, and the image frame after the average fusion processing is called an average image frame, and further, by adjusting the resolution of the average image frame to a lower value (e.g., to a value lower than the target resolution), low-resolution image data can be obtained. One target image frame may be any one image frame among a plurality of image frames included in the sample video data, one target image frame may be one high-resolution image data, and there may be multiple target image frames. The adjacent image frames of the target image frame may include one or more image frames on the left side of the target image frame in the plurality of sample image frames, and one or more image frames on the right side of the target image frame, and the number of adjacent image frames of the target image frame is determined according to an actual application scenario and is not limited thereto.

[0031] In one embodiment, the server directly obtains the high-resolution image data, for example, the high-resolution image data may be downloaded from a web page or may be local high-resolution image data. Then, the server performs Gaussian blurring on the high-resolution image data, and adjusts the resolution of the image frame after Gaussian blurring to a lower resolution (for example, below the target resolution), so as to obtain the low-resolution image data corresponding to the high-resolution image data. Gaussian blurring is also called Gaussian smoothing.

[0032] In one embodiment, the server directly obtains high-resolution image data, performs distortion format conversion on the high-resolution image data, and then adjusts the resolution of the image frame after distortion format conversion to a lower value (e.g., to a target resolution or lower), thereby obtaining low-resolution image data corresponding to the high-resolution image data. For example, the distortion format conversion on the high-resolution image data is a compression on the high-resolution image data, and the image quality of the image frame after compression is lower than that of the high-resolution image data, for example, the distortion format conversion on the high-resolution image data converts the data format of the high-resolution image data from png (lossless compressed image format) to jpg (lossy compressed image format).

[0033] In one embodiment, the server directly obtains the high-resolution image data. The server further obtains sample low-quality video data, and the sample low-quality video data may be video data in which the definition of the image frame included therein is lower than a definition threshold, so that the server learns noise data of the sample low-quality video data by machine learning, fuses the noise data into the high-resolution image data, and then adjusts the resolution of the high-resolution image data into which the noise data is fused to a lower level, thereby obtaining low-resolution image data. The manner of fusing noise data into high-resolution image data is to add noise data to the high-resolution image data. The process of the server learning the noise data of the sample low-quality video data by machine learning is as follows: the server obtains a noise learning network, and the noise learning network may be a model that can learn noise data in video data, so that the server inputs the sample low-quality video data into the noise learning network, and can learn the noise data of the sample low-quality video data through the noise learning network.

[0034] After acquiring the high resolution image data and the low resolution image data, a sample image pair is constructed from the acquired high resolution image data and the acquired low resolution image data.

[0035] The constructed sample image pairs are used to train an image processing network, which includes a super-resolution network, an image quality enhancement network, a face enhancement network and a sharpening network.

[0036] For each generating network of the image processing network (e.g., super-resolution network, image quality augmentation network, face augmentation network), a U-Net structure (network structure) based on an encoder-decoder concept may be adopted. Each generating network is composed of basic units (blocks), and the encoder and decoder of the super-resolution network each adopt three blocks (one layer in the encoder and decoder adopts three blocks), and the image quality augmentation network and face augmentation network each adopt five blocks (one layer in the encoder and decoder adopts five blocks), and the number of basic channels of each block may be 16. In addition, in this application, the first 3x3 convolution in the block is subjected to channel expansion to increase the feature dimension, and further, the output 3x3 convolution is subjected to feature compression to keep the dimension of the input channel unchanged, thereby learning more feature information of the image.

[0037] In addition, in this application, when performing super-resolution processing on an image in a super-resolution network, PixelShuffle (upsampling method) is used to perform the upsampling operation, and channel-to-space dimension conversion is substituted for the interpolation upsampling solution, thereby achieving better visual effects.

[0038] In this application, by obtaining sample image pairs in various ways, the types of obtained sample image pairs can be enriched, and the image processing network can be trained with various sample image pairs, so that the training effect of the image processing network can be improved. For details, please refer to the description in the following content.

[0039] Referring to Figures 4 and 5, Figure 4 is a structural diagram of the encoding and decoding network provided by the present application, and Figure 5 is a structural diagram of the basic unit provided by the present application. The above super-resolution network, image quality enhancement network, and face enhancement network can all adopt the network structure of Figure 4, and the network structure includes an encoder and a decoder, the encoder has three layers, and the decoder has three layers. Each layer of the encoder and the decoder can further be composed of the basic unit of Figure 5, and one basic unit includes a 3*3 convolution layer, a normalization network layer, an activation layer (i.e., LeakyRelu), a 3*3 convolution layer, and a 1*1 convolution layer in order.

[0040] Step S102: Adjust the resolution of the low-resolution image data to a target resolution by invoking an image processing network to obtain sample super-resolution image data, and generate a super-resolution loss function according to the sample super-resolution image data and the high-resolution image data.

[0041] In this application, the server calls a super-resolution network in the image processing network to adjust the resolution of low-resolution image data to a higher resolution, for example to a target resolution, and generates sample super-resolution image data corresponding to the low-resolution image data, where the sample super-resolution image data is image data obtained after the resolution of the low-resolution image data is adjusted to a higher resolution by the super-resolution network.

[0042] Then, the server generates a super-resolution loss function according to the sample super-resolution image data and the high-resolution image data, and specifically, The super-resolution loss function includes two parts: a pixel-level loss function and a feature-level loss function. By combining the pixel-level loss function and the feature-level loss function to constrain the super-resolution effect, the training effect of super-resolution is more accurate and better.

[0043] The pixel-level loss function is called the first super-resolution loss function, and the feature-level loss function is called the second super-resolution loss function.

[0044] The server generates the first super-resolution loss function based on pixel value elements included in the sample super-resolution image data and pixel value elements included in the high-resolution image data, and generates the first super-resolution loss function

number

number

number

[0045] The server generates a second super-resolution loss function based on feature value elements included in the feature map in the super-resolution network of the sample super-resolution image data and feature value elements included in the feature map in the super-resolution network of the high-resolution image data, and generates the second super-resolution loss function

number

number

[0046] moreover,

number

[0047] Therefore, the super-resolution loss function is the first super-resolution loss function

number

number

[0048] Step S103: By invoking an image processing network, perform image quality enhancement processing on the sample super-resolution image data to obtain first sample enhanced image data, and generate an image quality loss function based on the first sample enhanced image data and the high-resolution image data.

[0049] In the present application, the sample super-resolution image data obtained by the above-mentioned super-resolution image may be an input to an image quality enhancement network, and the server calls the image quality enhancement network in the image processing network to perform image quality enhancement processing on the sample super-resolution image data and generate first sample enhanced image data corresponding to the sample super-resolution image data, and the first sample enhanced image data is image data obtained after performing image quality enhancement processing on the sample super-resolution image data.

[0050] Further, the server determines a peak signal-to-noise ratio (PSNR) obtained by a mean square error between the first sample augmented image data and the high-resolution image data as an image quality loss function, and the image quality loss function

number

number

number

[0051] Step S104: By invoking an image processing network, perform face enhancement processing on the face image in the first sample enhanced image data to obtain a sample face enhancement image, fuse the sample face enhancement image and the first sample enhanced image data to obtain second sample enhanced image data, and generate a face loss function based on the sample face enhancement image and the face image in the high-resolution image data.

[0052] In the present application, the first sample reinforcement image data acquired by the above-mentioned image quality reinforcement network is used as the input of the face reinforcement network, the first sample reinforcement image data includes a face image, and the server calls the face reinforcement network in the image processing network to perform face reinforcement processing on the face image in the first sample reinforcement image data to generate second sample reinforcement image data, which is image data acquired after performing face reinforcement processing on the face image in the first sample reinforcement image data. For specific details, please refer to the contents described below.

[0053] The face reinforcement network may include a face detection network, a face reinforcement sub-network, and a face fusion network, and the face reinforcement sub-network may include a color discrimination network and a texture discrimination network, and the server calls the face detection network to detect a detection frame in which a face image in the first sample reinforcement image data is located, and the detection frame is called a face detection frame, and the first sample reinforcement image data is marked with a marking frame indicating a position where the face image in the first sample reinforcement image data is actually located, and the marking frame is called a face marking frame. The server cuts out the face image included in the face detection frame from the first sample reinforcement image data to obtain a detected face image, and the server further calls the face reinforcement sub-network to perform face reinforcement processing on the detected face image (i.e., the face image cut out from the first sample reinforcement image data), and a reinforced face image can be obtained, and the reinforced face image is called a sample face reinforcement image, and the sample face reinforcement image is a face image obtained after performing face reinforcement processing on the face image in the first sample reinforcement image data. The server invokes the face fusion network to fuse the sample face augmentation image with the first sample augmentation image data, where the fused image data is referred to as the second sample augmentation image data.

[0054] Therefore, the server generates a detection loss function according to the face detection frame and the face marking frame. As the name suggests, the detection loss function is obtained from the deviation between the detected position of the face image in the first sample augmented image data and the actual position of the face image. The detection loss function

number

number

[0055] The server further obtains a face image in the high-resolution image data by cropping the face image in the high-resolution image data, and the cropped face image in the high-resolution image data is called a high-resolution face image.

[0056] The server further generates a color loss function according to the high-resolution facial image, the sample facial enhancement image and a color discrimination device, where the color loss function represents the difference between the color of the enhanced sample facial enhancement image and the color of the high-resolution facial image. For example, the color discrimination device determines the probability that the color of the sample facial enhancement image is the color of the high-resolution facial image, and represents the color loss function with the probability, aiming to make the determined probability approach 0.5, so that at this time, the color discrimination device cannot distinguish the color of the sample facial enhancement image and the color of the high-resolution facial image, in this case, the expected effect is achieved.

[0057] The server performs Gaussian blurring on the high-resolution face image and the sample face-enhanced image respectively, and then determines the probability that the color of the sample face-enhanced image after Gaussian blurring is the color of the high-resolution face image after Gaussian blurring, and represents a color loss function based on the probability.

[0058] The server further generates a texture loss function according to the high-resolution facial image, the sample facial augmented image and a texture discrimination device, where the texture loss function represents the difference between the texture of the augmented sample facial augmented image and the texture of the high-resolution facial image, for example, by using the texture discrimination device to determine the probability that the texture of the sample facial augmented image is the texture of the high-resolution facial image, and represents the texture loss function with the probability, aiming to make the determined probability approach 0.5, so that at this time, the texture discrimination device cannot distinguish the texture of the sample facial augmented image and the texture of the high-resolution facial image, in this case, the expected effect is achieved.

[0059] The server performs grayscaling on the high-resolution face image and the sample face-enhanced image, respectively, and then determines the probability that the texture of the sample face-enhanced image after grayscaling is the texture of the high-resolution face image after grayscaling, and represents a texture loss function based on the probability.

[0060] The server further generates a content loss function according to the feature value elements included in the feature map of the sample face augmented image and the feature value elements included in the feature map of the high-resolution face image, the content loss function representing a content difference between the second sample augmented image data and the high-resolution image data, and the content loss function

number

number

[0061] moreover,

number

[0062] Therefore, the face loss function is the above detection loss function

number

number

[0063] As can be seen from the above, a detection loss function is obtained by the face detection network, and a color loss function, a texture loss function and a content loss function are obtained by the face augmentation sub-network, and the face loss function is the sum of the above detection loss function, color loss function, texture loss function and content loss function.

[0064] Preferably, the face reinforcement network is trained using a face image cut out from the first sample reinforcement image data, and may also be trained using a face image other than the above face image, and the training effect can be improved by training the face reinforcement network by combining two face images (one is a face image to be trained in a training set (any training set including the face image to be optimized) (i.e., a face image that is not cut out from the first sample reinforcement image data), and the other is a face image in the first sample reinforcement image data obtained by the image quality reinforcement network).

[0065] Step S105: Perform image sharpening processing on the second sample enhanced image data by invoking an image processing network to obtain sample sharpened image data, and generate a sharpening loss function according to the sample sharpened image data and the high-resolution image data.

[0066] In this application, the above-mentioned second sample reinforcement image data is used as input to the sharpening network, and the server calls the sharpening network in the image processing network to perform image sharpening processing on the second sample reinforcement image data, thereby obtaining image data after performing image sharpening processing on the second sample reinforcement image data, and the image data is referred to as sample sharpened image data.

[0067] The server generates a loss function of the sharpening network according to the sample sharpened image data and the high-resolution image data, and the loss function is called the sharpening loss function. The sharpening loss function includes two parts, namely an objective loss function and a perceptual loss function, and the objective loss function is called the quality loss function and the perceptual loss function is called the perception loss function.

[0068] The quality loss function is the peak signal-to-noise ratio (PSNR) between the sample sharpened image data and the high resolution image data, and the perceptual loss function is obtained by the perceptual similarity between the sample sharpened image data and the high resolution image data, which is obtained by the perceptual loss value (Learned Perceptual Image Patch Similarity, LPIPS) between the sample sharpened image data and the high resolution image data, and the smaller the perceptual loss value LPIPS, the more similar the sample sharpened image data and the high resolution image data are at a perceptual level, whereas the larger the perceptual loss value LPIPS, the less similar (i.e., the greater the difference) the sample sharpened image data and the high resolution image data are at a perceptual level, and therefore the use of the perceptual loss function aims to minimize the perceptual loss value between the sample sharpened image data and the high resolution image data.

[0069] Therefore, the sharpening loss function is the sum of the quality loss function and the perceptual loss function above.

[0070] Please refer to Fig. 6, which is a schematic diagram of a scenario for obtaining the loss function provided by the present application. As shown in Fig. 6, the server inputs a sample image pair into the super-resolution network, generates sample super-resolution image data corresponding to the low-resolution image data in the super-resolution network, and generates a super-resolution loss function according to the sample super-resolution image data and the high-resolution image data.

[0071] The server further inputs the sample super-resolution image data into an image quality enhancement network, generates first sample enhanced image data in the image quality enhancement network, and generates an image quality loss function according to the first sample enhanced image data and the high-resolution image data.

[0072] The server further inputs the first sample augmented image data into a face augmentation network, and generates an acquired sample augmented image after augmenting the face image in the first sample augmented image data in the face augmentation network, and generates a face loss function according to the sample augmented image and the high-resolution face image in the high-resolution image data. The face augmentation network further fuses the sample augmented image and the first sample augmented image data to obtain a second sample augmented image data.

[0073] The server further inputs the second sample augmented image data to a sharpening network, performs a sharpening process on the second sample augmented image data in the sharpening network to obtain sample sharpened image data, and generates a sharpening loss function based on the sample sharpened image data and the high-resolution image data.

[0074] Step S106: Update the network parameters of the image processing network according to the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network.

[0075] In this application, the network parameters of the image processing network include network parameters of the super-resolution network, the network parameters of the image quality enhancement network, the network parameters of the face enhancement network and the network parameters of the sharpening network, and the server updates the network parameters of the image processing network according to the above-mentioned super-resolution loss function, image quality loss function, face loss function and sharpening loss function, and there are two methods for updating the network parameters of the image processing network according to the super-resolution loss function, image quality loss function, face loss function and sharpening loss function, which are specifically as follows:

[0076] The order of each network in the image processing network from front to back is super-resolution network, image quality reinforcement network, face reinforcement network, and sharpening network, and the face reinforcement network includes three face image processing networks, namely, face detection network, face reinforcement sub-network, and face fusion network, from front to back. The loss function is transmitted forward in the image processing network to update the network parameters of the transmitted networks (such as super-resolution network, image quality reinforcement network, face reinforcement network, and sharpening network). Therefore, the first method of updating the network parameters of a network can be achieved by adding multiple loss functions transmitted to a network and directly updating the network parameters of the network by the loss function after addition, and the second method of updating the network parameters of a network can be achieved by sequentially using multiple loss functions transmitted to a network to perform iterative update on the network parameters of the network. Here, the update effect on the network parameters achieved by the two methods of updating the network parameters of a network is similar.

[0077] Specifically, the forward transmission of the super-resolution loss function may be transmitted only to the super-resolution network itself, the forward transmission of the image quality loss function may be transmitted to the image quality augmentation network and the super-resolution network, and the forward transmission of the face loss function may be transmitted to the face augmentation network, the image quality augmentation network and the super-resolution network. However, since the face augmentation network includes a face detection network, a face augmentation sub-network and a face fusion network from front to back, within the face augmentation network, for the transmission of the face loss function, the loss function transmitted to the face detection network may be a face loss function, and the loss function transmitted to the face augmentation sub-network may be a color loss function, a texture loss function and a content loss function in the face loss function (i.e., a loss function generated from the face augmentation sub-network itself), and the face loss function cannot be transmitted backward to the face fusion network, and the forward transmission of the sharpening loss function may be transmitted to the sharpening network, the face augmentation network, the image quality augmentation network and the super-resolution network.

[0078] Therefore, after updating (i.e., correcting) the network parameters of each network in the above first method, the process is as follows: add the above super-resolution loss function, image quality loss function, face loss function and sharpening loss function, and update the network parameters of the super-resolution network by the loss function after the addition to obtain a trained super-resolution network; add the above image quality loss function, face loss function and sharpening loss function, and update the network parameters of the image quality augmentation network by the loss function after the addition to obtain a trained image quality augmentation network; inside the face augmentation network, add the above sharpening loss function and face loss function, and update the network parameters of the face detection network by the loss function after the addition; further add the above sharpening loss function, color loss function, texture loss function and content loss function, and update the network parameters of the face augmentation sub-network by the loss function after the addition; and further update the network parameters of the face fusion network by the sharpening loss function, thereby obtaining a trained face augmentation network; and update the network parameters of the sharpening network by the sharpening loss function to obtain a trained sharpening network.

[0079] If the network parameters of each network are updated (i.e., modified) using the above second method, the process is as follows: the network parameters of the super-resolution network are iteratively updated in sequence using the above super-resolution loss function, image quality loss function, face loss function and sharpening loss function; after the iterative updating, a trained super-resolution network is obtained; for example, first, the network parameters of the super-resolution network are updated using the super-resolution loss function, then the network parameters of the super-resolution network whose super-resolution loss function is updated using the image quality loss function, then the network parameters of the super-resolution network whose image quality loss function is updated using the face loss function, and finally the network parameters of the super-resolution network whose face loss function is updated using the sharpening loss function.

[0080] Similarly, the network parameters of the image quality augmentation network can be iteratively updated in sequence according to the above image quality loss function, face loss function and sharpening loss function, and a trained image quality augmentation network can be obtained after the iterative update.

[0081] Similarly, the network parameters of the face detection network are iteratively updated in sequence according to the sharpening loss function and the face loss function, and a trained face detection network is obtained after the iterative update; the network parameters of the face reinforcement sub-network are iteratively updated in sequence according to the sharpening loss function, the color loss function, the texture loss function and the content loss function, and a trained face reinforcement sub-network is obtained after the iterative update; the network parameters of the face fusion network are updated according to the sharpening loss function, and a trained face fusion network is obtained; and the trained face detection network, the trained face reinforcement sub-network and the trained face fusion network are used to obtain a trained face reinforcement network. The network parameters of the sharpening network are updated according to the sharpening loss function, and a trained sharpening network is obtained.

[0082] Therefore, a trained image processing network is generated (i.e., obtained) by the above trained super-resolution network, trained image quality augmentation network, trained face augmentation network and trained sharpening network. The trained image processing network comprehensively optimizes video data or image data, and for details, refer to the following specific description of the embodiment corresponding to FIG. 7.

[0083] In the present application, each network (including super-resolution network, image quality augmentation network, face augmentation network and sharpening network) is trained in association with each other, on the premise of ensuring the training effect of each network itself, the training effect of mutual promotion and mutual fusion between each network is realized, the trained image processing network is more accurate, and therefore the trained image processing network realizes a more accurate and better optimization effect on image data. That is, when training an image processing network, the present application provides an end-to-end (for example, from the end of the super-resolution network to the end of the sharpening network in sequence) multi-task (the training of one network is one training task) joint training framework, which is a cascaded framework, for example, a framework that is connected from the super-resolution network to the image quality augmentation network and the face augmentation network in sequence to the sharpening network, and by training each network through such a cascaded framework, the collaborative training effect of data between each network is better, the mutual promotion and fusion of the training effect between different tasks is realized, and the conflict between tasks is avoided to achieve a good overall effect. In addition, by using an appropriate training data generation solution, including kernel learning degradation (e.g., obtaining sample image pairs by the above noise learning network), random generation of data by an encoding / decoding module (e.g., obtaining sample image pairs by encoding / decoding sample video data at the above target bit rate), motion blur simulation (e.g., obtaining sample image pairs by performing average fusion processing on the above target image frame and adjacent image frames of the target image frame), and noise compression (e.g., obtaining sample image pairs by performing distortion format conversion on the above high-resolution image data), widely distributed training data can be generated, and the image processing network trained by the training data can be applied to a wider range of image optimization scenarios and has stronger robustness.

[0084] In the present application, a sample image pair is obtained, the sample image pair includes low resolution image data and high resolution image data, and the low resolution image data and the high resolution image data have the same image content; a resolution of the low resolution image data is adjusted to a target resolution by invoking an image processing network; a sample super-resolution image data is obtained, and a super-resolution loss function is generated according to the sample super-resolution image data and the high resolution image data; an image processing network is invoked to perform image quality enhancement processing on the sample super-resolution image data; a first sample enhanced image data is obtained, and a image quality loss function is generated according to the first sample enhanced image data and the high resolution image data; and an image processing network is invoked to perform image quality enhancement processing on the sample super-resolution image data. Perform face enhancement processing on the face image in the sample enhanced image data to obtain a sample face enhancement image, fuse the sample face enhancement image with the first sample enhanced image data to obtain a second sample enhanced image data, generate a face loss function according to the sample face enhancement image and the face image in the high resolution image data, and perform image sharpening processing on the second sample enhanced image data by invoking an image processing network to obtain sample sharpened image data, generate a sharpening loss function according to the sample sharpened image data and the high resolution image data, and update the network parameters of the image processing network according to the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network. In this way, the method proposed by the present application trains the image processing network to correlate and integrate multiple tasks (such as super-resolution tasks, image quality enhancement tasks, face enhancement tasks and sharpening tasks), and when the image processing network after training simultaneously performs multi-task optimization on the image, there is no conflict between each task, and the optimization effect is better.

[0085] Please refer to Figure 7, which is a flow diagram of an image processing method provided by the present application. The embodiment of the present application describes the application process of the trained image processing network, and the contents described in the embodiment of the present application may be combined with the contents described in the embodiment of the application corresponding to the above Figure 3, and the execution body in the embodiment of the present application may be a server. As shown in Figure 7, the method includes the following steps: Step S201: obtain super-resolution image data corresponding to initial image data by invoking the trained image processing network, and the resolution of the super-resolution image data is equal to or greater than the target resolution.

[0086] In this application, the super-resolution network referred to here is the super-resolution network in the above trained image processing network, i.e., the super-resolution network referred to here is the trained super-resolution network.

[0087] The server obtains initial image data, which may be any one of images that need to be optimized. Since the optimization effect is better when the optimization is performed with high-resolution image data, the server detects the resolution of the initial image data by calling a super-resolution network, and if it detects that the resolution of the initial image data is lower than the target resolution, the initial image data is low-resolution image data, so the server increases the resolution of the initial image data by calling a super-resolution network, for example, by calling a super-resolution network, the resolution of the initial image data is adjusted to the target resolution (the target resolution is a high resolution set by the server according to the actual application scenario), and the initial image data adjusted to the target resolution is the super-resolution image data.

[0088] Alternatively, if it is detected that the resolution of the initial image data is equal to or higher than the target resolution, the initial image data itself is high-resolution image data, and therefore the resolution of the initial image data is not adjusted, and the initial image data is directly converted into super-resolution image data.

[0089] Step S202: Perform image quality enhancement processing on the super-resolution image data by invoking the trained image processing network to obtain first enhanced image data.

[0090] In this application, the image quality enhancement network to be called here is the image quality enhancement network in the above trained image processing network, that is, the image quality enhancement network to be called here is the trained image quality enhancement network.

[0091] Since there is a risk that the image quality of the image after super-resolution may be poor, the server further optimizes the image quality of the super-resolution image data overall (i.e., performs image quality enhancement processing on the super-resolution image data) by calling up an image quality enhancement network, and the image data after image quality optimization of the super-resolution image data by the image quality enhancement network is designated as the first enhanced image data.

[0092] Step S203: By invoking the trained image processing network, second reinforcement image data corresponding to the first reinforcement image data is obtained, and if the first reinforcement image data includes a facial image, the second reinforcement image data is image data obtained after performing facial reinforcement on the facial image in the first reinforcement image data.

[0093] In this application, the face reinforcement network to be called here is the face reinforcement network in the above trained image processing network, i.e., the face reinforcement network to be called here is the trained face reinforcement network.

[0094] The called face augmentation network includes a face detection network, a face augmentation sub-network and a face fusion network, and since face is generally an important element in image data, the server further performs face detection on the first augmented image data by the face detection network, i.e., detects whether the first augmented image data contains a face image.

[0095] If it is detected that the first reinforcing image data does not include a face image, the first reinforcing image data is directly used as the second reinforcing image data.

[0096] If it is detected that the first reinforcement image data contains a facial image, the facial image in the first reinforcement image data is optimized by calling a facial reinforcement sub-network, and the first reinforcement image data with the optimized facial image is further designated as the second reinforcement image data.

[0097] The process of optimizing the face image in the first reinforcement image data by invoking the face reinforcement sub-network is as follows. The server calls the face detection network to crop the detected face image from the first supplementary image data to obtain a face image in the first supplementary image data, and the face image is referred to as a face cropped image.

[0098] The server further performs face enhancement processing on the face cropped image by invoking a face enhancement sub-network, i.e., performs face optimization on the face cropped image, and the face-optimized face cropped image is called a face enhanced image.

[0099] In addition, the server further invokes a face fusion network to generate a face fusion mask (i.e., a fusion mask), which performs weighted fusion on the face augmentation image and the first augmentation image data to obtain second augmentation image data, and the adaptive face fusion mask realizes seamless fusion between the face augmentation image and the first augmentation image data.

[0100] For example, if the face augmentation image is denoted as a, the face fusion mask is denoted as b, and the first augmentation image data is denoted as c, then the second augmentation image data is b*a+(1-b)*c.

[0101] The process of obtaining second reinforcement image data by reinforcing the facial image in the first reinforcement image data is similar to the process of obtaining second sample reinforcement image data by reinforcing the facial image in the first sample reinforcement image data described above.

[0102] Please refer to FIG. 8, which is a schematic diagram of a face optimization scenario provided by the present application. As shown in FIG. 8, the server inputs the first augmented image data obtained by the image quality augmentation network into a trained face detection network, and the face detection network cuts out the face image in the first augmented image data to obtain a face cropped image, and inputs the face cropped image into a trained face augmentation sub-network, and the face augmentation sub-network performs face augmentation on the face cropped image to obtain a face augmented image. Furthermore, the face augmented image and the first augmented image data are input into a face fusion network to realize image fusion between the face augmented image and the first augmented image data, and as a result, second augmented image data is obtained.

[0103] Step S204: Perform image sharpening processing on the second supplementary image data by invoking the trained image processing network to obtain sharpened image data, and output the sharpened image data.

[0104] In this application, the sharpening network referred to here is the sharpening network in the trained image processing network above, i.e., the sharpening network referred to here is the trained sharpening network.

[0105] Finally, the sharpening network enhances the details in the second supplementary image data, making the details clearer. The server calls the sharpening network to extract high-frequency components in the second supplementary image data, for example, by performing Gaussian blurring on the second supplementary image data, and then obtains the difference between the second supplementary image data and the original second supplementary image data, thereby obtaining high-frequency image information (i.e., high-frequency components) in the second supplementary image data.

[0106] The server further generates a sharpening mask of the second augmented image data by invoking the sharpening network, where the sharpening mask indicates the details in the second augmented image data that require sharpening enhancement, and the server performs a dot product between the sharpening mask and the second augmented image data to obtain the sharpened image information (i.e., the details components) in the second augmented image data. For example, the server uses a convolution layer (e.g., a 1*1 convolution layer) and a Prelu (activation layer) included in the sharpening network to generate the sharpening mask of the second augmented image data.

[0107] The sharpening network further generates a weighting weight for the above high frequency image information (referred to as the first weighting weight), a weighting weight for the above sharpened image information (referred to as the second weighting weight), and a weighting weight for the second reinforcement image data (referred to as the third weighting weight), and obtains sharpened image data by performing a corresponding weighted sum for the high frequency image information, the sharpened image information, and the second reinforcement image data using the first weighting weight, the second weighting weight, and the third weighting weight.

[0108] For example, the product of the first weighting weight and the high-frequency image information is the first weighting result, the product of the second weighting weight and the sharpened image information is the second weighting result, and the product of the third weighting weight and the second reinforcement image data is the third weighting result, and the sharpened image data is obtained by further calculating the sum of the first weighting result, the second weighting result, and the third weighting result.

[0109] The sharpened image data is the final image data obtained after optimizing the initial image data, and the server outputs the sharpened image data from the image processing network. The process of obtaining the sharpened image data by reinforcing the second sampled reinforced image data is the same as the process of obtaining the sampled sharpened image data by reinforcing the second sampled reinforced image data.

[0110] Please refer to FIG. 9, which is a schematic diagram of an image optimization scenario provided by the present application. As shown in FIG. 9, the server inputs initial image data into the trained image processing network, and obtains super-resolution image data corresponding to the initial image data by the super-resolution network in the image processing network. Then, the image quality enhancement network performs image quality enhancement on the super-resolution image data to obtain first augmented image data. Next, the face detection network in the face augmentation network cuts out and obtains a face image (i.e., a face cutout image) in the first augmented image data, and the face augmentation sub-network performs face enhancement on the face cutout image to obtain a face augmented image, and the face fusion network fuses the face augmented image and the first augmented image data to obtain second augmented image data. Finally, the sharpening network performs sharpening processing on the second augmented image data to obtain sharpened image data, and outputs the sharpened image data.

[0111] The initial image data may be any one of a plurality of image frames obtained by performing frame division on the video data, the server may be a background server of the application client, and the video data may be data pushed to the application client. Thus, the server takes each image frame included in the video data as the initial image data, obtains sharpened image data corresponding to each image frame included in the video data in the above process, and generates optimized video data of the video data according to the sharpened image data corresponding to each image frame, and the optimized video data is the video data obtained after optimizing the image frames of each frame in the video data. The server pushes the optimized video data to the application client, and the application client outputs the optimized video data to the client interface, so that the user can view and check it.

[0112] Please refer to Fig. 10, which is a schematic diagram of a data pushing scenario provided by the present application. As shown in Fig. 10, the server performs frame division on the video data to obtain multiple image frames (e.g., image frame 1 to image frame n) contained in the video data, and optimizes each image frame through the frame division using the above trained image processing network to obtain sharpened image data (e.g., sharpened image data 1 to sharpened image data n) corresponding to each image frame.

[0113] Furthermore, optimized video data of the video data can be obtained according to the sharpened image data respectively corresponding to each image frame, and the server pushes the optimized video data to the application client.

[0114] According to the method provided by the present application, a multi-task joint training framework from the super-resolution network, image quality augmentation network, face augmentation network to the sharpening network is used to realize the interrelated, mutual fusion and mutual promotion training between the super-resolution network, image quality augmentation network, face augmentation network and the sharpening network. After training, the training effects of the super-resolution network, image quality augmentation network, face augmentation network and the sharpening network are better. In addition, when superimposing and optimizing the image simultaneously, there is no conflict and the overall optimization effect is better. The trained super-resolution network, image quality augmentation network and sharpening network can comprehensively enhance the global image quality, color, texture and definition attributes of the image data, there is no conflict, and the image data effect is improved in a multi-dimensional manner. The trained face augmentation network has a specialized augmentation effect on local faces in the image data, realizing global augmentation and local augmentation.

[0115] Please refer to Figure 11, which is a structural schematic diagram of an image processing network training device provided by the present application. The image processing network training device may be computer-readable instructions (including program code), such as application software, that run on a computer device, and the image processing network training device executes the corresponding steps in the method provided by the embodiment of the present application. As shown in Figure 11, the image processing network training device 1 includes: a sample acquisition module 11 for acquiring a sample image pair, the sample image pair including low resolution image data and high resolution image data, the low resolution image data and the high resolution image data having the same image content; A calling module 12 adjusts the resolution of the low-resolution image data to a target resolution by calling an image processing network to obtain sample super-resolution image data, and generates a super-resolution loss function based on the sample super-resolution image data and the high-resolution image data, A calling module 12 performs image quality enhancement processing on the sample super-resolution image data by calling an image processing network as described above to obtain first sample enhanced image data, and generates an image quality loss function based on the first sample enhanced image data and the high-resolution image data. A calling module 12, which performs a face enhancement process on a face image in the first sample enhanced image data by calling an image processing network to obtain a sample face enhancement image, merges the sample face enhancement image with the first sample enhanced image data to obtain a second sample enhanced image data, and generates a face loss function based on the sample face enhancement image and the face image in the high-resolution image data, A calling module 12 performs an image sharpening process on the second sample augmented image data by calling an image processing network to obtain sample sharpened image data, and generates a sharpening loss function based on the sample sharpened image data and the high-resolution image data; and an update module 13 for updating network parameters of the image processing network based on the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network.

[0116] Preferably, the image processing network includes a super-resolution network, an image quality enhancement network, a face enhancement network and a sharpening network, and the sample super-resolution image data is obtained based on the super-resolution network, the first sample enhancement image data is obtained based on the image quality enhancement network, the second sample enhancement image data is obtained based on the face enhancement network, and the sample sharpening image data is obtained based on the sharpening network; The method of the update module 13 updating the network parameters of the image processing network according to the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network is as follows: updating network parameters of the super-resolution network according to the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained super-resolution network; updating network parameters of the image quality augmentation network according to the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image quality augmentation network; updating network parameters of the face augmentation network according to the face loss function and the sharpening loss function to obtain a trained face augmentation network; updating network parameters of the sharpening network based on the sharpening loss function to obtain a trained sharpening network; generating a trained image processing network based on the trained super-resolution network, the trained image quality augmentation network, the trained face augmentation network, and the trained sharpening network.

[0117] Preferably, the manner in which the calling module 12 generates the super-resolution loss function based on the sample super-resolution image data and the high-resolution image data is: generating a first super-resolution loss function based on pixel value elements included in the sample super-resolution image data and pixel value elements included in the high-resolution image data; generating a second super-resolution loss function based on the feature value elements included in the feature map of the sample super-resolution image data and the feature value elements included in the feature map of the high-resolution image data; generating a super-resolution loss function based on the first super-resolution loss function and the second super-resolution loss function.

[0118] Preferably, the image processing network includes a face augmentation network, the second sample augmented image data is obtained based on the face augmentation network, the face augmentation network includes a face detection network, a color discrimination network and a texture discrimination network, and the face image in the first sample augmented image data includes a face detection frame generated by the face detection network and a face marking frame indicating an actual face position; The manner in which the calling module 12 generates the face loss function based on the face images in the sample face augmented image and the high-resolution image data is as follows: generating a detection loss function based on the face detection frame and the face marking frame; cropping a face image from the high resolution image data to obtain a high resolution face image; generating a color loss function based on the high-resolution face image, the sample face augmentation image, and a color discrimination network; generating a texture loss function based on the high-resolution face image, the sample face augmentation image, and the texture discrimination network; generating a content loss function based on feature value elements included in the feature map of the sample face augmented image and feature value elements included in the feature map of the high-resolution face image; generating a face loss function based on the detection loss function, the color loss function, the texture loss function and the content loss function.

[0119] Preferably, the manner in which the calling module 12 generates the sharpening loss function based on the sample sharpened image data and the high-resolution image data is: generating a quality loss function based on a peak signal-to-noise ratio between the sample sharpened image data and the high resolution image data; generating a perceptual loss function based on a perceptual similarity between the sample sharpened image data and the high-resolution image data; generating a sharpening loss function based on the quality loss function and the perceptual loss function.

[0120] Preferably, the manner in which the sample acquisition module 11 acquires the sample image pairs is as follows: obtaining sample video data; performing frame division on the sample video data to obtain a plurality of sample image frames included in the sample video data; performing encoding and decoding processing on the sample video data by adopting a target bit rate to obtain low-quality video data corresponding to the sample video data, where the image quality of an image frame of the low-quality video data is lower than that of an image frame of the sample video data, the low-quality video data includes low-quality image frames respectively corresponding to each sample image frame, and the target bit rate is lower than a bit rate threshold; constructing a sample image pair based on each sample image frame and a corresponding lower quality image frame.

[0121] Preferably, the manner in which the sample acquisition module 11 acquires the sample image pairs is as follows: obtaining sample video data; performing frame division on the sample video data to obtain a plurality of sample image frames included in the sample video data; selecting a target image frame from a plurality of sample image frames as high resolution image data; performing an average fusion process on the target image frame and adjacent image frames of the target image frame in the plurality of sample image frames to obtain low-resolution image data.

[0122] Preferably, the manner in which the sample acquisition module 11 acquires the sample image pairs is as follows: acquiring high resolution image data; performing a Gaussian blur process on the high resolution image data to obtain low resolution image data.

[0123] Preferably, the manner in which the sample acquisition acquires the module sample image pair comprises: acquiring high resolution image data; performing a warp format conversion on the high resolution image data to obtain low resolution image data.

[0124] Preferably, the manner in which the sample acquisition module 11 acquires the sample image pairs is as follows: acquiring high resolution image data; Obtaining sample low-resolution video data and inputting the sample low-resolution video data into the noise learning network, where the definition of the sample low-resolution video data is lower than a definition threshold; learning noise data of the sample low-resolution video data based on a noise learning network; Fusing the high resolution image data with the noise data to obtain low resolution image data.

[0125] According to one embodiment of the present application, the steps of the image processing network training method of Fig. 3 are executed by each module in the image processing network training device 1 of Fig. 11. For example, step S101 of Fig. 3 is executed by the sample acquisition module 11 of Fig. 11, steps S102 to S105 of Fig. 3 are executed by the call module 12 of Fig. 11, and step S106 of Fig. 3 is executed by the update module 13 of Fig. 11.

[0126] According to the present application, a sample image pair is obtained, the sample image pair includes low resolution image data and high resolution image data, the low resolution image data and the high resolution image data have the same image content, a resolution of the low resolution image data is adjusted to a target resolution by invoking an image processing network, a sample super-resolution image data is obtained, a super-resolution loss function is generated based on the sample super-resolution image data and the high resolution image data, an image quality enhancement process is performed on the sample super-resolution image data by invoking an image processing network, a first sample enhanced image data is obtained, a image quality loss function is generated based on the first sample enhanced image data and the high resolution image data, and an image quality enhancement process is performed on the sample super-resolution image data by invoking an image processing network, Perform face enhancement processing on the face image in the sample enhanced image data to obtain a sample face enhancement image, fuse the sample face enhancement image with the first sample enhanced image data to obtain a second sample enhanced image data, generate a face loss function according to the sample face enhancement image and the face image in the high resolution image data, and perform image sharpening processing on the second sample enhanced image data by invoking an image processing network to obtain sample sharpened image data, generate a sharpening loss function according to the sample sharpened image data and the high resolution image data, and update the network parameters of the image processing network according to the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network. In this way, the device proposed by the present application trains the image processing network to correlate and integrate multiple tasks (such as super-resolution tasks, image quality enhancement tasks, face enhancement tasks and sharpening tasks), and when the image processing network after training simultaneously performs multi-task optimization on the image, there is no conflict between each task, and the optimization effect is better.

[0127] According to one embodiment of the present application, each module in the image processing network training device 1 of FIG. 11 may be individually or entirely integrated into one or several units, or some (several) of the modules may be further decomposed into several smaller subunits in terms of function, which does not affect the realization of the technical effect of the embodiment of the present application and can achieve the same operation. The above modules are partitioned based on logical functions, and in actual application, the function of one module may be realized by several units, or the function of several modules may be realized by one unit. In other embodiments of the present application, the image processing network training device 1 may include other units, and in actual application, these functions may be realized by other units working together, or by several units working together.

[0128] According to one embodiment of the present application, a general-purpose computing device, such as a computer, including processing elements and memory elements such as a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM), etc., runs computer-readable instructions (including program code) that can execute each step of the corresponding method in Fig. 3, thereby configuring the image processing network training device 1 in Fig. 11 to realize the image processing network training method of the embodiment of the present application. The above computer-readable instructions are, for example, loaded into a computer-readable recording medium, and are installed in the above computing device by the computer-readable recording medium for operation.

[0129] Please refer to Figure 12, which is a structural schematic diagram of an image processing device provided by the present application. The image processing device may be a computer readable instruction (including program code), such as application software, that runs on a computer device, and the image processing device executes the corresponding steps of the method provided by the embodiments of the present application. As shown in Figure 12, the image processing device 2 includes: A super-resolution calling module 21 for obtaining super-resolution image data corresponding to the initial image data by calling the trained image processing network, the resolution of the super-resolution image data being equal to or greater than the target resolution; an image quality enhancement module 22 for performing image quality enhancement processing on the super-resolution image data by invoking the trained image processing network to obtain first enhanced image data; A face reinforcement module 23 that acquires second reinforcement image data corresponding to the first reinforcement image data by calling the trained image processing network, and when the first reinforcement image data includes a face image, the second reinforcement image data is the acquired image data after performing face reinforcement on the face image in the first reinforcement image data; and a sharpening module 24 that performs an image sharpening process on the second supplementary image data by invoking the trained image processing network to obtain sharpened image data, and outputs the sharpened image data.

[0130] Preferably, the trained image processing network includes a super-resolution network, and the manner in which the super-resolution calling module 21 obtains super-resolution image data corresponding to the initial image data by calling the trained image processing network is as follows: acquiring initial image data; Detecting the resolution of the initial image data by invoking a super-resolution network; If the resolution of the initial image data is equal to or greater than the target resolution, determining the initial image data as super-resolution image data; and if the resolution of the initial image data is smaller than the target resolution, adjusting the resolution of the initial image data to the target resolution by invoking the super-resolution network to obtain super-resolution image data.

[0131] Preferably, the trained image processing network includes a face augmentation network, and the manner in which the face augmentation module 23 obtains the second augmentation image data corresponding to the first augmentation image data by invoking the trained image processing network is as follows: performing face detection on the first augmented image data by invoking a face augmentation network; determining that the first reinforcing image data does not include a face image as the second reinforcing image data; When the first reinforcement image data includes a facial image, the method includes a step of performing a facial reinforcement process on the facial image in the first reinforcement image data by invoking a facial reinforcement network to obtain second reinforcement image data.

[0132] Preferably, the face augmentation network includes a face detection network, a face augmentation sub-network and a face fusion network; A method in which the face reinforcement module 23 performs face reinforcement processing on a face image in the first reinforcement image data by calling a face reinforcement network to obtain the second reinforcement image data is as follows: cropping a face image in the first supplementary image data by invoking a face detection network to obtain a face cropped image; performing a face augmentation process on the face cropped image by invoking a face augmentation sub-network to obtain a face augmented image; generating a face fusion mask by invoking a face fusion network; and performing an image fusion process on the first reinforcement image data and the face reinforcement image based on the face fusion mask to obtain second reinforcement image data.

[0133] Preferably, the trained image processing network includes a sharpening network, and the manner in which the sharpening module 24 performs image sharpening processing on the second supplementary image data to obtain sharpened image data by invoking the trained image processing network is as follows: extracting high frequency image information in the second augmented image data by invoking a sharpening network; generating a sharpening mask for the second reinforcement image data based on the sharpening network and extracting sharpened image information in the second reinforcement image data based on the sharpening mask; predicting a first weight for the high frequency image information, a second weight for the sharpened image information, and a third weight for the second enhanced image data based on the sharpening network; The method includes a step of performing a weighted sum on the high frequency image information, the sharpened image information and the second reinforcement image data based on the first weight, the second weight and the third weight to obtain the sharpened image data.

[0134] Preferably, the initial image data is one of a plurality of image frames obtained by performing frame division on the video data, and the above-mentioned device 2 further comprises: generating optimized video data for the video data based on the sharpened image data corresponding to each image frame of the plurality of image frames; The optimized video data is pushed to the application client, which outputs the optimized video data.

[0135] According to one embodiment of the present application, the steps of the image processing method of Fig. 7 are performed by each module in the image processing device 2 of Fig. 12. For example, step S201 of Fig. 7 is performed by the super-resolution calling module 21 of Fig. 12, step S202 of Fig. 7 is performed by the image quality enhancement module 22 of Fig. 12, step S203 of Fig. 7 is performed by the face enhancement module 23 of Fig. 12, and step S204 of Fig. 7 is performed by the sharpening module 24 of Fig. 12.

[0136] According to the present application, a sample image pair is obtained, the sample image pair includes low resolution image data and high resolution image data, the low resolution image data and the high resolution image data have the same image content, a resolution of the low resolution image data is adjusted to a target resolution by invoking an image processing network, a sample super-resolution image data is obtained, a super-resolution loss function is generated based on the sample super-resolution image data and the high resolution image data, an image quality enhancement process is performed on the sample super-resolution image data by invoking an image processing network, a first sample enhanced image data is obtained, a first image quality loss function is generated based on the first sample enhanced image data and the high resolution image data, and an image processing network is performed to obtain a first sample enhanced image data. Perform face enhancement processing on the face image in the sample enhanced image data, obtain a sample face enhancement image, fuse the sample face enhancement image with the first sample enhanced image data to obtain a second sample enhanced image data, generate a face loss function according to the sample face enhancement image and the face image in the high-resolution image data, and perform image sharpening processing on the second sample enhanced image data by invoking an image processing network, obtain sample sharpened image data, generate a sharpening loss function according to the sample sharpened image data and the high-resolution image data, and update the network parameters of the image processing network according to the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network. In this way, the device proposed by the present application trains the image processing network to correlate and integrate multiple tasks (such as a super-resolution task, an image quality enhancement task, a face enhancement task and a sharpening task), and when the image processing network after training simultaneously performs multi-task optimization on the image, there is no conflict between each task, and the optimization effect is better.

[0137] According to one embodiment of the present application, each module in the image processing device 2 of FIG. 12 may be individually or entirely integrated into one or several units, or some (several) of the modules may be further functionally decomposed into several smaller subunits, which can achieve the same operation without affecting the realization of the technical effect of the embodiment of the present application. The modules are partitioned based on logical functions, and in actual application, the function of one module may be realized by several units, or the functions of several modules may be realized by one unit. In other embodiments of the present application, the image processing device 2 may include other units, and in actual application, these functions may be realized by other units working together, or by several units working together.

[0138] According to one embodiment of the present application, a general-purpose computing device, such as a computer, including processing elements and memory elements such as a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM), etc., runs computer-readable instructions (including program code) that can execute each step of the corresponding method in Fig. 7 to configure the image processing device 2 in Fig. 12 to realize the training method for an image processing network in the embodiment of the present application. The above computer-readable instructions are, for example, loaded into a computer-readable recording medium, and are installed in the above computing device by the computer-readable recording medium to run.

[0139] Please refer to FIG. 13, which is a structural schematic diagram of a computer device provided by the present application. As shown in FIG. 13, the computer device 1000 includes a processor 1001, a network interface 1004 and a memory 1005, and the computer device 1000 further includes a user interface 1003 and at least one communication bus 1002. The communication bus 1002 realizes the connection communication between these components. The user interface 1003 may include a display and a keyboard, and preferably, the user interface 1003 may further include a standard wired interface and a wireless interface. Preferably, the network interface 1004 may include a quasi-wired interface and a wireless interface (e.g., a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory, such as at least one magnetic disk memory. Preferably, the memory 1005 may be at least one storage device remote from the processor 1001. As shown in FIG. 13, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and computer-readable instructions, and the execution of the computer-readable instructions can realize at least one of the image processing network training method and the image processing method provided in the embodiments of the present application.

[0140] In the computer device 1000 of FIG. 13, a network interface 1004 provides a network communication function, a user interface 1003 is an interface that mainly provides input to a user, and a processor 1001 realizes the image processing network training method provided by the embodiments of the present application by calling up computer-readable instructions stored in a memory 1005.

[0141] The processor 1001 is further used to implement the image processing methods provided by the embodiments of the present application by invoking computer-readable instructions stored in the memory 1005 .

[0142] Here, the computer device 1000 described in the embodiment of the present application may execute the above-mentioned image processing network training method described in the embodiment corresponding to Fig. 3 above, or may execute the above-mentioned image processing method described in the embodiment corresponding to Fig. 7 above, which are not described here in detail, and the beneficial effects of the same method are not described in detail.

[0143] In addition, the present application further provides a computer-readable storage medium, which stores computer-readable instructions executed by the image processing network training device 1 and image processing device 2 mentioned above, and the processor executes the program instructions to execute the image processing network training method described in the embodiment corresponding to Figure 3 above and the image processing method described in the embodiment corresponding to Figure 7 above, so that no detailed description is given here. In addition, no detailed description is given here regarding the beneficial effects of the same method. For undisclosed technical details of the embodiment of the computer storage medium related to the present application, please refer to the description of the method embodiment of the present application.

[0144] By way of example, the above program instructions may be executed on one computer device, or may be executed on multiple computer devices located at one location, or may be arranged to be executed on multiple computer devices distributed across multiple locations and connected to each other via a communications network, where multiple computer devices distributed across multiple locations and connected to each other via a communications network can form a blockchain network.

[0145] The computer-readable storage medium may be an internal storage unit of the image processing network training device or the computer device provided by any one of the above embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium may be an external storage device of the computer device, such as a connected hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., arranged in the computer device. Furthermore, the computer-readable storage medium may include an internal storage unit of the computer device and also an external storage device. The computer-readable storage medium stores the computer-readable instructions, other programs and data required by the computer device. The computer-readable storage medium may also temporarily store data that has been output or is to be output.

[0146] The present application provides a computer program product or a computer program, which includes computer-readable instructions, and the computer-readable instructions are stored in a computer-readable storage medium. A processor of a computer device reads and executes the computer-readable instructions from the computer-readable storage medium, thereby causing the computer device to execute the above-mentioned image processing network training method in the embodiment corresponding to FIG. 3 and the image processing method in the embodiment corresponding to FIG. 7, so that no detailed description is given here. In addition, no detailed description is given here about the beneficial effects of the same method. For undisclosed technical details of the embodiment of the computer-readable storage medium of the present application, please refer to the description of the method embodiment of the present application.

[0147] The terms "first", "second", etc. in the description, claims and drawings of the embodiments of this application do not describe a particular order, but are intended to distinguish different objects. Also, the term "comprises" and any variations thereof are intended to include a non-exclusive inclusion. For example, a process, method, apparatus, product or device comprising a series of steps or units is not limited to the recited steps or modules, and preferably includes unrecited steps or modules, or further includes other steps or units inherent in such process, method, apparatus, product or device.

[0148] As can be appreciated by those skilled in the art, each exemplary unit and algorithm step described in conjunction with the embodiments disclosed herein may be realized by electronic hardware, computer software, or a combination of both, and in the above description, each exemplary configuration and step is generally described according to function in order to clearly describe the compatibility between hardware and software. Whether these functions are executed in a hardware form or in a software form depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods for each specific application to realize the described functions, and such realization does not go beyond the scope of this application.

[0149] The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowcharts and / or structural diagrams provided by the embodiments of the present application, and in particular, computer readable instructions implement each flow and / or block of the method flowcharts and / or structural diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams. These computer readable instructions are provided to a processor of a general purpose computer, a special purpose computer, an embedded processor, or other programmable data processing device to generate a machine, and the instructions executed by the processor of the computer or other programmable data processing device generate an apparatus that implements the function specified by the flow or flows of the flowcharts and / or the block or blocks of the structural diagrams. These computer readable instructions can further be stored in a computer readable memory that guides the computer or other programmable data processing device to operate in a specific manner, and the instructions stored in the computer readable memory generate a product including an instruction apparatus, and the instruction apparatus implements the function specified by the flow or flows of the flowcharts and / or the block or blocks of the structural diagrams. These computer-readable instructions may further be loaded into a computer or other programmable data processing device to cause the computer or other programmable device to execute a series of operational steps to generate a computer-implemented process, the instructions executing on the computer or other programmable device providing steps to implement the functions specified by a flow or flows in the flowcharts and / or a block or blocks in the structural schematic diagrams.

[0150] The above disclosure does not limit the scope of the claims of this application, but is merely a preferred embodiment of this application, and any equivalent modifications made based on the claims of this application still belong to the scope of coverage of this application. [Explanation of symbols]

[0151] 1. Image processing network training device 2. Image Processing Device 11 Sample Acquisition Module 12 Call Module 13 Update Module 21 Super-resolution calling module 22 Image Quality Enhancement Module 23 Facial Augmentation Module 24 Sharpening Module 100a Terminal Equipment 101a Terminal Equipment 102a Terminal Equipment 103a Terminal Equipment 200 Servers 1000 Computer Equipment 1001 Processor 1002 Communication Bus 1003 User Interface 1004 Network Interface 1005 Memory

Claims

1. 1. A method for training an image processing network implemented by a computing device, comprising: acquiring a sample image pair, the sample image pair including low resolution image data and high resolution image data, the low resolution image data and the high resolution image data having the same image content; adjusting a resolution of the low-resolution image data to a target resolution by invoking the image processing network to obtain sample super-resolution image data, and generating a super-resolution loss function based on the sample super-resolution image data and the high-resolution image data; performing an image quality enhancement process on the sample super-resolution image data by invoking the image processing network to obtain first sample enhanced image data; and generating an image quality loss function based on the first sample enhanced image data and the high-resolution image data; performing a face enhancement process on a face image in the first sample enhanced image data by invoking the image processing network to obtain a sample face enhancement image; fusing the sample face enhancement image and the first sample enhanced image data to obtain second sample enhanced image data; and generating a face loss function based on the sample face enhancement image and the face image in the high resolution image data; performing an image sharpening process on the second sample augmented image data by invoking the image processing network to obtain sample sharpened image data; and generating a sharpening loss function based on the sample sharpened image data and the high-resolution image data; updating network parameters of the image processing network based on the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network.

2. The image processing network includes a super-resolution network, an image quality augmentation network, a face augmentation network, and a sharpening network, and the sample super-resolution image data is obtained based on the super-resolution network, the first sample augmentation image data is obtained based on the image quality augmentation network, the second sample augmentation image data is obtained based on the face augmentation network, and the sample sharpening image data is obtained based on the sharpening network; updating network parameters of the image processing network based on the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image processing network; updating network parameters of the super-resolution network according to the super-resolution loss function, the image quality loss function, the face loss function and the sharpening loss function to obtain a trained super-resolution network; updating network parameters of the image quality augmentation network according to the image quality loss function, the face loss function and the sharpening loss function to obtain a trained image quality augmentation network; updating network parameters of the face reinforcement network based on the face loss function and the sharpening loss function to obtain a trained face reinforcement network; updating network parameters of the sharpening network based on the sharpening loss function to obtain a trained sharpening network; and generating a trained image processing network based on the trained super-resolution network, the trained image quality augmentation network, the trained face augmentation network, and the trained sharpening network.

3. The step of generating a super-resolution loss function based on the sample super-resolution image data and the high-resolution image data includes: generating a first super-resolution loss function based on pixel value elements included in the sample super-resolution image data and pixel value elements included in the high-resolution image data; generating a second super-resolution loss function based on feature value elements included in the feature map of the sample super-resolution image data and feature value elements included in the feature map of the high-resolution image data; and generating the super-resolution loss function based on the first super-resolution loss function and the second super-resolution loss function.

4. the image processing network includes a face reinforcement network, the second sample reinforcement image data is obtained based on the face reinforcement network, the face reinforcement network includes a face detection network, a color discrimination network and a texture discrimination network, and the face image in the first sample reinforcement image data includes a face detection frame generated by the face detection network and a face marking frame indicating an actual face position; The step of generating a face loss function based on the sample face augmented image and a face image in the high resolution image data includes: generating a detection loss function based on the face detection frame and the face marking frame; cropping a face image from the high resolution image data to obtain a high resolution face image; generating a color loss function based on the high-resolution face image, the sample face augmentation image, and the color discrimination network; generating a texture loss function based on the high-resolution face image, the sample face augmentation images and the texture discrimination network; generating a content loss function based on feature value elements included in the feature map of the sample face augmented image and feature value elements included in the feature map of the high-resolution face image; generating the face loss function based on the detection loss function, the color loss function, the texture loss function, and the content loss function.

5. The step of generating a sharpening loss function based on the sample sharpened image data and the high-resolution image data includes: generating a quality loss function based on a peak signal-to-noise ratio between the sample sharpened image data and the high resolution image data; generating a perceptual loss function based on a perceptual similarity between the sample sharpened image data and the high resolution image data; and generating the sharpening loss function based on the quality loss function and the perceptual loss function.

6. The step of acquiring sample image pairs comprises: obtaining sample video data; performing frame division on the sample video data to obtain a plurality of sample image frames included in the sample video data; performing encoding and decoding processing on the sample video data by adopting a target bit rate to obtain low-quality video data corresponding to the sample video data, in which the image quality of the image frames of the low-quality video data is lower than that of the image frames of the sample video data, the low-quality video data includes low-quality image frames respectively corresponding to each sample image frame, and the target bit rate is lower than a bit rate threshold; and constructing the sample image pairs based on each of the sample image frames and a corresponding lower quality image frame.

7. The step of acquiring sample image pairs comprises: obtaining sample video data; performing frame division on the sample video data to obtain a plurality of sample image frames included in the sample video data; selecting a target image frame from the plurality of sample image frames as the high resolution image data; 2. The method of claim 1, further comprising: performing an average fusion process on the target image frame and adjacent image frames of the target image frame in the plurality of sample image frames to obtain the low-resolution image data.

8. The step of acquiring sample image pairs comprises: acquiring the high resolution image data; 2. The method of claim 1, further comprising: performing a Gaussian blurring process on the high-resolution image data to obtain the low-resolution image data.

9. The step of acquiring sample image pairs comprises: acquiring the high resolution image data; 2. The method of claim 1, further comprising: performing a warped format conversion on the high resolution image data to obtain the low resolution image data.

10. The step of acquiring sample image pairs comprises: acquiring the high resolution image data; obtaining sample low-resolution video data and inputting the sample low-resolution video data into a noise learning network, where the definition of the sample low-resolution video data is lower than a definition threshold; learning noise data of the sample low resolution video data based on the noise learning network; and fusing the high resolution image data with the noise data to obtain the low resolution image data.

11. 1. A computing device implemented image processing method, comprising: obtaining super-resolution image data corresponding to the initial image data by invoking the trained image processing network, the resolution of the super-resolution image data being equal to or greater than a target resolution; performing an image quality enhancement process on the super-resolution image data by invoking a trained image processing network to obtain first enhanced image data; obtaining second reinforcement image data corresponding to the first reinforcement image data by invoking a trained image processing network, where if the first reinforcement image data includes a face image, the second reinforcement image data is image data obtained after performing face reinforcement on the face image in the first reinforcement image data; performing an image sharpening process on the second reinforcement image data by invoking a trained image processing network to obtain sharpened image data; and outputting the sharpened image data; The trained image processing network is obtained by training using the method according to any one of claims 1 to 10 above.

12. The trained image processing network includes a super-resolution network, and the step of obtaining super-resolution image data corresponding to the initial image data by invoking the trained image processing network includes: obtaining the initial image data; Detecting the resolution of the initial image data by invoking the super-resolution network; determining the initial image data as the super-resolution image data if the resolution of the initial image data is equal to or greater than the target resolution; 12. The method of claim 11, further comprising: if a resolution of the initial image data is smaller than the target resolution, adjusting the resolution of the initial image data to the target resolution by invoking the super-resolution network to obtain the super-resolution image data.

13. The trained image processing network includes a face augmentation network, and the step of obtaining second augmented image data corresponding to the first augmented image data by invoking the trained image processing network includes: performing face detection on the first augmented image data by invoking the face augmentation network; determining the first reinforcement image data as the second reinforcement image data when the first reinforcement image data does not include a face image; 12. The method of claim 11, further comprising: if the first augmented image data includes a facial image, performing a facial augmentation process on the facial image in the first augmented image data by invoking the facial augmentation network to obtain the second augmented image data.

14. the face augmentation network includes a face detection network, a face augmentation sub-network and a face fusion network; The step of performing a face reinforcement process on the face image in the first reinforcement image data by calling the face reinforcement network to obtain the second reinforcement image data includes: cropping a face image in the first supplementary image data by invoking the face detection network to obtain a face cropped image; performing a face reinforcement process on the face cropped image by invoking the face reinforcement sub-network to obtain a face reinforced image; generating a face fusion mask by invoking the face fusion network; 14. The method of claim 13, further comprising: performing an image fusion process on the first augmented image data and the face augmented image based on the face fusion mask to obtain the second augmented image data.

15. The trained image processing network includes a sharpening network, and the step of performing an image sharpening process on the second reinforcement image data by invoking the trained image processing network to obtain sharpened image data includes: extracting high frequency image information in the second supplemental image data by invoking the sharpening network; generating a sharpening mask for the second supplementary image data based on the sharpening network, and extracting sharpened image information in the second supplementary image data based on the sharpening mask; predicting a first weight for the high frequency image information, a second weight for the sharpened image information, and a third weight for the second reinforced image data based on the sharpening network; and performing a weighted sum on the high frequency image information, the sharpened image information and the second reinforcement image data based on the first weighting weight, the second weighting weight and the third weighting weight to obtain the sharpened image data.

16. The initial image data is one of a plurality of image frames obtained by performing frame division on video data, and the method includes: generating optimized video data for the video data based on the sharpened image data corresponding to each image frame of the plurality of image frames; 12. The method of claim 11, further comprising: pushing the optimized video data to an application client, whereby the application client outputs the optimized video data.

17. 1. A training device for an image processing network, comprising: an acquisition module for acquiring a sample image pair, the sample image pair including low resolution image data and high resolution image data, the low resolution image data and the high resolution image data having the same image content; a module for adjusting a resolution of the low-resolution image data to a target resolution by invoking the image processing network to obtain sample super-resolution image data, and generating a super-resolution loss function based on the sample super-resolution image data and the high-resolution image data; a module for performing an image quality enhancement process on the sample super-resolution image data by invoking the image processing network to obtain first sample enhanced image data, and generating an image quality loss function based on the first sample enhanced image data and the high-resolution image data; a module for performing a face enhancement process on a face image in the first sample enhanced image data by invoking the image processing network to obtain a sample face enhancement image, fusing the sample face enhancement image with the first sample enhanced image data to obtain a second sample enhanced image data, and generating a face loss function based on the sample face enhancement image and the face image in the high resolution image data; a module for performing an image sharpening process on the second sample augmented image data by invoking the image processing network to obtain sample sharpened image data, and generating a sharpening loss function based on the sample sharpened image data and the high-resolution image data; and a module for updating network parameters of the image processing network based on the super-resolution loss function, the image quality loss function, the face loss function, and the sharpening loss function to obtain a trained image processing network.

18. A computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 16.

19. A computing device comprising a memory and a processor, the memory storing computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Image processing apparatus and method of the same

    JP2015197818A

  • Image processing apparatus, image processing program, and image processing method

    JP2017111470A

  • Image processing apparatus and image processing method

    JP2018195069A

  • Image processing method, image processing device, image enlarging method, server client system, and display terminal

    WO2005122089A1