WO2020133863A1 - 人脸模型的生成方法、装置、存储介质及终端 - Google Patents

人脸模型的生成方法、装置、存储介质及终端 Download PDF

Info

Publication number
WO2020133863A1
WO2020133863A1 PCT/CN2019/085236 CN2019085236W WO2020133863A1 WO 2020133863 A1 WO2020133863 A1 WO 2020133863A1 CN 2019085236 W CN2019085236 W CN 2019085236W WO 2020133863 A1 WO2020133863 A1 WO 2020133863A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
features
facial
feature
mapping relationship
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/085236
Other languages
English (en)
French (fr)
Inventor
杨克微
陈康
张伟东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to US16/632,395 priority Critical patent/US11328455B2/en
Publication of WO2020133863A1 publication Critical patent/WO2020133863A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three-dimensional [3D] modelling for computer graphics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/97Determining parameters from multiple pictures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20224Image subtraction

Definitions

  • the present disclosure relates to the field of computers, and in particular, to a method, device, storage medium, and terminal for generating a face model.
  • Face pinching in games usually refers to personalizing the facial features of game characters in the game.
  • the face-pinch system provided in games usually refers to that after building a face bone and adding skin to the face bone, the game player changes the shape of the face by manipulating the scaling factor and displacement parameters of the bone.
  • the more complex pinch-to-face system is often also equipped with a makeup system to support gamers to modify eye shadow, mouth lip gloss, eyebrow style and other parts.
  • the manual pinching process provides greater freedom for gamers, it requires gamers to have a certain aesthetic or graphics foundation and the entire process is time-consuming and laborious.
  • At least some embodiments of the present disclosure provide a method, device, storage medium, processor, and terminal for generating a face model, to at least solve the manual pinch face function provided in the game in the related art, which is time-consuming, laborious, and difficult The technical problem of getting a face-pinch effect that fully meets psychological expectations.
  • a method for generating a face model including:
  • the at least one dimension includes at least one of the following: a geometric dimension and an image visual dimension
  • performing feature extraction on the face image from the at least one dimension to obtain multiple face features includes: detecting and locating multiple persons included in the face image Facial feature points; extract geometric features of faces from multiple facial feature points according to geometric dimensions, and/or extract visual features of faces from multiple facial feature points according to image visual dimensions; combine facial geometric features and facial vision At least one of the features is determined as multiple face features.
  • the geometric features of the human face include at least one of the following: facial features, mouth features, nose features, eyebrow features, eye features, and facial features distribution features.
  • the visual features of the human face include at least one of the following: visual features of eye shadow, visual features of lip gloss, and visual features of beard.
  • extracting eye shadow visual features from multiple face feature points according to the image visual dimension includes: determining an eye area according to the eye feature points in the multiple face feature points; setting a plurality of anchor point areas around the eye area ; By calculating the difference in the brightness channel and saturation channel of each anchor point region and the skin color of the multiple anchor point regions, the visual characteristics of the eye shadow are obtained.
  • extracting lip gloss visual features from multiple face feature points according to the image visual dimension includes: determining the mouth region according to the mouth feature points in the multiple face feature points; calculating the color average value in the mouth region to obtain the lip gloss Visual characteristics.
  • extracting beard visual features from multiple face feature points according to the image visual dimension includes: determining the mouth region according to the mouth feature points in the multiple face feature points; determining the first region according to the first part feature points above the mouth region A detection area, and a second detection area is determined according to the second part of the feature area below the mouth area, wherein the first detection area and the second detection area are whisker generation areas; in the first detection area and the second detection area, respectively Calculate the difference between the average brightness of the area and the brightness of the human face skin to obtain the visual characteristics of the beard.
  • performing classification and recognition based on multiple face features to obtain a face feature recognition result includes: separately setting a corresponding classifier for each different face part in the face image, where the classifier is set according to different faces Parts are used to classify multiple facial features; a classifier is used to classify and recognize multiple facial features to obtain facial feature recognition results.
  • a classifier is used to classify and recognize multiple facial features, and the facial feature recognition result includes at least one of the following: If the first part of the multiple facial features belongs to one of the categories determined by the classifier, then the A part of the features are divided into the category; if the second part of the multiple face features belongs to multiple categories by the classifier, the second part of the feature is divided into the highest priority category; if the face is determined by the classifier The third part of the feature does not belong to any of the categories, and the third part of the feature is divided into the default category.
  • the above method further includes: constructing a first sub-mapping relationship between the facial feature recognition result and the skeletal parameter in the pinch face parameter; constructing a second sub-map between the facial feature recognition result and the makeup parameter in the pinch face parameter Mapping relationship; determining the first sub-mapping relationship and the second sub-mapping relationship as the mapping relationship.
  • constructing the first sub-mapping relationship between the face feature recognition result and the skeletal parameters includes: obtaining multiple face part type features from the face feature recognition result, and determining each face from the pinch face system Bone control strips and control parameters corresponding to parts to get facial feature type mapping; obtain detailed features related to multiple face parts types from the face feature recognition results, and determine the bone control corresponding to the detailed features from the pinch face system
  • the adjustment range of the bar and control parameters can be used to obtain the fine-tuned parameter map; determine the association between the bone control bars corresponding to different types of face parts to obtain the post-processing parameter map; map the facial features type, fine-tune parameter map and post-processing parameters
  • the mapping is determined as the first sub-mapping relationship.
  • constructing a second sub-mapping relationship between the face feature recognition result and the makeup parameter includes: obtaining multiple makeup category from the face feature recognition result, and determining the corresponding makeup category from the pinch face system Make-up map number, get makeup-type mapping; get the intensity adjustment range corresponding to makeup-look map number from the pinch face system, get makeup-lookup intensity map; determine makeup-type map and makeup-lookup intensity map as the second sub-mapping relationship.
  • a device for generating a face model including:
  • the extraction component is set to perform feature extraction on the currently input face image from at least one dimension to obtain multiple face features; the recognition component is set to classify and recognize different face parts in the face image based on the multiple face features, Obtain the facial feature recognition result; the processing component is set to obtain the mapping relationship between the facial feature recognition result and the facial pinch parameters set in the current facial pinching system; the generation component is set to generate based on the facial feature recognition result and the mapping relationship The corresponding face model.
  • At least one dimension includes at least one of the following: a geometric dimension and an image visual dimension
  • the extraction component includes: a detection unit configured to detect and locate multiple face feature points contained in the face image; an extraction unit configured to Geometric dimension extracts facial geometric features from multiple facial feature points, and/or, extracts facial visual features from multiple facial feature points according to the image visual dimension; the first determining unit is configured to set the facial geometric features and people At least one of the face visual features is determined as a plurality of face features.
  • the geometric features of the human face include at least one of the following: facial features, mouth features, nose features, eyebrow features, eye features, and facial features distribution features.
  • the visual features of the human face include at least one of the following: visual features of eye shadow, visual features of lip gloss, and visual features of beard.
  • the extraction unit includes: a first determination subunit, which is set to determine the eye region according to the eye feature points in the plurality of face feature points; a subunit, which is set to set a plurality of anchor points around the eye region Area; the first calculation subunit is set to obtain the visual characteristics of the eyeshadow by calculating the difference in the brightness channel and the saturation channel of each anchor point area and the face skin color in the plurality of anchor point areas.
  • the extraction unit includes: a second determination subunit, which is set to determine the mouth area according to the mouth feature points of the plurality of face feature points; a second calculation subunit, which is set to calculate the average color value in the mouth area To get the visual characteristics of lip gloss.
  • the extraction unit includes: a third determination subunit, which is set to determine the mouth area according to the mouth feature points of the plurality of face feature points; a fourth determination subunit, which is set according to the first part of the features above the mouth area Point to determine the first detection area and the second detection area based on the second partial feature point below the mouth area, where the first detection area and the second detection area are whisker generation areas; the third calculation subunit is set to The difference between the average brightness of the area and the brightness of the human skin is calculated in the first detection area and the second detection area, respectively, to obtain the visual characteristics of the beard.
  • the recognition component includes: a setting unit configured to respectively set a corresponding classifier for each different face part in the face image, wherein the classifier is set to perform multiple face features according to different face parts Classification; Recognition unit, set to use a classifier to classify and recognize multiple facial features to obtain facial feature recognition results.
  • the recognition unit includes: a first recognition subunit, configured to classify the first part of the feature into the category if the first part of the multiple face features belongs to one of the categories determined by the classifier; the second recognition subunit , Set to classify the second part feature into the highest priority category if it is determined by the classifier that the second part of the multiple face features belongs to multiple categories; the third recognition subunit is set to if it passes the classifier It is determined that the third part of the multiple face features does not belong to any of the categories, and the third part of the features is classified into the default category.
  • the above device further includes: a construction component, configured to construct a first sub-mapping relationship between the facial feature recognition result and the skeletal parameter in the pinch face parameter and construct a makeup parameter between the facial feature recognition result and the pinch face parameter Between the second sub-mapping relationship, and the first sub-mapping relationship and the second sub-mapping relationship are determined as the mapping relationship.
  • a construction component configured to construct a first sub-mapping relationship between the facial feature recognition result and the skeletal parameter in the pinch face parameter and construct a makeup parameter between the facial feature recognition result and the pinch face parameter.
  • the building component includes: a first processing unit configured to acquire multiple face part type features from the face feature recognition results, and determine a bone control bar corresponding to each face part from the face pinch system and Control the parameters to get the facial features type mapping; the second processing unit is set to obtain the detailed features related to multiple types of face parts from the facial feature recognition results, and determine the bone control bar corresponding to the detailed features from the face pinch system And the control parameter adjustment range to obtain the fine-tuning parameter map; the second determination unit is set to determine the association relationship between the bone control strips corresponding to different types of face parts, and the post-processing parameter map is obtained; the third determination unit is set to The facial feature type mapping, fine tuning parameter mapping, and post-processing parameter mapping are determined as the first sub-mapping relationship.
  • the building component includes: a third processing unit configured to obtain multiple makeup categories from the facial feature recognition results, and determine the makeup map number corresponding to each makeup category from the face pinch system to obtain a makeup type mapping
  • a storage medium is further provided.
  • the storage medium includes a stored program, wherein, when the program is running, the device where the storage medium is located is controlled to perform any one of the methods for generating a face model.
  • a terminal including: one or more processors, a memory, a display device, and one or more programs, wherein the one or more programs are stored in the memory and are It is configured to be executed by one or more processors, and one or more programs are used to execute any one of the methods for generating a face model.
  • a method of performing feature extraction on the currently input face image from at least one dimension to obtain multiple face features, classifying and recognizing the multiple face features to obtain a face feature recognition result By acquiring the mapping relationship between the facial feature recognition result and the facial pinch parameters set in the current facial pinching system and generating the corresponding facial model according to the facial feature recognition result and the mapping relationship, the facial image uploaded by the game player is achieved , It can automatically analyze the face features and makeup and drive the pinch face system to automatically generate the face pinch results (that is, generate face models) that meet the needs of game players, thereby reducing the complexity of face pinch operations, improving the efficiency of face pinch, The technical effect of the face pinch result is obviously improved, which further solves the technical problem that the manual face pinch function provided in the game in the related art is time-consuming and laborious, and it is difficult to obtain a face pinch effect that fully meets psychological expectations.
  • FIG. 1 is a flowchart of a method for generating a face model according to one embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of detection results of face feature points according to an optional embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of acquiring visual characteristics of an eye shadow according to one of the optional embodiments of the present disclosure
  • FIG. 4 is a schematic diagram of obtaining visual characteristics of a lip gloss according to an alternative embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of acquiring visual characteristics of a beard according to an alternative embodiment of the present disclosure
  • FIG. 6 is a structural block diagram of an apparatus for generating a face model according to one embodiment of the present disclosure
  • FIG. 7 is a structural block diagram of an apparatus for generating a face model according to an optional embodiment of the present disclosure.
  • an embodiment of a method for generating a face model is provided. It should be noted that the steps shown in the flowchart in the drawings may be in a computer system such as a set of computer-executable instructions Execution, and although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from here.
  • the mobile terminal may include one or more processors (processors may include but not limited to a central processing unit (CPU), a graphics processor (GPU), a digital signal processing (DSP) chip, a microcomputer A processing device such as a processor (MCU) or programmable logic device (FPGA)) and a memory set to store data.
  • processors may include but not limited to a central processing unit (CPU), a graphics processor (GPU), a digital signal processing (DSP) chip, a microcomputer A processing device such as a processor (MCU) or programmable logic device (FPGA)) and a memory set to store data.
  • the above mobile terminal may further include a transmission device set as a communication function and an input output device.
  • the mobile terminal may further include more or less components than the above structural description, or have a configuration different from the above structural description.
  • the memory may be configured to store computer programs, for example, software programs and components of application software, such as the computer program corresponding to the method of generating a face model in the embodiments of the present disclosure, and the processor executes the computer program stored in the memory to execute Various functional applications and data processing, that is, the method of generating the above-mentioned face model.
  • the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory may further include memories remotely provided with respect to the processor, and these remote memories may be connected to the mobile terminal through a network. Examples of the aforementioned network include, but are not limited to, the Internet, intranet, local area network, mobile communication network, and combinations thereof.
  • the transmission device is configured to receive or send data via a network.
  • the above-mentioned specific example of the network may include a wireless network provided by a communication provider of a mobile terminal.
  • the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through the base station to communicate with the Internet.
  • the transmission device may be a radio frequency (Radio Frequency, RF for short) component, which is configured to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • FIG. 1 is a flowchart of a method for generating a face model according to one embodiment of the present disclosure, as shown in FIG. 1 This method includes the following steps:
  • Step S12 Perform feature extraction on the currently input face image from at least one dimension to obtain multiple face features
  • Step S14 Perform classification and recognition based on multiple facial features to obtain facial feature recognition results
  • Step S16 Obtain the mapping relationship between the facial feature recognition result and the face pinch parameters set in the current face pinch system
  • step S18 a corresponding face model is generated according to the face feature recognition result and the mapping relationship.
  • the mapping relationship between the facial feature recognition result and the facial pinch parameters set in the current facial pinching system and the corresponding facial model is generated according to the facial feature recognition result and the mapping relationship, which achieves the facial image uploaded by the game player, which can be automatically Analyze the facial features and makeup and drive the pinch face system to automatically generate face pinch results (that is, generate face models) that meet the needs of game players, thereby reducing the complexity of face pinch operations, improving face pinching efficiency, and significantly improving pinch face
  • the technical effect of the face result further solves the technical problem that the manual face pinch function provided in the game in the related art is time-consuming and laborious, and it is difficult to obtain a face pinch effect that fully meets psychological expectations.
  • the at least one dimension includes at least one of the following: a geometric dimension and an image visual dimension.
  • performing feature extraction on the face image from at least one dimension to obtain multiple face features may include the following execution steps:
  • Step S121 Detect and locate multiple face feature points contained in the face image
  • Step S122 Extract facial geometric features from multiple facial feature points according to geometric dimensions, and/or extract facial visual features from multiple facial feature points according to image visual dimensions;
  • Step S123 Determine at least one of the geometric features of the face and the visual features of the face as a plurality of facial features.
  • feature extraction needs to be performed from at least one dimension (including at least one of the following: geometry and image vision).
  • geometry and image vision For face feature extraction, geometric and visual features that can reflect the characteristics of the face and are easy to understand and interpret can be extracted from two aspects of geometric and image vision for different face parts, thus solving the related technology only based on features Point to determine the characteristics of the face, lacking the defect of actual physical meaning.
  • FIG. 2 is a schematic diagram of the detection result of face feature points according to one of the alternative embodiments of the present disclosure.
  • 68 feature points included in the face are detected and located , which are: 17 feature points for face contour, 10 feature points for eyebrows, 12 feature points for eyes, 9 feature points for nose, and 20 feature points for mouth. Therefore, based on the detection results of feature points, the characteristics of face, nose, mouth, eye shape, eyebrow shape, facial features, eye shadow, lip gloss, beard, etc. are extracted from the geometric and image vision aspects. Multiple facial features.
  • the geometric features of the human face may include, but are not limited to, at least one of the following: facial features, mouth features, nose features, eyebrow features, eye features, and facial features distribution features.
  • facial geometric features such as facial features, mouth features, nose features, eyebrow features, eye features, and facial features distribution features
  • the calculation methods of these features can generally be divided into: Length feature, ratio feature, slope feature, area feature and curvature feature.
  • the length features are calculated using Euclidean distance
  • the ratio feature is the ratio between the lengths of the corresponding line segments
  • the slope feature is the slope of the angle between the line segments
  • the area feature is the polygon area enclosed by the contour points
  • curvature feature is calculated according to the following formula :
  • point t represents the position in the line where it is located, and x(t) and y(t) respectively represent the abscissa and ordinate of the t point.
  • the visual features of the face may include, but are not limited to, at least one of the following: visual features of eye shadow, visual features of lip gloss, and visual features of beard.
  • visual features of three types of facial images can also be extracted to guide the recognition and classification of facial makeup.
  • step S122 extracting visual characteristics of the eyeshadow from a plurality of facial feature points according to the visual dimension of the image may include the following execution steps:
  • Step S1221 Determine the eye area according to the eye feature points among the multiple face feature points;
  • Step S1222 setting a plurality of anchor point areas around the eye area
  • Step S1223 Obtain the visual characteristics of the eyeshadow by calculating the difference in the brightness channel and the saturation channel between each anchor point region and the skin color of the face in the plurality of anchor point regions.
  • FIG. 3 is a schematic diagram of acquiring eye shadow visual features according to one of the optional embodiments of the present disclosure.
  • the eye area can be determined according to the eye feature points first, and then Set multiple (for example: 12 in the figure, using numbers 1 to 12 to represent) anchor points around the area, and calculate the difference between the brightness and saturation channels of each anchor point area and the skin color of the face. Describe the visual characteristics of eye shadow.
  • step S122 extracting visual features of lip gloss from multiple face feature points according to the visual dimension of the image may include the following execution steps:
  • Step S1224 Determine the mouth area according to the mouth feature points among the multiple face feature points;
  • Step S1225 Calculate the average color value in the mouth area to obtain the visual characteristics of the lip gloss.
  • FIG. 4 is a schematic diagram of acquiring lip gloss visual features according to one of the optional embodiments of the present disclosure.
  • the mouth area can be determined first according to the mouth feature points ), and then the average value of the color of the image in the polygonal area surrounded by the mouth feature points is used as the mouth lip gloss feature.
  • step S122 extracting visual features of the beard from multiple face feature points according to the visual dimension of the image may include the following execution steps:
  • Step S1226 Determine the mouth area according to the mouth feature points among the multiple face feature points;
  • Step S1227 Determine the first detection area according to the first partial feature point above the mouth area, and determine the second detection area based on the second partial feature point below the mouth area, where the first detection area and the second detection area are whiskers Generation area
  • step S1228 the difference between the average brightness of the area and the brightness of the human skin is calculated in the first detection area and the second detection area, respectively, to obtain the visual characteristics of the beard.
  • FIG. 5 is a schematic diagram of acquiring the visual features of the beard according to one of the optional embodiments of the present disclosure.
  • the mouth area can be determined according to the feature points of the mouth first, and then in order to detect different Beard type, two detection areas are set above and below the mouth according to the characteristic points (for example: the area where the beard grows between the mouth and the nose is the first detection area, and the area where the beard grows around the chin under the mouth It is the second detection area), and the difference between the average brightness of the area and the brightness of the human skin is calculated in each detection area to obtain the visual characteristics of the beard.
  • the characteristic points for example: the area where the beard grows between the mouth and the nose is the first detection area, and the area where the beard grows around the chin under the mouth It is the second detection area
  • the difference between the average brightness of the area and the brightness of the human skin is calculated in each detection area to obtain the visual characteristics of the beard.
  • the use of length, proportion, slope, curvature, color, bounding box and other features to calculate and extract can reflect the face shape, nose shape, mouth shape, eye shape, eyebrow shape , Facial features, eye shadow, lip gloss, beard and other characteristics of the face.
  • step S14 performing classification and recognition based on multiple face features, and obtaining a face feature recognition result may include the following execution steps:
  • Step S141 Set a corresponding classifier for each different face part in the face image, wherein the classifier is set to classify multiple face features according to different face parts;
  • step S142 a classifier is used to classify and recognize multiple facial features to obtain a facial feature recognition result.
  • facial features and makeup recognition are performed part by part.
  • corresponding classifiers can be constructed for different parts of the human face, and according to different parts, the common face shape, mouth shape, eye shape, eyebrows in natural faces are respectively Types, eyeshadows, lip glosses, beards, etc. can be classified and recognized, and the recognition results can directly guide the subsequent intelligent face-pinch operation. Therefore, for the face-pinch system, the characteristics of diverse face models are mainly generated by adjusting different facial features shapes, positional relationships, and changing different makeup.
  • summarizing the common categories of various parts of natural faces, combined with the extracted face features through Set the classifier to recognize more shapes or color categories of human face parts related to smart pinching.
  • a classifier is used to classify and recognize multiple face features, and obtaining a face feature recognition result may include at least one of the following execution steps:
  • Step S1421 If it is determined by the classifier that the first part of the multiple face features belongs to one of the categories, the first part of the features is divided into the category;
  • Step S1422 if it is determined by the classifier that the second part of the multiple face features belongs to multiple categories, the second part of the feature is divided into the category with the highest priority;
  • step S1423 if it is determined by the classifier that the third part of the multiple face features does not belong to any of the categories, the third part of the features is divided into the default category.
  • the main purpose of facial facial features and makeup recognition is to classify facial features and makeup according to the extracted features to guide the subsequent mapping process.
  • the classifier setup process can include the following steps:
  • Table 1 describes the settings, face priority settings and default category settings of the face-based dichotomous classifier, as shown in Table 1:
  • the above method may construct the above mapping relationship in the following manner:
  • the first sub-mapping relationship between the facial feature recognition result and the skeletal parameters in the face pinch parameters is constructed
  • the second step is to construct a second sub-mapping relationship between the facial feature recognition results and the makeup parameters in the pinch face parameters;
  • the first sub-mapping relationship and the second sub-mapping relationship are determined as the mapping relationship.
  • the face-pinch system is driven by a pre-built mapping relationship to automatically generate a face model with similar face features to the input object.
  • the purpose of creating a mapping relationship in advance is achieved by generating a mapping file of face features and face pinch parameters in face pinch systems of different games offline. It should be noted that other methods are also possible. That is, decoupling the recognition results of facial features and makeup from the face pinch system, by setting the mapping relationship between facial features and recognition results and face pinch parameters, the mapping relationship can be applied to different types of face pinch systems .
  • mapping relationship between face features and pinch-face parameters different face features and parts categories are given in the form of configuration tables and the bones and makeup in the actual face-pinch system vary in direction, scale, makeup intensity and type
  • configuration table the entire smart face-pinch system can be applied to different games. Therefore, there is no need for artists to pre-make face materials, but by adding a mapping relationship to establish an association relationship between the recognition results and different face pinch systems, in the process of applying to different games according to the corresponding parameters of the face pinch system
  • the value range only needs to modify the mapping relationship configuration table, thereby significantly reducing the reuse cost.
  • constructing the first sub-mapping relationship between the facial feature recognition result and the bone parameters may include the following execution steps:
  • Step 1 Obtain multiple face part type features from the face feature recognition results, and determine the bone control strips and control parameters corresponding to each face part from the face pinching system to obtain a facial feature type map;
  • Step 2 Obtain the detailed features related to multiple types of face parts from the facial feature recognition results, and determine the bone control strips and control parameter adjustment ranges corresponding to the detailed features from the face pinching system to obtain the fine-tuned parameter map;
  • Step 3 Determine the association relationship between the bone control strips corresponding to different types of face parts, and obtain the post-processing parameter map;
  • Step 4 Determine the feature mapping, fine-tuning parameter mapping, and post-processing parameter mapping as the first sub-mapping relationship.
  • mapping relationship construction For the mapping relationship construction, the above process has extracted and recognized face features such as face features and part categories related to pinching faces. When applied to different face pinching systems, it is also necessary to construct the association or mapping relationship between these facial features and specific face pinching parameters in order to perform automatic face pinching operations using existing face pinching systems. Since the face pinch system provided in the related art usually modifies the skeleton or makeup of the face model, the mapping relationship also includes two parts: bone parameter mapping and makeup parameter mapping.
  • the bone parameter mapping mainly includes three parts: facial feature type mapping, fine tuning parameter mapping and post-processing parameter mapping.
  • the specific face part category for example: eye shape
  • the facial feature type mapping needs to be recorded Face control system control strips and control parameters corresponding to different face part categories.
  • some features that are not related to the type of the face part but can also reflect the characteristics of the face are extracted, for example: the angle of rotation of the eye, the area of the nose, etc.
  • constructing the second sub-mapping relationship between the facial feature recognition result and the makeup parameter may include the following execution steps:
  • Step 1 Obtain multiple makeup categories from the facial feature recognition results, and determine the makeup map number corresponding to each makeup category from the face pinch system to obtain a makeup type mapping;
  • Step 2 Obtain the intensity adjustment range corresponding to the makeup map number from the face pinch system to obtain a makeup intensity map
  • Step 3 Determine the makeup type mapping and makeup intensity mapping as the second sub-mapping relationship.
  • makeup parameter mapping mainly includes: makeup type mapping and makeup intensity mapping.
  • the makeup type mapping is responsible for recording the different makeup types of the face (for example: lip gloss type) and the corresponding makeup map numbers in the face pinch system.
  • the makeup intensity map is responsible for recording texture numbers in the pinch-face system and their corresponding intensity adjustment ranges.
  • the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases the former is Better implementation.
  • the technical solution of the present disclosure can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk,
  • the CD-ROM includes several instructions to enable a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the embodiments of the present disclosure.
  • a device for generating a face model is also provided.
  • the device is configured to implement the above-mentioned embodiments and preferred implementations, and descriptions that have already been described will not be repeated.
  • the term "component” may implement a combination of software and/or hardware that performs a predetermined function.
  • the devices described in the following embodiments are preferably implemented in software, implementation of hardware or a combination of software and hardware is also possible and conceived.
  • the device includes: an extraction component 10 configured to feature the currently input face image from at least one dimension Extraction to obtain multiple face features; recognition component 20 is set to perform classification and recognition based on multiple face features to obtain face feature recognition results; processing component 30 is set to obtain the face feature recognition results and the current face setting system settings Pinch the mapping relationship between face parameters; the generating component 40 is set to generate a corresponding face model according to the facial feature recognition result and the mapping relationship.
  • At least one dimension includes at least one of the following: a geometric dimension and an image visual dimension
  • the extraction component 10 includes: a detection unit (not shown in the figure) configured to detect and locate multiple face features contained in the face image Points; an extraction unit (not shown in the figure), which is set to extract facial geometric features from multiple facial feature points according to geometric dimensions, and/or to extract facial visual features from multiple facial feature points according to image visual dimensions
  • the first determining unit (not shown in the figure) is configured to determine at least one of the geometric features of the face and the visual features of the face as a plurality of facial features.
  • the geometric features of the human face include at least one of the following: facial features, mouth features, nose features, eyebrow features, eye features, and facial features distribution features.
  • the visual features of the human face include at least one of the following: visual features of eye shadow, visual features of lip gloss, and visual features of beard.
  • the extraction unit includes: a first determination subunit (not shown in the figure), which is set to determine the eye region according to the eye feature points among the plurality of face feature points; (Not shown in the figure), set to set a plurality of anchor point areas around the eye area; the first calculation subunit (not shown in the figure), set to calculate each anchor in the plurality of anchor point areas The difference between the point area and the skin color of the human face in the brightness channel and saturation channel provides the visual characteristics of the eye shadow.
  • the extraction unit includes: a second determination subunit (not shown in the figure), which is set to determine the mouth area according to the mouth feature points among the plurality of face feature points; the second calculation The subunit (not shown in the figure) is set to calculate the average color value in the mouth area to obtain the lip gloss visual characteristics.
  • the extraction unit includes: a third determination subunit (not shown in the figure), which is set to determine the mouth area according to the mouth feature points among the plurality of face feature points; the fourth determination The subunit (not shown in the figure) is configured to determine the first detection area based on the first partial feature point above the mouth area, and determine the second detection area based on the second partial feature point below the mouth area, where the first The detection area and the second detection area are beard generation areas; the third calculation subunit (not shown in the figure) is set to calculate the difference between the average brightness of the area and the brightness of the human skin in the first detection area and the second detection area, respectively To get the visual characteristics of the beard.
  • the recognition component 20 includes: a setting unit (not shown in the figure), which is set to respectively set a corresponding classifier for each different face part in the face image, wherein the classifier is set according to different faces
  • the parts classify multiple face features
  • the recognition unit (not shown in the figure) is set to classify and recognize multiple face features using a classifier to obtain a face feature recognition result.
  • the recognition unit includes: a first recognition sub-unit (not shown in the figure), which is set to determine that if the first part of the multiple facial features belongs to one of the categories by the classifier, then Divide the first part of the feature into its category; the second recognition subunit (not shown in the figure) is set to classify the second part if the second part of the multiple face features belongs to multiple categories if it is determined by the classifier The features are classified into the category with the highest priority; the third recognition subunit (not shown in the figure) is set to classify the third if the third part of the multiple facial features does not belong to any of the categories through the classifier Some features are divided into default categories.
  • FIG. 7 is a structural block diagram of a device for generating a face model according to one of the optional embodiments of the present disclosure.
  • the above device further includes: a building component 50, configured to build a face feature recognition result
  • the construction component 50 includes: a first processing unit (not shown in the figure), configured to acquire multiple face parts from the face feature recognition result, and determine each face part from the face pinch system Corresponding skeletal control strips and control parameters, to get the facial features type mapping; the second processing unit (not shown in the figure) is set to obtain the detailed features related to multiple face part types from the facial feature recognition results, and from Determine the bone control strips and control parameter adjustment ranges corresponding to the detailed features in the face pinch system to obtain the fine-tuned parameter mapping; the second determination unit (not shown in the figure) is set to determine the bone control strips corresponding to different face parts The association relationship between them is to obtain the post-processing parameter mapping; the third determining unit (not shown in the figure) is set to determine the facial feature type mapping, the fine-tuning parameter mapping and the post-processing parameter mapping as the first sub-mapping relationship.
  • the building component 50 includes a third processing unit (not shown in the figure), which is configured to acquire multiple makeup categories from the facial feature recognition results, and determine the corresponding makeup category from the pinch face system Makeup map number, get makeup type mapping; acquisition unit (not shown in the figure), set to obtain the intensity adjustment range corresponding to makeup map number from the pinch face system to get makeup intensity map; fourth determination unit (not shown in the figure) Shown), set to determine the makeup type mapping and the makeup intensity mapping as the second sub-mapping relationship.
  • a third processing unit (not shown in the figure)
  • acquisition unit not shown in the figure
  • fourth determination unit (not shown in the figure) Shown), set to determine the makeup type mapping and the makeup intensity mapping as the second sub-mapping relationship.
  • the above components can be implemented by software or hardware, and the latter can be implemented by the following methods, but not limited to this: the above components are all located in the same processor; or, the above components can be combined in any combination The forms are located in different processors.
  • An embodiment of the present disclosure also provides a storage medium in which a computer program is stored, wherein the computer program is set to execute any of the steps in the above method embodiments during runtime.
  • the above storage medium may be set to store a computer program for performing the following steps:
  • S1 Perform feature extraction on the currently input face image from at least one dimension to obtain multiple face features
  • the above storage medium may include, but is not limited to: a USB flash drive, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), Various media that can store computer programs, such as removable hard disks, magnetic disks, or optical disks.
  • An embodiment of the present disclosure also provides a processor configured to run a computer program to perform the steps in any of the above method embodiments.
  • the above processor may be configured to perform the following steps through a computer program:
  • S1 Perform feature extraction on the currently input face image from at least one dimension to obtain multiple face features
  • the disclosed technical content may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit may be a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may Integration into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, units or components, and may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or software function unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present disclosure essentially or part of the contribution to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to enable a computer device (which may be a personal computer, server, network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code .

Landscapes

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

Abstract

本公开提供了一种人脸模型的生成方法、装置、存储介质、处理器及终端。该方法包括:从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;根据多个人脸特征进行分类识别,得到人脸特征识别结果;获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系;根据人脸特征识别结果和映射关系生成对应的人脸模型。本公开解决了相关技术中在游戏内提供的手动捏脸功能既费时又费力、而且很难得到完全满足心理预期的捏脸效果的技术问题。

Description

人脸模型的生成方法、装置、存储介质及终端
交叉援引
本公开基于申请号为201811586883.3、申请日为2018-12-25的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及计算机领域,具体而言,涉及一种人脸模型的生成方法、装置、存储介质及终端。
背景技术
游戏中的捏脸操作通常是指对游戏中游戏角色的面部特征进行个性化调整。目前,游戏中提供的捏脸系统通常是指在建立脸部骨骼并在脸部骨骼上添加蒙皮之后,游戏玩家通过操作骨骼的缩放系数、位移参数来改变脸部外形。另外,较为复杂的捏脸系统时常还配备有妆容系统,以支持游戏玩家对眼影、嘴部唇彩、眉毛样式等部分进行修改。然而,手动捏脸过程虽然为游戏玩家提供了较大的自由度,但是需要游戏玩家具备一定的美学或图形学基础且整个过程既费时又费力。
由此可见,尽管相关技术中在不同类别的网络游戏中提供了多种类型的捏脸系统,这些网络游戏的捏脸系统在对脸部骨骼的操控方式、妆容元素样式种类等方面存在差别,但是,这些捏脸系统的本质仍然依赖于游戏玩家手动调整游戏角色的骨骼及妆容。
针对上述的问题,目前尚未提出有效的解决方案。
发明内容
本公开至少部分实施例提供了一种人脸模型的生成方法、装置、存储介质、处理器及终端,以至少解决相关技术中在游戏内提供的手动捏脸功能既费时又费力、而且很难得到完全满足心理预期的捏脸效果的技术问题。
根据本公开其中一实施例,提供了一种人脸模型的生成方法,包括:
从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;根据 多个人脸特征进行分类识别,得到人脸特征识别结果;获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系;根据人脸特征识别结果和映射关系生成对应的人脸模型。
可选地,至少一个维度包括以下至少之一:几何维度和图像视觉维度,从至少一个维度对人脸图像进行特征提取,得到多个人脸特征包括:检测并定位人脸图像中包含的多个人脸特征点;按照几何维度从多个人脸特征点中提取人脸几何特征,和/或,按照图像视觉维度从多个人脸特征点中提取人脸视觉特征;将人脸几何特征和人脸视觉特征中至少之一确定为多个人脸特征。
可选地,人脸几何特征包括以下至少之一:脸型特征、嘴部特征、鼻子特征、眉毛特征、眼睛特征、五官分布特征。
可选地,人脸视觉特征包括以下至少之一:眼影视觉特征、唇彩视觉特征、胡须视觉特征。
可选地,按照图像视觉维度从多个人脸特征点中提取眼影视觉特征包括:根据多个人脸特征点中的眼部特征点确定眼部区域;在眼部区域的周围设置多个锚点区域;通过计算多个锚点区域中的每个锚点区域与人脸皮肤颜色在亮度通道与饱和度通道上的差异,得到眼影视觉特征。
可选地,按照图像视觉维度从多个人脸特征点中提取唇彩视觉特征包括:根据多个人脸特征点中的嘴部特征点确定嘴部区域;计算嘴部区域内的颜色平均值,得到唇彩视觉特征。
可选地,按照图像视觉维度从多个人脸特征点中提取胡须视觉特征包括:根据多个人脸特征点中的嘴部特征点确定嘴部区域;依据嘴部区域上方的第一部分特征点确定第一检测区域,以及依据嘴部区域下方的第二部分特征点确定第二检测区域,其中,第一检测区域和第二检测区域为胡须生成区域;在第一检测区域和第二检测区域中分别计算区域平均亮度与人脸皮肤亮度的差异,得到胡须视觉特征。
可选地,根据多个人脸特征进行分类识别,得到人脸特征识别结果包括:为人脸图像中每个不同的人脸部位分别设置对应的分类器,其中,分类器设置为按照不同人脸部位对多个人脸特征进行分类;采用分类器对多个人脸特征进行分类识别,得到人脸特征识别结果。
可选地,采用分类器对多个人脸特征进行分类识别,得到人脸特征识别结果包括以下至少之一:如果通过分类器确定多个人脸特征中的第一部分特征属于其中一个类别,则将第一部分特征划分至所属类别;如果通过分类器确定多个人脸特征中的第二 部分特征属于其中多个类别,则将第二部分特征划分至优先级最高的类别;如果通过分类器确定多个人脸特征中的第三部分特征未属于其中任一类别,则将第三部分特征划分至默认类别。
可选地,上述方法还包括:构建人脸特征识别结果与捏脸参数中骨骼参数之间的第一子映射关系;构建人脸特征识别结果与捏脸参数中妆容参数之间的第二子映射关系;将第一子映射关系以及第二子映射关系确定为映射关系。
可选地,构建人脸特征识别结果与骨骼参数之间的第一子映射关系包括:从人脸特征识别结果中获取多个人脸部位类型特征,并从捏脸系统中确定与每个人脸部位对应的骨骼控制条和控制参数,得到五官类型映射;从人脸特征识别结果中获取与多个人脸部位类型相关的细节特征,并从捏脸系统中确定与细节特征对应的骨骼控制条和控制参数调整范围,得到精调参数映射;确定不同人脸部位类型对应的骨骼控制条之间的关联关系,得到后处理参数映射;将五官类型映射、精调参数映射以及后处理参数映射确定为第一子映射关系。
可选地,构建人脸特征识别结果与妆容参数之间的第二子映射关系包括:从人脸特征识别结果中获取多个妆容类别,并从捏脸系统中确定与每个妆容类别对应的妆容贴图编号,得到妆容类型映射;从捏脸系统中获取与妆容贴图编号对应的强度调整范围,得到妆容强度映射;将妆容类型映射与妆容强度映射确定为第二子映射关系。
根据本公开其中一实施例,还提供了一种人脸模型的生成装置,包括:
提取组件,设置为从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;识别组件,设置为根据多个人脸特征对人脸图像中不同人脸部位进行分类识别,得到人脸特征识别结果;处理组件,设置为获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系;生成组件,设置为根据人脸特征识别结果和映射关系生成对应的人脸模型。
可选地,至少一个维度包括以下至少之一:几何维度和图像视觉维度,提取组件包括:检测单元,设置为检测并定位人脸图像中包含的多个人脸特征点;提取单元,设置为按照几何维度从多个人脸特征点中提取人脸几何特征,和/或,按照图像视觉维度从多个人脸特征点中提取人脸视觉特征;第一确定单元,设置为将人脸几何特征和人脸视觉特征中至少之一确定为多个人脸特征。
可选地,人脸几何特征包括以下至少之一:脸型特征、嘴部特征、鼻子特征、眉毛特征、眼睛特征、五官分布特征。
可选地,人脸视觉特征包括以下至少之一:眼影视觉特征、唇彩视觉特征、胡须 视觉特征。
可选地,提取单元包括:第一确定子单元,设置为根据多个人脸特征点中的眼部特征点确定眼部区域;设置子单元,设置为在眼部区域的周围设置多个锚点区域;第一计算子单元,设置为通过计算多个锚点区域中的每个锚点区域与人脸皮肤颜色在亮度通道与饱和度通道上的差异,得到眼影视觉特征。
可选地,提取单元包括:第二确定子单元,设置为根据多个人脸特征点中的嘴部特征点确定嘴部区域;第二计算子单元,设置为计算嘴部区域内的颜色平均值,得到唇彩视觉特征。
可选地,提取单元包括:第三确定子单元,设置为根据多个人脸特征点中的嘴部特征点确定嘴部区域;第四确定子单元,设置为依据嘴部区域上方的第一部分特征点确定第一检测区域,以及依据嘴部区域下方的第二部分特征点确定第二检测区域,其中,第一检测区域和第二检测区域为胡须生成区域;第三计算子单元,设置为在第一检测区域和第二检测区域中分别计算区域平均亮度与人脸皮肤亮度的差异,得到胡须视觉特征。
可选地,识别组件包括:设置单元,设置为为人脸图像中每个不同的人脸部位分别设置对应的分类器,其中,分类器设置为按照不同人脸部位对多个人脸特征进行分类;识别单元,设置为采用分类器对多个人脸特征进行分类识别,得到人脸特征识别结果。
可选地,识别单元包括:第一识别子单元,设置为如果通过分类器确定多个人脸特征中的第一部分特征属于其中一个类别,则将第一部分特征划分至所属类别;第二识别子单元,设置为如果通过分类器确定多个人脸特征中的第二部分特征属于其中多个类别,则将第二部分特征划分至优先级最高的类别;第三识别子单元,设置为如果通过分类器确定多个人脸特征中的第三部分特征未属于其中任一类别,则将第三部分特征划分至默认类别。
可选地,上述装置还包括:构建组件,设置为构建人脸特征识别结果与捏脸参数中骨骼参数之间的第一子映射关系以及构建人脸特征识别结果与捏脸参数中妆容参数之间的第二子映射关系,并将第一子映射关系以及第二子映射关系确定为映射关系。
可选地,构建组件包括:第一处理单元,设置为从人脸特征识别结果中获取多个人脸部位类型特征,并从捏脸系统中确定与每个人脸部位对应的骨骼控制条和控制参数,得到五官类型映射;第二处理单元,设置为从人脸特征识别结果中获取与多个人脸部位类型相关的细节特征,并从捏脸系统中确定与细节特征对应的骨骼控制条和控 制参数调整范围,得到精调参数映射;第二确定单元,设置为确定不同人脸部位类型对应的骨骼控制条之间的关联关系,得到后处理参数映射;第三确定单元,设置为将五官类型映射、精调参数映射以及后处理参数映射确定为第一子映射关系。
可选地,构建组件包括:第三处理单元,设置为从人脸特征识别结果中获取多个妆容类别,并从捏脸系统中确定与每个妆容类别对应的妆容贴图编号,得到妆容类型映射;获取单元,设置为从捏脸系统中获取与妆容贴图编号对应的强度调整范围,得到妆容强度映射;第四确定单元,设置为将妆容类型映射与妆容强度映射确定为第二子映射关系。
根据本公开其中一实施例,还提供了一种存储介质,存储介质包括存储的程序,其中,在程序运行时控制存储介质所在设备执行上述任意一项的人脸模型的生成方法。
根据本公开其中一实施例,还提供了一种终端,包括:一个或多个处理器,存储器,显示装置以及一个或多个程序,其中,一个或多个程序被存储在存储器中,并且被配置为由一个或多个处理器执行,一个或多个程序用于执行上述任意一项的人脸模型的生成方法。
在本公开至少部分实施例中,采用从至少一个维度对当前输入的人脸图像进行特征提取以得到多个人脸特征的方式,通过多个人脸特征进行分类识别以得到人脸特征识别结果,以及通过获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系并根据人脸特征识别结果和映射关系生成对应的人脸模型,达到了通过游戏玩家上传的人脸图像,可以自动分析得到人脸特征及妆容并且驱动捏脸系统自动生成符合游戏玩家需求的捏脸结果(即生成人脸模型)的目的,从而实现了降低捏脸操作复杂度、提升捏脸效率、明显改善捏脸结果的技术效果,进而解决了相关技术中在游戏内提供的手动捏脸功能既费时又费力、而且很难得到完全满足心理预期的捏脸效果的技术问题。
附图说明
此处所说明的附图用来提供对本公开的进一步理解,构成本公开的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1是根据本公开其中一实施例的人脸模型的生成方法的流程图;
图2是根据本公开其中一可选实施例的人脸特征点检测结果示意图;
图3是根据本公开其中一可选实施例的获取眼影视觉特征的示意图;
图4是根据本公开其中一可选实施例的获取唇彩视觉特征的示意图;
图5是根据本公开其中一可选实施例的获取胡须视觉特征的示意图;
图6是根据本公开其中一实施例的人脸模型的生成装置的结构框图;
图7是根据本公开其中一可选实施例的人脸模型的生成装置的结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本公开方案,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分的实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本公开保护的范围。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
根据本公开其中一实施例,提供了一种人脸模型的生成方法的实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
该方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,移动终端可以包括一个或多个处理器(处理器可以包括但不限于中央处理器(CPU)、图形处理器(GPU)、数字信号处理(DSP)芯片、微处理器(MCU)或可编程逻辑器件(FPGA)等的处理装置)和设置为存储数据的存储器。可选地,上述移动终端还可以包括设置为通信功能的传输设备以及输入输出设备。本领域普通技术人员可以理解,上述结构描述仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比上述结构描述更多或者更少的组件,或者具有与上述结构描述不同的配置。
存储器可设置为存储计算机程序,例如,应用软件的软件程序以及组件,如本公开实施例中的人脸模型的生成方法对应的计算机程序,处理器通过运行存储在存储器内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的人脸模型的生成方法。存储器可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器可进一步包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输设备设置为经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输设备包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备可以为射频(Radio Frequency,简称为RF)组件,其设置为通过无线方式与互联网进行通讯。
在本实施例中提供了一种运行于上述移动终端的人脸模型的生成方法的流程图,图1是根据本公开其中一实施例的人脸模型的生成方法的流程图,如图1所示,该方法包括如下步骤:
步骤S12,从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;
步骤S14,根据多个人脸特征进行分类识别,得到人脸特征识别结果;
步骤S16,获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系;
步骤S18,根据人脸特征识别结果和映射关系生成对应的人脸模型。
通过上述步骤,可以实现采用从至少一个维度对当前输入的人脸图像进行特征提取以得到多个人脸特征的方式,通过多个人脸特征进行分类识别以得到人脸特征识别结果,以及通过获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系并根据人脸特征识别结果和映射关系生成对应的人脸模型,达到了通过游戏玩家上传的人脸图像,可以自动分析得到人脸特征及妆容并且驱动捏脸系统自动生成符合游戏玩家需求的捏脸结果(即生成人脸模型)的目的,从而实现了降低捏脸操作复杂度、提升捏脸效率、明显改善捏脸结果的技术效果,进而解决了相关技术中在游戏内提供的手动捏脸功能既费时又费力、而且很难得到完全满足心理预期的捏脸效果的技术问题。
可选地,上述至少一个维度包括以下至少之一:几何维度和图像视觉维度,在步骤S12中,从至少一个维度对人脸图像进行特征提取,得到多个人脸特征可以包括以下执行步骤:
步骤S121,检测并定位人脸图像中包含的多个人脸特征点;
步骤S122,按照几何维度从多个人脸特征点中提取人脸几何特征,和/或,按照图像视觉维度从多个人脸特征点中提取人脸视觉特征;
步骤S123,将人脸几何特征和人脸视觉特征中至少之一确定为多个人脸特征。
在游戏玩家输入人脸图像之后,需要从至少一个维度(包括以下至少之一:几何和图像视觉)进行特征提取。对于人脸特征提取方面,针对不同的人脸部位从几何和图像视觉两个方面提取能够反映人脸特点且易于理解、能够解释的几何特征和视觉特征,由此解决相关技术中仅依据特征点确定人脸特征,缺乏实际物理含义的缺陷。
人脸特征点检测是提取人脸特征的基础。在本公开的一个可选实施例中,图2是根据本公开其中一可选实施例的人脸特征点检测结果示意图,如图2所示,检测并定位人脸中所包含68个特征点,其分别为:人脸轮廓17个特征点,眉毛10个特征点,眼睛12个特征点,鼻子9个特征点以及嘴巴20个特征点。由此,在特征点检测结果的基础上,从几何和图像视觉两个方面提取出能够反映人脸脸型、鼻型、嘴型、眼型、眉型、五官分布、眼影、唇彩、胡须等特点的多个人脸特征。
可选地,上述人脸几何特征可以包括但不限于以下至少之一:脸型特征、嘴部特征、鼻子特征、眉毛特征、眼睛特征、五官分布特征。
在本公开的一个可选实施例中,可以提取脸型特征、嘴部特征、鼻子特征、眉毛特征、眼睛特征、五官分布特征这六类人脸几何特征,这些特征的计算方法通常可以分为:长度特征,比值特征,斜率特征,面积特征和曲率特征。长度特征均采用欧式距离计算,比值特征为相应线段长度之间的比值,斜率特征为线段之间夹角的斜率,面积特征为轮廓点所围成的多边形面积,而曲率特征则根据下式计算:
Figure PCTCN2019085236-appb-000001
其中,t点表示在所处线条中的位置,x(t)和y(t)则分别表示该t点处的横坐标与纵坐标。
可选地,上述人脸视觉特征可以包括但不限于以下至少之一:眼影视觉特征、唇 彩视觉特征、胡须视觉特征。
在本公开的一个可选实施例中,除了提取上述人脸几何特征之外,还可以提取出眼影、唇彩和胡须这三类人脸图像的视觉特征,以引导对人脸妆容的识别分类。
可选地,在步骤S122中,按照图像视觉维度从多个人脸特征点中提取眼影视觉特征可以包括以下执行步骤:
步骤S1221,根据多个人脸特征点中的眼部特征点确定眼部区域;
步骤S1222,在眼部区域的周围设置多个锚点区域;
步骤S1223,通过计算多个锚点区域中的每个锚点区域与人脸皮肤颜色在亮度通道与饱和度通道上的差异,得到眼影视觉特征。
对于眼影视觉特征而言,图3是根据本公开其中一可选实施例的获取眼影视觉特征的示意图,如图3所示,可以先依据眼部特征点确定眼部区域,然后,在眼部区域周围设置多个(例如:12个,图中采用序号1至12来表示)锚点区域,并分别计算每个锚点区域与人脸皮肤颜色在亮度与饱和度通道的差异,以此来描述眼影视觉特征。
可选地,在步骤S122中,按照图像视觉维度从多个人脸特征点中提取唇彩视觉特征可以包括以下执行步骤:
步骤S1224,根据多个人脸特征点中的嘴部特征点确定嘴部区域;
步骤S1225,计算嘴部区域内的颜色平均值,得到唇彩视觉特征。
对于唇彩视觉特征而言,图4是根据本公开其中一可选实施例的获取唇彩视觉特征的示意图,如图4所示,可以先依据嘴部特征点确定嘴部区域(图中采用虚线表示),然后再将嘴部特征点所围成的多边形区域中图像的颜色平均值作为嘴部唇彩特征。
可选地,在步骤S122中,按照图像视觉维度从多个人脸特征点中提取胡须视觉特征可以包括以下执行步骤:
步骤S1226,根据多个人脸特征点中的嘴部特征点确定嘴部区域;
步骤S1227,依据嘴部区域上方的第一部分特征点确定第一检测区域,以及依据嘴部区域下方的第二部分特征点确定第二检测区域,其中,第一检测区域和第二检测区域为胡须生成区域;
步骤S1228,在第一检测区域和第二检测区域中分别计算区域平均亮度与人脸皮肤亮度的差异,得到胡须视觉特征。
对于胡须视觉特征而言,图5是根据本公开其中一可选实施例的获取胡须视觉特征的示意图,如图5所示,可以先依据嘴部特征点确定嘴部区域,然后为了检测不同的胡须种类,分别在嘴部上方和下方依据特征点设置两个检测区域(例如:嘴部上方与鼻子之间易生长胡须的区域为第一检测区域,嘴部下方的下巴周围易生长胡须的区域为第二检测区域),并在每个检测区域中分别计算区域平均亮度与人脸皮肤亮度的差异,得到胡须视觉特征。
综合上述分析,从几何和图像视觉两个方面,利用长度、比例、斜率、曲率、颜色、包围盒等多种特征计算提取出能够反映人脸脸型、鼻型、嘴型、眼型、眉型、五官分布、眼影、唇彩、胡须等特点的丰富多样的人脸特征。
可选地,在步骤S14中,根据多个人脸特征进行分类识别,得到人脸特征识别结果可以包括以下执行步骤:
步骤S141,为人脸图像中每个不同的人脸部位分别设置对应的分类器,其中,分类器设置为按照不同人脸部位对多个人脸特征进行分类;
步骤S142,采用分类器对多个人脸特征进行分类识别,得到人脸特征识别结果。
对于五官及妆容识别方面,针对捏脸系统的实际需求,逐部位的人脸五官及妆容识别。具体地,在人脸特征提取的基础上,根据提取到的人脸特征可以为人脸的不同部位构建相应的分类器,按照不同部位分别对自然人脸中常见的脸型、嘴型、眼型、眉型、眼影、唇彩、胡须等进行分类识别,其识别结果能够直接引导后续的智能捏脸操作。由此,针对捏脸系统主要是通过调节不同五官形状、位置关系以及变换不同妆容产生多样人脸模型的特点,在总结自然人脸各个部位常见类别的基础上,结合提取得到的人脸特征,通过设置分类器识别出更多与智能捏脸相关的人脸部位的形状或颜色类别。
可选地,在步骤S142中,采用分类器对多个人脸特征进行分类识别,得到人脸特征识别结果可以包括以下至少之一执行步骤:
步骤S1421,如果通过分类器确定多个人脸特征中的第一部分特征属于其中一个类别,则将第一部分特征划分至所属类别;
步骤S1422,如果通过分类器确定多个人脸特征中的第二部分特征属于其中多个类别,则将第二部分特征划分至优先级最高的类别;
步骤S1423,如果通过分类器确定多个人脸特征中的第三部分特征未属于其中任一类别,则将第三部分特征划分至默认类别。
人脸五官及妆容识别的主要目的在于:依据提取到的特征对五官及妆容等进行分类,以引导后续的映射过程。分类器的设置过程可以包括以下步骤:
(1)对每个类别分别设置一个二分分类器,设置为判别是否属于该种类别;
(2)将人脸图像分别送入不同类别分别对应的二分分类器进行判别,输出通过分类器判定的类别结果;
(3)如果存在一个部位通过多个分类器的判定,则按照事先设定的类别优先级输出优先级最高的类别;若没有通过任何分类器的判定,则输出一个默认的类别。
表1描述了脸型的二分分类器的设置、类别优先级设定及默认类别设定,如表1所示:
表1
Figure PCTCN2019085236-appb-000002
可选地,在上述技术方案的基础上,在一个可选实施例中,上述方法可以按照以下方式构建上述映射关系:
第一步,构建人脸特征识别结果与捏脸参数中骨骼参数之间的第一子映射关系;
第二步,构建人脸特征识别结果与捏脸参数中妆容参数之间的第二子映射关系;
第三步,将第一子映射关系以及第二子映射关系确定为映射关系。
通过预先构建的映射关系驱动捏脸系统自动生成与输入对象具有相似人脸特征的人脸模型。在本实施方式中,通过离线生成人脸特征与不同游戏的捏脸系统中的捏脸参数的映射文件的方式实现预先构建映射关系的目的。需要说明的是,也可以通过其他的方式。即,将五官及妆容的识别结果与捏脸系统之间进行解耦,通过设置人脸特征及识别结果与捏脸参数之间的映射关系,使得该映射关系可以应用于不同类别的捏脸系统。在人脸特征与捏脸参数映射关系构建过程中,通过配置表的形式给出不同人脸特征及部位类别与实际捏脸系统中骨骼及妆容在变化方向、缩放尺度、妆容强度和类型之间的对应关系,在实际应用中通过修改配置表便可将整个智能捏脸系统应用于不同游戏中。由此,无需美术人员预制人脸素材,而是通过加入映射关系在识别结果与不同捏脸系统之间搭建关联关系,在应用于不同游戏的过程中根据对应捏脸系统中 每个参数的取值范围修改映射关系配置表即可,从而显著地降低复用成本。
可选地,构建人脸特征识别结果与骨骼参数之间的第一子映射关系可以包括以下执行步骤:
步骤1,从人脸特征识别结果中获取多个人脸部位类型特征,并从捏脸系统中确定与每个人脸部位对应的骨骼控制条和控制参数,得到五官类型映射;
步骤2,从人脸特征识别结果中获取与多个人脸部位类型相关的细节特征,并从捏脸系统中确定与细节特征对应的骨骼控制条和控制参数调整范围,得到精调参数映射;
步骤3,确定不同人脸部位类型对应的骨骼控制条之间的关联关系,得到后处理参数映射;
步骤4,将五官类型映射、精调参数映射以及后处理参数映射确定为第一子映射关系。
对于映射关系构建而言,上述过程针对与捏脸相关的人脸特征和部位类别等人脸特征进行过提取和识别。而在应用于不同的捏脸系统时还需要构建这些人脸特征与具体捏脸参数之间的关联或映射关系才能利用已有捏脸系统执行自动捏脸操作。由于相关技术中所提供的捏脸系统通常是对人脸模型的骨骼或妆容进行修改,因此,映射关系也包含骨骼参数映射和妆容参数映射两个部分。
关于骨骼参数映射(相当于上述第一子映射关系),骨骼参数映射主要包括:五官类型映射、精调参数映射和后处理参数映射三个部分。首先,特定的人脸部位类别(例如:眼型),往往与多个捏脸系统中的骨骼控制条相关(例如:上睑、下睑、前关、睛明),因此五官类型映射需要记录不同人脸部位类别所对应的捏脸系统控制条和控制参数。其次,在本公开上述可选实施方式中,还提取到一些与人脸部位类型无关但也能够体现人脸特点的特征,例如:眼睛的旋转角度、鼻子面积等,精调参数映射则是记录该部分特征与对应的捏脸系统控制条和控制参数调整范围。最后,由于捏脸系统不同控制条之间往往存在相互影响关系,例如:调整鼻子位置时会影响鼻嘴距和鼻眼距等,因此,在本公开的一个可选实施例中,还引入了后处理参数映射,用于记录这种影响关系,对捏脸结果参数进行后处理。
可选地,构建人脸特征识别结果与妆容参数之间的第二子映射关系可以包括以下执行步骤:
步骤1,从人脸特征识别结果中获取多个妆容类别,并从捏脸系统中确定与每个 妆容类别对应的妆容贴图编号,得到妆容类型映射;
步骤2,从捏脸系统中获取与妆容贴图编号对应的强度调整范围,得到妆容强度映射;
步骤3,将妆容类型映射与妆容强度映射确定为第二子映射关系。
关于妆容参数映射(相当于上述第二子映射关系),妆容参数映射主要包括:妆容类型映射和妆容强度映射两部分。首先,妆容类型映射负责记录人脸不同的妆容类别(例如:唇彩类型)与捏脸系统中对应的妆容贴图的编号。其次,由于大多捏脸系统不但允许修改妆容类型还允许对妆容的强度进行调整,因此妆容强度映射负责记录捏脸系统中贴图编号与其对应的强度调整范围。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。
在本实施例中还提供了一种人脸模型的生成装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“组件”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图6是根据本公开其中一实施例的人脸模型的生成装置的结构框图,如图6所示,该装置包括:提取组件10,设置为从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;识别组件20,设置为根据多个人脸特征进行分类识别,得到人脸特征识别结果;处理组件30,设置为获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系;生成组件40,设置为根据人脸特征识别结果和映射关系生成对应的人脸模型。
可选地,至少一个维度包括以下至少之一:几何维度和图像视觉维度,提取组件10包括:检测单元(图中未示出),设置为检测并定位人脸图像中包含的多个人脸特征点;提取单元(图中未示出),设置为按照几何维度从多个人脸特征点中提取人脸几何特征,和/或,按照图像视觉维度从多个人脸特征点中提取人脸视觉特征;第一确定 单元(图中未示出),设置为将人脸几何特征和人脸视觉特征中至少之一确定为多个人脸特征。
可选地,人脸几何特征包括以下至少之一:脸型特征、嘴部特征、鼻子特征、眉毛特征、眼睛特征、五官分布特征。
可选地,人脸视觉特征包括以下至少之一:眼影视觉特征、唇彩视觉特征、胡须视觉特征。
可选地,提取单元(图中未示出)包括:第一确定子单元(图中未示出),设置为根据多个人脸特征点中的眼部特征点确定眼部区域;设置子单元(图中未示出),设置为在眼部区域的周围设置多个锚点区域;第一计算子单元(图中未示出),设置为通过计算多个锚点区域中的每个锚点区域与人脸皮肤颜色在亮度通道与饱和度通道上的差异,得到眼影视觉特征。
可选地,提取单元(图中未示出)包括:第二确定子单元(图中未示出),设置为根据多个人脸特征点中的嘴部特征点确定嘴部区域;第二计算子单元(图中未示出),设置为计算嘴部区域内的颜色平均值,得到唇彩视觉特征。
可选地,提取单元(图中未示出)包括:第三确定子单元(图中未示出),设置为根据多个人脸特征点中的嘴部特征点确定嘴部区域;第四确定子单元(图中未示出),设置为依据嘴部区域上方的第一部分特征点确定第一检测区域,以及依据嘴部区域下方的第二部分特征点确定第二检测区域,其中,第一检测区域和第二检测区域为胡须生成区域;第三计算子单元(图中未示出),设置为在第一检测区域和第二检测区域中分别计算区域平均亮度与人脸皮肤亮度的差异,得到胡须视觉特征。
可选地,识别组件20包括:设置单元(图中未示出),设置为为人脸图像中每个不同的人脸部位分别设置对应的分类器,其中,分类器设置为按照不同人脸部位对多个人脸特征进行分类;识别单元(图中未示出),设置为采用分类器对多个人脸特征进行分类识别,得到人脸特征识别结果。
可选地,识别单元(图中未示出)包括:第一识别子单元(图中未示出),设置为如果通过分类器确定多个人脸特征中的第一部分特征属于其中一个类别,则将第一部分特征划分至所属类别;第二识别子单元(图中未示出),设置为如果通过分类器确定多个人脸特征中的第二部分特征属于其中多个类别,则将第二部分特征划分至优先级最高的类别;第三识别子单元(图中未示出),设置为如果通过分类器确定多个人脸特征中的第三部分特征未属于其中任一类别,则将第三部分特征划分至默认类别。
可选地,图7是根据本公开其中一可选实施例的人脸模型的生成装置的结构框图, 如图7所示,上述装置还包括:构建组件50,设置为构建人脸特征识别结果与捏脸参数中骨骼参数之间的第一子映射关系以及构建人脸特征识别结果与捏脸参数中妆容参数之间的第二子映射关系,并将第一子映射关系以及第二子映射关系确定为映射关系。
可选地,构建组件50包括:第一处理单元(图中未示出),设置为从人脸特征识别结果中获取多个人脸部位,并从捏脸系统中确定与每个人脸部位对应的骨骼控制条和控制参数,得到五官类型映射;第二处理单元(图中未示出),设置为从人脸特征识别结果中获取与多个人脸部位类型相关的细节特征,并从捏脸系统中确定与细节特征对应的骨骼控制条和控制参数调整范围,得到精调参数映射;第二确定单元(图中未示出),设置为确定不同人脸部位对应的骨骼控制条之间的关联关系,得到后处理参数映射;第三确定单元(图中未示出),设置为将五官类型映射、精调参数映射以及后处理参数映射确定为第一子映射关系。
可选地,构建组件50包括:第三处理单元(图中未示出),设置为从人脸特征识别结果中获取多个妆容类别,并从捏脸系统中确定与每个妆容类别对应的妆容贴图编号,得到妆容类型映射;获取单元(图中未示出),设置为从捏脸系统中获取与妆容贴图编号对应的强度调整范围,得到妆容强度映射;第四确定单元(图中未示出),设置为将妆容类型映射与妆容强度映射确定为第二子映射关系。
需要说明的是,上述各个组件是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述组件均位于同一处理器中;或者,上述各个组件以任意组合的形式分别位于不同的处理器中。
本公开的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:
S1,从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;
S2,根据多个人脸特征进行分类识别,得到人脸特征识别结果;
S3,获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系;
S4,根据人脸特征识别结果和映射关系生成对应的人脸模型。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简 称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
本公开的实施例还提供了一种处理器,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:
S1,从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;
S2,根据多个人脸特征进行分类识别,得到人脸特征识别结果;
S3,获取人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系;
S4,根据人脸特征识别结果和映射关系生成对应的人脸模型。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。
在本公开的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或组件的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅是本公开的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本公开原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本公开的保护范围。

Claims (15)

  1. 一种人脸模型的生成方法,包括:
    从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;
    根据所述多个人脸特征进行分类识别,得到人脸特征识别结果;
    获取人脸特征与当前捏脸系统中设置的捏脸参数之间的映射关系;
    根据所述人脸特征识别结果和所述映射关系生成对应的人脸模型。
  2. 根据权利要求1所述的方法,其中,所述至少一个维度包括以下至少之一:几何维度和图像视觉维度;从所述至少一个维度对所述人脸图像进行特征提取,得到所述多个人脸特征包括:
    检测并定位所述人脸图像中包含的多个人脸特征点;
    按照所述几何维度从所述多个人脸特征点中提取人脸几何特征,和/或,按照所述图像视觉维度从所述多个人脸特征点中提取人脸视觉特征;
    将所述人脸几何特征和所述人脸视觉特征中至少之一确定为所述多个人脸特征。
  3. 根据权利要求1所述的方法,其中,所述人脸几何特征包括以下至少之一:脸型特征、嘴部特征、鼻子特征、眉毛特征、眼睛特征、五官分布特征。
  4. 根据权利要求1所述的方法,其中,所述人脸视觉特征包括以下至少之一:眼影视觉特征、唇彩视觉特征、胡须视觉特征。
  5. 根据权利要求4所述的方法,其中,按照所述图像视觉维度从所述多个人脸特征点中提取眼影视觉特征包括:
    根据所述多个人脸特征点中的眼部特征点确定眼部区域;
    在所述眼部区域的周围设置多个锚点区域;
    通过计算所述多个锚点区域中的每个锚点区域与人脸皮肤颜色在亮度通道与饱和度通道上的差异,得到所述眼影视觉特征。
  6. 根据权利要求4所述的方法,其中,按照所述图像视觉维度从所述多个人脸特征点中提取唇彩视觉特征包括:
    根据所述多个人脸特征点中的嘴部特征点确定嘴部区域;
    计算所述嘴部区域内的颜色平均值,得到所述唇彩视觉特征。
  7. 根据权利要求4所述的方法,其中,按照所述图像视觉维度从所述多个人脸特征点中提取胡须视觉特征包括:
    根据所述多个人脸特征点中的嘴部特征点确定嘴部区域;
    依据所述嘴部区域上方的第一部分特征点确定第一检测区域,以及依据所述嘴部区域下方的第二部分特征点确定第二检测区域,其中,所述第一检测区域和所述第二检测区域为胡须生成区域;
    在所述第一检测区域和所述第二检测区域中分别计算区域平均亮度与人脸皮肤亮度的差异,得到所述胡须视觉特征。
  8. 根据权利要求1所述的方法,其中,根据所述多个人脸特征进行分类识别,得到所述人脸特征识别结果包括:
    为所述人脸图像中每个不同的人脸部位分别设置对应的分类器,其中,所述分类器设置为按照不同人脸部位对所述多个人脸特征进行分类;
    采用所述分类器对所述多个人脸特征进行分类识别,得到所述人脸特征识别结果。
  9. 根据权利要求8所述的方法,其中,采用所述分类器对所述多个人脸特征进行分类识别,得到所述人脸特征识别结果包括以下至少之一:
    如果通过所述分类器确定所述多个人脸特征中的第一部分特征属于其中一个类别,则将所述第一部分特征划分至所属类别;
    如果通过所述分类器确定所述多个人脸特征中的第二部分特征属于其中多个类别,则将所述第二部分特征划分至优先级最高的类别;
    如果通过所述分类器确定所述多个人脸特征中的第三部分特征未属于其中任一类别,则将所述第三部分特征划分至默认类别。
  10. 根据权利要求1所述的方法,其中,所述方法还包括:
    构建所述人脸特征与所述捏脸参数中骨骼参数之间的第一子映射关系;
    构建所述人脸特征与所述捏脸参数中妆容参数之间的第二子映射关系;
    将所述第一子映射关系以及所述第二子映射关系确定为所述映射关系。
  11. 根据权利要求10所述的方法,其中,构建所述人脸特征与所述骨骼参数之间的所述第一子映射关系包括:
    从所述人脸特征中获取多个人脸部位类型特征,并从所述捏脸系统中确定与每个人脸部位对应的骨骼控制条和控制参数,得到五官类型映射;
    从所述人脸特征中获取与所述多个人脸部位类型相关的细节特征,并从所述捏脸系统中确定与所述细节特征对应的骨骼控制条和控制参数调整范围,得到精调参数映射;
    确定不同所述人脸部位类型对应的骨骼控制条之间的关联关系,得到后处理参数映射;
    将所述五官类型映射、所述精调参数映射以及所述后处理参数映射确定为所述第一子映射关系。
  12. 根据权利要求10所述的方法,其中,构建所述人脸特征识别结果与所述妆容参数之间的所述第二子映射关系包括:
    从所述人脸特征识别结果中获取多个妆容类别,并从所述捏脸系统中确定与每个妆容类别对应的妆容贴图编号,得到妆容类型映射;
    从所述捏脸系统中获取与所述妆容贴图编号对应的强度调整范围,得到妆容强度映射;
    将所述妆容类型映射与所述妆容强度映射确定为所述第二子映射关系。
  13. 一种人脸模型的生成装置,包括:
    提取组件,设置为从至少一个维度对当前输入的人脸图像进行特征提取,得到多个人脸特征;
    识别组件,设置为根据所述多个人脸特征对所述人脸图像中不同人脸部位进行分类识别,得到人脸特征识别结果;
    处理组件,设置为获取所述人脸特征识别结果与当前捏脸系统中设置的捏脸参数之间的映射关系;
    生成组件,设置为根据所述人脸特征识别结果和所述映射关系生成对应的人脸模型。
  14. 一种存储介质,所述存储介质包括存储的程序,其中,在所述程序运行时控制所述存储介质所在设备执行权利要求1至12中任意一项所述的人脸模型的生成方法。
  15. 一种终端,包括:一个或多个处理器,存储器,显示装置以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置为由所述一个或多个处理器执行,所述一个或多个程序用于执行权利要求1至12中任意一项所述的人脸模型的生成方法。
PCT/CN2019/085236 2018-12-25 2019-04-30 人脸模型的生成方法、装置、存储介质及终端 Ceased WO2020133863A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/632,395 US11328455B2 (en) 2018-12-25 2019-04-30 Method and apparatus for generating face model, storage medium, and terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811586883.3 2018-12-25
CN201811586883.3A CN109671016B (zh) 2018-12-25 2018-12-25 人脸模型的生成方法、装置、存储介质及终端

Publications (1)

Publication Number Publication Date
WO2020133863A1 true WO2020133863A1 (zh) 2020-07-02

Family

ID=66146111

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/085236 Ceased WO2020133863A1 (zh) 2018-12-25 2019-04-30 人脸模型的生成方法、装置、存储介质及终端

Country Status (3)

Country Link
US (1) US11328455B2 (zh)
CN (1) CN109671016B (zh)
WO (1) WO2020133863A1 (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109671016B (zh) 2018-12-25 2019-12-17 网易(杭州)网络有限公司 人脸模型的生成方法、装置、存储介质及终端
CN110111418B (zh) * 2019-05-15 2022-02-25 北京市商汤科技开发有限公司 创建脸部模型的方法、装置及电子设备
CN111738087B (zh) * 2020-05-25 2023-07-25 完美世界(北京)软件科技发展有限公司 一种游戏角色面部模型的生成方法和装置
CN111729314B (zh) * 2020-06-30 2024-06-21 网易(杭州)网络有限公司 一种虚拟角色的捏脸处理方法、装置及可读存储介质
CN112257512B (zh) * 2020-09-25 2023-04-28 福建天泉教育科技有限公司 间接型眼部状态检测方法及计算机可读存储介质
CN114359471A (zh) * 2020-09-29 2022-04-15 阿里巴巴集团控股有限公司 脸部图像的处理方法、装置和系统
CN112337092B (zh) * 2020-12-01 2021-10-26 腾讯科技(深圳)有限公司 一种云游戏处理方法、装置、设备及存储介质
CN112973122A (zh) * 2021-03-02 2021-06-18 网易(杭州)网络有限公司 游戏角色上妆方法、装置及电子设备
CN115700790A (zh) * 2021-07-29 2023-02-07 脸萌有限公司 用于对象属性分类模型训练的方法、设备和存储介质
CN114155587B (zh) * 2021-11-30 2025-12-02 苏州亿歌网络科技有限公司 一种虚拟人脸的生成方法、装置、设备及存储介质
CN114519757B (zh) * 2022-02-17 2024-08-02 巨人移动技术有限公司 一种捏脸处理方法
CN117455940B (zh) * 2023-12-25 2024-02-27 四川汉唐云分布式存储技术有限公司 基于云值守的顾客行为检测方法、系统、设备及存储介质
CN118447548B (zh) * 2024-04-28 2024-11-29 首都医科大学附属北京口腔医院 面型分类的方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715447A (zh) * 2015-03-02 2015-06-17 百度在线网络技术(北京)有限公司 图像合成方法和装置
US20170364740A1 (en) * 2016-06-17 2017-12-21 International Business Machines Corporation Signal processing
CN107633542A (zh) * 2016-07-19 2018-01-26 珠海金山网络游戏科技有限公司 一种捏脸编辑和动画附加融合方法和系统
CN108765551A (zh) * 2018-05-15 2018-11-06 福建省天奕网络科技有限公司 一种实现3d模型捏脸的方法及终端
CN109671016A (zh) * 2018-12-25 2019-04-23 网易(杭州)网络有限公司 人脸模型的生成方法、装置、存储介质及终端

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6807290B2 (en) * 2000-03-09 2004-10-19 Microsoft Corporation Rapid computer modeling of faces for animation
CN1266642C (zh) * 2003-10-09 2006-07-26 重庆大学 基于多类别的人脸分类识别方法
JP4767718B2 (ja) * 2006-02-24 2011-09-07 富士フイルム株式会社 画像処理方法および装置ならびにプログラム
US8660319B2 (en) * 2006-05-05 2014-02-25 Parham Aarabi Method, system and computer program product for automatic and semi-automatic modification of digital images of faces
CN101968892A (zh) * 2009-07-28 2011-02-09 上海冰动信息技术有限公司 根据一张人脸照片自动调整三维人脸模型的方法
US9224248B2 (en) * 2012-07-12 2015-12-29 Ulsee Inc. Method of virtual makeup achieved by facial tracking
IL226047A (en) * 2013-04-29 2017-12-31 Hershkovitz Reshef May A method and system for giving personal expressions
US9508197B2 (en) * 2013-11-01 2016-11-29 Microsoft Technology Licensing, Llc Generating an avatar from real time image data
US9824262B1 (en) * 2014-10-04 2017-11-21 Jon Charles Daniels System and method for laterality adjusted identification of human attraction compatibility
EP3692896A1 (en) * 2014-11-04 2020-08-12 Samsung Electronics Co., Ltd. Electronic device, and method for analyzing face information in electronic device
CN105512614A (zh) * 2015-11-26 2016-04-20 北京像素软件科技股份有限公司 一种游戏角色生成方法及装置
CN105488527B (zh) * 2015-11-27 2020-01-10 小米科技有限责任公司 图像分类方法及装置
US10339365B2 (en) * 2016-03-31 2019-07-02 Snap Inc. Automated avatar generation
CN106780681B (zh) * 2016-12-01 2020-04-28 北京像素软件科技股份有限公司 一种角色动作生成方法和装置
US10028070B1 (en) * 2017-03-06 2018-07-17 Microsoft Technology Licensing, Llc Systems and methods for HRTF personalization
CN107316340B (zh) * 2017-06-28 2020-06-19 河海大学常州校区 一种基于单张照片的快速人脸建模方法
CN108479070A (zh) * 2018-03-30 2018-09-04 百度在线网络技术(北京)有限公司 虚拟模型生成方法和装置
CN108875594B (zh) * 2018-05-28 2023-07-18 腾讯科技(深圳)有限公司 一种人脸图像的处理方法、装置以及存储介质
US20200020173A1 (en) * 2018-07-16 2020-01-16 Zohirul Sharif Methods and systems for constructing an animated 3d facial model from a 2d facial image
US11189070B2 (en) * 2018-09-28 2021-11-30 Snap Inc. System and method of generating targeted user lists using customizable avatar characteristics
CN109636886B (zh) * 2018-12-19 2020-05-12 网易(杭州)网络有限公司 图像的处理方法、装置、存储介质和电子装置
US20200202604A1 (en) * 2018-12-20 2020-06-25 Imvu, Inc. System and method for extracting characteristics from a digital photo and automatically generating a three-dimensional avatar

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715447A (zh) * 2015-03-02 2015-06-17 百度在线网络技术(北京)有限公司 图像合成方法和装置
US20170364740A1 (en) * 2016-06-17 2017-12-21 International Business Machines Corporation Signal processing
CN107633542A (zh) * 2016-07-19 2018-01-26 珠海金山网络游戏科技有限公司 一种捏脸编辑和动画附加融合方法和系统
CN108765551A (zh) * 2018-05-15 2018-11-06 福建省天奕网络科技有限公司 一种实现3d模型捏脸的方法及终端
CN109671016A (zh) * 2018-12-25 2019-04-23 网易(杭州)网络有限公司 人脸模型的生成方法、装置、存储介质及终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SHULEI GAO: "The Research of Face Attributes Recognition on Convolutional Neural Network", CHINESE MASTER’S THESES FULL-TEXT DATABASE, no. 11, 1 June 2018 (2018-06-01), pages 1 - 59, XP055715442, ISSN: 1674-0246 *

Also Published As

Publication number Publication date
CN109671016A (zh) 2019-04-23
CN109671016B (zh) 2019-12-17
US20210366162A1 (en) 2021-11-25
US11328455B2 (en) 2022-05-10

Similar Documents

Publication Publication Date Title
CN109671016B (zh) 人脸模型的生成方法、装置、存储介质及终端
KR101259662B1 (ko) 얼굴 분류 방법, 얼굴 분류 장치, 분류맵, 얼굴 분류프로그램, 및 상기 프로그램이 기록된 기록매체
CN104992402B (zh) 一种美颜处理方法及装置
EP3338217B1 (en) Feature detection and masking in images based on color distributions
CN108629339B (zh) 图像处理方法及相关产品
CN104834898B (zh) 一种人物摄影图像的质量分类方法
TW202044202A (zh) 建立臉部模型的方法、裝置、電腦可讀儲存介質及電子設備
CN108230297B (zh) 一种基于服装替换的色彩搭配评估方法
CN103236066A (zh) 一种基于人脸特征分析的虚拟试妆方法
CN108012081A (zh) 智能美颜方法、装置、终端和计算机可读存储介质
CN111489311A (zh) 一种人脸美化方法、装置、电子设备及存储介质
CN106447720B (zh) 一种构建黄金比例脸型的方法
CN104680121A (zh) 一种人脸图像的处理方法及装置
CN105045968A (zh) 一种发型设计方法及系统
CN108921856B (zh) 图像裁剪方法、装置、电子设备及计算机可读存储介质
CN104537372A (zh) 一种具备区域感知特性的人脸图像蒙板自动生成方法
CN109410138B (zh) 修饰双下巴的方法、装置和系统
WO2023273247A1 (zh) 人脸图像处理方法及装置、计算机可读存储介质、终端
CN113420663B (zh) 一种儿童人脸识别方法及系统
WO2018214115A1 (zh) 一种评价脸妆的方法及装置
CN110516661B (zh) 应用于虹膜识别的美瞳检测方法及装置
CN113469874A (zh) 一种美妆处理方法、装置、电子设备和存储介质
CN108154088B (zh) 一种导购机检测侧脸的方法及系统
CN102103687A (zh) 图像处理设备、方法和程序
US9916497B2 (en) Automated embedding and blending head images

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

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

Country of ref document: EP

Kind code of ref document: A1