WO2021051543A1 - Method for generating face rotation model, apparatus, computer device and storage medium - Google Patents

Method for generating face rotation model, apparatus, computer device and storage medium Download PDF

Info

Publication number
WO2021051543A1
WO2021051543A1 PCT/CN2019/117299 CN2019117299W WO2021051543A1 WO 2021051543 A1 WO2021051543 A1 WO 2021051543A1 CN 2019117299 W CN2019117299 W CN 2019117299W WO 2021051543 A1 WO2021051543 A1 WO 2021051543A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
model
parameters
dimensional
rotation
Prior art date
Application number
PCT/CN2019/117299
Other languages
French (fr)
Chinese (zh)
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 平安科技(深圳)有限公司
Publication of WO2021051543A1 publication Critical patent/WO2021051543A1/en

Links

Images

Classifications

    • 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/168Feature extraction; Face representation
    • 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/60Rotation of whole images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-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/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data
    • 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/2016Rotation, translation, scaling

Definitions

  • This application relates to the field of model construction, and in particular to a method, device, computer equipment and storage medium for generating a face rotation model.
  • the face recognition technology in the field of artificial intelligence is not mature enough, and the face recognition technology for non-frontal faces has always been a problem in the field of face recognition.
  • the face alignment technology of non-frontal faces in the existing face recognition system can usually only solve the rotation of the roll angle in the face pose, and the similar transformation is directly used for the large-angle yaw angle or the pitch angle. In this way, The face will be deformed greatly after the alignment, which is not conducive to subsequent face recognition; at the same time, the face alignment of a non-frontal face in the prior art cannot obtain accurate three-dimensional coordinate information of the face. Therefore, finding a technical solution that can solve the above-mentioned problems has become an urgent problem for those skilled in the art.
  • a method for generating a face rotation model including:
  • the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
  • Extract the target feature of the face image in the face training picture input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
  • the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points is The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
  • the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model
  • the photo rotation is the required rotation angle for the front face photo.
  • a device for generating a face rotation model including:
  • the first acquisition module is configured to acquire face training pictures from the target set; the face training pictures have already marked three-dimensional face parameters;
  • the second acquiring module is configured to acquire a preset average face model, and acquire a real position map according to the three-dimensional face parameters and the preset average face model; the real position map contains the same face as the face model.
  • the third acquisition module is configured to extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain the face rotation model The three-dimensional position information of all the output second key points;
  • the input module is used to set the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function through a mask, and set each of the The three-dimensional position information of the first key point and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
  • the first confirmation module is used to confirm that the face rotation model training is completed when the loss result is less than or equal to the preset loss value; the face rotation model is used to input the face photo into the face rotation model , Confirm that the face photo is rotated to the required rotation angle for the front face photo.
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
  • Extract the target feature of the face image in the face training picture input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
  • the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points is The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
  • the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model
  • the photo rotation is the required rotation angle for the front face photo.
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
  • the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
  • Extract the target feature of the face image in the face training picture input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
  • the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points is The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
  • the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model
  • the photo rotation is the required rotation angle for the front face photo.
  • FIG. 1 is a schematic diagram of an application environment of a method for generating a face rotation model in an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for generating a face rotation model in an embodiment of the present application
  • step S20 of the method for generating a face rotation model in an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an apparatus for generating a face rotation model in an embodiment of the present application
  • Fig. 5 is a schematic diagram of a computer device in an embodiment of the present application.
  • the method for generating a face rotation model provided in this application can be applied in an application environment as shown in FIG. 1, where the client communicates with the server through the network.
  • the client can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a method for generating a face rotation model is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • S10 Obtain a face training picture from a target set; the face training picture has been marked with three-dimensional face parameters;
  • the target set can be a large public face data set (such as the 300W-LP public set, which contains more than 60,000 human pictures, and each face training picture has annotated three-dimensional face parameters.
  • Face parameters include face shape parameters, facial expression parameters, and face pose parameters).
  • the face photos in the face data set can be used as face training photos; face training images include face rotation
  • face training images include face rotation
  • the 43867 face vertices required in the model modeling process the three-dimensional coordinate information corresponding to the face vertices has not been determined yet).
  • the classic model Basel Face Model in the successfully trained and open source 3DMM model includes an average face model, and the average face model can represent a standard average face (and the average face model data comes from :Facial features extracted from a preset number of ordinary faces. According to the measurement of facial features, each measurement data is obtained. Finally, each average value is calculated based on each measurement data, that is, each average value can be used as the data of the composite average face model ); The three-dimensional face parameters can be compared with the model parameters in the average face model; the real position map is a standard frontal face picture.
  • the real position map is the same size as the face training picture, and both can be 256x256x3( 256x256 represents pixels in the horizontal and vertical directions respectively), this real position map will be used as the learning target in this training process; the three-dimensional position information refers to the three-dimensional coordinates in the three-dimensional coordinate system.
  • the real position map obtained in this embodiment can be used as a learning target in the training process of the face rotation model.
  • the initial parameters of the face rotation model can be adjusted in the subsequent training process, so that a computable face photo rotation can be obtained.
  • the face rotation model of the rotation angle required for the front face photo can be used as a learning target in the training process of the face rotation model.
  • the three-dimensional face parameters include face shape parameters, facial expression parameters, and face pose parameters; the obtaining a preset average face model is based on the three-dimensional face parameters and The preset average face model to obtain the real position map includes:
  • the model parameters include model shape parameters and model expression parameters;
  • S202 Determine the deformation of the face image in the face training picture according to the face shape parameter and the model shape parameter;
  • S203 Determine the expression change of the face image in the face training picture according to the face expression parameter and the model expression parameter;
  • S204 Determine, according to the average face shape, the deformation of the face image, and the expression change of the face image, that the face image corresponds to each of the faces in the preset average face model Three-dimensional position information of vertices;
  • the face training pictures are similar Transform to the frontal position to obtain the real position map of the frontal face at the frontal position corresponding to the face image in the face training picture.
  • the preset model parameters of the average face model include model shape parameters and model expression parameters.
  • the model shape parameters and model expression parameters are used to reflect the appearance and state of the corresponding average face in the average face model. , That is, what the shape of the average face of most people should look like (the outline of the entire face and the size of the face are the standard average face), and what should the expression of the average face of most people look like (face keeping Slight smile or non-smiling face, etc.);
  • the preset average face model corresponds to an average face shape, and the average face shape is an overall face shape (including the shape of various facial sense organs, such as mouth, eyes and nose, etc.) ,
  • Each vertex on the average face shape can be represented by three-dimensional position information, and the average face shape is first composed of each face vertex and line (the line between the face vertex and the face vertex) to form each two-dimensional Plane, and then assembled by each two-dimensional plane.
  • the preset model parameters of the average face model can be used to determine the difference between the three-dimensional face parameters in the face training picture and the standard parameters. Firstly, by comparing the face shape parameters with the model shape parameters The difference determines the deformation of the face image in the face training picture (the face shape parameters in the face training picture can include multiple, such as the national character face and the melon face), by comparing the facial expression parameters and the model expression The parameters determine the expression changes of the face image (the facial expression parameters in the face training images can include multiple, such as angry and happy, etc. The expression changes will affect the shape of the various sense organs in the entire face).
  • the average face shape and the deformation of the face image and the expression change of the face image can be used to determine the face image in the face training relative to the face in the preset average face model.
  • the three-dimensional position information of the vertex for example, the average face shape corresponds to a non-smiling facial expression, that is, the corners of the mouth will not rise or stretch out. If the face image in the face training image corresponds to a smiling expression at this time, that is The corners of the mouth have been raised or stretched.
  • the training picture can be determined at this time The face vertices where the face image has been raised or stretched, so that the three-dimensional position information can be determined.
  • each facial sensory in the face image corresponds to the face vertices in the preset average face model The three-dimensional location information.
  • the three-dimensional position information determines the real position map of the frontal face corresponding to the face image in the face training picture at the frontal position, that is, by similarly transforming the face training picture to the frontal position, for example, as mentioned in the above example
  • the face image of the face training picture is not in the front position (that is, there is a certain deviation from the front position).
  • similar transformation can be used to determine the three-dimensional position information of the transformed first key point (located on the real position map). ), the real position map of the front position can also be obtained.
  • the real position map obtained by the above method steps has accurate three-dimensional position information of the first key point, which provides an accurate reference for the subsequent steps to accurately calculate the rotation angle.
  • the face training image contains the data to be input to the face rotation model that contains the initial parameters.
  • This data can be extracted and used as the target feature of the face image (the target feature still exists in the form of a picture)
  • the target feature can be the key points needed to construct the various sensory areas of the face (such as constructing the key points of the eye area, constructing the key points of the nose area, and constructing the key points of the mouth area, etc.);
  • the face rotation model is The classic model in the 3DMM model, Basel Face Model.
  • the input target feature is input in the form of a picture (the same size as the face training picture) into the overall network structure (where the target feature is)
  • the pictures in the overall structure will become feature maps of different sizes between the base layers of the transposed rolls), there are 10 residual modules in the overall network structure, that is, the depth of the overall network structure can be deepened and the overall network structure can be deepened by the residual module first.
  • the output is a set of heatmaps, that is, the three-dimensional position information of all the second key points in the result location map), and there is also a loss layer (used to set the loss function) in the overall network structure.
  • the function of feature extraction is to initially obtain data that is more convenient for the operation and calculation of the face rotation model containing the initial parameters, thereby reducing the complexity of the overall network structure operation process in the face rotation model, and also reducing The running time of the running process; and the face rotation model can be further used to capture the deep information contained in the picture where the target feature is located in different picture sizes.
  • the method further includes:
  • the face rotation model extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index.
  • the resulting position map is a picture of the same size as the real position map and the face training picture;
  • the preset key points can be the key points in the front face, including the eyes, nose and mouth in the sensory area There are multiple key points in a sensory area.
  • the extracted three-dimensional position information of the second key point will be used for comparison with the three-dimensional position information of the second key point, so that the rotation angle of the face rotation model can be calculated.
  • the step of making the face rotation model to extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index includes:
  • Make the face rotation model determine the key points corresponding to the fixed sensory area in the result location map according to the preset key point index, and extract the three-dimensional coordinates of each of the key points from the three-dimensional coordinate system And record the three-dimensional coordinate information of each of the key points as the three-dimensional position information of each of the second key points.
  • the result location map is located in a three-dimensional coordinate system, that is, each fixed sensory area (the area composed of the eyes, nose, and mouth) in the result location map. At this time, it is indexed from multiple fixed sensory areas.
  • the preset key points determine the required key points, and extract the three-dimensional coordinate information of the key points, and the three-dimensional coordinate information of the last key point can be used as the three-dimensional position information of the second key point.
  • the three-dimensional position information of each first key point and the amount of the three-dimensional position information of each second key point in the mean square error loss function can be set in the numerical part of the mean square error loss function through the mask.
  • Weight value that is, set the weight value of the first key point and the second key point in the mean square error loss function, and the set first key point and second key point should be the key points corresponding to the same sensory area (For example, the first key point is the area where the eyes are located, that is, the second key point is also the area where the eyes are located), and the sensory area includes areas where the eyes, nose, and mouth are located (and there are a total of 68 key points in these three areas Composition, that is, the first key point must be greater than or equal to 68, and the second key point must be greater than or equal to 68) and other face areas. At this time, the areas where the eyes, nose, mouth and other face areas are in the mean square The ratio of the weight value in the error loss function is set to 16:4:3:0.
  • n is the number of key or the second key point of the first point
  • y i is the i-th vector set of three-dimensional position information of the second key is constituted
  • y 'i is the i th first key A set of vectors composed of three-dimensional position information.
  • the masks are used to set each The weight value of the three-dimensional position information of a key point and the three-dimensional position information of each second key point in the mean square error loss function is helpful for the face rotation model to learn a more accurate real position map.
  • the loss result is less than or equal to the preset loss value, it can indicate that the face rotation model regression training process is close to the training target. At this time, it can be determined that the face rotation model training is completed.
  • step S40 it further includes:
  • the loss result is greater than the preset loss value, it can indicate that the initial parameters of the face rotation model are not suitable for this training process. Therefore, it is necessary to continuously update the initial parameters of the face rotation model until the condition is suitable for This training process.
  • step S50 it further includes:
  • Input a face photo into the trained face rotation model obtain the rotation angle output by the face rotation model, and rotate the face photo into the frontal photo according to the rotation angle;
  • the rotation angle refers to a rotation angle required to rotate the face photo into a front face photo.
  • this embodiment is an application of the face rotation model.
  • the rotation angle needs to be rotated (the face rotation model can be used in the original training process).
  • the face rotation model can be used in the original training process.
  • the face photo and the front photo can accept a certain angle deviation (for example, within 0.5 degrees, etc.) within the preset deformation range.
  • the rotating the face photo into the front face photo according to the rotation angle includes: extracting the target feature of the face photo, and inputting the target feature of the face photo to In the trained face rotation model, and obtain the three-dimensional position information of all third key points output by the trained face rotation model; according to the rotation angle and the three-dimensional position information of the third key point Rotate the face photo into the front face photo.
  • the foregoing provides a method for generating a face rotation model, which obtains face training images from a target set; the face training images have been marked with three-dimensional face parameters; and a preset average face model is obtained , Obtaining a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the frontal face corresponding to the face image in the face training picture and the The three-dimensional position information of all the first key points of the frontal face; extract the target feature of the face image in the face training picture, input the target feature into the face rotation model containing initial parameters, and Obtain the three-dimensional position information of all the second key points output by the face rotation model; set the three-dimensional position information of each of the first key points and the three-dimensional position information of each of the second key points in the mean square error The weight value occupied in the loss function, and input the three-dimensional position information of each of the first key points and the three-dimensional position information of each of the second key points into the mean square error loss function to obtain a
  • a device for generating a face rotation model in one embodiment, corresponds to the method for generating a face rotation model in the above-mentioned embodiment in a one-to-one correspondence.
  • the device for generating the face rotation model includes a first acquisition module 11, a second acquisition module 12, a third acquisition module 13, an input module 14 and a first confirmation module 15.
  • the detailed description of each functional module is as follows:
  • the first obtaining module 11 is configured to obtain face training pictures from a target set; the face training pictures have already marked three-dimensional face parameters;
  • the second acquiring module 12 is configured to acquire a preset average face model, and acquire a real position map according to the three-dimensional face parameters and the preset average face model; the real position map contains the same as the person The three-dimensional position information of the front face corresponding to the face image in the face training picture and all first key points of the front face;
  • the third acquisition module 13 is configured to extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain the face rotation 3D position information of all second key points output by the model;
  • the input module 14 is configured to set the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function through a mask, and set Inputting the three-dimensional position information of the first key point and the three-dimensional position information of each of the second key points into the mean square error loss function to obtain a loss result;
  • the first confirmation module 15 is used to confirm that the face rotation model training is completed when the loss result is less than or equal to the preset loss value; the face rotation model is used to input a face photo into the face rotation When modeling, confirm that the face photo is rotated to the required rotation angle for the front face photo.
  • the second acquisition module includes:
  • the first acquisition sub-module is used to acquire the model parameters of the preset average face model and the average face shape that has been successfully trained;
  • the average face shape refers to the three-dimensional position of a preset number of face vertices
  • the model parameters include model shape parameters and model expression parameters;
  • the first determining sub-module is configured to determine the deformation of the face image in the face training picture according to the face shape parameter and the model shape parameter;
  • the second determining submodule is configured to determine the facial expression change of the facial image in the facial training picture according to the facial facial expression parameters and the model facial expression parameters;
  • the third determining sub-module is configured to determine that the face image corresponds to the preset average face model according to the average face shape, the deformation of the face image, and the expression change of the face image
  • the transformation sub-module is configured to convert the person according to the face pose parameters and the determined three-dimensional position information of the face image corresponding to each of the face vertices in the preset average face model
  • the face training picture is similarly transformed into the front face position, and the real position map of the front face corresponding to the face image in the face training picture at the front face position is obtained.
  • the device for generating the face rotation model further includes:
  • a fourth acquisition module configured to enable the face rotation model to acquire a result position map equal in size to the real position map according to the target feature
  • the extraction module is configured to enable the face rotation model to extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index.
  • the extraction module includes:
  • the establishment sub-module is used to enable the face rotation model to establish a three-dimensional coordinate system in the result position map
  • the fourth determining sub-module is used to make the face rotation model determine the key points corresponding to the fixed sensory area in the result position map according to the preset key point index, and extract them from the three-dimensional coordinate system
  • the three-dimensional coordinate information of each key point, and the three-dimensional coordinate information of each key point is recorded as the three-dimensional position information of each second key point.
  • the device for generating the face rotation model further includes:
  • the rotation module is used to input a face photo into the face rotation model that has been trained, obtain the rotation angle output by the face rotation model, and rotate the face photo according to the rotation angle.
  • the rotation module includes:
  • the second acquisition sub-module is used to extract the target feature of the face photo, input the target feature of the face photo into the face rotation model after training, and obtain the face rotation after training 3D position information of all third key points output by the model;
  • the rotation sub-module is configured to rotate the face photo into the front face photo according to the rotation angle and the three-dimensional position information of the third key point.
  • the device for generating the face rotation model further includes:
  • the second confirmation module is configured to iteratively update the initial parameters of the face rotation model when the loss result is greater than the preset loss value, until the loss result is less than or equal to the preset loss value To confirm that the training of the face rotation model is completed.
  • Each module in the device for generating a face rotation model described above can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 5.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a readable storage medium and an internal memory.
  • the readable storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium.
  • the database of the computer device is used to store the data involved in the generation method of the face rotation model.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a method for generating a face rotation model is realized.
  • the readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
  • Extract the target feature of the face image in the face training picture input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
  • the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points is The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
  • the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model
  • the photo rotation is the required rotation angle for the front face photo.
  • one or more readable storage media storing computer readable instructions are provided.
  • the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage.
  • the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
  • Extract the target feature of the face image in the face training picture input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
  • the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points
  • the three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
  • the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model
  • the photo rotation is the required rotation angle for the front face photo.
  • a person of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be implemented by instructing relevant hardware through computer-readable instructions.
  • the computer-readable instructions can be stored in a non-volatile computer.
  • a readable storage medium or a volatile readable storage medium when the computer readable instruction is executed, it may include the processes of the above-mentioned method embodiments.
  • any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

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

Abstract

A method for generating a face rotation model, an apparatus, a computer device and a storage medium. The method comprises: acquiring a face training image; acquiring a real position map according to three-dimensional face parameters and a preset average face model; extracting target features in the face training image, inputting the target features into a face rotation model, and acquiring three-dimensional position information of all second key points outputted by the face rotation model; using a mask to configure a weight value occupied by three-dimensional position information of each first key point and three-dimensional position information of each second key point in an average error loss function, and inputting the three-dimensional position information of each first key point and the three-dimensional position information of each second key point into the average error loss function to obtain a loss result; and when the loss result is less than or equal to a preset loss value, confirming that a face rotation model is completely trained. By using the described method, the angle of rotation required to rotate a face photograph to be a front-view face photograph can be accurately calculated.

Description

人脸旋转模型的生成方法、装置、计算机设备及存储介质Method, device, computer equipment and storage medium for generating face rotation model
本申请以2019年9月18日提交的申请号为201910882239.9,名称为“人脸旋转模型的生成方法、装置、计算机设备及存储介质”的中国申请专利申请为基础,并要求其优先权。This application is based on the Chinese patent application filed on September 18, 2019, with the application number 201910882239.9 and titled "Generation Method, Device, Computer Equipment and Storage Medium of Face Rotation Model", and claims priority.
技术领域Technical field
本申请涉及模型构建领域,尤其涉及一种人脸旋转模型的生成方法、装置、计算机设备及存储介质。This application relates to the field of model construction, and in particular to a method, device, computer equipment and storage medium for generating a face rotation model.
背景技术Background technique
对于非正面人脸来说,人工智能领域的人脸识别技术还不够成熟,非正面人脸的人脸识别技术也一直是人脸识别领域的难题。在现有人脸识别系统中的非正面人脸的人脸对齐技术,通常只能解决人脸姿态中的roll角的旋正,而对于大角度的yaw角度或者pitch角度直接使用相似变换,如此,对齐后人脸将会产生较大的形变,不利于后续的人脸识别;同时,现有技术中的非正面人脸的人脸对齐也无法获取到人脸的准确三维坐标信息。因此,寻找一种可解决上述问题的技术方案成为本领域技术人员亟解决的问题。For non-frontal faces, the face recognition technology in the field of artificial intelligence is not mature enough, and the face recognition technology for non-frontal faces has always been a problem in the field of face recognition. The face alignment technology of non-frontal faces in the existing face recognition system can usually only solve the rotation of the roll angle in the face pose, and the similar transformation is directly used for the large-angle yaw angle or the pitch angle. In this way, The face will be deformed greatly after the alignment, which is not conducive to subsequent face recognition; at the same time, the face alignment of a non-frontal face in the prior art cannot obtain accurate three-dimensional coordinate information of the face. Therefore, finding a technical solution that can solve the above-mentioned problems has become an urgent problem for those skilled in the art.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种人脸旋转模型的生成方法、装置、计算机设备及存储介质,解决目前不能较精准计算人脸照片旋转为正脸照片所需的旋转角度的问题。Based on this, it is necessary to provide a method, device, computer equipment, and storage medium for generating a face rotation model to solve the above-mentioned technical problems, so as to solve the current problem that the rotation angle required for a face photo to be rotated into a front face photo cannot be calculated more accurately. .
一种人脸旋转模型的生成方法,包括:A method for generating a face rotation model, including:
从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;Obtain face training pictures from the target set; three-dimensional face parameters have been marked in the face training pictures;
获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方 误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points is The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo.
一种人脸旋转模型的生成装置,包括:A device for generating a face rotation model, including:
第一获取模块,用于从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;The first acquisition module is configured to acquire face training pictures from the target set; the face training pictures have already marked three-dimensional face parameters;
第二获取模块,用于获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;The second acquiring module is configured to acquire a preset average face model, and acquire a real position map according to the three-dimensional face parameters and the preset average face model; the real position map contains the same face as the face model. Three-dimensional position information of the front face corresponding to the face image in the training picture and all first key points of the front face;
第三获取模块,用于提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;The third acquisition module is configured to extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain the face rotation model The three-dimensional position information of all the output second key points;
输入模块,用于通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The input module is used to set the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function through a mask, and set each of the The three-dimensional position information of the first key point and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
第一确认模块,用于在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。The first confirmation module is used to confirm that the face rotation model training is completed when the loss result is less than or equal to the preset loss value; the face rotation model is used to input the face photo into the face rotation model , Confirm that the face photo is rotated to the required rotation angle for the front face photo.
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;Obtain face training pictures from the target set; three-dimensional face parameters have been marked in the face training pictures;
获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points is The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo.
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;Obtain face training pictures from the target set; three-dimensional face parameters have been marked in the face training pictures;
获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points is The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo.
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。The details of one or more embodiments of the present application are set forth in the following drawings and description, and other features and advantages of the present application will become apparent from the description, drawings, and claims.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1是本申请一实施例中人脸旋转模型的生成方法的一应用环境示意图;FIG. 1 is a schematic diagram of an application environment of a method for generating a face rotation model in an embodiment of the present application;
图2是本申请一实施例中人脸旋转模型的生成方法的一流程示意图;2 is a schematic flowchart of a method for generating a face rotation model in an embodiment of the present application;
图3是本申请一实施例中人脸旋转模型的生成方法步骤S20的的一流程示意图;3 is a schematic flowchart of step S20 of the method for generating a face rotation model in an embodiment of the present application;
图4是本申请一实施例中人脸旋转模型的生成装置的结构示意图;FIG. 4 is a schematic structural diagram of an apparatus for generating a face rotation model in an embodiment of the present application;
图5是本申请一实施例中计算机设备的一示意图。Fig. 5 is a schematic diagram of a computer device in an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by a person of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请提供的人脸旋转模型的生成方法,可应用在如图1的应用环境中,其中,客户端通过网络与服务器进行通信。其中,客户端可以但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The method for generating a face rotation model provided in this application can be applied in an application environment as shown in FIG. 1, where the client communicates with the server through the network. Among them, the client can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented as an independent server or a server cluster composed of multiple servers.
在一实施例中,如图2所示,提供一种人脸旋转模型的生成方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:In an embodiment, as shown in FIG. 2, a method for generating a face rotation model is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
S10,从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;S10: Obtain a face training picture from a target set; the face training picture has been marked with three-dimensional face parameters;
可理解地,目标集合可以为一个大型公开的人脸数据集合(比如300W-LP公开集,包含了60000张以上的人图片,且每张人脸训练图片都有被标注三维人脸参数,三维人脸参数包括人脸形状参数、人脸表情参数和人脸姿态参数),此时,可以将人脸数据集合中的人脸照片当作为人脸训练照片;人脸训练图片包含了人脸旋转模型建模过程中所需要的43867个人脸顶点(此时人脸顶点对应的三维坐标信息还未被确定出)。Understandably, the target set can be a large public face data set (such as the 300W-LP public set, which contains more than 60,000 human pictures, and each face training picture has annotated three-dimensional face parameters. Face parameters include face shape parameters, facial expression parameters, and face pose parameters). At this time, the face photos in the face data set can be used as face training photos; face training images include face rotation The 43867 face vertices required in the model modeling process (the three-dimensional coordinate information corresponding to the face vertices has not been determined yet).
S20,获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;S20. Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map contains the person in the face training picture The front face corresponding to the face image and the three-dimensional position information of all first key points of the front face;
可理解地,训练成功且开源的3DMM模型中的经典模型Basel Face Model包含了平均人脸模型,且平均人脸模型可以代表一张标准的平均人脸(而该平均人脸模型的数据来源于:从预设数量的普通人脸提取的面部特征,根据对面部特征进行测量,得到各个测量数据,最后根据各个测量数据求取各个平均值,即各个平均值可作为合成平均人脸模型的数据);三维人脸参数可与平均脸模型中的模型参数进行比对;真实位置图为一张标准的正面人脸的图片,此真实位置图与人脸训练图片同等大小,都可为256x256x3(256x256分别代表水平方向和垂直方向的像素),此真实位置图将被作为此次训练过程中的学习目标;三维位置信息指三维坐标系中的三维坐标。Understandably, the classic model Basel Face Model in the successfully trained and open source 3DMM model includes an average face model, and the average face model can represent a standard average face (and the average face model data comes from :Facial features extracted from a preset number of ordinary faces. According to the measurement of facial features, each measurement data is obtained. Finally, each average value is calculated based on each measurement data, that is, each average value can be used as the data of the composite average face model ); The three-dimensional face parameters can be compared with the model parameters in the average face model; the real position map is a standard frontal face picture. The real position map is the same size as the face training picture, and both can be 256x256x3( 256x256 represents pixels in the horizontal and vertical directions respectively), this real position map will be used as the learning target in this training process; the three-dimensional position information refers to the three-dimensional coordinates in the three-dimensional coordinate system.
本实施例得到的真实位置图可以作为人脸旋转模型训练过程中的学习目标,通过该学习目标可以在后续的训练过程调整人脸旋转模型的初始参数,从而可得到一个可计算人脸照片旋转为正脸照片所需的旋转角度的人脸旋转模型。The real position map obtained in this embodiment can be used as a learning target in the training process of the face rotation model. Through the learning target, the initial parameters of the face rotation model can be adjusted in the subsequent training process, so that a computable face photo rotation can be obtained. The face rotation model of the rotation angle required for the front face photo.
进一步地,如图3所示,所述三维人脸参数包括人脸形状参数、人脸表情参数和人脸姿态参数;所述获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图,包括:Further, as shown in FIG. 3, the three-dimensional face parameters include face shape parameters, facial expression parameters, and face pose parameters; the obtaining a preset average face model is based on the three-dimensional face parameters and The preset average face model to obtain the real position map includes:
S201,获取所述预设的平均人脸模型的模型参数和已训练成功的平均人脸形状;所述平均人脸形状是指由预设数量的人脸顶点的三维位置信息构成的形状;所述模型参数包括模型形状参数和模型表情参数;S201. Obtain the model parameters of the preset average face model and the average face shape that has been successfully trained; the average face shape refers to a shape composed of a preset number of three-dimensional position information of face vertices; The model parameters include model shape parameters and model expression parameters;
S202,根据所述人脸形状参数和所述模型形状参数确定所述人脸训练图片中人脸图像的形变;S202: Determine the deformation of the face image in the face training picture according to the face shape parameter and the model shape parameter;
S203,根据所述人脸表情参数和所述模型表情参数确定所述人脸训练图片中人脸图像的表情变化;S203: Determine the expression change of the face image in the face training picture according to the face expression parameter and the model expression parameter;
S204,根据所述平均人脸形状、所述人脸图像的形变和所述人脸图像的表情变化确定所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息;S204: Determine, according to the average face shape, the deformation of the face image, and the expression change of the face image, that the face image corresponds to each of the faces in the preset average face model Three-dimensional position information of vertices;
S205,根据所述人脸姿态参数以及以确定的所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息,将所述人脸训练图片相似变换到正脸位置中,得到所述人脸训练图片中的所述人脸图像对应的所述正面人脸在所述正脸位置的所述真实位置图。S205: According to the face pose parameters and the determined three-dimensional position information of the face image corresponding to each of the face vertices in the preset average face model, the face training pictures are similar Transform to the frontal position to obtain the real position map of the frontal face at the frontal position corresponding to the face image in the face training picture.
可理解地,预设的平均人脸模型的模型参数包括模型形状参数和模型表情参数,模型形状参数和模型表情参数是用来反映平均人脸模型中对应的平均人脸所要呈现的样子和状态,即大都数人的平均人脸的形状应该呈现什么样子(整个面部的轮廓和面部的大小为标准的平均人脸),大多数人的平均人脸的表情应该呈现什么样的状态(面部保持轻微微笑或者面部不笑等);预设的平均人脸模型对应一个平均人脸形状,平均人脸形状是一个整体的人脸形状(包括各个面部感官的形状,比如嘴巴,眼睛和鼻子等),该平均人脸形状上的各个顶点都可以用三维位置信息来进行表示,且平均人脸形状是先由各个人脸顶点和线(人脸顶点与人脸顶点的连线)构成各个二维平面,再由各个二维平面进行整体组装。Understandably, the preset model parameters of the average face model include model shape parameters and model expression parameters. The model shape parameters and model expression parameters are used to reflect the appearance and state of the corresponding average face in the average face model. , That is, what the shape of the average face of most people should look like (the outline of the entire face and the size of the face are the standard average face), and what should the expression of the average face of most people look like (face keeping Slight smile or non-smiling face, etc.); the preset average face model corresponds to an average face shape, and the average face shape is an overall face shape (including the shape of various facial sense organs, such as mouth, eyes and nose, etc.) , Each vertex on the average face shape can be represented by three-dimensional position information, and the average face shape is first composed of each face vertex and line (the line between the face vertex and the face vertex) to form each two-dimensional Plane, and then assembled by each two-dimensional plane.
具体地,预设的平均人脸模型的模型参数可用于来确定人脸训练图片中的三维人脸参数与标准参数之间的差别,首先即通过比对人脸形状参数和模型形状参数之间的差别确定出人脸训练图片中的人脸图像的形变(人脸训练图片中的人脸形状参数可包括多种,比如国字脸和瓜子脸等),通过比对人脸表情参数和模型表情参数确定出人脸图像的表情变化(人脸训练图片中的人脸表情参数可包括多种,比如生气和开心等,表情变化会影响整个人脸中的各个感官的形状)。确定出这两个变化以后,接着可通过平均人脸形状和人脸图像的形变和人脸图像的表情变化确定出人脸训练中人脸图像相对于预设的平均人脸模型中的人脸顶点的三维位置信息,比如,平均人脸形状对应一个不笑的面部表情,即嘴巴的嘴角不会上扬或者伸开,若此时人脸训练图片中的人脸图像对应一个微笑的表情,即嘴巴的嘴角已进行上扬或者伸开,由于平均人脸形状上有预设数量(43867个)的人脸顶点,且每个顶点都有一个对应的三维位置信息,此时可确定出训练图片中的人脸图像已上扬或者伸开所在的人脸顶点,从而可确定出三维位置信息,通过上述例子可确定出人脸图像中各个面部感官对应于预设的平均人脸模型中的人脸顶点的三维位置信息。最后可通过三维人脸参数中的人脸姿态参数(人脸在人脸图像中应该是以正面姿态的形式呈现)和人脸图像对应于预设的平均人脸模型中的各个人脸顶点的三维位置信息确定出人脸训练图片中的人脸图像对应的正面人脸在正脸位置的真实位置图,即通过将人脸训练图片相似变换到正脸位置中,比如,上述例子提到的人脸训练图片的人脸图像并不是在正面位置(即与正面位置存在一定的偏差), 此时可通过相似变换,确定出变换后的第一关键点的三维位置信息(位于真实位置图上),也可得到正面位置的真实位置图。Specifically, the preset model parameters of the average face model can be used to determine the difference between the three-dimensional face parameters in the face training picture and the standard parameters. Firstly, by comparing the face shape parameters with the model shape parameters The difference determines the deformation of the face image in the face training picture (the face shape parameters in the face training picture can include multiple, such as the national character face and the melon face), by comparing the facial expression parameters and the model expression The parameters determine the expression changes of the face image (the facial expression parameters in the face training images can include multiple, such as angry and happy, etc. The expression changes will affect the shape of the various sense organs in the entire face). After determining these two changes, the average face shape and the deformation of the face image and the expression change of the face image can be used to determine the face image in the face training relative to the face in the preset average face model. The three-dimensional position information of the vertex, for example, the average face shape corresponds to a non-smiling facial expression, that is, the corners of the mouth will not rise or stretch out. If the face image in the face training image corresponds to a smiling expression at this time, that is The corners of the mouth have been raised or stretched. Since there are a preset number (43867) of face vertices on the average face shape, and each vertex has a corresponding three-dimensional position information, the training picture can be determined at this time The face vertices where the face image has been raised or stretched, so that the three-dimensional position information can be determined. Through the above example, it can be determined that each facial sensory in the face image corresponds to the face vertices in the preset average face model The three-dimensional location information. Finally, the face pose parameters in the three-dimensional face parameters (the face should be presented in the form of a front pose in the face image) and the face image corresponding to each face vertex in the preset average face model The three-dimensional position information determines the real position map of the frontal face corresponding to the face image in the face training picture at the frontal position, that is, by similarly transforming the face training picture to the frontal position, for example, as mentioned in the above example The face image of the face training picture is not in the front position (that is, there is a certain deviation from the front position). At this time, similar transformation can be used to determine the three-dimensional position information of the transformed first key point (located on the real position map). ), the real position map of the front position can also be obtained.
本实施例中,通过上述方法步骤得到的真实位置图上有准确的第一关键点的三维位置信息,为后续步骤准确计算旋转角度提供了精准的参照。In this embodiment, the real position map obtained by the above method steps has accurate three-dimensional position information of the first key point, which provides an accurate reference for the subsequent steps to accurately calculate the rotation angle.
S30,提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;S30. Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second features output by the face rotation model. Three-dimensional position information of key points;
可理解地,人脸训练图片中包含了要输入至此次包含初始参数的人脸旋转模型的数据,可提取此数据并将其作为人脸图像的目标特征(目标特征还是以图片的形式存在),目标特征可以为构建人脸各个感官区域所需的关键点(比如构建眼睛区域的各个关键点、构建鼻子区域的各个关键点和构建嘴巴区域的各个关键点等等);人脸旋转模型为3DMM模型中的经典模型Basel Face Model。Understandably, the face training image contains the data to be input to the face rotation model that contains the initial parameters. This data can be extracted and used as the target feature of the face image (the target feature still exists in the form of a picture) , The target feature can be the key points needed to construct the various sensory areas of the face (such as constructing the key points of the eye area, constructing the key points of the nose area, and constructing the key points of the mouth area, etc.); the face rotation model is The classic model in the 3DMM model, Basel Face Model.
具体地,在整体网络结构中(看作成一个Stacked Hourglass Network,堆叠沙漏网络结构),输入的目标特征是以图片的形式(与人脸训练图片同等大小)输入至整体网络结构中(目标特征所在的图片在整体结构中各转置卷基层之间会变成不同大小的特征图),在整体网络结构中存在10个残差模块,即首先通过残差模块可加深整体网络结构的深度且又不会出现梯度消失的问题,然后通过整体网络结构中存在的17层转置卷基层,在最后一个转置卷基层将特征图恢复为与人脸训练图片同等大小的结果位置图(整体网络结构输出的为heatmaps集合,即在结果位置图中所有第二关键点的三维位置信息),在整体网络结构中还存在一个loss层(用来设置损失函数)。Specifically, in the overall network structure (think of it as a Stacked Hourglass Network, stacked hourglass network structure), the input target feature is input in the form of a picture (the same size as the face training picture) into the overall network structure (where the target feature is) The pictures in the overall structure will become feature maps of different sizes between the base layers of the transposed rolls), there are 10 residual modules in the overall network structure, that is, the depth of the overall network structure can be deepened and the overall network structure can be deepened by the residual module first. There will be no problem of gradient disappearance, and then through the 17-layer transposed volume base layer existing in the overall network structure, the feature map is restored to the result position map of the same size as the face training image at the last transposed volume base layer (the overall network structure The output is a set of heatmaps, that is, the three-dimensional position information of all the second key points in the result location map), and there is also a loss layer (used to set the loss function) in the overall network structure.
本实施例中,特征提取的作用是为了初步得到更方便于包含初始参数的人脸旋转模型进行运行计算的数据,从而可减少人脸旋转模型中整体网络结构运行过程的复杂性,也可减少运行过程的运行时间;且人脸旋转模型可进一步用来捕捉不同图片大小下目标特征所在图片所包含的深层信息。In this embodiment, the function of feature extraction is to initially obtain data that is more convenient for the operation and calculation of the face rotation model containing the initial parameters, thereby reducing the complexity of the overall network structure operation process in the face rotation model, and also reducing The running time of the running process; and the face rotation model can be further used to capture the deep information contained in the picture where the target feature is located in different picture sizes.
在一实施例中,所述将所述目标特征输入至包含初始参数的人脸旋转模型之后,还包括:In an embodiment, after inputting the target feature into the face rotation model including initial parameters, the method further includes:
令所述人脸旋转模型根据所述目标特征获取与所述真实位置图大小相等的结果位置图;Enabling the face rotation model to obtain a result position map equal in size to the real position map according to the target feature;
令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息。Let the face rotation model extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index.
可理解地,结果位置图是一张与真实位置图、人脸训练图片都是大小相等的图片;预设的关键点可以为正面人脸中的关键点,包括眼睛、鼻子和嘴巴感官区域内的关键点,一个感官区域存在多个关键点。Understandably, the resulting position map is a picture of the same size as the real position map and the face training picture; the preset key points can be the key points in the front face, including the eyes, nose and mouth in the sensory area There are multiple key points in a sensory area.
本实施例中,提取的第二关键点的三维位置信息将被用于与第二关键点的三维位置信息进行比对,从而可计算出此次人脸旋转模型的旋转角度。In this embodiment, the extracted three-dimensional position information of the second key point will be used for comparison with the three-dimensional position information of the second key point, so that the rotation angle of the face rotation model can be calculated.
进一步地,所述令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第 二关键点的三维位置信息,包括:Further, the step of making the face rotation model to extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index includes:
令所述人脸旋转模型在所述结果位置图中建立三维坐标系;Enabling the face rotation model to establish a three-dimensional coordinate system in the result position map;
令所述人脸旋转模型根据所述预设的关键点索引确定所述结果位置图中与固定的感官区域对应的关键点,并从所述三维坐标系中提取各个所述关键点的三维坐标信息,并将各个所述关键点的三维坐标信息记录为各个所述第二关键点的三维位置信息。Make the face rotation model determine the key points corresponding to the fixed sensory area in the result location map according to the preset key point index, and extract the three-dimensional coordinates of each of the key points from the three-dimensional coordinate system And record the three-dimensional coordinate information of each of the key points as the three-dimensional position information of each of the second key points.
具体地,结果位置图位于一个三维坐标系中,即结果位置图中的每个固定的感官区域(眼睛、鼻子和嘴巴所组成的区域),此时通过索引从固定的感官区域中的多个预设的关键点确定出所需的关键点,并提取关键点的三维坐标信息,最后的关键点的三维坐标信息可作为第二关键点的三维位置信息。Specifically, the result location map is located in a three-dimensional coordinate system, that is, each fixed sensory area (the area composed of the eyes, nose, and mouth) in the result location map. At this time, it is indexed from multiple fixed sensory areas. The preset key points determine the required key points, and extract the three-dimensional coordinate information of the key points, and the three-dimensional coordinate information of the last key point can be used as the three-dimensional position information of the second key point.
S40,通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;S40. Set the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function through a mask, and set each of the first key points The three-dimensional position information of the point and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
可理解地,通过掩码(mask)可在均方误差损失函数中数值部分设置各第一关键点的三维位置信息以及各第二关键点的三维位置信息在均方误差损失函数中所占的权重值,即设置第一关键点和第二关键点在均方误差损失函数中所占的权重值,且设置的第一关键点和第二关键点应该为对同一个感官区域对应的关键点(比如第一关键点为眼睛所在的区域,即第二关键点也为眼睛所在的区域),且感官区域有眼睛、鼻子、嘴巴所在的区域(而这三个区域中一共有68个关键点组成,即第一关键点必须大于或等于68个,第二关键点必须大于或等于68个)和其它人脸区域,此时,眼睛、鼻子、嘴巴所在的区域和其它人脸区域在均方误差损失函数中所占的权重值的比值设置为16:4:3:0。Understandably, the three-dimensional position information of each first key point and the amount of the three-dimensional position information of each second key point in the mean square error loss function can be set in the numerical part of the mean square error loss function through the mask. Weight value, that is, set the weight value of the first key point and the second key point in the mean square error loss function, and the set first key point and second key point should be the key points corresponding to the same sensory area (For example, the first key point is the area where the eyes are located, that is, the second key point is also the area where the eyes are located), and the sensory area includes areas where the eyes, nose, and mouth are located (and there are a total of 68 key points in these three areas Composition, that is, the first key point must be greater than or equal to 68, and the second key point must be greater than or equal to 68) and other face areas. At this time, the areas where the eyes, nose, mouth and other face areas are in the mean square The ratio of the weight value in the error loss function is set to 16:4:3:0.
均方误差损失函数为
Figure PCTCN2019117299-appb-000001
其中,n为第一关键点的数量或第二关键点的数量,y i为第i个第二关键点的三维位置信息所构成的一组向量,y’ i为第i个第一关键点的三维位置信息所构成的一组向量。
The mean square error loss function is
Figure PCTCN2019117299-appb-000001
Wherein, n is the number of key or the second key point of the first point, y i is the i-th vector set of three-dimensional position information of the second key is constituted, y 'i is the i th first key A set of vectors composed of three-dimensional position information.
本实施例中通过在均方误差损失函数计算损失结果,可以在后续步骤中与预设损失值进行比较,从而对人脸旋转模型进行相应的优化;且本实施例中通过掩码设置各第一关键点的三维位置信息以及各第二关键点的三维位置信息在均方误差损失函数中所占的权重值,有利于人脸旋转模型学习到更精准的真实位置图。In this embodiment, by calculating the loss result in the mean square error loss function, it can be compared with the preset loss value in the subsequent steps, so as to optimize the face rotation model accordingly; and in this embodiment, the masks are used to set each The weight value of the three-dimensional position information of a key point and the three-dimensional position information of each second key point in the mean square error loss function is helpful for the face rotation model to learn a more accurate real position map.
S50,在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。S50: When the loss result is less than or equal to a preset loss value, confirm that the face rotation model training is completed; the face rotation model is used to confirm that the face photo is input into the face rotation model. The face photo is rotated to the required rotation angle for the front face photo.
可理解地,当损失结果小于或等于预设损失值时,则可以说明人脸旋转模型回归训练过程已接近训练目标,此时,可确定人脸旋转模型训练完成。Understandably, when the loss result is less than or equal to the preset loss value, it can indicate that the face rotation model regression training process is close to the training target. At this time, it can be determined that the face rotation model training is completed.
进一步地,所述步骤S40之后,还包括:Further, after the step S40, it further includes:
在所述损失结果大于所述预设损失值时,迭代更新所述人脸旋转模型的所述初始参数,直至所述损失结果小于或等于所述预设损失值时,确认所述人脸旋转模型训练完成。When the loss result is greater than the preset loss value, iteratively update the initial parameters of the face rotation model until the loss result is less than or equal to the preset loss value, confirm the face rotation The model training is complete.
可理解地,当损失结果大于预设损失值,则可以说明人脸旋转模型的初始参数并不适合于此次训练过程,因此需不断更新人脸旋转模型的初始参数直至于满足于条件适合于此次训练过程。Understandably, when the loss result is greater than the preset loss value, it can indicate that the initial parameters of the face rotation model are not suitable for this training process. Therefore, it is necessary to continuously update the initial parameters of the face rotation model until the condition is suitable for This training process.
进一步地,所述步骤S50之后,还包括:Further, after the step S50, it further includes:
在训练完成的所述人脸旋转模型中输入人脸照片,获取所述人脸旋转模型输出的所述旋转角度,并根据所述旋转角度将所述人脸照片旋转为所述正脸照片;所述旋转角度是指将所述人脸照片旋转为正脸照片所需的旋转角度。Input a face photo into the trained face rotation model, obtain the rotation angle output by the face rotation model, and rotate the face photo into the frontal photo according to the rotation angle; The rotation angle refers to a rotation angle required to rotate the face photo into a front face photo.
可理解地,此实施例是对人脸旋转模型的应用,一旦人脸旋转模型输出的旋转角度的数值不为0,就需要对旋转角度进行旋转(可在原先训练过程中的人脸旋转模型先设置好旋转方向代表的正负数值,即顺时针为正数值,逆时针为负数值)。且在旋转过程中,人脸照片与正面照片在预设的形变范围内可接受一定的角度偏差(比如0.5度内等)。Understandably, this embodiment is an application of the face rotation model. Once the value of the rotation angle output by the face rotation model is not 0, the rotation angle needs to be rotated (the face rotation model can be used in the original training process). First set the positive and negative values represented by the rotation direction, that is, clockwise is a positive value, and counterclockwise is a negative value). And during the rotation process, the face photo and the front photo can accept a certain angle deviation (for example, within 0.5 degrees, etc.) within the preset deformation range.
在一实施例中,所述根据所述旋转角度将所述人脸照片旋转为所述正脸照片,包括:提取所述人脸照片的目标特征,将所述人脸照片的目标特征输入至训练完成的所述人脸旋转模型中,并获取训练完成的所述人脸旋转模型输出的所有第三关键点的三维位置信息;根据所述旋转角度和所述第三关键点的三维位置信息将所述人脸照片旋转为所述正脸照片。In an embodiment, the rotating the face photo into the front face photo according to the rotation angle includes: extracting the target feature of the face photo, and inputting the target feature of the face photo to In the trained face rotation model, and obtain the three-dimensional position information of all third key points output by the trained face rotation model; according to the rotation angle and the three-dimensional position information of the third key point Rotate the face photo into the front face photo.
综上所述,上述提供了一种人脸旋转模型的生成方法,从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。本申请通过上述训练过程生成一个人脸旋转模型,来对输入至人脸旋转模型的每张人脸照片进行精准和高效率的识别,从而能精准和高效率计算出人脸照片旋转为正脸照片所需的旋转角度。In summary, the foregoing provides a method for generating a face rotation model, which obtains face training images from a target set; the face training images have been marked with three-dimensional face parameters; and a preset average face model is obtained , Obtaining a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the frontal face corresponding to the face image in the face training picture and the The three-dimensional position information of all the first key points of the frontal face; extract the target feature of the face image in the face training picture, input the target feature into the face rotation model containing initial parameters, and Obtain the three-dimensional position information of all the second key points output by the face rotation model; set the three-dimensional position information of each of the first key points and the three-dimensional position information of each of the second key points in the mean square error The weight value occupied in the loss function, and input the three-dimensional position information of each of the first key points and the three-dimensional position information of each of the second key points into the mean square error loss function to obtain a loss result; When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo. This application generates a face rotation model through the above training process to accurately and efficiently recognize each face photo input to the face rotation model, so as to accurately and efficiently calculate the face photo rotation as a positive face The desired rotation angle of the photo.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以 其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
在一实施例中,提供一种人脸旋转模型的生成装置,该人脸旋转模型的生成装置与上述实施例中人脸旋转模型的生成方法一一对应。如图4所示,该人脸旋转模型的生成装置包括第一获取模块11、第二获取模块12、第三获取模块13、输入模块14和第一确认模块15。各功能模块详细说明如下:In one embodiment, a device for generating a face rotation model is provided, and the device for generating a face rotation model corresponds to the method for generating a face rotation model in the above-mentioned embodiment in a one-to-one correspondence. As shown in FIG. 4, the device for generating the face rotation model includes a first acquisition module 11, a second acquisition module 12, a third acquisition module 13, an input module 14 and a first confirmation module 15. The detailed description of each functional module is as follows:
第一获取模块11,用于从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;The first obtaining module 11 is configured to obtain face training pictures from a target set; the face training pictures have already marked three-dimensional face parameters;
第二获取模块12,用于获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;The second acquiring module 12 is configured to acquire a preset average face model, and acquire a real position map according to the three-dimensional face parameters and the preset average face model; the real position map contains the same as the person The three-dimensional position information of the front face corresponding to the face image in the face training picture and all first key points of the front face;
第三获取模块13,用于提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;The third acquisition module 13 is configured to extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain the face rotation 3D position information of all second key points output by the model;
输入模块14,用于通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The input module 14 is configured to set the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function through a mask, and set Inputting the three-dimensional position information of the first key point and the three-dimensional position information of each of the second key points into the mean square error loss function to obtain a loss result;
第一确认模块15,用于在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。The first confirmation module 15 is used to confirm that the face rotation model training is completed when the loss result is less than or equal to the preset loss value; the face rotation model is used to input a face photo into the face rotation When modeling, confirm that the face photo is rotated to the required rotation angle for the front face photo.
进一步地,所述第二获取模块包括:Further, the second acquisition module includes:
第一获取子模块,用于获取所述预设的平均人脸模型的模型参数和已训练成功的平均人脸形状;所述平均人脸形状是指由预设数量的人脸顶点的三维位置信息构成的形状;所述模型参数包括模型形状参数和模型表情参数;The first acquisition sub-module is used to acquire the model parameters of the preset average face model and the average face shape that has been successfully trained; the average face shape refers to the three-dimensional position of a preset number of face vertices The shape formed by information; the model parameters include model shape parameters and model expression parameters;
第一确定子模块,用于根据所述人脸形状参数和所述模型形状参数确定所述人脸训练图片中人脸图像的形变;The first determining sub-module is configured to determine the deformation of the face image in the face training picture according to the face shape parameter and the model shape parameter;
第二确定子模块,用于根据所述人脸表情参数和所述模型表情参数确定所述人脸训练图片中人脸图像的表情变化;The second determining submodule is configured to determine the facial expression change of the facial image in the facial training picture according to the facial facial expression parameters and the model facial expression parameters;
第三确定子模块,用于根据所述平均人脸形状、所述人脸图像的形变和所述人脸图像的表情变化确定所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息;The third determining sub-module is configured to determine that the face image corresponds to the preset average face model according to the average face shape, the deformation of the face image, and the expression change of the face image The three-dimensional position information of each of the face vertices;
变换子模块,用于根据所述人脸姿态参数以及以确定的所述人脸图像对应于所述预设的平均人脸 模型中的各个所述人脸顶点的三维位置信息,将所述人脸训练图片相似变换到正脸位置中,得到所述人脸训练图片中的所述人脸图像对应的所述正面人脸在所述正脸位置的所述真实位置图。The transformation sub-module is configured to convert the person according to the face pose parameters and the determined three-dimensional position information of the face image corresponding to each of the face vertices in the preset average face model The face training picture is similarly transformed into the front face position, and the real position map of the front face corresponding to the face image in the face training picture at the front face position is obtained.
进一步地,所述人脸旋转模型的生成装置还包括:Further, the device for generating the face rotation model further includes:
第四获取模块,用于令所述人脸旋转模型根据所述目标特征获取与所述真实位置图大小相等的结果位置图;A fourth acquisition module, configured to enable the face rotation model to acquire a result position map equal in size to the real position map according to the target feature;
提取模块,用于令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息。The extraction module is configured to enable the face rotation model to extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index.
进一步地,所述提取模块包括:Further, the extraction module includes:
建立子模块,用于令所述人脸旋转模型在所述结果位置图中建立三维坐标系;The establishment sub-module is used to enable the face rotation model to establish a three-dimensional coordinate system in the result position map;
第四确定子模块,用于令所述人脸旋转模型根据所述预设的关键点索引确定所述结果位置图中与固定的感官区域对应的关键点,并从所述三维坐标系中提取各个所述关键点的三维坐标信息,并将各个所述关键点的三维坐标信息记录为各个所述第二关键点的三维位置信息。The fourth determining sub-module is used to make the face rotation model determine the key points corresponding to the fixed sensory area in the result position map according to the preset key point index, and extract them from the three-dimensional coordinate system The three-dimensional coordinate information of each key point, and the three-dimensional coordinate information of each key point is recorded as the three-dimensional position information of each second key point.
进一步地,所述人脸旋转模型的生成装置还包括:Further, the device for generating the face rotation model further includes:
旋转模块,用于在训练完成的所述人脸旋转模型中输入人脸照片,获取所述人脸旋转模型输出的所述旋转角度,并根据所述旋转角度将所述人脸照片旋转为所述正脸照片;所述旋转角度是指将所述人脸照片旋转为正脸照片所需的旋转角度。The rotation module is used to input a face photo into the face rotation model that has been trained, obtain the rotation angle output by the face rotation model, and rotate the face photo according to the rotation angle. The front face photo; the rotation angle refers to the rotation angle required to rotate the face photo into a front face photo.
进一步地,所述旋转模块包括:Further, the rotation module includes:
第二获取子模块,用于提取所述人脸照片的目标特征,将所述人脸照片的目标特征输入至训练完成的所述人脸旋转模型中,并获取训练完成的所述人脸旋转模型输出的所有第三关键点的三维位置信息;The second acquisition sub-module is used to extract the target feature of the face photo, input the target feature of the face photo into the face rotation model after training, and obtain the face rotation after training 3D position information of all third key points output by the model;
旋转子模块,用于根据所述旋转角度和所述第三关键点的三维位置信息将所述人脸照片旋转为所述正脸照片。The rotation sub-module is configured to rotate the face photo into the front face photo according to the rotation angle and the three-dimensional position information of the third key point.
进一步地,所述人脸旋转模型的生成装置还包括:Further, the device for generating the face rotation model further includes:
第二确认模块,用于在所述损失结果大于所述预设损失值时,迭代更新所述人脸旋转模型的所述初始参数,直至所述损失结果小于或等于所述预设损失值时,确认所述人脸旋转模型训练完成。The second confirmation module is configured to iteratively update the initial parameters of the face rotation model when the loss result is greater than the preset loss value, until the loss result is less than or equal to the preset loss value To confirm that the training of the face rotation model is completed.
关于人脸旋转模型的生成装置的具体限定可以参见上文中对于人脸旋转模型的生成方法的限定,在此不再赘述。上述人脸旋转模型的生成装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the generation device of the face rotation model, please refer to the above limitation on the generation method of the face rotation model, which will not be repeated here. Each module in the device for generating a face rotation model described above can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图5所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括可读存储介质、内存储器。该可读存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为可读存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储人脸旋转模型的生成方法中涉及到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种人脸旋转模型的生成方法。本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 5. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium. The database of the computer device is used to store the data involved in the generation method of the face rotation model. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a method for generating a face rotation model is realized. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现如下步骤:In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;Obtain face training pictures from the target set; three-dimensional face parameters have been marked in the face training pictures;
获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points is The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo.
在一个实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质,该可读存储介质上存储有计算机可读指令,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现以下步骤:In one embodiment, one or more readable storage media storing computer readable instructions are provided. The readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage. A medium in which computer-readable instructions are stored on the readable storage medium, and when the computer-readable instructions are executed by one or more processors, the one or more processors implement the following steps:
从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;Obtain face training pictures from the target set; three-dimensional face parameters have been marked in the face training pictures;
获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质或易失性可读存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be implemented by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile computer. In a readable storage medium or a volatile readable storage medium, when the computer readable instruction is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as required. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种人脸旋转模型的生成方法,其特征在于,包括:A method for generating a face rotation model, which is characterized in that it includes:
    从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;Obtain face training pictures from the target set; three-dimensional face parameters have been marked in the face training pictures;
    获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
    提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
    通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
    在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo.
  2. 根据权利要求1所述的人脸旋转模型的生成方法,其特征在于,所述三维人脸参数包括人脸形状参数、人脸表情参数和人脸姿态参数;所述获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图,包括:The method for generating a face rotation model according to claim 1, wherein the three-dimensional face parameters include face shape parameters, face expression parameters, and face pose parameters; and said obtaining a preset average face The model, which obtains a real position map according to the three-dimensional face parameters and the preset average face model, includes:
    获取所述预设的平均人脸模型的模型参数和已训练成功的平均人脸形状;所述平均人脸形状是指由预设数量的人脸顶点的三维位置信息构成的形状;所述模型参数包括模型形状参数和模型表情参数;Obtain the model parameters of the preset average face model and the average face shape that has been successfully trained; the average face shape refers to a shape composed of a preset number of three-dimensional position information of face vertices; the model Parameters include model shape parameters and model expression parameters;
    根据所述人脸形状参数和所述模型形状参数确定所述人脸训练图片中人脸图像的形变;Determining the deformation of the face image in the face training picture according to the face shape parameter and the model shape parameter;
    根据所述人脸表情参数和所述模型表情参数确定所述人脸训练图片中人脸图像的表情变化;Determining the facial expression change of the facial image in the facial training picture according to the facial expression parameters and the model facial expression parameters;
    根据所述平均人脸形状、所述人脸图像的形变和所述人脸图像的表情变化确定所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息;According to the average face shape, the deformation of the face image, and the expression change of the face image, it is determined that the face image corresponds to each of the face vertices in the preset average face model. Three-dimensional position information;
    根据所述人脸姿态参数以及以确定的所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息,将所述人脸训练图片相似变换到正脸位置中,得到所述人脸训练图片中的所述人脸图像对应的所述正面人脸在所述正脸位置的所述真实位置图。According to the face pose parameters and the determined three-dimensional position information of the face image corresponding to each of the face vertices in the preset average face model, the face training image is similarly transformed to In the front face position, the real position map of the front face corresponding to the face image in the face training picture at the front face position is obtained.
  3. 根据权利要求1所述的人脸旋转模型的生成方法,其特征在于,所述将所述目标特征输入至包含初始参数的人脸旋转模型之后,还包括:The method for generating a face rotation model according to claim 1, wherein after inputting the target feature into the face rotation model containing initial parameters, the method further comprises:
    令所述人脸旋转模型根据所述目标特征获取与所述真实位置图大小相等的结果位置图;Enabling the face rotation model to obtain a result position map equal in size to the real position map according to the target feature;
    令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息。Let the face rotation model extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index.
  4. 根据权利要求3所述的人脸旋转模型的生成方法,其特征在于,所述令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息,包括:The method for generating a face rotation model according to claim 3, wherein said making said face rotation model extracts all said second key points from said result position map according to a preset key point index The three-dimensional location information, including:
    令所述人脸旋转模型在所述结果位置图中建立三维坐标系;Enabling the face rotation model to establish a three-dimensional coordinate system in the result position map;
    令所述人脸旋转模型根据所述预设的关键点索引确定所述结果位置图中与固定的感官区域对应的关键点,并从所述三维坐标系中提取各个所述关键点的三维坐标信息,并将各个所述关键点的三维坐标信息记录为各个所述第二关键点的三维位置信息。Make the face rotation model determine the key points corresponding to the fixed sensory area in the result location map according to the preset key point index, and extract the three-dimensional coordinates of each of the key points from the three-dimensional coordinate system And record the three-dimensional coordinate information of each of the key points as the three-dimensional position information of each of the second key points.
  5. 根据权利要求1所述的人脸旋转模型的生成方法,其特征在于,所述在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成之后,还包括:The method for generating a face rotation model according to claim 1, wherein when the loss result is less than or equal to a preset loss value, after confirming that the training of the face rotation model is completed, the method further comprises:
    在训练完成的所述人脸旋转模型中输入人脸照片,获取所述人脸旋转模型输出的所述旋转角度,并根据所述旋转角度将所述人脸照片旋转为所述正脸照片;所述旋转角度是指将所述人脸照片旋转为正脸照片所需的旋转角度。Input a face photo into the trained face rotation model, obtain the rotation angle output by the face rotation model, and rotate the face photo into the frontal photo according to the rotation angle; The rotation angle refers to a rotation angle required to rotate the face photo into a front face photo.
  6. 根据权利要求5所述的人脸旋转模型的生成方法,其特征在于,所述根据所述旋转角度将所述人脸照片旋转为所述正脸照片,包括:The method for generating a face rotation model according to claim 5, wherein the rotating the face photo into the front face photo according to the rotation angle comprises:
    提取所述人脸照片的目标特征,将所述人脸照片的目标特征输入至训练完成的所述人脸旋转模型中,并获取训练完成的所述人脸旋转模型输出的所有第三关键点的三维位置信息;Extract the target feature of the face photo, input the target feature of the face photo into the trained face rotation model, and obtain all third key points output by the trained face rotation model 3D location information;
    根据所述旋转角度和所述第三关键点的三维位置信息将所述人脸照片旋转为所述正脸照片。Rotating the face photo into the front face photo according to the rotation angle and the three-dimensional position information of the third key point.
  7. 根据权利要求1所述的人脸旋转模型的生成方法,其特征在于,所述得到一个损失结果之后,还包括:The method for generating a face rotation model according to claim 1, wherein after obtaining a loss result, the method further comprises:
    在所述损失结果大于所述预设损失值时,迭代更新所述人脸旋转模型的所述初始参数,直至所述损失结果小于或等于所述预设损失值时,确认所述人脸旋转模型训练完成。When the loss result is greater than the preset loss value, iteratively update the initial parameters of the face rotation model until the loss result is less than or equal to the preset loss value, confirm the face rotation The model training is complete.
  8. 一种人脸旋转模型的生成装置,其特征在于,包括:A device for generating a face rotation model, which is characterized in that it comprises:
    第一获取模块,用于从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;The first acquisition module is configured to acquire face training pictures from the target set; the face training pictures have already marked three-dimensional face parameters;
    第二获取模块,用于获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;The second acquiring module is configured to acquire a preset average face model, and acquire a real position map according to the three-dimensional face parameters and the preset average face model; the real position map contains the same face as the face model. Three-dimensional position information of the front face corresponding to the face image in the training picture and all first key points of the front face;
    第三获取模块,用于提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;The third acquisition module is configured to extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain the face rotation model The three-dimensional position information of all the output second key points;
    输入模块,用于通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The input module is used to set the three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function through a mask, and set each of the The three-dimensional position information of the first key point and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
    第一确认模块,用于在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成; 所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。The first confirmation module is used to confirm that the face rotation model training is completed when the loss result is less than or equal to the preset loss value; the face rotation model is used to input the face photo into the face rotation model , Confirm that the face photo is rotated to the required rotation angle for the front face photo.
  9. 如权利要求8所述的一种人脸旋转模型的生成装置,其特征在于,所述第二获取模块包括:8. The device for generating a face rotation model according to claim 8, wherein the second acquisition module comprises:
    第一获取子模块,用于获取所述预设的平均人脸模型的模型参数和已训练成功的平均人脸形状;所述平均人脸形状是指由预设数量的人脸顶点的三维位置信息构成的形状;所述模型参数包括模型形状参数和模型表情参数;The first acquisition sub-module is used to acquire the model parameters of the preset average face model and the average face shape that has been successfully trained; the average face shape refers to the three-dimensional position of a preset number of face vertices The shape formed by information; the model parameters include model shape parameters and model expression parameters;
    第一确定子模块,用于根据所述人脸形状参数和所述模型形状参数确定所述人脸训练图片中人脸图像的形变;The first determining sub-module is configured to determine the deformation of the face image in the face training picture according to the face shape parameter and the model shape parameter;
    第二确定子模块,用于根据所述人脸表情参数和所述模型表情参数确定所述人脸训练图片中人脸图像的表情变化;The second determining submodule is configured to determine the facial expression change of the facial image in the facial training picture according to the facial facial expression parameters and the model facial expression parameters;
    第三确定子模块,用于根据所述平均人脸形状、所述人脸图像的形变和所述人脸图像的表情变化确定所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息;The third determining sub-module is configured to determine that the face image corresponds to the preset average face model according to the average face shape, the deformation of the face image, and the expression change of the face image The three-dimensional position information of each of the face vertices;
    变换子模块,用于根据所述人脸姿态参数以及以确定的所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息,将所述人脸训练图片相似变换到正脸位置中,得到所述人脸训练图片中的所述人脸图像对应的所述正面人脸在所述正脸位置的所述真实位置图。The transformation sub-module is configured to convert the person according to the face pose parameters and the determined three-dimensional position information of the face image corresponding to each of the face vertices in the preset average face model The face training picture is similarly transformed into the front face position, and the real position map of the front face corresponding to the face image in the face training picture at the front face position is obtained.
  10. 如权利要求8所述的一种人脸旋转模型的生成装置,其特征在于,所述人脸旋转模型的生成装置还包括:The device for generating a face rotation model according to claim 8, wherein the device for generating a face rotation model further comprises:
    第四获取模块,用于令所述人脸旋转模型根据所述目标特征获取与所述真实位置图大小相等的结果位置图;A fourth acquisition module, configured to enable the face rotation model to acquire a result position map equal in size to the real position map according to the target feature;
    提取模块,用于令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息。The extraction module is configured to enable the face rotation model to extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index.
  11. 如权利要求10所述的一种人脸旋转模型的生成装置,其特征在于,所述提取模块包括:The device for generating a face rotation model according to claim 10, wherein the extraction module comprises:
    建立子模块,用于令所述人脸旋转模型在所述结果位置图中建立三维坐标系;The establishment sub-module is used to enable the face rotation model to establish a three-dimensional coordinate system in the result position map;
    第四确定子模块,用于令所述人脸旋转模型根据所述预设的关键点索引确定所述结果位置图中与固定的感官区域对应的关键点,并从所述三维坐标系中提取各个所述关键点的三维坐标信息,并将各个所述关键点的三维坐标信息记录为各个所述第二关键点的三维位置信息。The fourth determining sub-module is used to make the face rotation model determine the key points corresponding to the fixed sensory area in the result position map according to the preset key point index, and extract them from the three-dimensional coordinate system The three-dimensional coordinate information of each key point, and the three-dimensional coordinate information of each key point is recorded as the three-dimensional position information of each second key point.
  12. 如权利要求10所述的一种人脸旋转模型的生成装置,其特征在于,所述人脸旋转模型的生成装置还包括:The device for generating a face rotation model according to claim 10, wherein the device for generating a face rotation model further comprises:
    旋转模块,用于在训练完成的所述人脸旋转模型中输入人脸照片,获取所述人脸旋转模型输出的所述旋转角度,并根据所述旋转角度将所述人脸照片旋转为所述正脸照片;所述旋转角度是指将所述人脸照片旋转为正脸照片所需的旋转角度。The rotation module is used to input a face photo into the face rotation model that has been trained, obtain the rotation angle output by the face rotation model, and rotate the face photo according to the rotation angle. The front face photo; the rotation angle refers to the rotation angle required to rotate the face photo into a front face photo.
  13. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, wherein the processor executes the computer-readable instructions as follows step:
    从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;Obtain face training pictures from the target set; three-dimensional face parameters have been marked in the face training pictures;
    获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
    提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
    通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
    在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo.
  14. 如权利要求13所述的计算机设备,其特征在于,所述三维人脸参数包括人脸形状参数、人脸表情参数和人脸姿态参数;所述获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图,包括:The computer device according to claim 13, wherein the three-dimensional face parameters include face shape parameters, face expression parameters, and face pose parameters; said acquiring a preset average face model is based on said The three-dimensional face parameters and the preset average face model to obtain the real position map include:
    获取所述预设的平均人脸模型的模型参数和已训练成功的平均人脸形状;所述平均人脸形状是指由预设数量的人脸顶点的三维位置信息构成的形状;所述模型参数包括模型形状参数和模型表情参数;Obtain the model parameters of the preset average face model and the average face shape that has been successfully trained; the average face shape refers to a shape composed of a preset number of three-dimensional position information of face vertices; the model Parameters include model shape parameters and model expression parameters;
    根据所述人脸形状参数和所述模型形状参数确定所述人脸训练图片中人脸图像的形变;Determining the deformation of the face image in the face training picture according to the face shape parameter and the model shape parameter;
    根据所述人脸表情参数和所述模型表情参数确定所述人脸训练图片中人脸图像的表情变化;Determining the facial expression change of the facial image in the facial training picture according to the facial expression parameters and the model facial expression parameters;
    根据所述平均人脸形状、所述人脸图像的形变和所述人脸图像的表情变化确定所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息;According to the average face shape, the deformation of the face image, and the expression change of the face image, it is determined that the face image corresponds to each of the face vertices in the preset average face model. Three-dimensional position information;
    根据所述人脸姿态参数以及以确定的所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息,将所述人脸训练图片相似变换到正脸位置中,得到所述人脸训练图片中的所述人脸图像对应的所述正面人脸在所述正脸位置的所述真实位置图。According to the face pose parameters and the determined three-dimensional position information of the face image corresponding to each of the face vertices in the preset average face model, the face training image is similarly transformed to In the front face position, the real position map of the front face corresponding to the face image in the face training picture at the front face position is obtained.
  15. 如权利要求13所述的计算机设备,其特征在于,所述将所述目标特征输入至包含初始参数的人脸旋转模型之后,所述处理器执行所述计算机可读指令时还实现如下步骤:The computer device according to claim 13, wherein after the target feature is input to the face rotation model including initial parameters, the processor further implements the following steps when executing the computer readable instruction:
    令所述人脸旋转模型根据所述目标特征获取与所述真实位置图大小相等的结果位置图;Enabling the face rotation model to obtain a result position map equal in size to the real position map according to the target feature;
    令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息。Let the face rotation model extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index.
  16. 如权利要求15所述的计算机设备,其特征在于,所述令所述人脸旋转模型根据预设的关键 点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息,包括:15. The computer device according to claim 15, wherein said making said face rotation model extracts three-dimensional position information of all said second key points from said result position map according to a preset key point index, include:
    令所述人脸旋转模型在所述结果位置图中建立三维坐标系;Enabling the face rotation model to establish a three-dimensional coordinate system in the result position map;
    令所述人脸旋转模型根据所述预设的关键点索引确定所述结果位置图中与固定的感官区域对应的关键点,并从所述三维坐标系中提取各个所述关键点的三维坐标信息,并将各个所述关键点的三维坐标信息记录为各个所述第二关键点的三维位置信息。Make the face rotation model determine the key points corresponding to the fixed sensory area in the result location map according to the preset key point index, and extract the three-dimensional coordinates of each of the key points from the three-dimensional coordinate system And record the three-dimensional coordinate information of each of the key points as the three-dimensional position information of each of the second key points.
  17. 一个或多个存储有计算机可读指令的可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more readable storage media storing computer readable instructions, wherein when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
    从目标集合中获取人脸训练图片;所述人脸训练图片中已标注三维人脸参数;Obtain face training pictures from the target set; three-dimensional face parameters have been marked in the face training pictures;
    获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图;所述真实位置图中包含与所述人脸训练图片中的人脸图像对应的正面人脸以及所述正面人脸的所有第一关键点的三维位置信息;Obtain a preset average face model, and obtain a real position map according to the three-dimensional face parameters and the preset average face model; the real position map includes the face image in the face training picture The corresponding front face and the three-dimensional position information of all first key points of the front face;
    提取所述人脸训练图片中的所述人脸图像的目标特征,将所述目标特征输入至包含初始参数的人脸旋转模型中,并获取所述人脸旋转模型输出的所有第二关键点的三维位置信息;Extract the target feature of the face image in the face training picture, input the target feature into a face rotation model containing initial parameters, and obtain all second key points output by the face rotation model 3D location information;
    通过掩码设置各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息在均方误差损失函数中所占的权重值,并将各所述第一关键点的三维位置信息以及各所述第二关键点的三维位置信息输入至所述均方误差损失函数中,得到一个损失结果;The three-dimensional position information of each of the first key points and the weight value of the three-dimensional position information of each of the second key points in the mean square error loss function are set through a mask, and the value of each of the first key points The three-dimensional position information and the three-dimensional position information of each of the second key points are input into the mean square error loss function to obtain a loss result;
    在所述损失结果小于或等于预设损失值时,确认所述人脸旋转模型训练完成;所述人脸旋转模型用于在将人脸照片输入该人脸旋转模型时,确认将该人脸照片旋转为正脸照片所需的旋转角度。When the loss result is less than or equal to the preset loss value, it is confirmed that the face rotation model training is completed; the face rotation model is used to confirm the face when the face photo is input into the face rotation model The photo rotation is the required rotation angle for the front face photo.
  18. 如权利要求17所述的可读存储介质,其特征在于,所述三维人脸参数包括人脸形状参数、人脸表情参数和人脸姿态参数;所述获取预设的平均人脸模型,根据所述三维人脸参数以及所述预设的平均人脸模型获取真实位置图,包括:The readable storage medium according to claim 17, wherein the three-dimensional face parameters include face shape parameters, face expression parameters, and face pose parameters; said obtaining a preset average face model is based on The three-dimensional face parameters and the preset average face model to obtain a real position map includes:
    获取所述预设的平均人脸模型的模型参数和已训练成功的平均人脸形状;所述平均人脸形状是指由预设数量的人脸顶点的三维位置信息构成的形状;所述模型参数包括模型形状参数和模型表情参数;Obtain the model parameters of the preset average face model and the average face shape that has been successfully trained; the average face shape refers to a shape composed of a preset number of three-dimensional position information of face vertices; the model Parameters include model shape parameters and model expression parameters;
    根据所述人脸形状参数和所述模型形状参数确定所述人脸训练图片中人脸图像的形变;Determining the deformation of the face image in the face training picture according to the face shape parameter and the model shape parameter;
    根据所述人脸表情参数和所述模型表情参数确定所述人脸训练图片中人脸图像的表情变化;Determining the facial expression change of the facial image in the facial training picture according to the facial expression parameters and the model facial expression parameters;
    根据所述平均人脸形状、所述人脸图像的形变和所述人脸图像的表情变化确定所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息;According to the average face shape, the deformation of the face image, and the expression change of the face image, it is determined that the face image corresponds to each of the face vertices in the preset average face model. Three-dimensional position information;
    根据所述人脸姿态参数以及以确定的所述人脸图像对应于所述预设的平均人脸模型中的各个所述人脸顶点的三维位置信息,将所述人脸训练图片相似变换到正脸位置中,得到所述人脸训练图片中的所述人脸图像对应的所述正面人脸在所述正脸位置的所述真实位置图。According to the face pose parameters and the determined three-dimensional position information of the face image corresponding to each of the face vertices in the preset average face model, the face training image is similarly transformed to In the front face position, the real position map of the front face corresponding to the face image in the face training picture at the front face position is obtained.
  19. 如权利要求17所述的可读存储介质,其特征在于,所述将所述目标特征输入至包含初始参 数的人脸旋转模型之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:The readable storage medium of claim 17, wherein after the target feature is input to the face rotation model containing initial parameters, when the computer-readable instructions are executed by one or more processors , So that the one or more processors further execute the following steps:
    令所述人脸旋转模型根据所述目标特征获取与所述真实位置图大小相等的结果位置图;Enabling the face rotation model to obtain a result position map equal in size to the real position map according to the target feature;
    令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息。Let the face rotation model extract the three-dimensional position information of all the second key points from the result position map according to a preset key point index.
  20. 如权利要求19所述的可读存储介质,其特征在于,所述令所述人脸旋转模型根据预设的关键点索引自所述结果位置图中提取所有所述第二关键点的三维位置信息,包括:The readable storage medium of claim 19, wherein the face rotation model extracts the three-dimensional positions of all the second key points from the result position map according to a preset key point index Information, including:
    令所述人脸旋转模型在所述结果位置图中建立三维坐标系;Enabling the face rotation model to establish a three-dimensional coordinate system in the result position map;
    令所述人脸旋转模型根据所述预设的关键点索引确定所述结果位置图中与固定的感官区域对应的关键点,并从所述三维坐标系中提取各个所述关键点的三维坐标信息,并将各个所述关键点的三维坐标信息记录为各个所述第二关键点的三维位置信息。Make the face rotation model determine the key points corresponding to the fixed sensory area in the result location map according to the preset key point index, and extract the three-dimensional coordinates of each of the key points from the three-dimensional coordinate system And record the three-dimensional coordinate information of each of the key points as the three-dimensional position information of each of the second key points.
PCT/CN2019/117299 2019-09-18 2019-11-12 Method for generating face rotation model, apparatus, computer device and storage medium WO2021051543A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910882239.9 2019-09-18
CN201910882239.9A CN110826395B (en) 2019-09-18 2019-09-18 Face rotation model generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021051543A1 true WO2021051543A1 (en) 2021-03-25

Family

ID=69548014

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117299 WO2021051543A1 (en) 2019-09-18 2019-11-12 Method for generating face rotation model, apparatus, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN110826395B (en)
WO (1) WO2021051543A1 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343927A (en) * 2021-07-03 2021-09-03 郑州铁路职业技术学院 Intelligent face recognition method and system suitable for facial paralysis patient
CN113610864A (en) * 2021-07-23 2021-11-05 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114004986A (en) * 2021-10-29 2022-02-01 北京百度网讯科技有限公司 Image processing method, training method, device, equipment and medium for detection model
CN114266860A (en) * 2021-12-22 2022-04-01 西交利物浦大学 Three-dimensional face model establishing method and device, electronic equipment and storage medium
CN114283265A (en) * 2021-12-03 2022-04-05 北京航空航天大学 Unsupervised face correcting method based on 3D rotation modeling
CN114332377A (en) * 2021-12-31 2022-04-12 科大讯飞股份有限公司 Object model determination method and related device
CN114821737A (en) * 2022-05-13 2022-07-29 浙江工商大学 Moving end real-time wig try-on method based on three-dimensional face alignment
CN114998690A (en) * 2022-06-22 2022-09-02 武汉纺织大学 Text regulation and control three-dimensional face generation method based on StyleCLIP and 3DDFA
CN115187822A (en) * 2022-07-28 2022-10-14 广州方硅信息技术有限公司 Face image data set analysis method, live broadcast face image processing method and device
CN115546845A (en) * 2022-11-24 2022-12-30 中国平安财产保险股份有限公司 Multi-view cow face identification method and device, computer equipment and storage medium
CN117372657A (en) * 2023-07-12 2024-01-09 南京硅基智能科技有限公司 Training method and device for key point rotation model, electronic equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112336342B (en) * 2020-10-29 2023-10-24 深圳市优必选科技股份有限公司 Hand key point detection method and device and terminal equipment
CN112541484B (en) * 2020-12-28 2024-03-19 平安银行股份有限公司 Face matting method, system, electronic device and storage medium
CN113256799A (en) * 2021-06-07 2021-08-13 广州虎牙科技有限公司 Three-dimensional face model training method and device
CN116350227B (en) * 2023-05-31 2023-09-22 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Individualized detection method, system and storage medium for magnetoencephalography spike

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760836A (en) * 2016-02-17 2016-07-13 厦门美图之家科技有限公司 Multi-angle face alignment method based on deep learning and system thereof and photographing terminal
CN106203400A (en) * 2016-07-29 2016-12-07 广州国信达计算机网络通讯有限公司 A kind of face identification method and device
CN108805977A (en) * 2018-06-06 2018-11-13 浙江大学 A kind of face three-dimensional rebuilding method based on end-to-end convolutional neural networks
CN108920999A (en) * 2018-04-16 2018-11-30 深圳市深网视界科技有限公司 A kind of head angle prediction model training method, prediction technique, equipment and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503684B (en) * 2016-10-28 2019-10-18 厦门中控智慧信息技术有限公司 A kind of face image processing process and device
CN109697688B (en) * 2017-10-20 2023-08-04 虹软科技股份有限公司 Method and device for image processing
CN109978754A (en) * 2017-12-28 2019-07-05 广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
WO2020037678A1 (en) * 2018-08-24 2020-02-27 太平洋未来科技(深圳)有限公司 Method, device, and electronic apparatus for generating three-dimensional human face image from occluded image
CN109508678B (en) * 2018-11-16 2021-03-30 广州市百果园信息技术有限公司 Training method of face detection model, and detection method and device of face key points

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760836A (en) * 2016-02-17 2016-07-13 厦门美图之家科技有限公司 Multi-angle face alignment method based on deep learning and system thereof and photographing terminal
CN106203400A (en) * 2016-07-29 2016-12-07 广州国信达计算机网络通讯有限公司 A kind of face identification method and device
CN108920999A (en) * 2018-04-16 2018-11-30 深圳市深网视界科技有限公司 A kind of head angle prediction model training method, prediction technique, equipment and medium
CN108805977A (en) * 2018-06-06 2018-11-13 浙江大学 A kind of face three-dimensional rebuilding method based on end-to-end convolutional neural networks

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIGANG HAO: "Researches of Multi-angle Face Recognition Based on Deep Learning", CHINESE MASTER’S THESES FULL-TEXT DATABASE, no. 3, 1 June 2015 (2015-06-01), pages 1 - 59, XP055792533, ISSN: 1674-0246 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343927A (en) * 2021-07-03 2021-09-03 郑州铁路职业技术学院 Intelligent face recognition method and system suitable for facial paralysis patient
CN113610864B (en) * 2021-07-23 2024-04-09 Oppo广东移动通信有限公司 Image processing method, device, electronic equipment and computer readable storage medium
CN113610864A (en) * 2021-07-23 2021-11-05 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114004986A (en) * 2021-10-29 2022-02-01 北京百度网讯科技有限公司 Image processing method, training method, device, equipment and medium for detection model
CN114283265A (en) * 2021-12-03 2022-04-05 北京航空航天大学 Unsupervised face correcting method based on 3D rotation modeling
CN114266860A (en) * 2021-12-22 2022-04-01 西交利物浦大学 Three-dimensional face model establishing method and device, electronic equipment and storage medium
CN114332377A (en) * 2021-12-31 2022-04-12 科大讯飞股份有限公司 Object model determination method and related device
CN114821737A (en) * 2022-05-13 2022-07-29 浙江工商大学 Moving end real-time wig try-on method based on three-dimensional face alignment
CN114821737B (en) * 2022-05-13 2024-06-04 浙江工商大学 Mobile-end real-time wig try-on method based on three-dimensional face alignment
CN114998690A (en) * 2022-06-22 2022-09-02 武汉纺织大学 Text regulation and control three-dimensional face generation method based on StyleCLIP and 3DDFA
CN115187822A (en) * 2022-07-28 2022-10-14 广州方硅信息技术有限公司 Face image data set analysis method, live broadcast face image processing method and device
CN115187822B (en) * 2022-07-28 2023-06-30 广州方硅信息技术有限公司 Face image dataset analysis method, live face image processing method and live face image processing device
CN115546845A (en) * 2022-11-24 2022-12-30 中国平安财产保险股份有限公司 Multi-view cow face identification method and device, computer equipment and storage medium
CN115546845B (en) * 2022-11-24 2023-06-06 中国平安财产保险股份有限公司 Multi-view cow face recognition method and device, computer equipment and storage medium
CN117372657A (en) * 2023-07-12 2024-01-09 南京硅基智能科技有限公司 Training method and device for key point rotation model, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110826395A (en) 2020-02-21
CN110826395B (en) 2023-10-31

Similar Documents

Publication Publication Date Title
WO2021051543A1 (en) Method for generating face rotation model, apparatus, computer device and storage medium
US11915514B2 (en) Method and apparatus for detecting facial key points, computer device, and storage medium
EP3992919B1 (en) Three-dimensional facial model generation method and apparatus, device, and medium
WO2021093453A1 (en) Method for generating 3d expression base, voice interactive method, apparatus and medium
US11200404B2 (en) Feature point positioning method, storage medium, and computer device
WO2017088432A1 (en) Image recognition method and device
WO2022147736A1 (en) Virtual image construction method and apparatus, device, and storage medium
WO2023050992A1 (en) Network training method and apparatus for facial reconstruction, and device and storage medium
WO2020207177A1 (en) Image augmentation and neural network training method and apparatus, device and storage medium
WO2021159781A1 (en) Image processing method, apparatus and device, and storage medium
WO2021068325A1 (en) Facial action recognition model training method, facial action recognition method and apparatus, computer device, and storage medium
WO2023019974A1 (en) Correction method and apparatus for document image, and electronic device and storage medium
CN107452049B (en) Three-dimensional head modeling method and device
JP7064257B2 (en) Image depth determination method and creature recognition method, circuit, device, storage medium
WO2020211396A1 (en) Silent living body image recognition method and apparatus, computer device and storage medium
WO2022033513A1 (en) Target segmentation method and apparatus, and computer-readable storage medium and computer device
US20240338895A1 (en) Three-Dimensional Model Expansion Methods and Systems
WO2023001095A1 (en) Face key point interpolation method and apparatus, computer device, and storage medium
WO2023284608A1 (en) Character recognition model generating method and apparatus, computer device, and storage medium
WO2020223940A1 (en) Posture prediction method, computer device and storage medium
WO2022063321A1 (en) Image processing method and apparatus, device and storage medium
WO2021218020A1 (en) Vehicle damage picture processing method and apparatus, and computer device and storage medium
CN111915676B (en) Image generation method, device, computer equipment and storage medium
CN113610864B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN117011431A (en) Expression base acquisition method, device, equipment and storage medium

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: 19945717

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19945717

Country of ref document: EP

Kind code of ref document: A1