WO2020042975A1 - 人脸姿态估计/三维人脸重构方法、装置及电子设备 - Google Patents

人脸姿态估计/三维人脸重构方法、装置及电子设备 Download PDF

Info

Publication number
WO2020042975A1
WO2020042975A1 PCT/CN2019/101715 CN2019101715W WO2020042975A1 WO 2020042975 A1 WO2020042975 A1 WO 2020042975A1 CN 2019101715 W CN2019101715 W CN 2019101715W WO 2020042975 A1 WO2020042975 A1 WO 2020042975A1
Authority
WO
WIPO (PCT)
Prior art keywords
dimensional
face
dimensional face
model
face image
Prior art date
Application number
PCT/CN2019/101715
Other languages
English (en)
French (fr)
Inventor
周世威
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to JP2021510684A priority Critical patent/JP7203954B2/ja
Priority to EP19855542.7A priority patent/EP3836070A4/en
Publication of WO2020042975A1 publication Critical patent/WO2020042975A1/zh
Priority to US17/186,593 priority patent/US11941753B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/06Topological mapping of higher dimensional structures onto lower dimensional surfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/75Determining position or orientation of objects or cameras using feature-based methods involving models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects
    • G06V20/647Three-dimensional objects by matching two-dimensional images to three-dimensional objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/174Facial expression recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/174Facial expression recognition
    • G06V40/175Static expression
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/08Indexing scheme for image data processing or generation, in general involving all processing steps from image acquisition to 3D model generation
    • 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/20076Probabilistic image processing
    • 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/20112Image segmentation details
    • G06T2207/20121Active appearance model [AAM]
    • 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/20112Image segmentation details
    • G06T2207/20124Active shape model [ASM]
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2021Shape modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/12Acquisition of 3D measurements of objects

Definitions

  • the present application relates to the field of image processing technology, and in particular, to a method and an apparatus for estimating a face pose, a method and an apparatus for reconstructing a three-dimensional face, and an electronic device.
  • Face pose estimation is a very popular problem in the computer field. It refers to determining the angle information of the face orientation according to the face image, that is, three deflection angles are calculated according to the characteristics of the face image: pitch, yaw Yaw and roll.
  • model-based methods there are various methods for face pose estimation, which can be divided into model-based methods, apparent-based methods, and classification-based methods.
  • the model-based method since the face pose obtained by the model-based method is a continuous value and the pose estimation accuracy is higher, the model-based method has become a common method.
  • the process of a typical model-based pose estimation method is described below. First, locate the coordinates of key points (feature points) on the two-dimensional face image to obtain two-dimensional key points, such as facial features, contours, etc .; then, build a neutral and expressionless average three-dimensional model of the face, and 3D key points with the same semantics as the 2D key points are extracted from the model. Next, based on the 2D key point coordinate values, the 3D key point coordinate values, and the camera focal length, a 3D average face model is obtained to a 2D face image Finally, the face pose of the two-dimensional face image is determined according to the rotation matrix.
  • the prior art has at least the following problems: Because there is usually a difference between a three-dimensional average face model and a two-dimensional face image, when performing pose estimation on a large angle and exaggerated facial expression , The accuracy of attitude estimation will be greatly reduced. In summary, the prior art has a problem that the robustness of pose estimation based on a three-dimensional average face model is poor.
  • This application provides a face pose estimation method to solve the problem of poor robustness of pose estimation based on a three-dimensional average face model in the prior art.
  • the present application additionally provides a three-dimensional face reconstruction method and system, and an electronic device.
  • This application provides a face pose estimation method, including:
  • the constructing a three-dimensional face model corresponding to the two-dimensional face image includes:
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed.
  • the face shape fitting algorithm includes:
  • the three-dimensional face model after the face contour feature points are fitted is used as The three-dimensional face model is described.
  • Optional also includes:
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed according to the three-dimensional face model after the facial contour feature points are fitted.
  • the constructing a facial expression three-dimensional face model corresponding to the two-dimensional face image includes:
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed.
  • the constructing a three-dimensional face model corresponding to the two-dimensional face image includes:
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed through a face shape and expression fitting algorithm.
  • the face shape and expression fitting algorithm includes:
  • the three-dimensional face model after expression fitting is used as the three-dimensional face model.
  • Optional also includes:
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed according to the three-dimensional face model after the expression fitting.
  • the constructing a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and the feature vector of the three-dimensional feature face space includes:
  • E represents the energy function
  • N represents the number of internal feature points in the face
  • i represents the two-dimensional interior obtained by projecting the internal feature points of the three-dimensional average face model into the two-dimensional space through the projection mapping matrix.
  • the coordinate value of the feature point, y i represents the coordinate value of the feature point inside the face of the two-dimensional face image
  • represents the three-dimensional face shape parameter.
  • the coordinate values of the two-dimensional internal feature points obtained by the projection into the two-dimensional space are obtained by using the following formula:
  • U represents a matrix composed of feature vectors corresponding to the internal feature points of the face of the three-dimensional average face model
  • P represents the projection mapping matrix
  • V represents vertex coordinate data of the 3d average face corresponding to the internal feature points.
  • performing contour feature point fitting on the first three-dimensional model according to the facial feature point of the two-dimensional face image includes:
  • the three-dimensional points corresponding to the two-dimensional contour feature points obtained by the mapping are selected as the facial contour feature points of the first three-dimensional face model.
  • Optional also includes:
  • the three-dimensional average face model and the feature vector are determined.
  • Optional also includes:
  • At least one expression basis corresponding to the three-dimensional average face model is determined.
  • This application also provides a three-dimensional face reconstruction method, including:
  • the fitted three-dimensional face model is used as the three-dimensional face of the two-dimensional face image model.
  • the method further includes:
  • the three-dimensional face model after contour fitting is subjected to expression fitting.
  • the method further includes:
  • Performing contour feature point fitting on the first three-dimensional face model based on the face contour feature points of the two-dimensional face image includes:
  • contour feature point fitting is performed on the first three-dimensional facial model after the expression fitting.
  • the constructing a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and the feature vector of the three-dimensional feature face space includes:
  • E represents the energy function
  • N represents the number of internal feature points in the face
  • i represents the two-dimensional interior obtained by projecting the internal feature points of the three-dimensional average face model into the two-dimensional space through the projection mapping matrix
  • the coordinate value of the feature point y i represents the coordinate value of the feature point inside the face of the two-dimensional face image
  • represents the three-dimensional face shape parameter.
  • the coordinate values of the two-dimensional internal feature points obtained by the projection into the two-dimensional space are obtained by using the following formula:
  • U represents a matrix composed of feature vectors corresponding to the internal feature points of the face of the three-dimensional average face model
  • P represents the projection mapping matrix
  • V represents vertex coordinate data of the 3d average face corresponding to the internal feature points.
  • performing contour feature point fitting on the first three-dimensional model according to the facial feature point of the two-dimensional face image includes:
  • the three-dimensional points corresponding to the two-dimensional contour feature points obtained by the mapping are selected as the facial contour feature points of the first three-dimensional face model.
  • Optional also includes:
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed according to the fitted three-dimensional face model.
  • Optional also includes:
  • the three-dimensional average face model and the feature vector are determined.
  • Optional also includes:
  • At least one expression basis corresponding to the three-dimensional average face model is determined.
  • the present application also provides a face pose estimation device, including:
  • a two-dimensional face image obtaining unit configured to obtain a two-dimensional face image to be processed
  • a three-dimensional face model constructing unit configured to construct a three-dimensional face model corresponding to the two-dimensional face image
  • a face pose determination unit is configured to determine a face pose of the two-dimensional face image according to a face feature point of the three-dimensional face model and a face feature point of the two-dimensional face image.
  • the three-dimensional face model construction unit is specifically configured to construct a three-dimensional face model corresponding to the two-dimensional face image through a face shape fitting algorithm.
  • the three-dimensional face model construction unit includes:
  • a projection matrix determining subunit configured to determine the relationship between the three-dimensional average face model and the two-dimensional face image according to the internal feature points of the two-dimensional face image and the internal feature points of the three-dimensional average face model; Projection mapping matrix;
  • a first model construction subunit configured to construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and feature vectors of the three-dimensional feature face space;
  • a contour fitting subunit configured to fit the contour feature points of the first three-dimensional model according to the contour feature points of the face of the two-dimensional face image
  • the second model determining subunit is configured to simulate the facial contour feature points if the error between the two-dimensional face image and the three-dimensional facial model after the facial contour feature points are fitted is less than a preset error.
  • the combined three-dimensional face model is used as the three-dimensional face model.
  • the three-dimensional face model construction unit further includes:
  • a third model construction subunit configured to construct a three-dimensional person corresponding to the two-dimensional face image according to the three-dimensional face model after fitting the facial contour feature points if the error is greater than or equal to a preset error Face model.
  • the three-dimensional face model construction unit is specifically configured to construct a three-dimensional face model corresponding to the two-dimensional face image through a facial expression fitting algorithm.
  • the three-dimensional face model construction unit is specifically configured to construct a three-dimensional face model corresponding to the two-dimensional face image through a face shape and expression fitting algorithm.
  • the three-dimensional face model construction unit includes:
  • a projection matrix determining subunit configured to determine the relationship between the three-dimensional average face model and the two-dimensional face image according to the internal feature points of the two-dimensional face image and the internal feature points of the three-dimensional average face model; Projection mapping matrix;
  • a first model construction subunit configured to construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and feature vectors of the three-dimensional feature face space;
  • a contour fitting subunit configured to fit the contour feature points of the first three-dimensional model according to the contour feature points of the face of the two-dimensional face image
  • An expression fitting subunit configured to perform expression fitting on a three-dimensional face model after contour fitting according to facial feature points in the two-dimensional face image and at least one expression basis corresponding to the three-dimensional average face model.
  • a second model determining subunit configured to use the three-dimensional face model after expression fitting as an error if the error between the two-dimensional face image and the three-dimensional face model after expression fitting is less than a preset error; Three-dimensional face model.
  • Optional also includes:
  • a third model construction subunit is configured to construct a three-dimensional face model corresponding to the two-dimensional face image according to the three-dimensional face model after the expression is fitted if the error is greater than or equal to a preset error.
  • the contour fitting subunit includes:
  • a first contour feature point selection subunit configured to select a three-dimensional point corresponding to a face contour feature point of the two-dimensional face image from the first three-dimensional face model as an initial three-dimensional contour feature point;
  • a contour feature point mapping subunit configured to map the initial three-dimensional contour feature points to the two-dimensional face image through the projection mapping matrix
  • the second contour feature point selection subunit is used to select a three-dimensional point corresponding to the two-dimensional contour feature point obtained by mapping as a face contour feature point of the first three-dimensional face model through a nearest neighbor matching algorithm.
  • Optional also includes:
  • the first prior data determination unit is configured to determine the three-dimensional average face model and the feature vector according to a three-dimensional face model sample.
  • Optional also includes:
  • the second prior data determination unit is configured to determine at least one expression basis corresponding to the three-dimensional average face model according to a three-dimensional face model sample.
  • the present application also provides a three-dimensional face reconstruction device, including:
  • a two-dimensional face image obtaining unit configured to obtain a two-dimensional face image to be processed
  • a projection matrix determining subunit configured to determine the relationship between the three-dimensional average face model and the two-dimensional face image according to the internal feature points of the two-dimensional face image and the internal feature points of the three-dimensional average face model; Projection mapping matrix;
  • a first model construction subunit configured to construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and feature vectors of the three-dimensional feature face space;
  • a contour fitting subunit configured to fit the contour feature points of the first three-dimensional face model according to the facial contour feature points of the two-dimensional face image
  • a second model determining unit configured to use the fitted three-dimensional face model as the second if the error between the two-dimensional face image and the fitted three-dimensional face model is less than a preset error;
  • a three-dimensional face model of a three-dimensional face image
  • Optional also includes:
  • a first expression fitting unit configured to perform expression simulation on the three-dimensional face model after contour fitting according to the internal feature points of the face of the two-dimensional face image and at least one expression basis corresponding to the three-dimensional average face model; Together.
  • Optional also includes:
  • a second expression fitting unit configured to perform expression fitting on the first three-dimensional face model according to at least one expression basis corresponding to the three-dimensional average face model
  • the contour fitting subunit is specifically configured to perform contour feature point fitting on the first three-dimensional face model after the expression fitting according to the face contour feature points of the two-dimensional face image.
  • the contour fitting subunit includes:
  • a first contour feature point selection subunit configured to select a three-dimensional point corresponding to a face contour feature point of the two-dimensional face image from the first three-dimensional face model as an initial three-dimensional contour feature point;
  • a contour feature point mapping subunit configured to map the initial three-dimensional contour feature points to the two-dimensional face image through the projection mapping matrix
  • the second contour feature point selection subunit is used to select a three-dimensional point corresponding to the two-dimensional contour feature point obtained by mapping as a face contour feature point of the first three-dimensional face model through a nearest neighbor matching algorithm.
  • Optional also includes:
  • a third model construction subunit is configured to construct a three-dimensional face model corresponding to the two-dimensional face image according to the fitted three-dimensional face model if the error is greater than or equal to a preset error.
  • Optional also includes:
  • the first prior data determination unit is configured to determine the three-dimensional average face model and the feature vector according to a three-dimensional face model sample.
  • Optional also includes:
  • the second prior data determination unit is configured to determine at least one expression basis corresponding to the three-dimensional average face model according to a three-dimensional face model sample.
  • This application also provides an electronic device, including:
  • a memory for storing a program that implements a face pose estimation method after the device is powered on and runs the program for the face pose estimation method through the processor, the following steps are performed: obtaining a two-dimensional face image to be processed; constructing A three-dimensional face model corresponding to the two-dimensional face image; determining a person of the two-dimensional face image according to the face feature points of the three-dimensional face model and the face feature points of the two-dimensional face image Face gesture.
  • This application also provides an electronic device, including:
  • a memory for storing a program that implements a three-dimensional face reconstruction method after the device is powered on and runs the program of the three-dimensional face reconstruction method through the processor, the following steps are performed: obtaining a two-dimensional face image to be processed Determining a projection mapping matrix of the three-dimensional average face model to the two-dimensional face image according to the internal feature points of the face of the two-dimensional face image and the internal feature points of the three-dimensional average face model; according to the Project a mapping matrix and a feature vector of a three-dimensional feature face space to construct a first three-dimensional face model corresponding to the two-dimensional face image; and according to the face contour feature points of the two-dimensional face image,
  • the face model is fitted with contour feature points; if the error between the two-dimensional face image and the fitted three-dimensional face model is less than a preset error, the fitted three-dimensional face model is used as the A three-dimensional face model of a two-dimensional face image is described.
  • the present application also provides a computer-readable storage medium having instructions stored in the computer-readable storage medium that, when run on a computer, causes the computer to execute the various methods described above.
  • the present application also provides a computer program product including instructions that, when run on a computer, causes the computer to perform the various methods described above.
  • the face pose estimation method constructs a three-dimensional face model corresponding to the two-dimensional face image by acquiring a two-dimensional face image to be processed, and according to the facial feature points of the three-dimensional face model And the face feature points of the two-dimensional face image to determine the face pose of the two-dimensional face image; this processing method enables a pose solution based on a three-dimensional face model corresponding to the two-dimensional face image, Instead of only solving the pose based on the three-dimensional average face model, a high-precision pose can still be obtained when the pose estimation is performed on a face with a large angle and an exaggerated expression; therefore, the robustness of the pose estimation can be effectively improved.
  • a two-dimensional face image to be processed is obtained; according to the internal feature points of the face of the two-dimensional face image and the internal feature points of the three-dimensional average face model, Determining a projection mapping matrix of the three-dimensional average face model to the two-dimensional face image; and constructing a first three-dimensional face corresponding to the two-dimensional face image according to the projection mapping matrix and a feature vector of the three-dimensional feature face space Model; fitting contour feature points to the first three-dimensional face model according to facial feature points of the two-dimensional face image; if the two-dimensional face image and the fitted three-dimensional face model If the error between them is smaller than the preset error, the fitted three-dimensional face model is taken as the three-dimensional face model of the two-dimensional face image; this processing method makes it possible to drive the three-dimensional based on the prior data of the three-dimensional face.
  • Face model fitting considers the combination of internal feature points and outer contour feature points of the face, and then fits iterations to minimize the error between the three-dimensional face model and the two-dimensional face image.
  • the original real face, and the reconstructed 3D face model conforms to the biological characteristics of the face; therefore, the reconstruction accuracy of the 3D face model can be effectively improved.
  • FIG. 1 is a flowchart of an embodiment of a face pose estimation method provided by the present application
  • FIG. 2 is a schematic diagram of a two-dimensional face image according to an embodiment of a face pose estimation method provided by the present application
  • FIG. 3 is a face shape fitting flowchart of an embodiment of a face pose estimation method provided by the present application.
  • FIG. 4 is a schematic diagram of a three-dimensional average face model of an embodiment of a face pose estimation method provided by the present application
  • FIG. 5 is a specific flowchart of face shape fitting according to an embodiment of a face pose estimation method provided in the present application
  • FIG. 6 is a flowchart of face shape and expression fitting according to an embodiment of a face pose estimation method provided by the present application.
  • FIG. 7 is a schematic diagram of multiple expressions of a three-dimensional average face model of an embodiment of a face pose estimation method provided by the present application.
  • FIG. 8 is a specific flowchart of face shape and expression fitting according to an embodiment of a face pose estimation method provided by the present application.
  • FIG. 9 is a schematic diagram of an embodiment of a face pose estimation device provided by the present application.
  • FIG. 10 is a specific schematic diagram of an embodiment of a face pose estimation device provided by the present application.
  • FIG. 11 is a schematic diagram of an embodiment of an electronic device provided by the present application.
  • FIG. 12 is a flowchart of an embodiment of a three-dimensional face reconstruction method provided by the present application.
  • FIG. 13 is a specific flowchart of an embodiment of a three-dimensional face reconstruction method provided by the present application.
  • FIG. 15 is a schematic diagram of an embodiment of a three-dimensional face reconstruction device provided by the present application.
  • FIG. 16 is a schematic diagram of an embodiment of an electronic device provided by the present application.
  • Face pose estimation plays a very important role in three-dimensional space such as face reconstruction and virtual try-on.
  • Face pose estimation can be applied in the fields of three-dimensional augmented reality stickers (AR stickers), three-dimensional face changes, three-dimensional AR glasses, and the like. Detailed descriptions will be made in the following embodiments one by one.
  • AR stickers three-dimensional augmented reality stickers
  • FIG. 1 is a flowchart of an embodiment of a face pose estimation method provided by this application.
  • the method is executed by a face pose estimation device, which is usually deployed on a server, but is not limited to the server. It can be any device capable of implementing the face pose estimation method.
  • a face pose estimation method provided in this application includes:
  • Step S101 Acquire a two-dimensional face image to be processed.
  • the two-dimensional face image may be a two-dimensional face image captured by an image acquisition device such as a camera or a camera.
  • the two-dimensional face image includes a plurality of pixels.
  • the two-dimensional face image shown in FIG. 2 is 256 * 256 pixels.
  • Step S103 Construct a three-dimensional face model corresponding to the two-dimensional face image.
  • the face pose estimation method provided by this application reconstructs a 3D face model corresponding to a 2D face image by introducing a 3D face reconstruction technology, and extracts a 2D face image from the 3D face model. Feature points with the same semantic relationship can be used to solve the two-dimensional face pose.
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed by using a face shape fitting algorithm; using this processing method, a face angle corresponding to the two-dimensional face image is constructed.
  • the similar three-dimensional face model makes it possible to obtain a high-precision pose when performing pose estimation on a large angle of the face; therefore, the robustness of the pose estimation can be effectively improved.
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed by using an expression fitting algorithm; using this processing method, a facial expression corresponding to the two-dimensional face image is constructed similarly
  • the three-dimensional face model of the face makes it possible to obtain a high-precision pose when performing pose estimation on an exaggerated facial expression; therefore, the robustness of the pose estimation can be effectively improved.
  • a three-dimensional face model corresponding to the two-dimensional face image is constructed through a face and expression fitting algorithm; using this processing method, a person corresponding to the two-dimensional face image is constructed A three-dimensional face model with similar facial expressions and similar face angles, so that when performing pose estimation on large angles and exaggerated facial expressions, a high-precision pose can still be obtained; therefore, the pose estimation can be effectively improved.
  • a face and expression fitting algorithm using this processing method, a person corresponding to the two-dimensional face image is constructed A three-dimensional face model with similar facial expressions and similar face angles, so that when performing pose estimation on large angles and exaggerated facial expressions, a high-precision pose can still be obtained; therefore, the pose estimation can be effectively improved.
  • Step S105 Determine the face pose of the two-dimensional face image according to the face feature points of the three-dimensional face model and the face feature points of the two-dimensional face image.
  • a face pose estimation may be performed on the two-dimensional face image based on the reconstructed three-dimensional face model. This embodiment Based on the face feature points of the three-dimensional face model and the face feature points of the two-dimensional face image, the face pose of the two-dimensional face image can be determined.
  • the facial feature points can be obtained by analyzing the facial feature point positioning algorithm. As shown in FIG. 1, there are 66 facial feature points, including 49 internal feature points and 17 contour feature points.
  • the facial feature point location algorithm includes, but is not limited to, the following categories: 1) Optimization-based methods, such as ASM (Active Shape Model, Active Shape Model), AAM (Active Appreance Model, Active Appearance Model), and CLM, etc. 2) Regression-based methods, such as cascaded pose regression, SDM, ESR and other methods; 3) Deep learning methods, such as based on convolutional neural network (CNN), deep autoencoder (DAE) ) And restricted Boltzmann machine (RBM) for facial feature point localization.
  • ASM Active Shape Model, Active Shape Model
  • AAM Active Appreance Model
  • CLM etc.
  • Regression-based methods such as cascaded pose regression, SDM, ESR and other methods
  • Deep learning methods such as based on convolutional neural network (CNN), deep autoencoder (DAE) ) And restricted Boltzmann machine (RBM) for facial feature point localization.
  • the process of step S105 is as follows. First, the facial feature point positioning algorithm is used to locate the facial feature point coordinates on a two-dimensional face image to obtain two-dimensional key points, and the reconstructed three-dimensional face model is extracted with the same two-dimensional key points. Semantic 3D keypoints; then, based on the 2D keypoint coordinate values, the 3D keypoint coordinate values, and the camera focal length, obtain a reconstructed 3D face model to a 2D face image rotation matrix; finally, according to the rotation The matrix determines the face pose of a two-dimensional face image.
  • FIG. 3 is a flowchart of face fitting according to an embodiment of a face pose estimation method according to an embodiment of the present application. Since the face shape fitting algorithm used in this embodiment is implemented based on the three-dimensional face prior data, the following first describes the three-dimensional face prior data and the generation process thereof.
  • the three-dimensional face prior data may include a three-dimensional average face model, a feature vector of a three-dimensional feature face space, and a feature value of each sample of the three-dimensional face model.
  • the three-dimensional average face model includes a three-dimensional average face model calculated according to a plurality of three-dimensional face model samples. Each 3D face model sample can be converted into a multi-dimensional vector. After obtaining the vector set of 3D face model samples, the vectors in the vector set are traversed and accumulated, and then the average value is obtained to obtain a 3D average face model.
  • FIG. 4 shows a three-dimensional average face model of this embodiment, which is a three-dimensional average face model of a neutral expression.
  • the three-dimensional face model sample is generated by the following steps: 1) Obtaining multiple three-dimensional face data sets, for example, Surrey Face Model (SFM) and Basel Face model (BFM), etc., among which Surrey Face
  • the Model face data set includes three-dimensional face models of 169 neutral expressions, each model contains 3448 vertices, and the Basel face model face data set includes three-dimensional face models of 100 European men and 100 European women, each The model contains 53215 vertices; 2) Model data with different numbers of vertices and different three-dimensional network topology is unified into model data with the same number of vertices and the same three-dimensional network topology as a sample of a three-dimensional face model.
  • 200 three-dimensional facial structure data of neutral expressions are constructed from SFM
  • 200 three-dimensional facial structure data are constructed from BFM feature data.
  • the dimensions of the two feature data need to be unified.
  • the dimensions of the two feature data are uniformly adjusted to the 3D average face scale of the SFM dataset.
  • the specific method can be performed by solving the transformation matrix of two models in three dimensions (x, y, z). Specific steps are as follows:
  • the 3D model with the same spatial coordinate scale is obtained in step 3), but because the number of vertices of the two 3D models is different, it is necessary to select 3448 vertex index values related to SFM semantics from 53215 vertices in BFM.
  • the method can be to compare the distance between each vertex on the SFM model and the vertex on the BFM, and record the index of the vertex with the smallest distance, so as to obtain 3348 vertex index values, and use this index value to go to 200 3D faces of the BFM. Segment the model above the model to get a 3D face model with the same number of vertices and the same network topology as the SFM 3D data. So far, 400 3D face model samples with neutral expressions have been constructed.
  • the three-dimensional average face model, feature vector, and feature value can be calculated by a dimensionality reduction algorithm.
  • the sample data is subjected to dimensionality reduction processing by the PCA algorithm.
  • the PCA algorithm indicates that any specific face can be represented by a low-dimensional feature subspace, and can be approximately reconstructed using this feature subspace.
  • the features selected by the PCA algorithm maximize the differences between the three-dimensional face model samples, but also retain some unnecessary changes due to lighting and facial expressions. And the change caused by the same person due to lighting may be greater than the change between different people. Because the PCA algorithm implements the process of dimensionality reduction, it makes data processing easier and faster.
  • the specific method may include the following steps:
  • a face shape fitting algorithm as shown in FIG. 3 may be used to construct a three-dimensional face model corresponding to the two-dimensional face image.
  • the face shape fitting algorithm includes the following steps:
  • Step S301 Determine a projection mapping matrix of the three-dimensional average face model to the two-dimensional face image according to the internal feature points of the face of the two-dimensional face image and the internal feature points of the three-dimensional average face model.
  • the internal feature points of the face (hereinafter referred to as two-dimensional internal feature points) and the three-dimensional average are determined.
  • the projection mapping of the three-dimensional average face model to the two-dimensional face image can be determined according to the two-dimensional internal feature points and the three-dimensional internal feature points. matrix.
  • the internal feature points of the face refer to other face feature points that do not include the contour outline feature points of the face, for example, some important feature points such as eyes, nose tips, corner points of the mouth, and eyebrows.
  • the two-dimensional internal feature points and the three-dimensional internal feature points have the same semantics, that is, the two-dimensional internal feature points include feature points such as eyes, nose tip, mouth corner points, and eyebrows, and the three-dimensional internal feature points also include eyes, Feature points of nose, corner of mouth and eyebrows.
  • the matrix can project a three-dimensional face model into two dimensions to obtain a two-dimensional face image.
  • the projection process includes transformations such as rotation, scaling, and deformation.
  • T] and K are as follows:
  • the projection mapping matrix may be determined by using the following processing methods:
  • T (T1, T2, T3, T4)
  • Step S303 construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and the feature vector of the three-dimensional feature face space.
  • the projection mapping matrix P of the three-dimensional internal feature point to the two-dimensional internal feature point has been obtained.
  • the projection mapping matrix and the feature vector are needed.
  • the fitting is performed without considering the outer contour of the face A rough three-dimensional face shape, that is, the first three-dimensional face model.
  • step S303 may be implemented in the following manner: After the projection mapping matrix is obtained, the feature vector may be used to fit a face shape parameter ⁇ , which may be specifically obtained by minimizing an energy function.
  • the energy function is as follows:
  • N represents the number of internal feature points in the face (such as 49)
  • y pro_2D i
  • i the coordinate values of the two-dimensional internal feature points obtained by projecting the three-dimensional internal feature points into a two-dimensional space through the projection mapping matrix
  • y i Represents the coordinate values of the two-dimensional internal feature points located by the facial feature point positioning algorithm
  • is the shape parameter to be solved, and is also called shape coefficient.
  • the shape parameter ⁇ can be solved in the following manner: the feature vector of the trained face shape data (the feature vector of the three-dimensional feature face space) ⁇ s 1 , s 2 , ... s 3n ⁇ ( Among them, n is the number of vertices of the three-dimensional face model, and s i is a feature vector), and an index value having the same semantic information as the corresponding 49 three-dimensional internal feature points is obtained (the index value mainly includes vectors of 49 * 3 rows Basis, each three rows represents a vertex coordinate, and corresponds to the feature vector of the 3D vertex number from 0 to 48), the obtained feature vector is composed into a new matrix U, and then the matrix U is mapped by the projection mapping matrix P
  • is a coefficient to be solved, so that the three-dimensional internal feature points are converted into corresponding coordinate points of the corresponding two-dimensional face image, and an error is found with the original two-dimensional internal feature points in the two-dimensional face image. And minimize E.
  • Step S305 Fit the contour feature points of the first three-dimensional face model according to the contour feature points of the face of the two-dimensional face image.
  • this step After obtaining a rough first three-dimensional face model corresponding to the two-dimensional face image after the previous step, this step will add face contour information to the first three-dimensional face model to generate a more accurate three-dimensional face model.
  • step S305 may include the following sub-steps: 1) selecting (from the first three-dimensional face model) a three-dimensional point corresponding to the facial contour feature point of the two-dimensional face image (such as the closest) , As the initial three-dimensional contour feature point; 2) the initial three-dimensional contour feature point is mapped to the two-dimensional face image through the projection mapping matrix P; 3) by the nearest neighbor matching method (such as kdtree), select Index values of the three-dimensional points corresponding to the two-dimensional contour feature points obtained by the mapping, so as to obtain the facial contour feature points of the first three-dimensional face model.
  • the nearest neighbor matching method such as kdtree
  • Step S307 If the error between the two-dimensional face image and the three-dimensional face model after the facial contour feature points are fitted is smaller than a preset error, then fit the three-dimensional human face contour feature points A model is used as the three-dimensional face model.
  • the face model is used as a three-dimensional face model corresponding to the two-dimensional face image.
  • FIG. 5 is a specific flowchart of face shape fitting in an embodiment of a face pose estimation method provided by the present application. If the error is greater than or equal to a preset error, based on the three-dimensional face model fitted with the facial contour feature points, the above steps S301, S303, S305, and S307 are performed, that is, all the steps in these steps are performed.
  • the three-dimensional average face model is replaced with the previously constructed three-dimensional face model after fitting the facial contour feature points. Each time a new three-dimensional face model is formed. After repeating the above process multiple times, when the error is less than the After setting the error, the iteration is stopped, and the three-dimensional face model of the two-dimensional face image is reconstructed.
  • FIG. 6 is a flowchart of face shape and expression fitting of an embodiment of a face pose estimation method provided by the present application. Since the expression fitting algorithm used in this embodiment is implemented based on the expression-based data included in the three-dimensional face prior data, the expression-based data and its generation process are described below first.
  • each human face is constructed with another 46 expressions, which is equivalent to constructing data of 400 * 47 three-dimensional face model samples.
  • FIG. 7 shows 47 types of expression maps corresponding to a three-dimensional face model sample in this embodiment.
  • the expression can be a basic expression, such as: angry, timid, disgusted, bored, surprised, concerned, happy, hated, sad, etc .; it can also be a compound expression, such as: anger + disgust, anger + surprise, very angry, Very disgusted, very surprised, happy + disgusted, happy + surprised, sad + angry, sad + disgusted, sad + scared, sad + surprised and so on.
  • multiple expression construction methods of the prior art can be used to construct a three-dimensional face model of another 46 expressions for a three-dimensional face model of a neutral expression.
  • the following expression construction method can be used to construct a three-dimensional face model with 46 expressions: the shape transfer between the triangular meshes between the two groups of three-dimensional models does not require the source model and the target model to have the same number of vertices or triangles, Or have the same connectivity; the user establishes a correspondence relationship between the triangle of the source model and the triangle of the target by specifying a set of vertex labels, and calculates the mapping transformation matrix of the correspondence relationship from the source model to the target model, and solves a Optimize the problem to transform the original model to the target shape.
  • the difference data of 46 expressions can be calculated, that is, the expression basis.
  • various expression bases X corresponding to the three-dimensional average face model can be obtained by the following steps: 1) For each expression, according to 400 three-dimensional face model samples corresponding to the expression, calculate the expression's The three-dimensional average face model, also known as the average expression, can obtain 47 types of average expressions, including the average expression corresponding to the neutral expression; 2) For each expression, subtract each sample of the three-dimensional face model of the expression After the average expression of the expression, the difference data of 46 expressions is obtained.
  • N the number of 3D face model samples for each expression, such as 400
  • Expx, i the i-th three-dimensional face model sample.
  • this embodiment adds a step of expression fitting based on the above FIG. 3.
  • the embodiment is based on the three-dimensional model. Further expression fitting is performed, because the two-dimensional face image can be any expression, and the three-dimensional model is expressionless, so it is necessary to perform expression fitting.
  • the face shape and expression fitting process may include the following steps:
  • Step S601 Determine a projection mapping matrix of the three-dimensional average face model to the two-dimensional face image according to the internal feature points of the face of the two-dimensional face image and the internal feature points of the three-dimensional average face model.
  • Step S603 Construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and the feature vector of the three-dimensional feature face space.
  • Step S605 Perform contour feature point fitting on the first three-dimensional face model according to facial feature points of the two-dimensional face image.
  • Step S607 According to the internal feature points of the two-dimensional face image and at least one expression basis corresponding to the three-dimensional average face model, perform expression fitting on the three-dimensional face model after the contour feature points are fitted.
  • S model represents a three-dimensional face model after the contour feature points are fitted
  • S exp_model represents a three-dimensional face model after the expression is fitted
  • G represents an expression base
  • a represents a fitted expression coefficient
  • FIG. 8 is a specific flowchart of face shape and expression fitting of an embodiment of a face pose estimation method provided by the present application.
  • this embodiment adds a step of expression fitting on the basis of the above FIG. 5. After obtaining the first three-dimensional face model fitted based on 49 feature points inside the face, the embodiment is based on the three-dimensional model. Further expression fitting is performed, because the two-dimensional face image can be any expression, and the three-dimensional model is expressionless, so it is necessary to perform expression fitting.
  • Step S609 If the error between the two-dimensional face image and the three-dimensional face model after expression fitting is smaller than a preset error, use the three-dimensional face model after expression fitting as the three-dimensional face model.
  • the method further includes the step of: if the error is greater than or equal to a preset error, constructing a three-dimensional person corresponding to the two-dimensional face image according to the three-dimensional face model after the expression fitting.
  • Face model That is, based on the three-dimensional face model after the facial expression fitting, the above steps S601 to S609 are performed, that is, the three-dimensional average face model in these steps is replaced with the facial expression after the previous fitting.
  • a three-dimensional face model Each time a new three-dimensional face model is formed. After repeated iterations of the above process, when the error is less than a preset error, the iteration is stopped, and the three-dimensional face of the two-dimensional face image is reconstructed. model.
  • the face pose estimation method constructs a three-dimensional face model corresponding to the two-dimensional face image by acquiring a two-dimensional face image to be processed, and according to the three-dimensional face
  • the face feature points of the model and the face feature points of the two-dimensional face image determine the face pose of the two-dimensional face image; this processing method makes it based on the three-dimensional person corresponding to the two-dimensional face image
  • the face model can be used to solve poses instead of only based on the three-dimensional average face model, so that when the pose estimation is performed on the face with large angles and exaggerated expressions, a high-precision pose can still be obtained; therefore, the pose can be effectively improved Estimated robustness.
  • a method for estimating face posture is provided.
  • the present application further provides a device for estimating face posture. This device corresponds to an embodiment of the method described above.
  • FIG. 9 is a schematic diagram of an embodiment of a face pose estimation device of the present application. Since the device embodiment is basically similar to the method embodiment, it is described relatively simply. For the relevant part, refer to the description of the method embodiment. The device embodiments described below are only schematic.
  • the present application further provides a face pose estimation device, including:
  • a face pose determination unit 905 is configured to determine a face pose of the two-dimensional face image according to a face feature point of the three-dimensional face model and a face feature point of the two-dimensional face image.
  • the three-dimensional face model constructing unit 903 is specifically configured to construct a three-dimensional face model corresponding to the two-dimensional face image through a face shape fitting algorithm.
  • the three-dimensional face model constructing unit 903 includes:
  • a projection matrix determining subunit 9031 configured to determine the three-dimensional average face model to the two-dimensional face image according to the internal feature points of the face of the two-dimensional face image and the internal feature points of the three-dimensional average face model; Projection mapping matrix;
  • a first model construction subunit 9033 configured to construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and the feature vector of the three-dimensional feature face space;
  • a contour fitting subunit 9035 configured to fit the contour feature points of the first three-dimensional model according to the facial contour feature points of the two-dimensional face image
  • the second model determining subunit 9037 is configured to, if the error between the two-dimensional face image and the three-dimensional face model after fitting the contour feature points of the face is less than a preset error, set the facial contour feature points
  • the fitted three-dimensional face model is used as the three-dimensional face model.
  • the three-dimensional face model construction unit 903 further includes:
  • a third model construction subunit configured to construct a three-dimensional person corresponding to the two-dimensional face image according to the three-dimensional face model after fitting the facial contour feature points if the error is greater than or equal to a preset error Face model.
  • the three-dimensional face model constructing unit 903 is specifically configured to construct a three-dimensional face model corresponding to the two-dimensional face image through a facial expression fitting algorithm.
  • the three-dimensional face model constructing unit 903 is specifically configured to construct a three-dimensional face model corresponding to the two-dimensional face image through a face shape and expression fitting algorithm.
  • the three-dimensional face model constructing unit 903 includes:
  • a projection matrix determining subunit configured to determine the relationship between the three-dimensional average face model and the two-dimensional face image according to the internal feature points of the two-dimensional face image and the internal feature points of the three-dimensional average face model; Projection mapping matrix;
  • a first model construction subunit configured to construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and feature vectors of the three-dimensional feature face space;
  • a contour fitting subunit configured to fit the contour feature points of the first three-dimensional model according to the contour feature points of the face of the two-dimensional face image
  • An expression fitting subunit configured to perform expression fitting on a three-dimensional face model after contour fitting according to facial feature points in the two-dimensional face image and at least one expression basis corresponding to the three-dimensional average face model.
  • a second model determining subunit configured to use the three-dimensional face model after expression fitting as an error if the error between the two-dimensional face image and the three-dimensional face model after expression fitting is less than a preset error; Three-dimensional face model.
  • Optional also includes:
  • a third model construction subunit is configured to construct a three-dimensional face model corresponding to the two-dimensional face image according to the three-dimensional face model after the expression is fitted if the error is greater than or equal to a preset error.
  • the contour fitting subunit includes:
  • a first contour feature point selection subunit configured to select a three-dimensional point corresponding to a face contour feature point of the two-dimensional face image from the first three-dimensional face model as an initial three-dimensional contour feature point;
  • a contour feature point mapping subunit configured to map the initial three-dimensional contour feature points to the two-dimensional face image through the projection mapping matrix
  • the second contour feature point selection subunit is used to select the three-dimensional points corresponding to the two-dimensional contour feature points obtained by the mapping through the nearest neighbor matching algorithm as the facial contour feature points of the first three-dimensional face model.
  • Optional also includes:
  • the first prior data determination unit is configured to determine the three-dimensional average face model and the feature vector according to a three-dimensional face model sample.
  • Optional also includes:
  • the second prior data determination unit is configured to determine at least one expression basis corresponding to the three-dimensional average face model according to a three-dimensional face model sample.
  • FIG. 11 is a schematic diagram of an embodiment of an electronic device of the present application. Since the device embodiment is basically similar to the method embodiment, it is described relatively simply. For the relevant part, refer to the description of the method embodiment. The device embodiments described below are only schematic.
  • An electronic device includes: a processor 1101 and a memory 1102; the memory is configured to store a program that implements a method for estimating a face pose, and the device is powered on and runs the face pose estimation through the processor.
  • the program of the method the following steps are performed: obtaining a two-dimensional face image to be processed; constructing a three-dimensional face model corresponding to the two-dimensional face image; and according to the facial feature points of the three-dimensional face model and the face The face feature points of the two-dimensional face image determine the face pose of the two-dimensional face image.
  • the present application also provides a three-dimensional face reconstruction method.
  • the execution subject of the method includes a three-dimensional face reconstruction device.
  • FIG. 12 is a flowchart of an embodiment of a three-dimensional face reconstruction method provided by the present application.
  • the same parts of this embodiment as those of the first embodiment are not described again, please refer to the corresponding parts in the first embodiment .
  • a three-dimensional face reconstruction method provided in this application includes:
  • Step S1200 Acquire a two-dimensional face image to be processed.
  • Step S1201 Determine a projection mapping matrix of the three-dimensional average face model to the two-dimensional face image according to the internal feature points of the face of the two-dimensional face image and the internal feature points of the three-dimensional average face model.
  • Step S1203 Construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and the feature vector of the three-dimensional feature face space.
  • Step S1205 Perform contour feature point fitting on the first three-dimensional face model according to facial feature points of the two-dimensional face image.
  • Step S1207 if the error between the two-dimensional face image and the fitted three-dimensional face model is less than a preset error, use the fitted three-dimensional face model as the Three-dimensional face model.
  • the method may further include the following steps:
  • Step S1301 if the error is greater than or equal to a preset error, a three-dimensional face model corresponding to the two-dimensional face image is constructed according to the fitted three-dimensional face model.
  • the method may further include the following steps:
  • Step S1401 Perform expression fitting on the three-dimensional face model after contour fitting according to the internal feature points of the face of the two-dimensional face image and at least one expression basis corresponding to the three-dimensional average face model.
  • the method may further include the following steps: At least one expression basis corresponding to the three-dimensional average face model is used to perform expression fitting on the first three-dimensional face model.
  • step S1205 may adopt the following method: according to the facial contour feature points of the two-dimensional face image, Perform contour feature point fitting on the first three-dimensional face model after expression fitting.
  • the contour feature point fitting of the first three-dimensional model based on the face contour feature points of the two-dimensional face image may include the following sub-steps: 1) from the first three-dimensional model A three-dimensional point corresponding to a face contour feature point of the two-dimensional face image is selected in the face model as an initial three-dimensional contour feature point; 2) the initial three-dimensional contour feature point is mapped to the projection mapping matrix to The two-dimensional face image; 3) selecting a three-dimensional point corresponding to the two-dimensional contour feature point obtained by the mapping as a feature of the contour feature of the first three-dimensional face model through a nearest neighbor matching algorithm.
  • the method may further include the step of determining the three-dimensional average face model and the feature vector according to a three-dimensional face model sample.
  • the method may further include the step of determining at least one expression basis corresponding to the three-dimensional average face model according to a three-dimensional face model sample.
  • the three-dimensional face reconstruction method obtaineds a two-dimensional face image to be processed; according to the internal feature points of the face and the three-dimensional average face model of the two-dimensional face image Internal feature points of the face, determining a projection mapping matrix of the three-dimensional average face model to the two-dimensional face image; and constructing a corresponding two-dimensional face image according to the projection mapping matrix and feature vectors of the three-dimensional feature face space A first three-dimensional face model; according to the face contour feature points of the two-dimensional face image, contour feature point fitting is performed on the first three-dimensional face model; if the two-dimensional face image and the fit The error between the subsequent three-dimensional face models is less than a preset error, then the fitted three-dimensional face model is used as the three-dimensional face model of the two-dimensional face image; this processing method makes the The face prior data drives the fitting of the 3D face model, considering the combination of the internal feature points of the face and the three-dimensional average face model of the two-dimensional face image Internal feature points of the face, determining a projection
  • a three-dimensional face reconstruction method is provided.
  • the present application also provides a three-dimensional face reconstruction device. This device corresponds to an embodiment of the method described above.
  • FIG. 15 is a schematic diagram of an embodiment of a three-dimensional face reconstruction device of the present application. Since the device embodiment is basically similar to the method embodiment, it is described relatively simply. For the relevant part, refer to the description of the method embodiment. The device embodiments described below are only schematic.
  • the present application further provides a three-dimensional face reconstruction device, including:
  • a two-dimensional face image obtaining unit 1500 configured to obtain a two-dimensional face image to be processed
  • a projection matrix determining subunit 1501 configured to determine the three-dimensional average face model to the two-dimensional face image according to the internal feature points of the two-dimensional face image and the internal feature points of the three-dimensional average face model; Projection mapping matrix;
  • a first model construction subunit 1503 configured to construct a first three-dimensional face model corresponding to the two-dimensional face image according to the projection mapping matrix and the feature vector of the three-dimensional feature face space;
  • a contour fitting sub-unit 1505, configured to fit contour feature points to the first three-dimensional face model according to facial feature points of the two-dimensional face image;
  • a second model determining unit 1507 is configured to use the fitted three-dimensional face model as the error if the error between the two-dimensional face image and the fitted three-dimensional face model is less than a preset error.
  • Optional also includes:
  • a first expression fitting unit configured to perform expression simulation on the three-dimensional face model after contour fitting according to the internal feature points of the face of the two-dimensional face image and at least one expression basis corresponding to the three-dimensional average face model; Together.
  • Optional also includes:
  • a second expression fitting unit configured to perform expression fitting on the first three-dimensional face model according to at least one expression basis corresponding to the three-dimensional average face model
  • the contour fitting subunit is specifically configured to perform contour feature point fitting on the first three-dimensional face model after the expression fitting according to the face contour feature points of the two-dimensional face image.
  • the contour fitting sub-unit 1505 includes:
  • a first contour feature point selection subunit configured to select a three-dimensional point corresponding to a face contour feature point of the two-dimensional face image from the first three-dimensional face model as an initial three-dimensional contour feature point;
  • a contour feature point mapping subunit configured to map the initial three-dimensional contour feature points to the two-dimensional face image through the projection mapping matrix
  • the second contour feature point selection subunit is used to select a three-dimensional point corresponding to the two-dimensional contour feature point obtained by mapping as a face contour feature point of the first three-dimensional face model through a nearest neighbor matching algorithm.
  • Optional also includes:
  • a third model construction subunit is configured to construct a three-dimensional face model corresponding to the two-dimensional face image according to the fitted three-dimensional face model if the error is greater than or equal to a preset error.
  • Optional also includes:
  • the first prior data determination unit is configured to determine the three-dimensional average face model and the feature vector according to a three-dimensional face model sample.
  • Optional also includes:
  • the second prior data determination unit is configured to determine at least one expression basis corresponding to the three-dimensional average face model according to a three-dimensional face model sample.
  • FIG. 16 is a schematic diagram of an embodiment of an electronic device of the present application. Since the device embodiment is basically similar to the method embodiment, it is described relatively simply. For the relevant part, refer to the description of the method embodiment. The device embodiments described below are only schematic.
  • An electronic device in this embodiment includes a processor 1601 and a memory 1602; the memory is configured to store a program for implementing a three-dimensional face reconstruction method, and the device is powered on and runs the three-dimensional through the processor.
  • the program of the face reconstruction method the following steps are performed: obtaining a two-dimensional face image to be processed; and according to the internal feature points of the face of the two-dimensional face image and the internal feature points of the three-dimensional average face model, Determining a projection mapping matrix of the three-dimensional average face model to the two-dimensional face image; and constructing a first three-dimensional face corresponding to the two-dimensional face image according to the projection mapping matrix and a feature vector of the three-dimensional feature face space Model; fitting contour feature points to the first three-dimensional face model according to facial feature points of the two-dimensional face image; if the two-dimensional face image and the fitted three-dimensional face model If the error between them is smaller than the preset error, the fitted three-dimensional face model is used as the three-dimensional face model of the two-dimensional
  • a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
  • processors CPUs
  • input / output interfaces output interfaces
  • network interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-persistent memory, random access memory (RAM), and / or non-volatile memory in computer-readable media, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media. Information can be stored by any method or technology. Information may be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), and read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media may be used to store information that can be accessed by computing devices. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • this application may be provided as a method, a system, or a computer program product. Therefore, this application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Architecture (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请公开了人脸姿态估计/三维人脸重构方法、装置及电子设备。其中,人脸姿态估计方法包括:获取待处理的二维人脸图像,构建所述二维人脸图像对应的三维人脸模型,根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。采用这种处理方式,使得基于与二维人脸图像对应的三维人脸模型进行姿态求解,而不再只基于三维平均脸模型进行姿态求解,使得在对人脸大角度、夸张表情进行姿态估计时,仍可获得较高精准度的姿态;因此,可以有效提升姿态估计的鲁棒性。

Description

人脸姿态估计/三维人脸重构方法、装置及电子设备
本申请要求2018年08月27日递交的申请号为201810983040.0、发明名称为“人脸姿态估计/三维人脸重构方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,具体涉及人脸姿态估计方法和装置,三维人脸重构方法和装置,以及电子设备。
背景技术
人脸姿态估计是计算机领域一个非常热门的问题,是指根据人脸图像确定脸部朝向的角度信息,即:根据人脸图像的特征计算出三个偏转角度:俯仰角(pitch)、偏航角(yaw)和旋转角(roll)。
目前,人脸姿态估计有多种方法,可以分为基于模型的方法,基于表观的方法,以及,基于分类的方法。其中,由于基于模型的方法得到的人脸姿态是连续值,姿态估计精度更高,因此基于模型的方法成为一种常用方法。一种典型的基于模型的人脸姿态估计方法的处理过程如下所述。首先,在二维人脸图像上定位关键点(特征点)坐标,获得二维关键点,如五官、轮廓等;然后,构建一个中性且无表情的平均脸的三维模型,并在该三维模型中提取与二维关键点具有相同语义的三维关键点;接下来,再根据二维关键点的坐标数值、三维关键点的坐标数值和摄像机焦距,获得三维平均脸模型至二维人脸图像的旋转矩阵;最后,根据旋转矩阵确定二维人脸图像的人脸姿态。
然而,在实现本发明过程中,发明人发现现有技术至少存在如下问题:由于三维平均脸模型和二维人脸图像通常存在差异,因此,在对人脸大角度、夸张表情进行姿态估计时,姿态估计的精准度将较大幅度降低。综上所述,现有技术存在基于三维平均脸模型进行姿态估计的鲁棒性较差的问题。
发明内容
本申请提供人脸姿态估计方法,以解决现有技术存在基于三维平均脸模型进行姿态估计的鲁棒性较差的问题。本申请另外提供三维人脸重构方法和系统,以及电子设备。
本申请提供一种人脸姿态估计方法,包括:
获取待处理的二维人脸图像;
构建所述二维人脸图像对应的三维人脸模型;
根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
可选的,所述构建所述二维人脸图像对应的三维人脸模型,包括:
通过人脸形状拟合算法,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述人脸形状拟合算法包括:
根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合;
若所述二维人脸图像与人脸轮廓特征点拟合后的三维人脸模型之间的误差小于预设误差,则将所述人脸轮廓特征点拟合后的三维人脸模型作为所述三维人脸模型。
可选的,还包括:
若所述误差大于或等于预设误差,则根据所述人脸轮廓特征点拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述构建所述二维人脸图像对应的表情三维人脸模型,包括:
通过人脸表情拟合算法,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述构建所述二维人脸图像对应的三维人脸模型,包括:
通过人脸形状及表情拟合算法,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述人脸形状及表情拟合算法包括:
根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合;
根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表 情基,对轮廓拟合后的三维人脸模型进行表情拟合;
若所述二维人脸图像与表情拟合后的三维人脸模型之间的误差小于预设误差,则将表情拟合后的三维人脸模型作为所述三维人脸模型。
可选的,还包括:
若所述误差大于或等于预设误差,则根据所述表情拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型,包括:
通过最小化能量函数确定三维人脸形状参数;其中,所述能量函数采用如下公式:
Figure PCTCN2019101715-appb-000001
其中,E表示能量函数,N表示人脸内部特征点数量,y pro_2D,i表示通过所述投影映射矩阵将所述三维平均脸模型的人脸内部特征点投影到二维空间得到的二维内部特征点的坐标值,y i表示所述二维人脸图像的人脸内部特征点的坐标值,
Figure PCTCN2019101715-appb-000002
表示所述二维人脸图像的人脸内部特征点的协方差矩阵,α表示所述三维人脸形状参数。
可选的,所述投影到二维空间得到的二维内部特征点的坐标值,采用如下公式获取:
Figure PCTCN2019101715-appb-000003
其中,U表示由与所述三维平均脸模型的人脸内部特征点对应的特征向量构成的矩阵,P表示所述投影映射矩阵,V表示3d平均脸上对应内部特征点语义相关的顶点坐标数据。
可选的,所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合,包括:
从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;
通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;
通过最近邻匹配算法,选取映射得到的二维轮廓特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
可选的,还包括:
根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
可选的,还包括:
根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
本申请还提供一种三维人脸重构方法,包括:
获取待处理的二维人脸图像;
根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;
若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
可选的,在所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合之后,还包括:
根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对轮廓拟合后的三维人脸模型进行表情拟合。
可选的,在所述根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型之后,还包括:
根据所述三维平均脸模型对应的至少一个表情基,对所述第一三维人脸模型进行表情拟合;
所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合,包括:
根据所述二维人脸图像的人脸轮廓特征点,对表情拟合后的第一三维人脸模型进行轮廓特征点拟合。
可选的,所述根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型,包括:
通过最小化能量函数确定三维人脸形状参数;其中,所述能量函数采用如下公式:
Figure PCTCN2019101715-appb-000004
其中,E表示能量函数,N表示人脸内部特征点数量,y pro_2D,i表示通过所述投影映射矩阵将所述三维平均脸模型的人脸内部特征点投影到二维空间得到的二维内部特征点的坐标值,y i表示所述二维人脸图像的人脸内部特征点的坐标值,
Figure PCTCN2019101715-appb-000005
表示所述二维人脸图像的人脸内部特征点的协方差矩阵,α表示所述三维人脸形状参数。
可选的,所述投影到二维空间得到的二维内部特征点的坐标值,采用如下公式获取:
Figure PCTCN2019101715-appb-000006
其中,U表示由与所述三维平均脸模型的人脸内部特征点对应的特征向量构成的矩阵,P表示所述投影映射矩阵,V表示3d平均脸上对应内部特征点语义相关的顶点坐标数据。
可选的,所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合,包括:
从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;
通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;
通过最近邻匹配算法,选取映射得到的二维轮廓特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
可选的,还包括:
若所述误差大于或等于预设误差,则根据所述拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,还包括:
根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
可选的,还包括:
根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
本申请还提供一种人脸姿态估计装置,包括:
二维人脸图像获取单元,用于获取待处理的二维人脸图像;
三维人脸模型构建单元,用于构建所述二维人脸图像对应的三维人脸模型;
人脸姿态确定单元,用于根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
可选的,所述三维人脸模型构建单元,具体用于通过人脸形状拟合算法,构建所述 二维人脸图像对应的三维人脸模型。
可选的,所述三维人脸模型构建单元包括:
投影矩阵确定子单元,用于根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
第一模型构建子单元,用于根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
轮廓拟合子单元,用于根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合;
第二模型确定子单元,用于若所述二维人脸图像与人脸轮廓特征点拟合后的三维人脸模型之间的误差小于预设误差,则将所述人脸轮廓特征点拟合后的三维人脸模型作为所述三维人脸模型。
可选的,所述三维人脸模型构建单元还包括:
第三模型构建子单元,用于若所述误差大于或等于预设误差,则根据所述人脸轮廓特征点拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述三维人脸模型构建单元,具体用于通过人脸表情拟合算法,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述三维人脸模型构建单元,具体用于通过人脸形状及表情拟合算法,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述述三维人脸模型构建单元包括:
投影矩阵确定子单元,用于根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
第一模型构建子单元,用于根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
轮廓拟合子单元,用于根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合;
表情拟合子单元,用于根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对轮廓拟合后的三维人脸模型进行表情拟合;
第二模型确定子单元,用于若所述二维人脸图像与表情拟合后的三维人脸模型之间的误差小于预设误差,则将表情拟合后的三维人脸模型作为所述三维人脸模型。
可选的,还包括:
第三模型构建子单元,用于若所述误差大于或等于预设误差,则根据所述表情拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述轮廓拟合子单元包括:
第一轮廓特征点选取子单元,用于从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;
轮廓特征点映射子单元,用于通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;
第二轮廓特征点选取子单元,用于通过最近邻匹配算法,选取映射得到的二维轮廓特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
可选的,还包括:
第一先验数据确定单元,用于根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
可选的,还包括:
第二先验数据确定单元,用于根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
本申请还提供一种三维人脸重构装置,包括:
二维人脸图像获取单元,用于获取待处理的二维人脸图像;
投影矩阵确定子单元,用于根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
第一模型构建子单元,用于根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
轮廓拟合子单元,用于根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;
第二模型确定单元,用于若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
可选的,还包括:
第一表情拟合单元,用于根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对轮廓拟合后的三维人脸模型进行表情拟合。
可选的,还包括:
第二表情拟合单元,用于根据所述三维平均脸模型对应的至少一个表情基,对所述 第一三维人脸模型进行表情拟合;
所述轮廓拟合子单元,具体用于根据所述二维人脸图像的人脸轮廓特征点,对表情拟合后的第一三维人脸模型进行轮廓特征点拟合。
可选的,所述轮廓拟合子单元包括:
第一轮廓特征点选取子单元,用于从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;
轮廓特征点映射子单元,用于通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;
第二轮廓特征点选取子单元,用于通过最近邻匹配算法,选取映射得到的二维轮廓特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
可选的,还包括:
第三模型构建子单元,用于若所述误差大于或等于预设误差,则根据所述拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,还包括:
第一先验数据确定单元,用于根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
可选的,还包括:
第二先验数据确定单元,用于根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
本申请还提供一种电子设备,包括:
处理器;以及
存储器,用于存储实现人脸姿态估计方法的程序,该设备通电并通过所述处理器运行该人脸姿态估计方法的程序后,执行下述步骤:获取待处理的二维人脸图像;构建所述二维人脸图像对应的三维人脸模型;根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
本申请还提供一种电子设备,包括:
处理器;以及
存储器,用于存储实现三维人脸重构方法的程序,该设备通电并通过所述处理器运行该三维人脸重构方法的程序后,执行下述步骤:获取待处理的二维人脸图像;根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维 平均脸模型至所述二维人脸图像的投影映射矩阵;根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各种方法。
本申请还提供一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各种方法。
与现有技术相比,本申请具有以下优点:
本申请实施例提供的人脸姿态估计方法,通过获取待处理的二维人脸图像,构建所述二维人脸图像对应的三维人脸模型,根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态;这种处理方式,使得基于与二维人脸图像对应的三维人脸模型进行姿态求解,而不再只基于三维平均脸模型进行姿态求解,使得在对人脸大角度、夸张表情进行姿态估计时,仍可获得较高精准度的姿态;因此,可以有效提升姿态估计的鲁棒性。
[根据细则91更正 13.12.2019] 
本申请实施例提供的三维人脸重构方法,通过获取待处理的二维人脸图像;根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型;这种处理方式,使得基于三维人脸先验数据驱动三维人脸模型拟合,考虑了人脸内部特征点和外轮廓特征点的相结合,进而拟合迭代,实现最小化三维人脸模型与二维人脸图像之间的误差,最大程度还原真实人脸,且重构出的三维人脸模型符合人脸生物学特征;因此,可以有效提升三维人脸模型的重构准确度。
附图说明
图1是本申请提供的一种人脸姿态估计方法的实施例的流程图;
图2是本申请提供的一种人脸姿态估计方法的实施例的二维人脸图像示意图;
图3是本申请提供的一种人脸姿态估计方法的实施例的人脸形状拟合流程图;
图4是本申请提供的一种人脸姿态估计方法的实施例的三维平均脸模型示意图;
图5是本申请提供的一种人脸姿态估计方法的实施例的人脸形状拟合具体流程图;
图6是本申请提供的一种人脸姿态估计方法的实施例的人脸形状及表情拟合流程图;
图7是本申请提供的一种人脸姿态估计方法的实施例的三维平均脸模型的多种表情示意图;
图8是本申请提供的一种人脸姿态估计方法的实施例的人脸形状及表情拟合的具体流程图;
图9是本申请提供的一种人脸姿态估计装置的实施例的示意图;
图10是本申请提供的一种人脸姿态估计装置的实施例的具体示意图;
图11是本申请提供的一种电子设备的实施例的示意图;
图12是本申请提供的一种三维人脸重构方法的实施例的流程图;
图13是本申请提供的一种三维人脸重构方法的实施例的具体流程图;
图14是本申请提供的一种三维人脸重构方法的实施例的又一具体流程图;
图15是本申请提供的一种三维人脸重构装置的实施例的示意图;
图16是本申请提供的一种电子设备的实施例的示意图。
具体实施方式
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。
在本申请中,提供了人脸姿态估计方法和装置,三维人脸重构方法和装置,以及电子设备。人脸姿态估计,对于人脸重构以及虚拟试戴等三维空间具有非常重要的作用,例如,可应用在三维增强现实贴纸(AR贴纸)、三维换脸、三维AR眼镜等领域。在下面的实施例中逐一进行详细说明。
第一实施例
请参考图1,其为本申请提供的一种人脸姿态估计方法实施例的流程图,该方法的执行主体为人脸姿态估计装置,该装置通常部署于服务器,但并不局限于服务器,也可 以是能够实现所述人脸姿态估计方法的任何设备。本申请提供的一种人脸姿态估计方法包括:
步骤S101:获取待处理的二维人脸图像。
所述二维人脸图像,可以是通过照相机、摄像头等图像采集设备拍摄得到的二维人脸图像。所述二维人脸图像包括多个像素点,例如,如图2所示的二维人脸图像为256*256像素。
步骤S103:构建所述二维人脸图像对应的三维人脸模型。
本申请提供的人脸姿态估计方法,通过引入三维人脸重构技术,重构出与二维人脸图像对应的三维人脸模型,并在该三维人脸模型中提取和二维人脸图像具有相同语义关系的特征点,进而求解二维人脸姿态。
在一个示例中,通过人脸形状拟合算法,构建所述二维人脸图像对应的三维人脸模型;采用这种处理方式,使得构建出与所述二维人脸图像对应的人脸角度相似的三维人脸模型,进而使得在对人脸大角度进行姿态估计时,仍可获得较高精准度的姿态;因此,可以有效提升姿态估计的鲁棒性。
在另一个示例中,通过表情拟合算法,构建所述二维人脸图像对应的三维人脸模型;采用这种处理方式,使得构建出与所述二维人脸图像对应的人脸表情相似的三维人脸模型,进而使得在对人脸夸张表情进行姿态估计时,仍可获得较高精准度的姿态;因此,可以有效提升姿态估计的鲁棒性。
在又一个示例中,通过人脸及表情拟合算法,构建所述二维人脸图像对应的三维人脸模型;采用这种处理方式,使得构建出与所述二维人脸图像对应的人脸表情相似、且人脸角度相似的三维人脸模型,进而使得在对人脸大角度且夸张表情进行姿态估计时,仍可获得较高精准度的姿态;因此,可以有效提升姿态估计的鲁棒性。
步骤S105:根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
通过上述步骤重构出与所述二维人脸图像对应的三维人脸模型之后,就可以基于重构出的三维人脸模型对所述二维人脸图像进行人脸姿态估计,本实施例根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,即可确定所述二维人脸图像的人脸姿态。
所述人脸特征点,可通过人脸特征点定位算法分析获得。如图1所示的66个人脸特征点,其中包括49个所述内部特征点和17个所述轮廓特征点。
所述人脸特征点定位算法,包括但不限于以下几类:1)基于优化的方法,如ASM(Active Shape Model,活动形状模型)、AAM(Active Appreance Model,活动外观模型)和CLM等方法;2)基于回归的方法,如级联的姿势回归(cascaded pose regression)、SDM、ESR等方法;3)基于深度学习的方法,如基于卷积神经网络(CNN)、深度自编码器(DAE)和受限玻尔兹曼机(RBM)的人脸特征点定位方法。
在一个示例中,步骤S105的处理过程如下所述。首先,通过人脸特征点定位算法,在二维人脸图像上定位人脸特征点坐标,获得二维关键点,以及,在重构出的三维人脸模型中提取与二维关键点具有相同语义的三维关键点;然后,根据二维关键点的坐标数值、三维关键点的坐标数值和摄像机焦距,获得重构出的三维人脸模型至二维人脸图像的旋转矩阵;最后,根据旋转矩阵确定二维人脸图像的人脸姿态。
请参考图3,其为本申请实施例提供的一种人脸姿态估计方法实施例的人脸拟合流程图。由于本实施例采用的人脸形状拟合算法基于三维人脸先验数据实现,因此,下面首先对三维人脸先验数据及其生成过程进行说明。
所述三维人脸先验数据,可包括三维平均脸模型、三维特征脸空间的特征向量及每一个三维人脸模型样本的特征值。
所述三维平均脸模型,包括根据多个三维人脸模型样本计算得到的三维平均脸模型。每个三维人脸模型样本可以转换成一个多维的向量,在获取到三维人脸模型样本的向量集合后,将向量集合内的向量遍历一遍进行累加,然后取平均值得到三维平均脸模型。图4示出了本实施例的三维平均脸模型,该模型是一个中性表情的三维平均脸模型。
在一个示例中,所述三维人脸模型样本采用如下步骤生成:1)获取多个三维人脸数据集,例如,Surrey Face Model(SFM)和Basel Face model(BFM)等等,其中,Surrey Face Model人脸数据集包括169个中性表情的三维人脸模型,每个模型包含3448个顶点,Basel Face model人脸数据集包括100个欧洲男性和100个欧洲女性的三维人脸模型,每个模型包含53215个顶点;2)将拥有不同顶点数量、不同三维网络拓扑结构的模型数据,统一为拥有相同顶点数量、相同三维网络拓扑结构的模型数据,作为三维人脸模型样本。
在本实施例中,根据SFM和BFM构造三维人脸模型样本。由于SFM和BFM都没有提供原始的三维人脸模型数据,只提供了通过主成分分析法(Principal Component Analysis,PCA)进行特征压缩后的文件M,V,E,其中M表示平均脸数据,V表示三维特征脸空间的特征向量,E表示特征值,再参数化人脸,因此,本实施例首先通过随机 采样取得特征值的正负标准差,通过公式S 3D=M+V*E new重建出三维人脸结构数据。本实施例从SFM构建出200个中性表情的三维人脸结构数据,从BFM特征数据中构造出200个三维人脸结构数据。
由于SFM和BFM各自对应的三维模型数据的空间尺度不一样,因此还需要将两个特征数据的维度统一,本实施例将两个特征数据的维度统一调整到SFM数据集的三维平均脸尺度上,具体做法可以是通过求解两个模型在三个维度(x,y,z)的变换矩阵来进行转换。具体步骤如下:
1)在两个三维平均脸模型中,通过工具(包括人脸特征点定位算法)取得和二维人脸图像的关键定位语义相关的66个三维关键的索引值;
2)通过迭代最近点算法(Iterative Closest Point,ICP),根据66个三维点对,分别设两个数据集为P,Q,
Figure PCTCN2019101715-appb-000007
通过该两个三维点集求解二者之间的空间转换参数R(3*3旋转矩阵),T(tx,ty,tz)。假设两个三维人脸模型在三维空间中的三维点,
Figure PCTCN2019101715-appb-000008
两组点之间的欧式距离可以表示为
Figure PCTCN2019101715-appb-000009
两个模型之间的坐标归一化问题的目的就是为了找到P和Q之间的变换矩阵R和T,而对于
Figure PCTCN2019101715-appb-000010
利用最小二乘法求解得到最优转换参数R和T,使:
Figure PCTCN2019101715-appb-000011
其中N表示66个关键点信息。
3)通过上一步得到了两组三维模型在三维空间尺度中的最优转换矩阵R和T,下面就可以改参数,本实施例将基于BFM构造出来的200个三维人脸模型尺度转换了SFM模型的尺度。
4)通过步骤3)中得到同一空间坐标尺度的三维模型,但是由于两个三维模型的顶点数量不一样,所以需要从BFM的53215个顶点选择出和SFM语义相关的3448个顶点索引值,具体做法可以是通过比较SFM模型上每个顶点到BFM上顶点的距离,把距离最小的那个顶点的索引记录下来,这样就得到3348个顶点索引值,通过该索引值去BFM的200个三维人脸模型上面的分割模型,这样就得到和SFM三维数据拥有一样的顶点数量以及一样的网络拓扑结构的三维人脸模型,至此构造出来400个中性表情的三维人 脸模型样本。
在获取到三维人脸模型样本,就可以通过降维算法计算得到所述三维平均脸模型、特征向量和特征值。在本实施例中,通过PCA算法对样本数据进行降维处理,PCA算法指出任何特定的人脸可以由一个低维的特征子空间表示,并可以用这个特征子空间近似地重建。PCA算法选取的特征最大化了三维人脸模型样本间的差异,但也保留了一些由于光照和面部表情产生的不必要的变化。而同一个人由于光照产生的变化可能会大于不同人之间的变化。由于PCA算法实现了降维的过程,因此使得数据的处理更容易,速度更快。在本实施例中,具体做法可包括如下步骤:
1)根据400个中性表情的三维人脸模型样本,计算得到所有模型的平均脸模型
Figure PCTCN2019101715-appb-000012
其中
Figure PCTCN2019101715-appb-000013
为所述三维平均脸模型,S i为所述三维平均脸模型样本,N=400。
2)将所有模型减去所述三维平均脸模型,得到距离数据:
Figure PCTCN2019101715-appb-000014
采用主成分分析法对400个中性表情的三维人脸模型样本进行数据压缩,得到人脸形状的协方差矩阵C s,以及对应的协方差矩阵特征向量s i(对应的特征值由大道小排序)构成的正交基底表示:
Figure PCTCN2019101715-appb-000015
其中,α=[α 12,.......α m-1] T,参数α的概率
Figure PCTCN2019101715-appb-000016
σ i 2为人脸形状协方差矩阵C s的特征值。
至此,确定出针对400个三维人脸模型样本构成的所述三维平均脸模型
Figure PCTCN2019101715-appb-000017
人脸形状特征向量集合{s 1,s 2,.....s 3n}∈□ 3n和对应的特征值集合{σ s,1s,2,.....σ s,3n},其中n表情三维人脸模型的顶点数量。
在获取到所述三维人脸先验数据后,就可以采用如图3所示的人脸形状拟合算法,构建所述二维人脸图像对应的三维人脸模型。
由图3可见,在本实施例中,所述人脸形状拟合算法包括如下步骤:
步骤S301:根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵。
在获取到二维人脸图像和三维平均脸模型后,以及,通过人脸特征点点位算法确定 所述二维人脸图像的人脸内部特征点(以下简称二维内部特征点)和三维平均脸模型的人脸内部特征点(以下简称三维内部特征点)之后,就可以根据二维内部特征点和三维内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵。
所述人脸内部特征点,是指不包括人脸轮廓特征点的其它人脸特征点,例如,眼睛、鼻尖、嘴角点以及眉毛等等一些重要的特征点。
所述二维内部特征点和所述三维内部特征点具有相同语义,即:所述二维内部特征点包括眼睛、鼻尖、嘴角点以及眉毛等特征点,所述三维内部特征点同样包括眼睛、鼻尖、嘴角点以及眉毛等位置的特征点。
所述投影映射矩阵,可以用数学表达式P=K[R|T]表示,其中,P为投影映射矩阵,K为摄像头内参矩阵,R为旋转矩阵,T为平移矩阵,通过所述投影映射矩阵可将三维人脸模型投影到二维,获得二维人脸图像,投影过程包括旋转、缩放、变形等变换。其中,[R|T]及K的表达式如下:
Figure PCTCN2019101715-appb-000018
所述投影映射矩阵,可采用如下处理方式确定:
设所述二维人脸图像的特征点坐标为pi=(xi,yi),所述三维平均脸模型对应的特征点为Pi=(Xi,Yi,Zi),所述二维人脸图像的特征点与所述三维平均脸模型的特征点之间的对应关系为(pi,Pi)=(xi,yi,Xi,Yi,Zi)这样就可以求解二者之间的投影映射矩阵。设三个旋转角度为roll,yaw,pitch,那么R=(r1,r2,r3)=R(roll)*R(yaw)*R(pitch),
Figure PCTCN2019101715-appb-000019
根据摄像头成像原理可知:
xi=f*(r*Pi+T1)/(r3*Pi+T3),yi=f*(r2*Pi+T2)/(e3*Pi+T3)
其中,T=(T1,T2,T3,T4);
然后,由透视模型可以得到如下公式:K*[R(roll,yaw,pitxch)*Pi+T],那么这时候的姿态估计就可以表征为K是已知的摄像头参数,Pi是所述三维平均脸模型的特征点坐标,求得的二维图像坐标为pi,由于这样求得的坐标与人脸关键点坐标是有误差的,因此, 该问题就转化为了求最优解问题:
(roll,yaw,pitch)=argmin{pi-Aq*[R(roll,yaw,pitch)*Pi+T]}(i=0,1,2..n)下面就是要对该公式用最小化二乘解其最优化解。在本实施例中,设置多次迭代后基本就可以达到一个比较稳定的数值,这样就求出旋转矩阵R和偏移矩阵T,通过变换就可得到三维坐标点到二维坐标点的转化关系P,即:投影映射矩阵。
步骤S303:根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型。
在上一步中已经得到了三维内部特征点到二维内部特征点的投影映射矩阵P,本步骤就需要通过投影映射矩阵和所述特征向量,首先在不考虑人脸外轮廓的情况下去拟合一个粗精度的三维人脸形状,即:第一三维人脸模型。
在一个示例中,步骤S303可采用如下方式实现:在得到了所述投影映射矩阵后,就可以利用所述特征向量拟合人脸形状参数α,具体可以通过最小化能量函数来得到,所述能量函数如下所示:
Figure PCTCN2019101715-appb-000020
其中,N表示人脸内部特征点数量(如49个),y pro_2D,i表示通过所述投影映射矩阵将三维内部特征点投影到二维空间得到的二维内部特征点的坐标值,y i表示通过人脸特征点定位算法定位出来的所述二维内部特征点的坐标值,
Figure PCTCN2019101715-appb-000021
表示通过人脸特征点定位算法定位出来的所述二维内部特征点的协方差矩阵,α就是需要求解的形状参数,又称为形状系数。
具体实施时,可采用如下方式求解形状参数α:在训练出来的人脸形状数据特征向量(所述三维特征脸空间的特征向量){s 1,s 2,.....s 3n}(其中,n为三维人脸模型的顶点数量,s i为特征向量)中,取得和对应49个所述三维内部特征点具有相同语义信息的索引值(该索引值主要包括49*3行的向量基,每三行代表一个顶点坐标,而且对应于0到48的3D顶点的序号)的特征向量,将取得的特征向量组成新的矩阵U,然后通过投影映射矩阵P对矩阵U做映射
Figure PCTCN2019101715-appb-000022
其中α为需要求解的系数,这样就将所述三维内部特征点转化到对应的二维人脸图像对应的坐标点,并和二维人脸图像中原来的所 述二维内部特征点求误差,并最小化E。在求得α后,就得到了所述第一三维人脸模型的数学表达式如下:
Figure PCTCN2019101715-appb-000023
其中s i人脸形状特征向量,
Figure PCTCN2019101715-appb-000024
为训练出来的平均脸数据
步骤S305:根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合。
在经过上一步得到粗的和所述二维人脸图像对应的第一三维人脸模型,本步骤将向所述第一三维人脸模型加入人脸轮廓信息,以生成更加精准的三维人脸模型。
在一个示例中,步骤S305可包括如下子步骤:1)从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的(如最相近的)三维点,作为初始三维轮廓特征点;2)通过所述投影映射矩阵P,将所述初始三维轮廓特征点映射至所述二维人脸图像;3)通过最近邻匹配的方法(如kdtree),选取映射得到的二维轮廓特征点对应的三维点的索引值,这样就得到了所述第一三维人脸模型的人脸轮廓特征点。
步骤S307:若所述二维人脸图像与人脸轮廓特征点拟合后的三维人脸模型之间的误差小于预设误差,则将所述人脸轮廓特征点拟合后的三维人脸模型作为所述三维人脸模型。
将上一步得到的所述第一三维人脸模型的人脸轮廓特征点和所述第一三维人脸模型的人脸内部特征点进行重新拼接,得到加入人脸轮廓特征点的所述第一三维人脸模型;若所述二维人脸图像与人脸轮廓特征点拟合后的三维人脸模型之间的误差小于预设误差,则将所述人脸轮廓特征点拟合后的三维人脸模型作为所述二维人脸图像对应的三维人脸模型。
请参考图5,其为本申请提供的一种人脸姿态估计方法实施例的人脸形状拟合具体流程图。如果所述误差大于或等于预设误差,则基于所述人脸轮廓特征点拟合后的三维人脸模型,执行上述步骤S301、S303、S305和S307,即:将这几个步骤中的所述三维平均脸模型替换为上一次构建的所述人脸轮廓特征点拟合后的三维人脸模型,每次形成新的三维人脸模型,在重复迭代多次上述过程后,当误差小于预设误差后就停止迭代,至此重构出所述二维人脸图像的三维人脸模型。
以上对本申请提供的方法可采用的人脸形状拟合算法进行了说明,下面对人脸表情拟合算法进行说明。
请参考图6,其为本申请提供的一种人脸姿态估计方法实施例的人脸形状及表情拟 合的流程图。由于本实施例采用的表情拟合算法基于三维人脸先验数据包括的表情基数据实现,因此,下面首先对表情基数据及其生成过程进行说明。
在一个示例中,对上述构造出的400个中性表情的三维人脸模型样本,将每一个人脸构造出另外的46个表情,相当于构造出400*47个三维人脸模型样本的数据,以使得可以得到表情拟合数据。图7示出了本实施例的一个三维人脸模型样本对应的47种表情图。
所述表情,可以是基础表情,如:生气,畏怯,厌恶,厌烦,惊讶,担心,幸福,憎恨,难过等等;也可以是复合表情,如:愤怒+厌恶,愤怒+惊讶,非常生气,非常厌恶,非常惊讶,幸福+厌恶,愉快+惊讶,难过+愤怒,难过+厌恶,难过+害怕,难过+惊讶等等。
具体实施时,可以采用现有技术的多种表情构建方法,为一个中性表情的三维人脸模型构建另外46个表情的三维人脸模型。例如,可采用如下表情构建方法构建46个表情的三维人脸模型:通过两组三维模型之间的三角网格之间的形状迁移,不需要源模型和目标模型拥有相同数量的顶点或三角形,或者具有相同的连接性;用户通过指定一组顶点标记,在源模型的三角形和目标的三角形之间建立对应关系,通过计算从源模型到目标模型的对应关系的映射变换矩阵,并以求解一个最优化问题来使原模型变换到目标形状。
在获取到46个表情的三维人脸模型样本后,就可以计算得到46种表情的差值数据,即:表情基。具体实施时,对应于所述三维平均脸模型的各类表情基X可通过如下步骤获取:1)针对每一种表情,根据该表情对应的400个三维人脸模型样本,计算得到该表情的三维平均脸模型,又称为平均表情,就可以得到47种平均表情,其中包括中性表情对应的平均表情;2)针对每一种表情,将该表情的每一个三维人脸模型样本减去该表情的平均表情后,就得到46种表情的差值数据
Figure PCTCN2019101715-appb-000025
其中Gexp,j表示第j种表情对应的差值数据,N表示每一种表情的三维人脸模型样本数量,如400,
Figure PCTCN2019101715-appb-000026
表示平均表情,Sexp,i表示第i个三维人脸模型样本。
在获得对应于所述三维平均脸模型的各类表情基X后,通过将所述三维平均脸模型M和表情基X相加就可以得到各种表情的平均脸的三维模型S[i]=M+X[i](i=0,1,2,..n)。需要说明的是,表情基X对每个人脸是相同的。
由图6可见,本实施例在上述图3基础上加入表情拟合的步骤,在得到了基于人脸 内部49个特征点拟合好的所述第一三维人脸模型后,基于该三维模型做进一步的表情拟合,因为所述二维人脸图像可以是任意表情,而该三维模型是无表情的,因此需要做表情的拟合。在本实施例种,人脸形状及表情拟合过程可包括如下步骤:
步骤S601:根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵。
步骤S603:根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型。
步骤S605:根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合。
步骤S607:根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对所述轮廓特征点拟合后的三维人脸模型进行表情拟合。
在之前步骤中已经得到46种表情基,本步骤可以采用二次规划或非负最小算法求解表情基的拟合表情系数,然后就可以得到表情拟合之后的三维人脸模型,其数学表达式如下:
S exp_model=S model+G*a
Figure PCTCN2019101715-appb-000027
其中
Figure PCTCN2019101715-appb-000028
其中,S model表示所述轮廓特征点拟合后的三维人脸模型,S exp_model表示表情拟合后后的三维人脸模型,G表示表情基,a表示拟合表情系数。
请参考图8,其为本申请提供的一种人脸姿态估计方法实施例的人脸形状及表情拟合的具体流程图。由图8可见,本实施例在上述图5基础上加入表情拟合的步骤,在得到了基于人脸内部49个特征点拟合好的所述第一三维人脸模型后,基于该三维模型做进一步的表情拟合,因为所述二维人脸图像可以是任意表情,而该三维模型是无表情的,因此需要做表情的拟合。
步骤S609:若所述二维人脸图像与表情拟合后的三维人脸模型之间的误差小于预设误差,则将表情拟合后的三维人脸模型作为所述三维人脸模型。
在一个示例中,所述方法还包括如下步骤:若所述误差大于或等于预设误差,则根据所述表情拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。即:基于所述表情拟合后的三维人脸模型,执行上述步骤S601至S609,即:将这几个步骤 中的所述三维平均脸模型替换为上一次构建的所述表情拟合后的三维人脸模型,每次形成新的三维人脸模型,在重复迭代多次上述过程后,当误差小于预设误差后就停止迭代,至此重构出所述二维人脸图像的三维人脸模型。
从上述实施例可见,本申请实施例提供的人脸姿态估计方法,通过获取待处理的二维人脸图像,构建所述二维人脸图像对应的三维人脸模型,根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态;这种处理方式,使得基于与二维人脸图像对应的三维人脸模型进行姿态求解,而不再只基于三维平均脸模型进行姿态求解,使得在对人脸大角度、夸张表情进行姿态估计时,仍可获得较高精准度的姿态;因此,可以有效提升姿态估计的鲁棒性。
第二实施例
在上述的实施例中,提供了一种人脸姿态估计方法,与之相对应的,本申请还提供一种人脸姿态估计装置。该装置是与上述方法的实施例相对应。
请参看图9,其为本申请的人脸姿态估计装置的实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。
本申请另外提供一种人脸姿态估计装置,包括:
二维人脸图像获取单元901,用于获取待处理的二维人脸图像;
三维人脸模型构建单元903,用于构建所述二维人脸图像对应的三维人脸模型;
人脸姿态确定单元905,用于根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
可选的,所述三维人脸模型构建单元903,具体用于通过人脸形状拟合算法,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述三维人脸模型构建单元903,包括:
投影矩阵确定子单元9031,用于根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
第一模型构建子单元9033,用于根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
轮廓拟合子单元9035,用于根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合;
第二模型确定子单元9037,用于若所述二维人脸图像与人脸轮廓特征点拟合后的三维人脸模型之间的误差小于预设误差,则将所述人脸轮廓特征点拟合后的三维人脸模型作为所述三维人脸模型。
可选的,所述三维人脸模型构建单元903还包括:
第三模型构建子单元,用于若所述误差大于或等于预设误差,则根据所述人脸轮廓特征点拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述三维人脸模型构建单元903,具体用于通过人脸表情拟合算法,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述三维人脸模型构建单元903,具体用于通过人脸形状及表情拟合算法,构建所述二维人脸图像对应的三维人脸模型。
可选的,请参考图10,所述三维人脸模型构建单元903包括:
投影矩阵确定子单元,用于根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
第一模型构建子单元,用于根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
轮廓拟合子单元,用于根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合;
表情拟合子单元,用于根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对轮廓拟合后的三维人脸模型进行表情拟合;
第二模型确定子单元,用于若所述二维人脸图像与表情拟合后的三维人脸模型之间的误差小于预设误差,则将表情拟合后的三维人脸模型作为所述三维人脸模型。
可选的,还包括:
第三模型构建子单元,用于若所述误差大于或等于预设误差,则根据所述表情拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,所述轮廓拟合子单元包括:
第一轮廓特征点选取子单元,用于从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;
轮廓特征点映射子单元,用于通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;
第二轮廓特征点选取子单元,用于通过最近邻匹配算法,选取映射得到的二维轮廓 特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
可选的,还包括:
第一先验数据确定单元,用于根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
可选的,还包括:
第二先验数据确定单元,用于根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
第三实施例
请参考图11,其为本申请的电子设备实施例的示意图。由于设备实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的设备实施例仅仅是示意性的。
本实施例的一种电子设备,该电子设备包括:处理器1101和存储器1102;存储器,用于存储实现人脸姿态估计方法的程序,该设备通电并通过所述处理器运行该人脸姿态估计方法的程序后,执行下述步骤:获取待处理的二维人脸图像;构建所述二维人脸图像对应的三维人脸模型;根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
第四实施例
与上述的人脸姿态估计方法相对应,本申请还提供一种三维人脸重构方法,该方法的执行主体包括三维人脸重构装置。
请参考图12,其为本申请提供的一种三维人脸重构方法实施例的流程图,本实施例与第一实施例内容相同的部分不再赘述,请参见实施例一中的相应部分。本申请提供的一种三维人脸重构方法包括:
步骤S1200:获取待处理的二维人脸图像。
步骤S1201:根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵。
步骤S1203:根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型。
步骤S1205:根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合。
步骤S1207:若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误 差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
由图13可见,所述方法还可包括如下步骤:
步骤S1301:若所述误差大于或等于预设误差,则根据所述拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
由图14可见,在所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合之后,还可包括如下步骤:
步骤S1401:根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对轮廓拟合后的三维人脸模型进行表情拟合。
在一个示例中,在所述根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型之后,还可包括如下步骤:根据所述三维平均脸模型对应的至少一个表情基,对所述第一三维人脸模型进行表情拟合;相应的,步骤S1205可采用如下方式:根据所述二维人脸图像的人脸轮廓特征点,对表情拟合后的第一三维人脸模型进行轮廓特征点拟合。
在一个示例中,所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合,可包括如下子步骤:1)从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;2)通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;3)通过最近邻匹配算法,选取映射得到的二维轮廓特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
在一个示例中,所述方法还可包括如下步骤:根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
在一个示例中,所述方法还可包括如下步骤:根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
[根据细则91更正 13.12.2019] 
从上述实施例可见,本申请实施例提供的三维人脸重构方法,通过获取待处理的二维人脸图像;根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型;这种处理方式,使得基 于三维人脸先验数据驱动三维人脸模型拟合,考虑了人脸内部特征点和外轮廓特征点的相结合,进而拟合迭代,实现最小化三维人脸模型与二维人脸图像之间的误差,最大程度还原真实人脸,且重构出的三维人脸模型符合人脸生物学特征;因此,可以有效提升三维人脸模型的重构准确度。
第五实施例
在上述的实施例中,提供了一种三维人脸重构方法,与之相对应的,本申请还提供一种三维人脸重构装置。该装置是与上述方法的实施例相对应。
请参看图15,其为本申请的三维人脸重构装置的实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。
本申请另外提供一种三维人脸重构装置,包括:
二维人脸图像获取单元1500,用于获取待处理的二维人脸图像;
投影矩阵确定子单元1501,用于根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
第一模型构建子单元1503,用于根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
轮廓拟合子单元1505,用于根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;
第二模型确定单元1507,用于若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
可选的,还包括:
第一表情拟合单元,用于根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对轮廓拟合后的三维人脸模型进行表情拟合。
可选的,还包括:
第二表情拟合单元,用于根据所述三维平均脸模型对应的至少一个表情基,对所述第一三维人脸模型进行表情拟合;
所述轮廓拟合子单元,具体用于根据所述二维人脸图像的人脸轮廓特征点,对表情拟合后的第一三维人脸模型进行轮廓特征点拟合。
可选的,所述轮廓拟合子单元1505包括:
第一轮廓特征点选取子单元,用于从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;
轮廓特征点映射子单元,用于通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;
第二轮廓特征点选取子单元,用于通过最近邻匹配算法,选取映射得到的二维轮廓特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
可选的,还包括:
第三模型构建子单元,用于若所述误差大于或等于预设误差,则根据所述拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
可选的,还包括:
第一先验数据确定单元,用于根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
可选的,还包括:
第二先验数据确定单元,用于根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
第六实施例
请参考图16,其为本申请的电子设备实施例的示意图。由于设备实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的设备实施例仅仅是示意性的。
本实施例的一种电子设备,该电子设备包括:处理器1601和存储器1602;所述存储器,用于存储实现三维人脸重构方法的程序,该设备通电并通过所述处理器运行该三维人脸重构方法的程序后,执行下述步骤:获取待处理的二维人脸图像;根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术 人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。

Claims (22)

  1. 一种人脸姿态估计方法,其特征在于,包括:
    获取待处理的二维人脸图像;
    构建所述二维人脸图像对应的三维人脸模型;
    根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
  2. 根据权利要求1所述的方法,其特征在于,所述构建所述二维人脸图像对应的三维人脸模型,包括:
    通过人脸形状拟合算法,构建所述二维人脸图像对应的三维人脸模型。
  3. 根据权利要求2所述的方法,其特征在于,所述人脸形状拟合算法包括:
    根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
    根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
    根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合;
    若所述二维人脸图像与人脸轮廓特征点拟合后的三维人脸模型之间的误差小于预设误差,则将所述人脸轮廓特征点拟合后的三维人脸模型作为所述三维人脸模型。
  4. 根据权利要求3所述的方法,其特征在于,还包括:
    若所述误差大于或等于预设误差,则根据所述人脸轮廓特征点拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
  5. 根据权利要求1所述的方法,其特征在于,所述构建所述二维人脸图像对应的表情三维人脸模型,包括:
    通过人脸表情拟合算法,构建所述二维人脸图像对应的三维人脸模型。
  6. 根据权利要求1所述的方法,其特征在于,所述构建所述二维人脸图像对应的三维人脸模型,包括:
    通过人脸形状及表情拟合算法,构建所述二维人脸图像对应的三维人脸模型。
  7. 根据权利要求6所述的方法,其特征在于,所述人脸形状及表情拟合算法包括:
    根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
    根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
    根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合;
    根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对轮廓拟合后的三维人脸模型进行表情拟合;
    若所述二维人脸图像与表情拟合后的三维人脸模型之间的误差小于预设误差,则将表情拟合后的三维人脸模型作为所述三维人脸模型。
  8. 根据权利要求7所述的方法,其特征在于,还包括:
    若所述误差大于或等于预设误差,则根据所述表情拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
  9. 根据权利要求3或7所述的方法,其特征在于,所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合,包括:
    从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;
    通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;
    通过最近邻匹配算法,选取映射得到的二维轮廓特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
  10. 根据权利要求3或7所述的方法,其特征在于,还包括:
    根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
  11. 根据权利要求7所述的方法,其特征在于,还包括:
    根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
  12. 一种三维人脸重构方法,其特征在于,包括:
    获取待处理的二维人脸图像;
    根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
    根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
    根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;
    若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
  13. 根据权利要求12所述的方法,其特征在于,在所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合之后,还包括:
    根据所述二维人脸图像的人脸内部特征点和所述三维平均脸模型对应的至少一个表情基,对轮廓拟合后的三维人脸模型进行表情拟合。
  14. 根据权利要求12所述的方法,其特征在于,在所述根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型之后,还包括:
    根据所述三维平均脸模型对应的至少一个表情基,对所述第一三维人脸模型进行表情拟合;
    所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合,包括:
    根据所述二维人脸图像的人脸轮廓特征点,对表情拟合后的第一三维人脸模型进行轮廓特征点拟合。
  15. 根据权利要求12所述的方法,其特征在于,所述根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维模型进行轮廓特征点拟合,包括:
    从所述第一三维人脸模型中选取和所述二维人脸图像的人脸轮廓特征点对应的三维点,作为初始三维轮廓特征点;
    通过所述投影映射矩阵,将所述初始三维轮廓特征点映射至所述二维人脸图像;
    通过最近邻匹配算法,选取映射得到的二维轮廓特征点对应的三维点,作为所述第一三维人脸模型的人脸轮廓特征点。
  16. 根据权利要求12所述的方法,其特征在于,还包括:
    若所述误差大于或等于预设误差,则根据所述拟合后的三维人脸模型,构建所述二维人脸图像对应的三维人脸模型。
  17. 根据权利要求12所述的方法,其特征在于,还包括:
    根据三维人脸模型样本,确定所述三维平均脸模型和所述特征向量。
  18. 根据权利要求13或14所述的方法,其特征在于,还包括:
    根据三维人脸模型样本,确定所述三维平均脸模型对应的至少一个表情基。
  19. 一种人脸姿态估计装置,其特征在于,包括:
    二维人脸图像获取单元,用于获取待处理的二维人脸图像;
    三维人脸模型构建单元,用于构建所述二维人脸图像对应的三维人脸模型;
    人脸姿态确定单元,用于根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
  20. 一种三维人脸重构装置,其特征在于,包括:
    二维人脸图像获取单元,用于获取待处理的二维人脸图像;
    投影矩阵确定子单元,用于根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;
    第一模型构建子单元,用于根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;
    轮廓拟合子单元,用于根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;
    第二模型确定单元,用于若所述二维人脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
  21. 一种电子设备,其特征在于,包括:
    处理器;以及
    存储器,用于存储实现人脸姿态估计方法的程序,该设备通电并通过所述处理器运行该人脸姿态估计方法的程序后,执行下述步骤:获取待处理的二维人脸图像;构建所述二维人脸图像对应的三维人脸模型;根据所述三维人脸模型的人脸特征点和所述二维人脸图像的人脸特征点,确定所述二维人脸图像的人脸姿态。
  22. 一种电子设备,其特征在于,包括:
    处理器;以及
    存储器,用于存储实现三维人脸重构方法的程序,该设备通电并通过所述处理器运行该三维人脸重构方法的程序后,执行下述步骤:获取待处理的二维人脸图像;根据所述二维人脸图像的人脸内部特征点和三维平均脸模型的人脸内部特征点,确定所述三维平均脸模型至所述二维人脸图像的投影映射矩阵;根据所述投影映射矩阵和三维特征脸空间的特征向量,构建所述二维人脸图像对应的第一三维人脸模型;根据所述二维人脸图像的人脸轮廓特征点,对所述第一三维人脸模型进行轮廓特征点拟合;若所述二维人 脸图像与拟合后的三维人脸模型之间的误差小于预设误差,则将所述拟合后的三维人脸模型作为所述二维人脸图像的三维人脸模型。
PCT/CN2019/101715 2018-08-27 2019-08-21 人脸姿态估计/三维人脸重构方法、装置及电子设备 WO2020042975A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021510684A JP7203954B2 (ja) 2018-08-27 2019-08-21 顔姿勢推定/3次元顔再構築方法、装置、及び電子デバイス
EP19855542.7A EP3836070A4 (en) 2018-08-27 2019-08-21 METHOD AND EQUIPMENT FOR FACIAL POSITION ASSESSMENT / FOR THREE-DIMENSIONAL FACIAL RECONSTRUCTION AND ELECTRONIC DEVICE
US17/186,593 US11941753B2 (en) 2018-08-27 2021-02-26 Face pose estimation/three-dimensional face reconstruction method, apparatus, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810983040.0A CN110866864A (zh) 2018-08-27 2018-08-27 人脸姿态估计/三维人脸重构方法、装置及电子设备
CN201810983040.0 2018-08-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/186,593 Continuation US11941753B2 (en) 2018-08-27 2021-02-26 Face pose estimation/three-dimensional face reconstruction method, apparatus, and electronic device

Publications (1)

Publication Number Publication Date
WO2020042975A1 true WO2020042975A1 (zh) 2020-03-05

Family

ID=69645036

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101715 WO2020042975A1 (zh) 2018-08-27 2019-08-21 人脸姿态估计/三维人脸重构方法、装置及电子设备

Country Status (5)

Country Link
US (1) US11941753B2 (zh)
EP (1) EP3836070A4 (zh)
JP (1) JP7203954B2 (zh)
CN (1) CN110866864A (zh)
WO (1) WO2020042975A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582208A (zh) * 2020-05-13 2020-08-25 北京字节跳动网络技术有限公司 用于生成生物体姿态关键点信息的方法和装置
CN111784818A (zh) * 2020-06-01 2020-10-16 北京沃东天骏信息技术有限公司 生成三维人体模型的方法、装置及计算机可读存储介质
US20210303923A1 (en) * 2020-03-31 2021-09-30 Sony Corporation Cleaning dataset for neural network training
US20210406516A1 (en) * 2018-11-16 2021-12-30 Bigo Technology Pte. Ltd. Method and apparatus for training face detection model, and apparatus for detecting face key point
US11941753B2 (en) 2018-08-27 2024-03-26 Alibaba Group Holding Limited Face pose estimation/three-dimensional face reconstruction method, apparatus, and electronic device

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210030147A (ko) * 2019-09-09 2021-03-17 삼성전자주식회사 3d 렌더링 방법 및 장치
CN111563944B (zh) * 2020-04-29 2023-06-23 山东财经大学 三维人脸表情迁移方法及系统
CN113689538B (zh) * 2020-05-18 2024-05-21 北京达佳互联信息技术有限公司 一种视频生成方法、装置、电子设备及存储介质
CN111510769B (zh) * 2020-05-21 2022-07-26 广州方硅信息技术有限公司 视频图像处理方法、装置及电子设备
CN113744384B (zh) * 2020-05-29 2023-11-28 北京达佳互联信息技术有限公司 三维人脸重建方法、装置、电子设备及存储介质
CN112307899A (zh) * 2020-09-27 2021-02-02 中国科学院宁波材料技术与工程研究所 一种基于深度学习的面部姿态检测与矫正方法及系统
CN113628322B (zh) * 2021-07-26 2023-12-05 阿里巴巴(中国)有限公司 图像处理、ar显示与直播方法、设备及存储介质
CN113808274A (zh) * 2021-09-24 2021-12-17 福建平潭瑞谦智能科技有限公司 人脸识别模型构建方法及系统及识别方法
CN114078184B (zh) * 2021-11-11 2022-10-21 北京百度网讯科技有限公司 数据处理方法、装置、电子设备和介质
WO2023144950A1 (ja) * 2022-01-27 2023-08-03 三菱電機株式会社 調整装置、顔向き推定装置、および、調整方法
CN116524572B (zh) * 2023-05-16 2024-01-26 北京工业大学 基于自适应Hope-Net的人脸精准实时定位方法
CN116524165B (zh) * 2023-05-29 2024-01-19 北京百度网讯科技有限公司 三维表情模型的迁移方法、装置、设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404091A (zh) * 2008-11-07 2009-04-08 重庆邮电大学 基于两步形状建模的三维人脸重建方法和系统
US20150235372A1 (en) * 2011-11-11 2015-08-20 Microsoft Technology Licensing, Llc Computing 3d shape parameters for face animation
CN105528805A (zh) * 2015-12-25 2016-04-27 苏州丽多数字科技有限公司 一种虚拟人脸动画合成方法
CN107958479A (zh) * 2017-12-26 2018-04-24 南京开为网络科技有限公司 一种移动端3d人脸增强现实实现方法

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6959109B2 (en) * 2002-06-20 2005-10-25 Identix Incorporated System and method for pose-angle estimation
US7426292B2 (en) 2003-08-07 2008-09-16 Mitsubishi Electric Research Laboratories, Inc. Method for determining optimal viewpoints for 3D face modeling and face recognition
US7212664B2 (en) 2003-08-07 2007-05-01 Mitsubishi Electric Research Laboratories, Inc. Constructing heads from 3D models and 2D silhouettes
KR100682889B1 (ko) 2003-08-29 2007-02-15 삼성전자주식회사 영상에 기반한 사실감 있는 3차원 얼굴 모델링 방법 및 장치
US7804997B2 (en) 2004-06-10 2010-09-28 Technest Holdings, Inc. Method and system for a three dimensional facial recognition system
JP4653606B2 (ja) * 2005-05-23 2011-03-16 株式会社東芝 画像認識装置、方法およびプログラム
US7756325B2 (en) 2005-06-20 2010-07-13 University Of Basel Estimating 3D shape and texture of a 3D object based on a 2D image of the 3D object
US20080309662A1 (en) 2005-12-14 2008-12-18 Tal Hassner Example Based 3D Reconstruction
JP4954945B2 (ja) * 2008-06-13 2012-06-20 日本放送協会 三次元形状推定装置及びコンピュータプログラム
US8208717B2 (en) * 2009-02-25 2012-06-26 Seiko Epson Corporation Combining subcomponent models for object image modeling
JP5273030B2 (ja) * 2009-12-18 2013-08-28 株式会社デンソー 顔特徴点検出装置および眠気検出装置
CN102156537B (zh) * 2010-02-11 2016-01-13 三星电子株式会社 一种头部姿态检测设备及方法
EP2538388B1 (en) 2011-06-20 2015-04-01 Alcatel Lucent Method and arrangement for image model construction
WO2013120851A1 (en) 2012-02-13 2013-08-22 Mach-3D Sàrl Method for sharing emotions through the creation of three-dimensional avatars and their interaction through a cloud-based platform
WO2013174671A1 (en) 2012-05-22 2013-11-28 Telefonica, S.A. A method and a system for generating a realistic 3d reconstruction model for an object or being
CN102800129B (zh) 2012-06-20 2015-09-30 浙江大学 一种基于单幅图像的头发建模和肖像编辑方法
US9936165B2 (en) 2012-09-06 2018-04-03 Intel Corporation System and method for avatar creation and synchronization
US9552668B2 (en) 2012-12-12 2017-01-24 Microsoft Technology Licensing, Llc Generation of a three-dimensional representation of a user
US10004866B2 (en) 2013-03-15 2018-06-26 Lucy Carol Davis Facial mask apparatus and method of making
US11235119B2 (en) 2013-03-15 2022-02-01 Lucy Carol Davis Facial mask apparatus and method of making
WO2015042867A1 (zh) 2013-09-27 2015-04-02 中国科学院自动化研究所 一种基于单摄像头与运动捕捉数据的人脸表情编辑方法
CN104157010B (zh) 2014-08-29 2017-04-12 厦门幻世网络科技有限公司 一种3d人脸重建的方法及其装置
US9747493B2 (en) * 2014-09-23 2017-08-29 Keylemon Sa Face pose rectification method and apparatus
JP6572538B2 (ja) * 2014-12-15 2019-09-11 アイシン精機株式会社 下方視判定装置および下方視判定方法
US20170069124A1 (en) 2015-04-07 2017-03-09 Intel Corporation Avatar generation and animations
US9679192B2 (en) 2015-04-24 2017-06-13 Adobe Systems Incorporated 3-dimensional portrait reconstruction from a single photo
JP6754619B2 (ja) * 2015-06-24 2020-09-16 三星電子株式会社Samsung Electronics Co.,Ltd. 顔認識方法及び装置
WO2017058733A1 (en) 2015-09-29 2017-04-06 BinaryVR, Inc. Head-mounted display with facial expression detecting capability
CN108960020A (zh) * 2017-05-27 2018-12-07 富士通株式会社 信息处理方法和信息处理设备
CN107704848A (zh) * 2017-10-27 2018-02-16 深圳市唯特视科技有限公司 一种基于多约束条件卷积神经网络的密集人脸对齐方法
CN108062791A (zh) * 2018-01-12 2018-05-22 北京奇虎科技有限公司 一种重建人脸三维模型的方法和装置
CN110866864A (zh) 2018-08-27 2020-03-06 阿里巴巴集团控股有限公司 人脸姿态估计/三维人脸重构方法、装置及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404091A (zh) * 2008-11-07 2009-04-08 重庆邮电大学 基于两步形状建模的三维人脸重建方法和系统
US20150235372A1 (en) * 2011-11-11 2015-08-20 Microsoft Technology Licensing, Llc Computing 3d shape parameters for face animation
CN105528805A (zh) * 2015-12-25 2016-04-27 苏州丽多数字科技有限公司 一种虚拟人脸动画合成方法
CN107958479A (zh) * 2017-12-26 2018-04-24 南京开为网络科技有限公司 一种移动端3d人脸增强现实实现方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3836070A4 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11941753B2 (en) 2018-08-27 2024-03-26 Alibaba Group Holding Limited Face pose estimation/three-dimensional face reconstruction method, apparatus, and electronic device
US20210406516A1 (en) * 2018-11-16 2021-12-30 Bigo Technology Pte. Ltd. Method and apparatus for training face detection model, and apparatus for detecting face key point
US11922707B2 (en) * 2018-11-16 2024-03-05 Bigo Technology Pte. Ltd. Method and apparatus for training face detection model, and apparatus for detecting face key point
US20210303923A1 (en) * 2020-03-31 2021-09-30 Sony Corporation Cleaning dataset for neural network training
US11748943B2 (en) * 2020-03-31 2023-09-05 Sony Group Corporation Cleaning dataset for neural network training
CN111582208A (zh) * 2020-05-13 2020-08-25 北京字节跳动网络技术有限公司 用于生成生物体姿态关键点信息的方法和装置
CN111784818A (zh) * 2020-06-01 2020-10-16 北京沃东天骏信息技术有限公司 生成三维人体模型的方法、装置及计算机可读存储介质
CN111784818B (zh) * 2020-06-01 2024-04-16 北京沃东天骏信息技术有限公司 生成三维人体模型的方法、装置及计算机可读存储介质

Also Published As

Publication number Publication date
EP3836070A1 (en) 2021-06-16
CN110866864A (zh) 2020-03-06
JP2021535499A (ja) 2021-12-16
EP3836070A4 (en) 2021-10-20
JP7203954B2 (ja) 2023-01-13
US20210183141A1 (en) 2021-06-17
US11941753B2 (en) 2024-03-26

Similar Documents

Publication Publication Date Title
WO2020042975A1 (zh) 人脸姿态估计/三维人脸重构方法、装置及电子设备
JP7040278B2 (ja) 顔認識のための画像処理装置の訓練方法及び訓練装置
Abdal et al. Styleflow: Attribute-conditioned exploration of stylegan-generated images using conditional continuous normalizing flows
Ezuz et al. GWCNN: A metric alignment layer for deep shape analysis
JP7373554B2 (ja) クロスドメイン画像変換
Rock et al. Completing 3d object shape from one depth image
Jeni et al. Dense 3D face alignment from 2D videos in real-time
JP4466951B2 (ja) 立体結合顔形状の位置合わせ
US10210430B2 (en) System and a method for learning features on geometric domains
KR100804282B1 (ko) 2차원 영상으로부터 3차원 표현을 생성시키기 위한 장치와 방법
WO2020207177A1 (zh) 图像增广与神经网络训练方法、装置、设备及存储介质
US8411081B2 (en) Systems and methods for enhancing symmetry in 2D and 3D objects
JP7327140B2 (ja) 画像処理方法及び情報処理装置
Jeni et al. The first 3d face alignment in the wild (3dfaw) challenge
JP2006520054A (ja) 不変視点からの画像照合および2次元画像からの3次元モデルの生成
Bas et al. What does 2D geometric information really tell us about 3D face shape?
US20220414821A1 (en) Systems and methods for point cloud registration
WO2020108304A1 (zh) 人脸网格模型的重建方法、装置、设备和存储介质
WO2020037963A1 (zh) 脸部图像识别的方法、装置及存储介质
CN109376698B (zh) 人脸建模方法和装置、电子设备、存储介质、产品
Laga A survey on nonrigid 3d shape analysis
Feng et al. 3D shape retrieval using a single depth image from low-cost sensors
Wang et al. Joint head pose and facial landmark regression from depth images
Sahillioğlu et al. Detail-preserving mesh unfolding for nonrigid shape retrieval
CN110990604A (zh) 图像底库生成方法、人脸识别方法和智能门禁系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19855542

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021510684

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019855542

Country of ref document: EP

Effective date: 20210310