CN111008935B - Face image enhancement method, device, system and storage medium - Google Patents

Face image enhancement method, device, system and storage medium Download PDF

Info

Publication number
CN111008935B
CN111008935B CN201911060534.2A CN201911060534A CN111008935B CN 111008935 B CN111008935 B CN 111008935B CN 201911060534 A CN201911060534 A CN 201911060534A CN 111008935 B CN111008935 B CN 111008935B
Authority
CN
China
Prior art keywords
face
image
dimensional
dimensional face
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911060534.2A
Other languages
Chinese (zh)
Other versions
CN111008935A (en
Inventor
杨骏锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Megvii Technology Co Ltd
Original Assignee
Beijing Megvii Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Megvii Technology Co Ltd filed Critical Beijing Megvii Technology Co Ltd
Priority to CN201911060534.2A priority Critical patent/CN111008935B/en
Publication of CN111008935A publication Critical patent/CN111008935A/en
Application granted granted Critical
Publication of CN111008935B publication Critical patent/CN111008935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a face image enhancement method, a device, a system and a storage medium, wherein the method comprises the following steps: performing face detection on the original image to obtain a face detection frame; according to the face detection frame and the three-dimensional face model, determining three-dimensional face information corresponding to a face image in the face detection frame; based on the original image and the human face three-dimensional model, the human face image in the original image is processed, the human face three-dimensional information can be fully utilized, the accuracy of image processing is improved, in addition, the human face distortion blurring can be greatly reduced through the image processing of the original image, and the image processing effect is improved. According to the method, the device, the system and the storage medium, the face image in the original image is processed based on the original image and the face three-dimensional model, the face three-dimensional information can be fully utilized, the accuracy of image processing is improved, in addition, the distortion and blurring of the face can be greatly reduced through the image processing of the original image, and the image processing effect is improved.

Description

Face image enhancement method, device, system and storage medium
Technical Field
The invention relates to the technical field of image processing, in particular to processing based on face image enhancement.
Background
The face fusion refers to obtaining a face enhancement result with more information content by fusing face information of multiple frames, and comprises noise reduction, resolution improvement, richer details and the like. The existing face fusion method is based on the RGB image processed by an image signal processor (isp), and the RGB image processed by the isp has lost much information. In addition, the shape and expression information of the original face are not considered in the existing method, so that the fused face and the fused person can be distorted due to the influence of factors such as the shape and expression of the face, or the fused face is wrong due to wrong posture estimation.
Therefore, the face fusion technology in the prior art has the problems of excessive information loss before fusion and fuzzy face distortion after fusion.
Disclosure of Invention
The present invention has been made in view of the above-described problems. The invention provides a face image enhancement method, a face image enhancement device, a face image enhancement system and a face image enhancement computer storage medium.
According to a first aspect of the present invention, there is provided a face image enhancement method, comprising:
Performing face detection on the original image to obtain a face detection frame;
according to the face detection frame and the three-dimensional face model, determining three-dimensional face information corresponding to a face image in the face detection frame;
and processing the original image according to the three-dimensional face information to obtain an output image.
According to a second aspect of the present invention, there is provided a face image enhancement apparatus comprising:
the face detection module is used for carrying out face detection on the original image to obtain a face detection frame;
the three-dimensional face module is used for determining three-dimensional face information corresponding to a face image in the face detection frame according to the face detection frame and the three-dimensional face model;
and the fusion module is used for processing the original image according to the three-dimensional face information to obtain an output image.
According to a third aspect of the present invention there is provided a facial image enhancement system comprising a memory, a processor and a computer program stored on said memory and running on said processor, characterised in that said processor implements the steps of the method of the first aspect when said computer program is executed.
According to a fourth aspect of the present invention there is provided a computer storage medium having stored thereon a computer program, characterized in that the computer program when executed by a computer implements the steps of the method of the first aspect.
According to the face image enhancement method, the face image enhancement device, the face image enhancement system and the face image enhancement computer storage medium, the face image in the original image is processed based on the original image and the face three-dimensional model, the face three-dimensional information can be fully utilized, the accuracy of image processing is improved, in addition, the face distortion blurring can be greatly reduced through the image processing of the original image, and the image processing effect is improved.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following more particular description of embodiments of the present invention, as illustrated in the accompanying drawings. The accompanying drawings are included to provide a further understanding of embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, and not constitute a limitation to the invention. In the drawings, like reference numerals generally refer to like parts or steps.
FIG. 1 is a schematic block diagram of an example electronic device for implementing face image enhancement methods and apparatus in accordance with embodiments of the present invention;
FIG. 2 is a schematic flow chart of a face image enhancement method according to an embodiment of the invention;
fig. 3 is an example of a face image enhancement method according to an embodiment of the present invention;
Fig. 4 is a schematic block diagram of a face image enhancement apparatus according to an embodiment of the present invention;
fig. 5 is a schematic block diagram of a face image enhancement system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some embodiments of the present invention and not all embodiments of the present invention, and it should be understood that the present invention is not limited by the example embodiments described herein. Based on the embodiments of the invention described in the present application, all other embodiments that a person skilled in the art would have without inventive effort shall fall within the scope of the invention.
First, an example electronic device 100 for implementing the face image enhancement method and apparatus of the embodiment of the present invention is described with reference to fig. 1.
As shown in fig. 1, an electronic device 100 includes one or more processors 101, one or more storage devices 102, an input device 103, an output device 104, an image sensor 105, which are interconnected by a bus system 106 or other form of connection mechanism (not shown). It should be noted that the components and structures of the electronic device 100 shown in fig. 1 are exemplary only and not limiting, as the electronic device may have other components and structures as desired.
The processor 101 may be a Central Processing Unit (CPU) or other form of processing unit having facial image enhancement or instruction execution capabilities, and may control other components in the electronic device 100 to perform desired functions.
The storage 102 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by the processor 102 to implement client functions and/or other desired functions in embodiments of the present invention as described below. Various applications and various data, such as various data used or generated by the applications, may also be stored in the computer-readable storage medium.
The input device 103 may be a device used by a user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like.
The output device 104 may output various information (e.g., images or sounds) to the outside (e.g., a user), and may include one or more of a display, a speaker, and the like.
The image sensor 105 may take images (e.g., photographs, videos, etc.) desired by the user and store the taken images in the storage 102 for use by other components.
For example, example electronic devices for implementing face image enhancement methods and apparatus in accordance with embodiments of the present invention may be implemented as, for example, smart phones, tablets, computer devices, and the like.
Next, a face image enhancement method 200 according to an embodiment of the present invention will be described with reference to fig. 2. As shown in fig. 2, a face image enhancement method 200 includes:
firstly, in step S210, face detection is performed on an original image to obtain a face detection frame;
in step S220, determining three-dimensional face information corresponding to a face image in the face detection frame according to the face detection frame and the three-dimensional face model;
In step S230, the original image is processed according to the three-dimensional face information, so as to obtain the original image enhanced by the face image.
The original image, namely the raw image, refers to original data which is not processed by any way and is obtained by converting a light source signal of the captured image into a digital signal by an image sensor, the image has rich layers, all data spaces can be utilized to the maximum extent, and a large amount of rich information is contained; the original image gives users a very sufficient processing space, almost is subjected to lossless processing, and the processed image has good effect and is suitable for being used as the basis of image processing.
Compared with the traditional method that the face image is processed based on RGB images processed by an image signal processor (isp) and the like, the face image processing method has the advantages that the face fusion enhancement is directly performed on the original image, and the information of the original image can be utilized to the greatest extent. The 3D face model is built through the original image, the information of the shape, the expression, the gesture and the like of the face in the original image is fully utilized, the 3D face model is projected to 2D to obtain a 2D fused face image, and then the 2D fused face image is fused into the original image, so that the distortion of face fusion enhancement is greatly reduced, and the face synergy effect is improved; because the 3D face model does not depend on color information, the problems that a face in an image is blocked and greatly influenced by objective factors such as light can be solved after the 3D face model is constructed, the distortion of the fused face is further reduced, and the face fusion enhancement effect is ensured. The method is suitable for various occasions needing to strengthen the face image in image processing, is beneficial to saving time and cost, fully utilizes the original information to sort the distortion of the face image, and can further improve the accuracy of the subsequent face image processing.
The face image enhancement method according to the embodiment of the invention can be implemented in a device, apparatus or system having a memory and a processor.
The face image enhancement method according to the embodiment of the invention can be deployed at a face image acquisition end, for example, can be deployed at an image acquisition end of an access control system; may be deployed at personal terminals such as smartphones, tablets, personal computers, and the like.
The face image enhancement method according to the embodiment of the invention can be deployed at a personal terminal, such as a smart phone, a tablet computer, a personal computer, or the like, or at a server side (or cloud side). For example, raw image data may be acquired and facial image enhancement performed at a personal terminal or at a server side (or cloud).
By way of example, the face image enhancement method according to the embodiment of the present invention may also be distributed and deployed at a personal terminal and at a server (or cloud) end. For example, the original image data may be acquired at a server (or cloud) and the server (or cloud) transmits the acquired original image data to a personal terminal, and the personal terminal performs face image enhancement according to the received original image data. As another example, the raw image data may be acquired at a personal terminal. And transmitting the acquired original image data to a server (or cloud) and then enhancing the face image by the server (or cloud).
According to the face image enhancement method provided by the embodiment of the invention, the face image is fused and enhanced by constructing the face 3D model based on the face image of the raw domain, so that the facial expression and the posture are ensured to the greatest extent, and the distortion and the blurring of the face image are greatly reduced.
According to an embodiment of the present invention, before the step S210, the method 200 may further include: an original image is acquired.
Illustratively, the acquiring the original image may further include: and acquiring the original image by an image acquisition device.
The image acquisition device can acquire single-frame images and also can acquire multi-frame images or video data. When the image acquisition device acquires a single-frame image, the single-frame image can be directly used as the original image without other processing; when the image acquisition device acquires multi-frame images or video data, at least one frame of original image can be obtained after the acquired multi-frame images or video data are subjected to framing.
The acquisition of the original image may also be obtained by acquiring image data from other data sources, for example. The image data may include video data and/or non-video data, and the non-video data may include a single frame image, where the single frame image may be directly used as the original image without framing.
It should be noted that, the original image may be data acquired in real time, or may be non-real-time data; and the original image is not necessarily all images containing human faces in the image data, but only part of the image frames; on the other hand, at least one frame of the original image may be a continuous multi-frame image, or may be a discontinuous, arbitrarily selected multi-frame image, which is not limited herein.
In step S210, according to an embodiment of the present invention, performing face detection on an original image to obtain a face detection frame may include:
and inputting the original image into a trained face detection and/or face tracking network to obtain a face detection frame of the original image.
Illustratively, the face detection box is a detection box (bounding box) of an image containing a target face determined by performing face detection and face tracking processing on at least one frame of the original image. Specifically, the size and position of the target face may be determined in the original image including the target face by various face detection and tracking methods commonly used in the art, such as template matching, SVM (support vector machine), neural network, etc., and then the target face may be tracked and/or located based on color information, local features, motion information, etc. of the target face, so as to determine an image including the target face in at least one frame of the original image and a detection frame thereof. The above-described process of determining an image containing a target face and its detection frame through a face detection and/or face tracking network is a common process in the field of image processing, and will not be described in detail herein.
It should be understood that the present invention is not limited by a face detection method, a face tracking method, or a detection frame positioning method specifically adopted, and whether a face detection method, a face tracking method, or a detection frame positioning method is an existing face detection method, a face tracking method, or a detection frame positioning method, or a face detection method, a face tracking method, or a detection frame positioning method developed in the future may be applied to the face image enhancement method according to the embodiment of the present invention, and should also be included in the protection scope of the present invention.
In some embodiments, the face detection box for performing face detection on the original image to obtain the original image may further include:
and displaying the face detection frame of the face image in the original image.
According to an embodiment of the present invention, the method 200 may further include: and allocating corresponding identification information to each face detection frame.
The identification information may be any information for distinguishing different faces, such as face IDs, etc., and is not limited herein. The original image may include one or more faces, and identification information is set for the detected face image and/or face detection frame to distinguish different faces in the original image, and the face image and/or face detection frame with the same identification information represent the same person.
In one embodiment, the identification information includes an ID, and assigning a corresponding ID to each face detection box may include:
inputting the original image into a trained face detection and/or face tracking network;
the face detection and tracking network detects a face detection frame comprising n face images in the original image;
judging whether the face image in the ith face detection frame and the face image in the face detection frame with the ID allocated thereto belong to the same face, wherein i=1, 2,3 … … n, n is a positive integer;
if the face image in the ith face detection frame and the face image in the face detection frame with the allocated ID do not belong to the same face, a new ID is allocated to the ith face detection frame;
if the face image in the ith face detection frame and the face image in the face detection frame with the ID allocated thereto belong to the same face, the ID of the face detection frame with the same face is allocated to the ith face detection frame.
According to an embodiment of the present invention, in step S220, determining three-dimensional face information corresponding to a face image in the face detection frame according to the face detection frame and the three-dimensional face model may include:
acquiring morphological parameters of a face image in the face detection frame;
And obtaining three-dimensional face information corresponding to the face image according to the morphological parameters and the three-dimensional face model.
Illustratively, acquiring the morphological parameters of the face image in the face detection frame may include:
and inputting the face image into a trained three-dimensional parameter detection network to obtain morphological parameters of the face image.
The three-dimensional parameter detection network can estimate and obtain three-dimensional parameters of the face image according to the face image based on an average face model, and can construct a 3D face image corresponding to the face image according to the three-dimensional parameters.
In some embodiments, the 3D face network may be a residual neural network, for example, res nets, but the embodiment of the present application is not limited thereto. Illustratively, the training of the three-dimensional parameter detection network comprises:
taking the 2D face training image as input layer data;
the three-dimensional parameter detection network establishes a three-dimensional face training image for the 2D face training image based on the three-dimensional face model to obtain three-dimensional parameters of the three-dimensional face training image, wherein the three-dimensional parameters enable Euclidean distances between points (such as key points) in the three-dimensional face training image projected onto a 2D plane coordinate system and corresponding points (such as key points) of the 2D face training image to be minimum.
Illustratively, the morphological parameters include at least one of: shape parameters and expression parameters.
The shape parameters can represent the shape (such as face shape, etc.), the angle of the face, etc., and the expression parameters can represent the facial features of the face, etc.; the three-dimensional parameters obtained by estimating the original image can be used for constructing the three-dimensional face image of the face image from factors such as the shape, the expression and the angle of the face, and compared with the traditional face fusion enhancement method which is too dependent on the color information of the image, the method has the advantages that more abundant face information is obtained, the problem that the face information is lost too much before fusion is solved, a more accurate data basis is provided for the face fusion process, and the face fusion effect is improved.
Illustratively, the method 200 further comprises:
acquiring texture information of a face image in the face detection frame;
the obtaining the three-dimensional face information corresponding to the face image according to the morphological parameters and the three-dimensional face model comprises the following steps:
according to the morphological parameters and the three-dimensional face model, obtaining a three-dimensional face gesture corresponding to the face image;
and fusing the texture information of the face image to the corresponding position of the three-dimensional face gesture to obtain the three-dimensional face information corresponding to the face image.
Illustratively, acquiring texture information of the face image in the face detection frame may include: and acquiring pixel information of the face image as the texture information, or extracting features of the face image to obtain the texture information.
Wherein the texture information is represented by gray scale distribution of the pixels and surrounding spatial neighbors, describing the surface properties of the face in the face image.
In some embodiments, the method for extracting features from the face image to obtain the texture information may include: statistical methods, model methods or signal processing methods. The statistical method researches statistical characteristics in a texture area or first-order, second-order or higher-order statistical characteristics of gray scales in the pixels and the neighborhood thereof based on gray scale attributes of the pixels and the neighborhood thereof, so that the texture information is obtained; the model method assumes that textures are formed in a certain parameter-controlled distributed model mode, and estimates calculation model parameters from the realization of texture images; the signal processing method is to extract the characteristic value which keeps relatively stable as the texture information after transforming (such as wavelet transforming) a certain area in the texture image.
Illustratively, according to the morphological parameters and the three-dimensional face model, obtaining the three-dimensional face pose corresponding to the face image includes:
acquiring the three-dimensional face model with a preset angle;
based on the morphological parameters, adjusting the outline of the three-dimensional face model of the preset angle;
and adjusting the five sense organs of the three-dimensional face model subjected to contour adjustment based on the expression parameters to obtain the three-dimensional face gesture corresponding to the face image.
Illustratively, the obtaining the three-dimensional face pose corresponding to the face image according to the morphological parameter and the three-dimensional face model includes:
acquiring identification information of the face image and a three-dimensional face model corresponding to the identification information;
based on the expression parameters, adjusting the five sense organs of the three-dimensional face model corresponding to the identification information to obtain the three-dimensional face gesture corresponding to the face image.
According to an embodiment of the present invention, after step S210, the method 200 may further include:
judging whether the face in the face detection frame has corresponding identification information or not; if the identification information exists, directly acquiring the corresponding three-dimensional face information of the face image;
If the identification information does not exist, step S220 is performed.
If the identification information exists, it is indicated that the face image in the current frame appears in the previous image frame, accordingly, the three-dimensional face model of the face image may be constructed based on the previous image frame, so as to speed up the whole face fusion process and save computing resources, projection can be performed on the three-dimensional face model of the same person which has been constructed according to expression parameters and fusion texture information, thus, repeated three-dimensional face model construction is not required for the face image appearing in each frame of original image, a great deal of computing resources are saved, and the face fusion speed is improved.
If the identification information does not exist, the fact that the face image in the current frame does not appear in the previous image frame is a newly added face is indicated, and new identification information needs to be set for distinguishing the face image from other face images; and simultaneously, constructing a three-dimensional face model according to the morphological parameters.
Illustratively, fusing the texture information of the face image to the corresponding position of the three-dimensional face pose to obtain three-dimensional face information corresponding to the face image, including:
Obtaining a face angle of the three-dimensional face image according to the gesture parameters;
rotating the three-dimensional face image to a preset angle according to the face angle of the three-dimensional face image;
copying texture information of the face image to a corresponding position in the three-dimensional face image based on the key point of the face image to obtain three-dimensional face information corresponding to the face image.
The angles of the faces in the face image may be different, so that the distribution of texture information of the faces is different, and in order to avoid adverse effects of these factors on the construction of the 3D face image, the 3D face model may be rotated to a uniform preset angle (such as a front face) and then the texture information fusion may be performed, so as to improve the accuracy of the texture information fusion. It should be appreciated that the predetermined angle may be set as desired, and is not limited herein.
In some embodiments, fusing texture information of the face image to a corresponding position of the three-dimensional face pose to obtain three-dimensional face information corresponding to the face image includes:
the three-dimensional face gesture comprises a plurality of unit areas;
obtaining corresponding areas of the unit areas in the face image according to the key points of the three-dimensional face gesture and the key points of the corresponding face image;
And respectively fusing texture information of the unit areas in the corresponding areas of the face image to the unit areas to obtain three-dimensional face information corresponding to the face image.
And copying texture information at or near the key points in the face image to a unit area corresponding to the same key points of the three-dimensional face gesture to obtain the three-dimensional face information corresponding to the face image. The key points can be key points used for identifying the face, such as facial key points and/or facial contour key points; wherein the facial feature key points can comprise at least one of eyebrow eye key points, nose key points, lip key points and ear key points. In some embodiments, the eyebrow keypoints include an eyebrow keypoint and an eye keypoint, the eye keypoints include an upper eyelid keypoint and a lower eyelid keypoint, the lip keypoints include an upper lip keypoint and a lower lip keypoint, and the like.
In one embodiment, the cell region includes a triangular region.
According to the embodiment of the present invention, in step S230, the processing the original image according to the three-dimensional face information to obtain the original image enhanced by the face image may include:
Projecting the three-dimensional face information to a 2D coordinate system to obtain a 2D face image corresponding to the three-dimensional face information;
and fusing the 2D face image with the original image to obtain the original image enhanced by the face image.
Illustratively, projecting the three-dimensional face information to a 2D coordinate system to obtain a 2D face image corresponding to the three-dimensional face information includes:
according to the morphological parameters, determining the face angle of the face image;
according to the face angle and the three-dimensional face information, calculating an angle transformation matrix between the three-dimensional face information and the face image;
rotating the three-dimensional face information according to the angle transformation matrix;
and projecting the rotated three-dimensional face information to a 2D coordinate system to obtain the 2D face image.
The three-dimensional face image is rotated to a unified preset angle in the process of fusing texture information, so that when the fused and enhanced face image is fused to an original image, the obtained 2D face image is required to be consistent according to the face image before fusion enhancement so as to ensure the fusion effect, and then the three-dimensional face image can be rotated to be consistent with the corresponding face image in the original image, and then the fused and enhanced face image is obtained by projection.
Illustratively, the fusing the 2D face image with the original image to obtain an output image includes:
obtaining a mask image of the original image according to the face image in the detection frame;
and fusing the 2D face image with the mask image to obtain the output image.
After obtaining the enhanced 2D face image according to the three-dimensional face model established by the original image, the enhanced 2D face image needs to be fused into the original image to replace the face image in the original image, so as to obtain a good face image processing effect. Specifically, the pixels of the face image in the detection frame in the original image can be set to 0, which is equivalent to removing the face image to be enhanced, so as to obtain a mask image of the original image; and then fusing the enhanced 2D face image obtained based on the information of the original image with the mask image to obtain the original image enhanced by the face image as an output image.
In some embodiments, the 2D face image and the mask image may be fused by a weighted average image fusion method, an HIS space image fusion method, a principal component analysis image fusion method, a pseudo-color image fusion method, a pyramid transformation-based fusion method, a wavelet transformation-based image fusion method, and the like. It should be noted that, the face image enhancement method according to the embodiment of the present invention is not limited by the image fusion method, and both the existing image fusion method and the image fusion method developed in the future are suitable for the face image enhancement method according to the embodiment of the present invention.
In some embodiments, the method further comprises: and carrying out image signal processing on the original image enhanced by the face image. Wherein the image signal processing may include feature extraction or the like. After the face image enhancement method is used for enhancing the face image of the original image, the face image contains more abundant information, an accurate and effective data basis is provided for the subsequent image processing process such as face recognition and the like, the face fusion effect is improved, and the accuracy of the whole image processing process is improved.
In one embodiment, referring to fig. 3, fig. 3 illustrates an example of a face image enhancement method according to an embodiment of the present invention. As shown in fig. 3, the method includes:
firstly, acquiring an original image through an image sensor;
then, face detection and tracking are performed on each frame of original image acquired by the image acquisition device, which specifically includes: inputting the original image into a trained face detection and/or face tracking network; the face detection and tracking network detects a face detection frame comprising n face images in the original image; judging whether the face image in the ith face detection frame and the face image in the face detection frame with the ID allocated to the face image belong to the same face or not; if the face image in the ith face detection frame and the face image in the face detection frame with the allocated ID do not belong to the same face, a new ID is allocated to the ith face detection frame; if the face image in the ith face detection frame and the face image in the face detection frame with the ID allocated thereto belong to the same face, the ID of the face detection frame which belongs to the same face as the ith face detection frame is allocated to the ith face detection frame;
Assuming that face frames displaying the N face images in the original image are all appeared, setting corresponding IDs as N1, N2 and … … NN, wherein N is a positive integer;
then, according to the face detection frame and the three-dimensional face model, determining three-dimensional face information corresponding to the face image in the face detection frame may specifically include:
inputting the face image into a trained three-dimensional parameter detection network to obtain morphological parameters of the face image; wherein the morphological parameters include shape parameters and expression parameters;
then, judging whether the ID of the face image exists or not;
if the ID exists, a three-dimensional face model corresponding to the ID is obtained, and then the five sense organs of the three-dimensional face model corresponding to the identification information are adjusted based on the expression parameters, so that the three-dimensional face gesture corresponding to the face image is obtained;
if the ID does not exist, a three-dimensional face model of the face image is established according to the morphological parameters, and the three-dimensional face gesture corresponding to the face image is obtained according to the morphological parameters and the three-dimensional face model, which comprises the following steps: acquiring the three-dimensional face model with a preset angle; based on the morphological parameters, adjusting the outline of the three-dimensional face model of the preset angle; based on the expression parameters, adjusting the five sense organs of the three-dimensional face model subjected to contour adjustment to obtain a three-dimensional face posture corresponding to the face image;
For example, if the ID is N2, directly acquiring a three-dimensional face model corresponding to N2 (the ID of the corresponding three-dimensional face model may also be N2), and if the ID is N5, establishing a three-dimensional face model corresponding to N5 according to the three-dimensional morphological parameter of the face image with the ID of N5 (or setting the ID of the three-dimensional face model to be N5);
the three-dimensional face gesture comprises a plurality of unit areas;
then, obtaining corresponding areas of the unit areas in the face image according to the key points of the three-dimensional face gesture and the key points of the corresponding face image;
respectively fusing texture information of the unit areas in the corresponding areas of the face image to the unit areas to obtain three-dimensional face information corresponding to the face image;
then, according to the morphological parameters, determining the face angle of the face image; according to the face angle and the three-dimensional face information, calculating an angle transformation matrix between the three-dimensional face information and the face image; rotating the three-dimensional face information according to the angle transformation matrix; projecting the rotated three-dimensional face information to a 2D coordinate system to obtain the 2D face image;
Then, obtaining a mask image of the original image according to the face image in the detection frame; fusing the 2D face image with the mask image to obtain the output image;
and finally, inputting the original image enhanced by the face image into an image signal processor for image processing.
Therefore, according to the face image enhancement method provided by the embodiment of the invention, the three-dimensional face model is built by fusing the original image, so that the face image in the original image is fused and enhanced, the facial expression and the facial posture are ensured to the greatest extent, and the facial distortion and blurring are greatly reduced.
Fig. 4 shows a schematic block diagram of a face image enhancement apparatus 400 according to an embodiment of the invention. As shown in fig. 4, a face image enhancement apparatus 400 according to an embodiment of the present invention includes:
the face detection module 410 is configured to perform face detection on the original image to obtain a face detection frame;
the three-dimensional face module 420 is configured to determine three-dimensional face information corresponding to a face image in the face detection frame according to the face detection frame and the three-dimensional face model;
and the fusion module 430 is configured to process the original image according to the three-dimensional face information, so as to obtain the original image enhanced by the face image.
It should be noted that the respective modules in the face image enhancement apparatus 400 according to the embodiment of the present invention may perform the respective steps/functions of the face image enhancement method described above in connection with fig. 2. Only the main functions of the respective components of the face image enhancement apparatus 400 are described above, and the details already described above are omitted. Fig. 5 shows a schematic block diagram of a face image enhancement system 500 according to an embodiment of the invention. The face image enhancement system 500 includes an image sensor 510, a storage device 520, and a processor 530.
The image sensor 510 is used to collect image data.
The storage means 520 stores program code for implementing the respective steps in the face image enhancement method according to an embodiment of the present invention.
The processor 530 is configured to execute the program code stored in the storage device 520 to perform the respective steps of the face image enhancement method according to the embodiment of the present invention, and to implement the respective modules in the face image enhancement device according to the embodiment of the present invention.
Furthermore, according to an embodiment of the present invention, there is also provided a storage medium on which program instructions are stored, which program instructions, when being executed by a computer or a processor, are for performing the respective steps of the face image enhancement method of the embodiment of the present invention, and for realizing the respective modules in the face image enhancement apparatus according to the embodiment of the present invention. The storage medium may include, for example, a memory card of a smart phone, a memory component of a tablet computer, a hard disk of a personal computer, read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, or any combination of the foregoing storage media. The computer readable storage medium may be any combination of one or more computer readable storage media, such as one containing computer readable program code for randomly generating a sequence of action instructions and another containing computer readable program code for facial image enhancement.
In an embodiment, the computer program instructions may implement respective functional modules of the face image enhancement apparatus according to an embodiment of the present invention when executed by a computer, and/or may perform the face image enhancement method according to an embodiment of the present invention.
The modules in the face image enhancement system according to the embodiment of the present invention may be implemented by a processor of the face image enhancement electronic device according to the embodiment of the present invention running computer program instructions stored in a memory, or may be implemented when computer instructions stored in a computer readable storage medium of a computer program product according to the embodiment of the present invention are run by a computer.
According to the face image enhancement method, the device, the system and the storage medium, the face images based on the raw domain are fused to construct the face 3D model to perform fusion enhancement on the face images, so that the facial shape expression and the facial gesture are guaranteed to the greatest extent, and the facial distortion and blurring are greatly reduced.
Although the illustrative embodiments have been described herein with reference to the accompanying drawings, it is to be understood that the above illustrative embodiments are merely illustrative and are not intended to limit the scope of the present invention thereto. Various changes and modifications may be made therein by one of ordinary skill in the art without departing from the scope and spirit of the invention. All such changes and modifications are intended to be included within the scope of the present invention as set forth in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another device, or some features may be omitted or not performed.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in order to streamline the invention and aid in understanding one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention. However, the method of the present invention should not be construed as reflecting the following intent: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
It will be understood by those skilled in the art that all of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be combined in any combination, except combinations where the features are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some of the modules in an item analysis device according to embodiments of the present invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present invention can also be implemented as an apparatus program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
The foregoing description is merely illustrative of specific embodiments of the present invention and the scope of the present invention is not limited thereto, and any person skilled in the art can easily think about variations or substitutions within the scope of the present invention. The protection scope of the invention is subject to the protection scope of the claims.

Claims (11)

1. A method of face image enhancement, the method comprising:
performing face detection on an original image to obtain a face detection frame, wherein the original image comprises a raw image;
according to the face detection frame and the three-dimensional face model, determining three-dimensional face information corresponding to a face image in the face detection frame;
processing the original image according to the three-dimensional face information to obtain an output image, including:
projecting the three-dimensional face information to a two-dimensional coordinate system to obtain a two-dimensional face image corresponding to the three-dimensional face information;
and fusing the two-dimensional face image with the original image to obtain the output image.
2. The method of claim 1, wherein determining three-dimensional face information corresponding to a face image in the face detection box based on the face detection box and a three-dimensional face model comprises:
acquiring morphological parameters of a face image in the face detection frame;
and obtaining three-dimensional face information corresponding to the face image according to the morphological parameters and the three-dimensional face model.
3. The method as recited in claim 2, further comprising:
Acquiring texture information of a face image in the face detection frame;
the obtaining the three-dimensional face information corresponding to the face image according to the morphological parameters and the three-dimensional face model comprises the following steps:
according to the morphological parameters and the three-dimensional face model, obtaining a three-dimensional face gesture corresponding to the face image;
and fusing the texture information of the face image to the corresponding position of the three-dimensional face gesture to obtain the three-dimensional face information corresponding to the face image.
4. The method of claim 3, wherein the morphological parameters include shape parameters and expression parameters.
5. The method of claim 4, wherein obtaining a three-dimensional face pose corresponding to the face image according to the morphological parameters and the three-dimensional face model comprises:
acquiring the three-dimensional face model with a preset angle;
based on the morphological parameters, adjusting the outline of the three-dimensional face model of the preset angle;
and adjusting the five sense organs of the three-dimensional face model subjected to contour adjustment based on the expression parameters to obtain the three-dimensional face gesture corresponding to the face image.
6. The method of claim 4, wherein the obtaining the three-dimensional face pose corresponding to the face image according to the morphological parameters and the three-dimensional face model comprises:
acquiring identification information of the face image and a three-dimensional face model corresponding to the identification information;
based on the expression parameters, adjusting the five sense organs of the three-dimensional face model corresponding to the identification information to obtain the three-dimensional face gesture corresponding to the face image.
7. The method according to any one of claims 2-6, wherein projecting the three-dimensional face information to a two-dimensional coordinate system to obtain a two-dimensional face image corresponding to the three-dimensional face information includes:
according to the morphological parameters, determining the face angle of the face image;
according to the face angle and the three-dimensional face information, calculating an angle transformation matrix between the three-dimensional face information and the face image;
rotating the three-dimensional face information according to the angle transformation matrix;
and projecting the rotated three-dimensional face information to a two-dimensional coordinate system to obtain the two-dimensional face image.
8. The method of claim 7, wherein the fusing the two-dimensional face image with the original image to obtain an output image comprises:
Obtaining a mask image of the original image according to the face image in the detection frame;
and fusing the two-dimensional face image with the mask image to obtain the output image.
9. A facial image enhancement apparatus, the apparatus comprising:
the face detection module is used for carrying out face detection on an original image to obtain a face detection frame, wherein the original image comprises a raw image;
the three-dimensional face module is used for determining three-dimensional face information corresponding to a face image in the face detection frame according to the face detection frame and the three-dimensional face model;
the fusion module is used for processing the original image according to the three-dimensional face information to obtain an output image, and comprises the following steps:
projecting the three-dimensional face information to a two-dimensional coordinate system to obtain a two-dimensional face image corresponding to the three-dimensional face information;
and fusing the two-dimensional face image with the original image to obtain the output image.
10. A facial image enhancement system comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed by the processor.
11. A computer storage medium having stored thereon a computer program, which when executed by a computer performs the steps of the method according to any of claims 1 to 8.
CN201911060534.2A 2019-11-01 2019-11-01 Face image enhancement method, device, system and storage medium Active CN111008935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911060534.2A CN111008935B (en) 2019-11-01 2019-11-01 Face image enhancement method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911060534.2A CN111008935B (en) 2019-11-01 2019-11-01 Face image enhancement method, device, system and storage medium

Publications (2)

Publication Number Publication Date
CN111008935A CN111008935A (en) 2020-04-14
CN111008935B true CN111008935B (en) 2023-12-12

Family

ID=70111434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911060534.2A Active CN111008935B (en) 2019-11-01 2019-11-01 Face image enhancement method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN111008935B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111508050B (en) * 2020-04-16 2022-05-13 北京世纪好未来教育科技有限公司 Image processing method and device, electronic equipment and computer storage medium
CN111652113B (en) 2020-05-29 2023-07-25 阿波罗智联(北京)科技有限公司 Obstacle detection method, device, equipment and storage medium
CN112257552B (en) * 2020-10-19 2023-09-05 腾讯科技(深圳)有限公司 Image processing method, device, equipment and storage medium
CN112381927A (en) * 2020-11-19 2021-02-19 北京百度网讯科技有限公司 Image generation method, device, equipment and storage medium
CN112712004B (en) * 2020-12-25 2023-09-12 英特灵达信息技术(深圳)有限公司 Face detection system, face detection method and device and electronic equipment
CN114120414B (en) * 2021-11-29 2022-11-01 北京百度网讯科技有限公司 Image processing method, image processing apparatus, electronic device, and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751144A (en) * 2015-04-02 2015-07-01 山东大学 Frontal face quick evaluation method for video surveillance
CN104809687A (en) * 2015-04-23 2015-07-29 上海趣搭网络科技有限公司 Three-dimensional human face image generation method and system
CN107146199A (en) * 2017-05-02 2017-09-08 厦门美图之家科技有限公司 A kind of fusion method of facial image, device and computing device
CN108921795A (en) * 2018-06-04 2018-11-30 腾讯科技(深圳)有限公司 A kind of image interfusion method, device and storage medium
CN109242760A (en) * 2018-08-16 2019-01-18 Oppo广东移动通信有限公司 Processing method, device and the electronic equipment of facial image
CN109325437A (en) * 2018-09-17 2019-02-12 北京旷视科技有限公司 Image processing method, device and system
CN109712080A (en) * 2018-10-12 2019-05-03 迈格威科技有限公司 Image processing method, image processing apparatus and storage medium
CN109949386A (en) * 2019-03-07 2019-06-28 北京旷视科技有限公司 A kind of Method for Texture Image Synthesis and device
WO2019128508A1 (en) * 2017-12-28 2019-07-04 Oppo广东移动通信有限公司 Method and apparatus for processing image, storage medium, and electronic device
CN110096925A (en) * 2018-01-30 2019-08-06 普天信息技术有限公司 Enhancement Method, acquisition methods and the device of Facial Expression Image

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751144A (en) * 2015-04-02 2015-07-01 山东大学 Frontal face quick evaluation method for video surveillance
CN104809687A (en) * 2015-04-23 2015-07-29 上海趣搭网络科技有限公司 Three-dimensional human face image generation method and system
CN107146199A (en) * 2017-05-02 2017-09-08 厦门美图之家科技有限公司 A kind of fusion method of facial image, device and computing device
WO2019128508A1 (en) * 2017-12-28 2019-07-04 Oppo广东移动通信有限公司 Method and apparatus for processing image, storage medium, and electronic device
CN110096925A (en) * 2018-01-30 2019-08-06 普天信息技术有限公司 Enhancement Method, acquisition methods and the device of Facial Expression Image
CN108921795A (en) * 2018-06-04 2018-11-30 腾讯科技(深圳)有限公司 A kind of image interfusion method, device and storage medium
CN109242760A (en) * 2018-08-16 2019-01-18 Oppo广东移动通信有限公司 Processing method, device and the electronic equipment of facial image
CN109325437A (en) * 2018-09-17 2019-02-12 北京旷视科技有限公司 Image processing method, device and system
CN109712080A (en) * 2018-10-12 2019-05-03 迈格威科技有限公司 Image processing method, image processing apparatus and storage medium
CN109949386A (en) * 2019-03-07 2019-06-28 北京旷视科技有限公司 A kind of Method for Texture Image Synthesis and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于卷积神经网络的低照度可见光与近红外图像融合;唐超影;浦世亮;叶鹏钊;肖飞;冯华君;;光学学报(第16期);全文 *

Also Published As

Publication number Publication date
CN111008935A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN111008935B (en) Face image enhancement method, device, system and storage medium
KR102319177B1 (en) Method and apparatus, equipment, and storage medium for determining object pose in an image
CN106778928B (en) Image processing method and device
CN108765278B (en) Image processing method, mobile terminal and computer readable storage medium
CN110532984B (en) Key point detection method, gesture recognition method, device and system
CN108961303B (en) Image processing method and device, electronic equipment and computer readable medium
WO2019218824A1 (en) Method for acquiring motion track and device thereof, storage medium, and terminal
CN109815843B (en) Image processing method and related product
WO2022161286A1 (en) Image detection method, model training method, device, medium, and program product
WO2018137623A1 (en) Image processing method and apparatus, and electronic device
CN106682632B (en) Method and device for processing face image
CN108876804B (en) Matting model training and image matting method, device and system and storage medium
CN108875537B (en) Object detection method, device and system and storage medium
Liu et al. Real-time robust vision-based hand gesture recognition using stereo images
JP6544900B2 (en) Object identification device, object identification method and program
CN108875542B (en) Face recognition method, device and system and computer storage medium
KR101141643B1 (en) Apparatus and Method for caricature function in mobile terminal using basis of detection feature-point
WO2019075666A1 (en) Image processing method and apparatus, terminal, and storage medium
CN109063678B (en) Face image recognition method, device and storage medium
CN111626163B (en) Human face living body detection method and device and computer equipment
CN109919971B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN107959798B (en) Video data real-time processing method and device and computing equipment
CN110222572A (en) Tracking, device, electronic equipment and storage medium
CN113160231A (en) Sample generation method, sample generation device and electronic equipment
CN111199169A (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant