Face image deblurring method, face image deblurring device, medium and equipment

Through multi-level processing of face images and the application of neural network technology, the blur problem caused by face movement is solved, the clarity and texture characteristics of the image are improved, and it is suitable for a variety of application scenarios.

CN113240598BActive Publication Date: 2024-08-27GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110501229.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-08
Publication Date
2024-08-27
Estimated Expiration
2041-05-08

Smart Images

  • Figure CN113240598B
    Figure CN113240598B
Patent Text Reader

Abstract

The present disclosure provides a facial image deblurring method, a facial image deblurring device, a computer-readable storage medium and an electronic device, and relates to the field of image processing technology. The facial image deblurring method comprises: obtaining a facial image to be processed; performing a first processing on the texture of the facial image to be processed to obtain a first intermediate feature, wherein the first processing is a preliminary deblurring processing on the texture of the facial image to be processed; performing a second processing on the facial image to be processed to obtain a second intermediate feature, wherein the second processing is a preliminary deblurring processing on the facial image to be processed; performing a third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the facial image to be processed. The present disclosure can effectively and accurately deblur the facial image to be processed.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the widespread application of facial images in face recognition fields such as quick payment, face card swiping, and access control unlocking, in order to improve recognition precision and accuracy, it is necessary to ensure that facial images have high image quality. In practical applications, due to interference from various factors, such as face movement or camera out-of-focus, facial images will appear blurred. Therefore, it is very important to deblur facial images to improve their quality. In the prior art, facial images are deblurred mainly for situations where facial images are hardware blurred or out-of-focus blurred, but there is no better solution for the blurry facial images caused by facial movement. Therefore, how to accurately, effectively and conveniently deblur facial images is a problem that needs to be solved in the prior art. Summary of the invention

[0003] The present disclosure provides a facial image deblurring method, a facial image deblurring device, a computer-readable storage medium and an electronic device, thereby at least to a certain extent improving the problem in the prior art that it is difficult to effectively deblur all facial images.

[0004] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0005] According to a first aspect of the present disclosure, a facial image deblurring method is provided, comprising: obtaining a facial image to be processed; performing a first processing on the texture of the facial image to be processed to obtain a first intermediate feature, wherein the first processing is a preliminary deblurring processing on the texture of the facial image to be processed; performing a second processing on the facial image to be processed to obtain a second intermediate feature, wherein the second processing is a preliminary deblurring processing on the facial image to be processed; performing a third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the facial image to be processed.

[0006] According to a second aspect of the present disclosure, a facial image deblurring device is provided, comprising: an image acquisition module, used to acquire a facial image to be processed; a first processing module, used to perform a first processing on the texture of the facial image to be processed to obtain a first intermediate feature, wherein the first processing is a preliminary deblurring processing on the texture of the facial image to be processed; a second processing module, used to perform a second processing on the facial image to be processed to obtain a second intermediate feature, wherein the second processing is a preliminary deblurring processing on the facial image to be processed; and a third processing module, used to perform a third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the facial image to be processed.

[0007] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the facial image deblurring method of the first aspect and its possible implementation methods are implemented.

[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor, wherein the processor is configured to execute the facial image deblurring method and possible implementations thereof of the first aspect by executing the executable instructions.

[0009] The technical solution disclosed in this disclosure has the following beneficial effects:

[0010] Acquire a face image to be processed; perform a first processing on the texture of the face image to be processed to obtain a first intermediate feature, wherein the first processing is to perform a preliminary deblurring processing on the texture of the face image to be processed; perform a second processing on the face image to be processed to obtain a second intermediate feature, wherein the second processing is to perform a preliminary deblurring processing on the face image to be processed; perform a third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the face image to be processed. On the one hand, this exemplary embodiment proposes a new method for deblurring facial images. Taking into account that a clear face often has clear and obvious textures, the processing results of the facial image texture dimension are integrated to deblur the facial image, which can ensure that the restored facial image has a better texture and more texture features, thereby improving the deblurring effect of the facial image. On the other hand, this exemplary embodiment includes three processing processes, which first process the facial image texture and the facial image itself, and then further comprehensively process the processing results. The processing results of the facial image texture can guide and strengthen the enhancement of the texture details of the facial area in the facial image, thereby ensuring the accuracy and effectiveness of the facial image deblurring process. On the other hand, the processing structure of this exemplary embodiment is clear and can be deployed in electronic devices such as mobile terminals. While saving memory resources, it can provide clear image blur recovery and detail enhancement effects in various application scenarios such as video and photography, and has a wide range of applications.

[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0013] Figure 1 A schematic diagram showing a system architecture in this exemplary embodiment;

[0014] Figure 2 A structural diagram of an electronic device according to the exemplary embodiment is shown;

[0015] Figure 3 A flowchart of a facial image deblurring method in this exemplary embodiment is shown;

[0016] Figure 4 A sub-flow chart of a facial image deblurring method in this exemplary embodiment is shown;

[0017] Figure 5 A schematic diagram showing an original image in this exemplary embodiment;

[0018] Figure 6 A schematic diagram showing the detection of key points of human faces on an original image in this exemplary embodiment is shown;

[0019] Figure 7 A schematic diagram showing a face region of an original image in this exemplary embodiment;

[0020] Figure 8 A schematic diagram showing a face image to be processed determined according to a face region in this exemplary embodiment;

[0021] Fig. 9 A flowchart of obtaining a face image to be processed in this exemplary embodiment is shown;

[0022] Fig.10 A sub-flow chart showing another method for deblurring a facial image in this exemplary embodiment;

[0023] Fig.11 A schematic diagram showing a texture image determined according to an original image in this exemplary embodiment;

[0024] Fig.12 A sub-flow chart of another facial image deblurring method in this exemplary embodiment is shown;

[0025] Fig.13 A schematic diagram showing a defuzzification network structure in this exemplary embodiment;

[0026] Fig.14 A flowchart for training a deblurring network in this exemplary embodiment is shown;

[0027] Fig.15 A sub-flow chart for training a deblurring network in this exemplary embodiment is shown;

[0028] Fig.16 A schematic diagram showing a structure of training a deblurring network in this exemplary embodiment is shown;

[0029] Fig.17 A structural diagram of a facial image deblurring device in this exemplary embodiment is shown. DETAILED DESCRIPTION

[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0031] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0032] An exemplary embodiment of the present disclosure provides a facial image deblurring method. Figure 1 1 shows a system architecture diagram of the operating environment of this exemplary embodiment. Figure 1 As shown, the system architecture 100 may include a server 110 and a terminal 120, which communicate with each other through a network. For example, the server 110 sends the processed deblurred image to the terminal 120, and the terminal 120 displays the deblurred face image. The server 110 refers to a backend server that provides Internet services; the terminal 120 may include but is not limited to a smartphone, a tablet computer, a game console, a wearable device, etc.

[0033] It should be understood that Figure 1 The number of each device is only exemplary. According to the implementation requirements, any number of terminals can be set, or the server can be a cluster formed by multiple servers.

[0034] The facial image deblurring method provided in the embodiment of the present disclosure can be executed by the server 110, for example, after the terminal 120 collects the facial image to be processed, it sends it to the server 110, and the server 110 deblurs it and then returns it to the terminal 120; it can also be executed by the terminal 120, for example, the terminal 120 collects the facial image to be processed and directly deblurs it, etc., and the present disclosure does not limit this.

[0035] An exemplary embodiment of the present disclosure provides an electronic device for implementing a facial image deblurring method, which may be Figure 1 The server 110 or the terminal 120 in the embodiment of the present invention. The electronic device at least comprises a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to execute the facial image deblurring method by executing the executable instructions.

[0036] Below Figure 2 Taking the mobile terminal 200 in the example, the structure of the above electronic device is exemplarily described. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 2 The construction in can also be applied to fixed type equipment.

[0037] like Figure 2 As shown, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a USB (Universal Serial Bus) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294 and a SIM (Subscriber Identification Module) card interface 295, etc.

[0038] The processor 210 may include one or more processing units, for example, the processor 210 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc. The encoder may encode (i.e., compress) the image or video data; the decoder may decode (i.e., decompress) the bitstream data of the image or video to restore the image or video data.

[0039] In some implementations, the processor 210 may include one or more interfaces, and may be connected to other components of the mobile terminal 200 via different interfaces.

[0040] The internal memory 221 may be used to store computer executable program codes, which may include instructions. The internal memory 221 may include volatile memory, non-volatile memory, etc. The processor 210 executes various functional applications and data processing of the mobile terminal 200 by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor.

[0041] The external memory interface 222 can be used to connect an external memory. The external memory communicates with the processor 210 through the external memory interface 222 to implement a data storage function.

[0042] The USB interface 230 can be used to connect a charger to charge the mobile terminal 200, or can be used to connect an earphone or other electronic devices. The charging management module 240 is used to receive charging input from the charger.

[0043] The wireless communication function of the mobile terminal 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 250 can provide solutions for wireless communication including 2G / 3G / 4G / 5G etc. applied to the mobile terminal 200.

[0044] The mobile terminal 200 can realize the display function and display the user interface through the GPU, the display screen 290 and the AP, etc. For example, the mobile terminal 200 can display the face image before or after the deblurring process on the display screen 290 .

[0045] The mobile terminal 200 can realize the shooting function through ISP, camera module 291, encoder, decoder, GPU, display screen 290 and AP. For example, the user can start the shooting function in the image processing application, trigger the camera module 291 to take pictures, and deblur the taken facial image.

[0046] The mobile terminal 200 may also implement audio functions through the audio module 270 , the speaker 271 , the receiver 272 , the microphone 273 , the earphone interface 274 , and the AP.

[0047] The sensor module 280 may include a depth sensor 2801 , a pressure sensor 2802 , a gyroscope sensor 2803 , an air pressure sensor 2804 , etc., to implement different sensing detection functions.

[0048] Indicator 292 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc. Motor 293 may generate vibration prompts, and may also be used for touch vibration feedback, etc. Buttons 294 include a power button, a volume button, etc.

[0049] The mobile terminal 200 may support one or more SIM card interfaces 295 for connecting a SIM card to implement functions such as calls and data communications.

[0050] Figure 3 An exemplary process of a facial image deblurring method is shown, which can be performed by the above-mentioned server 110 or terminal 120, including the following steps S310 to S340:

[0051] Step S310, obtaining a face image to be processed.

[0052] The facial image to be processed refers to an image that can be used for deblurring. The facial area of ​​the image may have blur factors of varying degrees and for different reasons, and deblurring is required to obtain a clear facial image. The facial image to be processed can be acquired in real time by a camera or image sensor configured by the terminal device, such as directly shooting an original image containing a face through a mobile phone camera as the facial image to be processed; it can also be acquired from other specific image sources, such as from a locally stored album or a historically shot image; it can also be downloaded from the cloud or the Internet, etc.

[0053] In this exemplary embodiment, the original image can also be obtained from different data sources, and the face image to be processed can be determined by performing face detection on the original image. When a face is included, the subsequent deblurring process can be continued, and when a face is not included, the subsequent deblurring process does not need to be performed. Specifically, it is possible to identify whether the original image includes a face area by extracting specific image features from the original image, such as color features, texture features, shape features, or spatial relationship features. Among them, considering that this exemplary embodiment is to perform deblurring processing on the face, the image feature can be feature data that can reflect the face features, such as the face shape, facial shape, facial structure, face brightness, face skin color, face texture, face orientation, or face size of the face. Specifically, there can be multiple ways to extract image features, for example, multiple Haar feature templates can be used to traverse the original image to determine the feature value to extract the corresponding image features, etc. The present disclosure does not specifically limit the way to extract image features. After the image features are extracted, the original image including the face can be used as the face image to be processed by identifying and analyzing the image features, and then a subsequent face image deblurring process can be performed.

[0054] In an exemplary embodiment, if Figure 4 As shown, the above step S310 may include the following steps:

[0055] Step S410, detecting key points of the face in the original image;

[0056] Step S420, determining the face area according to the eyebrow upper edge key point and the face outer edge key point among the face key points;

[0057] Step S430, extracting the image of the face area from the original image to obtain a face image to be processed.

[0058] This exemplary embodiment can obtain an accurate and more targeted face image to be processed that only contains the face area by extracting face key points from the original image. Among them, face key points refer to key points that can reflect the facial features of a person, such as eye key points, eyebrow key points, and mouth key points, which can respectively reflect information such as the shape and position of the eyes, eyebrows, and mouth, and face contour key points or face center key points can reflect the overall structural features of the face.

[0059] The upper eyebrow key point refers to the key point that can characterize the upper edge of the eyebrow, which can be the highest key point among the eyebrow key points, or a key point determined by calculating multiple key points with higher positions. The outer edge key point of the face refers to the key point that can characterize the facial contour. The size, area or position of the face can be roughly determined based on the outer edge key point of the face.

[0060] In order to avoid certain interference factors from interfering with the face image, such as the broken hair or bangs in front of the forehead, hats or sunglasses on the forehead, etc., which will cause partial occlusion of the face area, and then affect the effect of the subsequent deblurring process, this exemplary embodiment can first determine the face area according to the eyebrow upper edge key point and the face outer edge key point in the face key point, and further, according to the face area, determine the face image containing only the face area. Specifically, the original face area in the original image can be segmented, and only the face area below the eyebrows and above the chin can be retained. For example, a specific two-dimensional key point (x, y) point set Keyp can be used, then:

[0061] Keyp = {KeypEye Brow_Upper ,Keyp Face_Outline}

[0062] Among them, KeypEye Brow_Upper Including the key points of the upper edge of the left and right eyebrows, Keyp Face_Outline Including the key points on the outer edge of the face, and the y value of the key points on the outer edge is less than KeypEyeBrow_Upper. Face detection can usually use Viola-Jones face detector or MTCNN (Multi-task convolutional neural network), etc. Face key point detection can use key point detection based on HOG (Histogram of Gradient) features or deep learning, etc., and this disclosure does not make specific restrictions on this. Figure 5 The original image shown in FIG. 1 is used as an example to illustrate that the original image includes a human face. The key points of the human face can be detected in the original image to determine the key points of the human face. Figure 6 The image shown includes key points such as eyebrows, eyes, nose, mouth and cheek contours; further, in order to avoid the occlusion interference of bangs in the face area, the forehead area above the upper edge of the eyebrows can be filtered according to the key points of the upper edge of the eyebrows and the key points of the outer edge of the face, and only the face area below the eyebrows is retained, such as Figure 7 As shown, the facial region can be presented in the form of a mask image. Further, based on the mask image of the facial region and the original image, the face image to be processed that only contains the facial region can be determined, such as Figure 8 shown.

[0063] In addition, this exemplary embodiment may also adopt a face segmentation model based on deep learning, first segmenting the face area and facial features area from the original image and then filtering the area to obtain a face image to be processed containing the face area.

[0064] Fig. 9 Another flowchart for obtaining a face image to be processed is shown, which may specifically include the following steps:

[0065] Step S910, obtaining an original image;

[0066] Step S920, performing face detection on the original image to determine whether the original image contains a face;

[0067] If the original image contains a human face, executing step S930, detecting key points of the human face in the original image;

[0068] Step S940, determining the face area according to the eyebrow upper edge key point and the face outer edge key point among the face key points;

[0069] Step S950, extracting an image of the face area from the original image to obtain a face image to be processed;

[0070] If the original image does not contain a human face, step S960 is executed to end the current process.

[0071] This exemplary embodiment can first determine the original image containing the face through face detection. If the original image does not contain the face, it means that there is no need to perform the face image deblurring process; further, through face key point detection, the facial area of ​​the face is segmented from the entire original image, and finally the face image to be processed is generated based on the facial area.

[0072] Step S320, performing a first processing on the texture of the face image to be processed to obtain a first intermediate feature, wherein the first processing is performing a preliminary deblurring processing on the texture of the face image to be processed.

[0073] Step S330, performing a second process on the face image to be processed to obtain a second intermediate feature, wherein the second process is performing a preliminary deblurring process on the face image to be processed.

[0074] The texture of the face image to be processed refers to data that can reflect the lines or fineness of the face. This exemplary embodiment can first determine the corresponding texture image based on the face image to be processed, and perform the first processing based on the texture image; it can also directly extract the texture feature data of the face from the face image to be processed, and perform the first processing on the texture feature data, etc., and the present disclosure does not make specific restrictions on this. There are many ways to extract texture from the face image to be processed, for example, the LBP (Local binary pattern) algorithm can be used to analyze and classify the relationship between different pixels in the face image to be processed to extract the texture; the HOG method can also be used to extract the texture in the face image to be processed, etc., and the present disclosure does not make specific restrictions on this. The first processing refers to a process of processing the texture of the face image to be processed, which can optimize or restore the texture of the face image to be processed to a certain extent, for example, the texture of the face image to be processed can be preliminarily deblurred, and the first intermediate feature after processing can be obtained. In this exemplary embodiment, the first processing can be performed in a variety of ways. For example, the texture of the face image to be processed can be processed by a pre-trained neural network model to obtain a first intermediate feature; a specific image enhancement algorithm can be used, such as smoothing, sharpening and other spatial filtering algorithms, to process the texture of the face image to be processed to obtain the first intermediate feature; a blur kernel can also be determined in advance, and calculations can be performed based on the blur kernel and the texture of the face image to be processed to determine the first intermediate feature, etc. The present disclosure does not make specific limitations on this.

[0075] Different from the process of processing the texture of the face image to be processed in the first processing, the second processing refers to a preliminary deblurring processing process of the face image to be processed itself, such as blur repair of the face image to be processed, and the corresponding second intermediate feature can be obtained after processing. Similar to the first processing, the second processing can also adopt methods such as training a neural network model, image enhancement algorithm or blur kernel calculation, and the present disclosure does not make specific limitations on this. It should be noted that the methods adopted by the first processing and the second processing can be the same or different. For example, the first processing and the second processing can both adopt the method of training a neural network model for processing; or the first processing adopts the method of training a neural network model for processing, and the second processing adopts an image enhancement algorithm, etc., and the specific algorithm to be adopted can be determined according to actual needs.

[0076] Step S340: performing a third process on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the face image to be processed.

[0077] Furthermore, this exemplary embodiment can fuse the processing results of the first processing process with the processing results of the second processing process to perform a third processing process again, that is, take the first intermediate features and the second intermediate features as data to be processed, perform a third processing on them, and obtain a deblurred image corresponding to the final face image to be processed. The deblurred image can present a clear effect of the face area after deblurring processing.

[0078] In summary, in this exemplary embodiment, a facial image to be processed is obtained; a first processing is performed on the texture of the facial image to be processed to obtain a first intermediate feature, and the first processing is to perform a preliminary deblurring processing on the texture of the facial image to be processed; a second processing is performed on the facial image to be processed to obtain a second intermediate feature, and the second processing is to perform a preliminary deblurring processing on the facial image to be processed; a third processing is performed on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the facial image to be processed. On the one hand, this exemplary embodiment proposes a new method for deblurring facial images. Taking into account that a clear face often has clear and obvious textures, the processing results of the facial image texture dimension are integrated to deblur the facial image, which can ensure that the restored facial image has a better texture and more texture features, thereby improving the deblurring effect of the facial image. On the other hand, this exemplary embodiment includes three processing processes, which first process the facial image texture and the facial image itself, and then further comprehensively process the processing results. The processing results of the facial image texture can guide and strengthen the enhancement of the texture details of the facial area in the facial image, thereby ensuring the accuracy and effectiveness of the facial image deblurring process. On the other hand, the processing structure of this exemplary embodiment is clear and can be deployed in electronic devices such as mobile terminals. While saving memory resources, it can provide clear image blur recovery and detail enhancement effects in various application scenarios such as video and photography, and has a wide range of applications.

[0079] In an exemplary embodiment, if Fig.10 As shown, the above step S320 may include the following steps:

[0080] Step S1010, using a first neural network to process the texture of the face image to be processed to obtain a first intermediate feature;

[0081] Step S330 may include:

[0082] Step S1020, using a second neural network to process the face image to be processed to obtain a second intermediate feature;

[0083] Step S340 may include:

[0084] Step S1030, using a third neural network to process the first intermediate feature and the second intermediate feature to obtain a deblurred image;

[0085] The output of the first neural network and the output of the second neural network are the input of the third neural network.

[0086] This exemplary embodiment can use three neural networks to respectively perform the processing of the first processing, the second processing and the third processing. The network structures of the three neural networks can be the same, and different processing processes can be performed only by setting different network weight parameters, that is, the three neural networks can share a network structure, but the parameters are different, so that memory can be better saved. This exemplary embodiment can regard the processing of the first neural network and the second neural network as the preliminary processing stage. After obtaining the face image to be processed, texture extraction is performed on it, and the texture is used as the input of the first neural network, and the face image to be processed is used as the input of the second neural network; the processing of the third neural network is regarded as the comprehensive processing stage, and the output results of the first neural network and the second neural network are used as input data for processing to obtain a deblurred image.

[0087] In this exemplary embodiment, the first neural network, the second neural network and the third neural network may be three independent neural network models, or they may be sub-models in one neural network model.

[0088] In an exemplary embodiment, at least one of the first neural network, the second neural network, and the third neural network is a sub-network in a defuzzification network.

[0089] Among them, the deblurring network is a network model used to obtain a deblurred image in this exemplary embodiment, which may include one or more of a first neural network, a second neural network or a third neural network. In other words, this exemplary embodiment may construct at least one subnetwork in the deblurring network, for example, construct three subnetworks, namely a first neural network, a second neural network, and a third neural network; or construct two subnetworks, namely a subnetwork composed of a first neural network and a second neural network, and a third neural network, etc. The present disclosure does not make specific limitations on this.

[0090] In an exemplary embodiment, the texture of the face image to be processed may include a face texture image to be processed. Figure 8 Taking the face image to be processed as an example, the corresponding texture image can be determined, such as Fig.11 As shown. The first intermediate feature may include a deblurred texture intermediate image, and the second intermediate feature may include a deblurred face intermediate image; Fig.12 As shown, the above step S1110 includes:

[0091] Step S1210, performing a first deblurring process on the face texture image to be processed by using a first neural network to obtain a deblurred texture intermediate image;

[0092] The above step S1120 includes:

[0093] Step S1220: Perform a second deblurring process on the face image to be processed using a second neural network to obtain a deblurred face intermediate image.

[0094] Generally speaking, blurred faces tend to be smoother, and the texture features in the corresponding texture images are also less obvious. Therefore, in this exemplary embodiment, the texture image of the face image to be processed can be restored by the first neural network, and its texture details can be enhanced to obtain a deblurred texture intermediate image.

[0095] In addition, the face image to be processed is repaired by the second neural network. For example, the face area of ​​the original three channels of the face image to be processed can be deblurred and repaired, where the original three channels can be determined according to the image encoding method, such as RGB (red, green, blue) or YVU (brightness and chromaticity), etc., to obtain a deblurred face intermediate image. Usually, after the face image to be processed is repaired, although the deblurring effect can be achieved, the skin texture of the face area in the processed face image, such as eyes, eyebrows, lips, etc., is difficult to restore, which may present an over-beautification effect.

[0096] Therefore, in order to obtain a facial image with excellent texture and deblurring effects, the present exemplary embodiment can further combine the deblurred face intermediate image with the deblurred texture intermediate image. For example, after splicing, they are input into the third neural network for processing, so as to use the deblurred texture intermediate image to guide and strengthen the third neural network's attention to enhancing the details of facial texture, so that a clear and textured deblurred face image can be obtained.

[0097] In this exemplary embodiment, the network structure of the above-mentioned deblurring network can be set according to the task requirements. For example, it can adopt a U-net network structure or a GAN (Generative adversarial nets) network structure, etc., and the present disclosure does not make specific limitations on this. Fig.13A schematic diagram of a deblurring network of a U-net (U-type network) network structure in this exemplary embodiment is shown, wherein the first neural network processes the texture image 1311 of the face image to be processed as input and outputs a deblurred texture intermediate image; the second neural network processes the face image 1321 to be processed as input and outputs a deblurred face intermediate image; the third neural network processes the deblurred texture intermediate image and the deblurred face intermediate image as input and outputs a final deblurred image 1331.

[0098] Taking the processing process of the first neural network 1310 as an example, the first neural network may include a first pixel rearrangement layer, at least one convolution layer, at least one transposed convolution layer, and a second pixel rearrangement layer. After acquiring the texture image, the first neural network can first use the first pixel rearrangement layer 1312 to perform pixel rearrangement processing on the texture image from single channel to multi-channel to obtain a first feature image; then perform convolution processing on the first feature image through multiple convolution layers 1313, that is, downsampling processing, to achieve information abstraction, reduce parameter complexity, and obtain a second feature image; further, use multiple transposed convolution layers 1314 to perform transposed convolution processing on the second feature image, that is, upsampling the second feature image through the transposed convolution layer, which can be regarded as the opposite process of convolution, thereby restoring the size of the image to obtain the second feature image; finally, use the second pixel rearrangement layer 1315 to perform pixel rearrangement processing on the third feature image from multi-channel to single channel to obtain a deblurred texture intermediate image, wherein the first pixel rearrangement layer can be implemented using the space_to_depth function in TensorFlow (a machine learning implementation framework), and the second pixel rearrangement layer can be implemented using the depth_to_space function in TensorFlow. The convolution layer and the transposed convolution layer can be a completely symmetrical structure, and the number of convolution layers and the transposed convolution layers, the convolution kernel size, the specific structure of the convolution layer, etc. are not specifically limited here. The processing process of the second neural network 1320 and the third neural network 1330 is similar to that of the second neural network 1320 and the third neural network 1330, which will not be described in detail here.

[0099] In an exemplary embodiment, if Fig.14 As shown, the above-mentioned face image deblurring method may further include the following steps:

[0100] Step S1410, obtaining a clear face sample image;

[0101] Step S1420, blurring the clear face sample image to obtain a blurred face sample image;

[0102] Step S1430, extracting texture from the clear face sample image to obtain a clear face sample texture image;

[0103] Step S1440, extracting texture from the blurred face sample image or blurring the clear face sample texture image to obtain a blurred face sample texture image;

[0104] Step S1450, using the blurred face sample texture image as the input of the first neural network, the blurred face sample image as the input of the second neural network, the output of the first neural network and the output of the second neural network as the input of the third neural network, using the clear face sample texture image as a label to train the first neural network, using the clear face sample image as a label to train the second neural network and / or the third neural network.

[0105] Considering that the input data of the first neural network and the second neural network are essentially face sample images, and clear face images are easier to obtain than blurred face images and texture images. Therefore, clear face sample images can be obtained in a variety of ways, such as directly obtaining clear face images from different data sources, or shooting or collecting a large number of clear face images. Then, the clear face sample images are blurred, such as resetting the pixels in the clear face sample images; or by setting the blur kernel, calculating with the clear face sample images, etc., to obtain the blurred face sample images. Then, textures are extracted from the clear face sample images and the blurred face sample images, respectively, to obtain the clear face sample texture images and the blurred face sample texture images, thereby completing the training data and label data required for training the deblurring network. Finally, the blurred face sample texture images are used as the input of the first neural network, the blurred face sample images are used as the input of the second neural network, the output of the first neural network and the output of the second neural network are used as the input of the third neural network, the clear face sample texture images are used as labels to train the first neural network, and the clear face sample images are used as labels to train the second neural network, the third neural network, or the second neural network and the third neural network. The training process may include: the first neural network takes the blurred face sample texture image as input, outputs the processing result, and adjusts the parameters of the first neural network so that the output result is closer and closer to the label of the clear face sample image until the accuracy of the model reaches a certain standard or the calculation converges, and the training is considered complete. The training process of the second neural network and the third neural network is similar to that of the second neural network and will not be described in detail here. It should be noted that the training process of the first neural network, the second neural network and the third neural network can be carried out simultaneously or separately. For example, the second neural network and the third neural network can share the same label and carry out the training process at the same time, etc. This disclosure does not specifically limit this.

[0106] This exemplary embodiment can obtain all training data and labels for the first neural network, the second neural network and the third neural network by processing the clear face sample images differently, which greatly reduces the difficulty of obtaining training data and improves the efficiency of network training. In addition, both the blurred face sample images and the blurred face sample texture images are obtained through the face sample images, which also ensures the consistency of the training data and is conducive to improving the accuracy of network training.

[0107] In an exemplary embodiment, if Fig.15 As shown, step S1450 includes:

[0108] Step S1510, using the blurred face sample texture image as the input of the first neural network and the clear face sample texture image as the corresponding label, and determining a first loss function according to the difference between the output of the first neural network and the clear face sample texture image;

[0109] Step S1520, using the blurred face sample image as the input of the second neural network and the clear face sample image as the corresponding label, and determining a second loss function according to the difference between the output of the second neural network and the clear face sample image;

[0110] Step S1530, using the output of the first neural network and the output of the second neural network as inputs of the third neural network, and the clear face sample image as the corresponding label, and determining a third loss function according to the difference between the output of the third neural network and the clear face sample image;

[0111] Step S1540, updating the first neural network according to the first loss function, updating the second neural network according to the second loss function, and updating the parameters of the third neural network according to the third loss function.

[0112] Fig.16A schematic diagram of a network structure for deblurring network training in this exemplary embodiment is shown. The training of the first neural network 1610 may include taking the blurred face sample texture image 1611 as input, comparing the texture image output by the first neural network with the clear face sample texture image 1612, determining the first loss function 1613, and updating the weight parameters of the first neural network based on the first loss function back propagation. The training of the second neural network 1620 may include taking the blurred face sample image 1621 as input, comparing the face image output by the second neural network with the clear face sample image 1622, determining the second loss function 1623, and updating the weight parameters of the second neural network based on the second loss function back propagation. The training of the third neural network 1630 may include taking the output of the first neural network and the output of the second neural network as input, comparing the face image 1631 output by the third neural network with the clear face sample image 1622, determining the third loss function 1632, and updating the weight parameters of the second neural network based on the third loss function back propagation. It can be seen that the second neural network and the third neural network can share the same label clear face sample image 1622 for training.

[0113] In this exemplary embodiment, the loss function can be calculated in a variety of ways, such as the L1 loss function, i.e., the minimum absolute deviation, or the L2 loss function, i.e., the minimum square error, etc., which is not specifically limited in this disclosure.

[0114] The exemplary embodiment of the present disclosure also provides a facial image deblurring device. Fig.17 As shown, the facial image deblurring device 1700 may include: an image acquisition module 1710, used to acquire a facial image to be processed; a first processing module 1720, used to perform a first processing on the texture of the facial image to be processed to obtain a first intermediate feature, the first processing is to perform a preliminary deblurring processing on the texture of the facial image to be processed; a second processing module 1730, used to perform a second processing on the facial image to be processed to obtain a second intermediate feature, the second processing is to perform a preliminary deblurring processing on the facial image to be processed; a third processing module 1740, used to perform a third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the facial image to be processed.

[0115] In an exemplary embodiment, the first processing module includes: a first feature acquisition unit, used to process the texture of the face image to be processed using a first neural network to obtain a first intermediate feature; the second processing module includes: a second feature acquisition unit, used to process the face image to be processed using a second neural network to obtain a second intermediate feature; the third processing module includes: a third feature acquisition unit, used to process the first intermediate feature and the second intermediate feature using a third neural network to obtain a deblurred image; wherein the output of the first neural network and the output of the second neural network are inputs to the third neural network.

[0116] In an exemplary embodiment, at least one of the first neural network, the second neural network, and the third neural network is a sub-network in a defuzzification network.

[0117] In an exemplary embodiment, the texture of the face image to be processed includes the face texture image to be processed; the first intermediate feature includes a deblurred texture intermediate image, and the second intermediate feature includes a deblurred face intermediate image; the first feature acquisition unit includes: a first deblurring processing subunit, used to perform a first deblurring processing on the face texture image to be processed using a first neural network to obtain a deblurred texture intermediate image; the second feature acquisition unit includes: a second deblurring processing subunit, used to perform a second deblurring processing on the face image to be processed using a second neural network to obtain a deblurred face intermediate image.

[0118] In an exemplary embodiment, the above-mentioned facial image deblurring device also includes: a sample image acquisition module, which is used to acquire a clear facial sample image; a sample image blur processing module, which is used to blur the clear facial sample image to obtain a blurred facial sample image; a texture image acquisition module, which is used to extract texture from the clear facial sample image to obtain a clear facial sample texture image; a texture image blur processing module, which is used to extract texture from the blurred facial sample image or blur the clear facial sample texture image to obtain a blurred facial sample texture image; a network training module, which is used to use the blurred facial sample texture image as the input of the first neural network, the blurred facial sample image as the input of the second neural network, the output of the first neural network and the output of the second neural network as the input of the third neural network, use the clear facial sample texture image as a label to train the first neural network, and use the clear facial sample image as a label to train the second neural network and / or the third neural network.

[0119] In an exemplary embodiment, the network training module includes: a first loss function determination unit, which is used to use the blurred face sample texture image as the input of the first neural network and the clear face sample texture image as the corresponding label, and determine the first loss function according to the difference between the output of the first neural network and the clear face sample texture image; a second loss function determination unit, which is used to use the blurred face sample image as the input of the second neural network and the clear face sample image as the corresponding label, and determine the second loss function according to the difference between the output of the second neural network and the clear face sample image; a third loss function determination unit, which is used to use the output of the first neural network and the output of the second neural network as the input of the third neural network, the clear face sample image as the corresponding label, and determine the third loss function according to the difference between the output of the third neural network and the clear face sample image; a network parameter updating unit, which is used to update the first neural network according to the first loss function, update the second neural network according to the second loss function, and update the parameters of the third neural network according to the third loss function.

[0120] In an exemplary embodiment, the above-mentioned image acquisition module includes: a key point detection unit, which is used to detect facial key points in the original image; a facial area determination unit, which is used to determine the facial area based on the eyebrow upper edge key points and the facial outer edge key points among the facial key points; and a facial image acquisition unit, which is used to extract an image of the facial area from the original image to obtain a facial image to be processed.

[0121] The specific details of each part of the above device have been described in detail in the method part implementation method, so they will not be repeated here.

[0122] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium, which can be implemented in the form of a program product, including program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification, for example, to execute Figure 3 , Figure 4 , Fig. 9 , Fig.10 , Fig.12 , Fig.14 or Fig.15 The program product may be in the form of a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0123] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0124] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0125] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

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

[0127] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or implementations combining hardware and software aspects, which may be collectively referred to herein as "circuit", "module" or "system". Those skilled in the art will readily think of other implementations of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0128] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A facial image deblurring method, characterized in that: include: Obtain the face image to be processed; By analyzing and classifying the relationship between different pixels in the face image to be processed, a texture is extracted from the face image to be processed; the texture of the face image to be processed is first processed to obtain a first intermediate feature, wherein the first processing is to perform a preliminary deblurring processing on the texture of the face image to be processed; the first processing is to optimize or restore the texture of the face image to be processed; Performing a second processing on the face image to be processed to obtain a second intermediate feature, wherein the second processing is performing a preliminary deblurring processing on the face image to be processed; Performing a third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the face image to be processed; The step of obtaining a face image to be processed comprises: Detect facial key points in the original image; Determine the face area according to the eyebrow upper edge key point and the face outer edge key point among the face key points; the eyebrow upper edge key point is the highest key point among the eyebrow key points; Extracting the image of the face area from the original image to obtain the face image to be processed; The first processing of the texture of the face image to be processed to obtain a first intermediate feature includes: Using a first neural network to process the texture of the face image to be processed to obtain a first intermediate feature; The performing a second processing on the face image to be processed to obtain a second intermediate feature includes: Processing the face image to be processed by using a second neural network to obtain a second intermediate feature; The performing a third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the face image to be processed includes: Processing the first intermediate feature and the second intermediate feature using a third neural network to obtain the deblurred image; The output of the first neural network and the output of the second neural network are the input of the third neural network; the first neural network, the second neural network and the third neural network have the same network structure, but different network weight parameters; The texture of the face image to be processed includes a face texture image to be processed; the first intermediate feature includes a deblurred texture intermediate image, and the second intermediate feature includes a deblurred face intermediate image; The step of processing the texture of the face image to be processed by using the first neural network to obtain the first intermediate feature includes: Using the first neural network to perform a first deblurring process on the face texture image to be processed to obtain the deblurred texture intermediate image; The step of processing the face image to be processed by the second neural network to obtain a second intermediate feature includes: The second neural network is used to perform a second deblurring process on the face image to be processed to obtain the deblurred face intermediate image.

2. The method according to claim 1, characterized in that At least one of the first neural network, the second neural network, and the third neural network is a subnetwork in a defuzzification network.

3. The method according to claim 1, characterized in that: The method further comprises: Obtain clear face sample images; Blurring the clear face sample image to obtain a blurred face sample image; Extracting texture from the clear face sample image to obtain a clear face sample texture image; Extracting texture from the blurred face sample image or blurring the clear face sample texture image to obtain a blurred face sample texture image; The blurred face sample texture image is used as the input of the first neural network, the blurred face sample image is used as the input of the second neural network, the output of the first neural network and the output of the second neural network are used as the input of the third neural network, the first neural network is trained with the clear face sample texture image as a label, and the second neural network and / or the third neural network is trained with the clear face sample image as a label.

4. The method according to claim 3, characterized in that The method uses the blurred face sample texture image as the input of the first neural network, the blurred face sample image as the input of the second neural network, and the output of the first neural network and the output of the second neural network as the input of the third neural network; uses the clear face sample texture image as a label to train the first neural network, and uses the clear face sample image as a label to train the second neural network and / or the third neural network, including: Taking the blurred face sample texture image as the input of the first neural network and the clear face sample texture image as the corresponding label, determining a first loss function according to the difference between the output of the first neural network and the clear face sample texture image; Taking the blurred face sample image as the input of the second neural network and the clear face sample image as the corresponding label, determining a second loss function according to the difference between the output of the second neural network and the clear face sample image; Taking the output of the first neural network and the output of the second neural network as inputs of the third neural network, and the clear face sample image as a corresponding label, determining a third loss function according to the difference between the output of the third neural network and the clear face sample image; The first neural network is updated according to the first loss function, the second neural network is updated according to the second loss function, and the parameters of the third neural network are updated according to the third loss function.

5. A facial image deblurring device, characterized in that: include: An image acquisition module, used to acquire a face image to be processed; A first processing module is used to extract texture from the face image to be processed by analyzing and classifying the relationship between different pixels in the face image to be processed; perform a first processing on the texture of the face image to be processed to obtain a first intermediate feature, wherein the first processing is to perform a preliminary deblurring processing on the texture of the face image to be processed; the first processing is to optimize or restore the texture of the face image to be processed; A second processing module, used for performing a second processing on the face image to be processed to obtain a second intermediate feature, wherein the second processing is a preliminary deblurring processing on the face image to be processed; A third processing module, configured to perform a third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the face image to be processed; The image acquisition module is configured as follows: Detect facial key points in the original image; Determine the face area according to the eyebrow upper edge key point and the face outer edge key point among the face key points; the eyebrow upper edge key point is the highest key point among the eyebrow key points; Extracting the image of the face area from the original image to obtain the face image to be processed; The first processing is performed on the texture of the face image to be processed to obtain a first intermediate feature, and is configured as follows: Using a first neural network to process the texture of the face image to be processed to obtain a first intermediate feature; The second processing of the face image to be processed to obtain the second intermediate feature is configured as follows: Processing the face image to be processed by using a second neural network to obtain a second intermediate feature; The performing third processing on the first intermediate feature and the second intermediate feature to obtain a deblurred image corresponding to the face image to be processed is configured as follows: Processing the first intermediate feature and the second intermediate feature using a third neural network to obtain the deblurred image; The output of the first neural network and the output of the second neural network are the input of the third neural network; the first neural network, the second neural network and the third neural network have the same network structure, but different network weight parameters; The texture of the face image to be processed includes a face texture image to be processed; the first intermediate feature includes a deblurred texture intermediate image, and the second intermediate feature includes a deblurred face intermediate image; The first neural network is used to process the texture of the face image to be processed to obtain a first intermediate feature, which is configured as follows: Using the first neural network to perform a first deblurring process on the face texture image to be processed to obtain the deblurred texture intermediate image; The method of using the second neural network to process the face image to be processed to obtain a second intermediate feature is configured as follows: The second neural network is used to perform a second deblurring process on the face image to be processed to obtain the deblurred face intermediate image.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

7. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 4 by executing the executable instructions.