CN112101127B - Face shape recognition method and device, computing equipment and computer storage medium - Google Patents

Face shape recognition method and device, computing equipment and computer storage medium Download PDF

Info

Publication number
CN112101127B
CN112101127B CN202010849002.3A CN202010849002A CN112101127B CN 112101127 B CN112101127 B CN 112101127B CN 202010849002 A CN202010849002 A CN 202010849002A CN 112101127 B CN112101127 B CN 112101127B
Authority
CN
China
Prior art keywords
face
key point
coordinates
point coordinates
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010849002.3A
Other languages
Chinese (zh)
Other versions
CN112101127A (en
Inventor
陈仿雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Original Assignee
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Shuliantianxia Intelligent Technology Co Ltd filed Critical Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority to CN202010849002.3A priority Critical patent/CN112101127B/en
Publication of CN112101127A publication Critical patent/CN112101127A/en
Application granted granted Critical
Publication of CN112101127B publication Critical patent/CN112101127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention relates to the technical field of face recognition and discloses a face recognition method, which comprises the following steps: acquiring a face image to be identified; determining positive face key point coordinates in the face image to be recognized; normalizing the face contour key point coordinates in the face key point coordinates to obtain normalized face contour key point coordinates; calculating the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape; and determining the face shape corresponding to the face image to be identified according to the standard face shape corresponding to the minimum similarity distance. Through the mode, the facial form recognition method and the facial form recognition device realize facial form recognition.

Description

Face shape recognition method and device, computing equipment and computer storage medium
Technical Field
The embodiment of the invention relates to the technical field of face recognition, in particular to a face recognition method, a face recognition device, a computing device and a computer storage medium.
Background
With the improvement of the living standard of people, many people pay more attention to personal figures, want to know the facial shapes of the people to select proper hairstyles, makeup and the like.
The common facial form recognition method in the prior art is to judge the facial form according to the set rules through the distance or angle between the five sense organs. As the types of facial forms are classified more and more finely, distances between the five sense organs corresponding to different facial forms are similar, resulting in low recognition accuracy.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide a method, an apparatus, a computing device, and a computer storage medium for identifying a face shape, which are used for solving the problem of low face shape identification accuracy in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a method for identifying a face shape, the method including:
acquiring a face image to be identified;
determining positive face key point coordinates in the face image to be recognized;
normalizing the face contour key point coordinates in the face key point coordinates to obtain normalized face contour key point coordinates;
calculating the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape;
and determining the face shape corresponding to the face image to be identified according to the standard face shape corresponding to the minimum similarity distance.
In an optional manner, the determining the coordinates of the frontal key point in the face image to be identified further includes:
extracting face key point coordinates in the face image to be recognized;
calculating a face rotation angle according to the coordinates of the key points of the target face; the coordinates of the target face key points are the coordinates of two key points which are symmetrical to each other in the front face key points;
and adjusting the face key point coordinates according to the face rotation angle to obtain the positive face key point coordinates.
In an optional manner, normalizing the face contour key point coordinates in the positive face key point coordinates to obtain normalized face contour key point coordinates includes:
Calculating the average value of the face contour key point coordinates in the positive face key point coordinates to obtain the face center coordinates;
and normalizing the face contour key point coordinates according to the face center coordinates to obtain normalized face contour key point coordinates.
In an optional manner, the normalizing the coordinates of the key points of the face contour according to the coordinates of the face center includes:
Calculating the average value of the distances between the key point coordinates of the face outline and the central coordinates of the face to obtain normalized parameters;
And calculating the ratio of the face contour key point coordinates to the normalization parameters to obtain the normalization face contour key point coordinates.
In an optional manner, the calculating an average value of the distances between the face contour key point coordinates and the face center coordinates to obtain the normalization parameter includes:
Translating the coordinates of the key points of the face contour according to the direction from the coordinates of the central point of the face to the origin of coordinates to obtain the coordinates of the key points of the face contour in translation;
And calculating the average value of the distances between the coordinates of the key points of the translational face contour and the origin of coordinates to obtain normalized parameters.
In an optional manner, the calculating the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape includes:
and calculating Hausdorff distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape to obtain the similar distance.
In an optional manner, the determining the face shape corresponding to the face image to be identified according to the standard face shape corresponding to the minimum similarity distance includes:
taking the standard face corresponding to the minimum similar distance as a candidate face corresponding to the face image to be identified;
calculating a length value of a preset part in the face image to be recognized according to the positive face key point coordinates;
determining whether the length value of the preset part in the candidate face shape is matched with the length value of the preset part in the face image to be identified;
if the face images are matched, the candidate face forms are determined to be the face forms corresponding to the face images to be identified;
if the target standard face shape is not matched with the length value of the preset part in the face image to be identified, determining whether the target standard face shape matched with the length value of the preset part in the face image to be identified exists in the standard face shape;
If the face image to be recognized exists, the target standard face shape is determined to be the face shape corresponding to the face image to be recognized;
and if the face image does not exist, determining the candidate face shape as the face shape corresponding to the face image to be recognized.
According to another aspect of the embodiment of the present invention, there is provided a face shape recognition apparatus, including:
the acquisition module is used for acquiring the face image to be identified;
The first determining module is used for determining positive face key point coordinates in the face image to be recognized;
the normalization module is used for normalizing the coordinates of the key points of the translational face profile to obtain the coordinates of the key points of the normalized face profile;
the calculating module is used for calculating the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape;
and the second determining module is used for determining the face shape corresponding to the face image to be identified according to the standard face shape corresponding to the minimum similar distance.
According to another aspect of an embodiment of the present invention, there is provided a computing device including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
The memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the face recognition method.
According to still another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium having stored therein at least one executable instruction for causing a computing apparatus/device to perform operations corresponding to the above-described method for recognizing a face shape.
The face model corresponding to the face image to be recognized is determined according to the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face model. The dimensions of the key point coordinates of the normalized face outline are the same, and the influence of the size of the face in the face image to be recognized on the calculation result of the similar distance is avoided. In addition, the similarity distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face can reflect the similarity between the face shape and the standard face shape in the face image to be recognized, even if the face shape is finely divided, the standard face shape which is most similar to the face shape in the face image to be recognized can be accurately recognized according to the similarity distance, and the recognition precision is high.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present invention can be more clearly understood, and the following specific embodiments of the present invention are given for clarity and understanding.
Drawings
The drawings are only for purposes of illustrating embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a schematic flow chart of a face recognition method according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of facial key points in a face recognition method according to an embodiment of the present invention;
Fig. 3 is a schematic diagram of a flow chart of face in a face recognition method according to another embodiment of the present invention;
fig. 4 is a functional block diagram of a face shape recognition device according to an embodiment of the present invention;
FIG. 5 illustrates a schematic diagram of a computing device provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein.
Fig. 1 shows a flowchart of a face recognition method according to an embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step 110: and acquiring a face image to be identified.
In this step, the face image to be recognized is an image including a face. The face image to be recognized may include images of other parts, such as the neck, the shoulder, and the like, in addition to the face image. According to the application scene of the embodiment of the invention, the face image to be recognized can be obtained in different modes. For example, when the embodiment of the invention is applied to make-up APP and the like on an intelligent terminal device, an image acquisition device (such as a camera) on the intelligent terminal device can acquire a face image to be identified, and the face image to be identified is transmitted to a processor of the intelligent terminal, so that the processor acquires the face image to be identified. In other embodiments, the face image to be recognized may be an image stored in advance in the face recognition device, for example, a network image. In this scenario, the face image to be recognized may be directly obtained from the storage module of the face recognition apparatus.
The size of the face image to be identified obtained in the step is a preset size value. Embodiments of the present invention are not limited to a particular value of the predetermined size value, for example, in one embodiment, the predetermined size value is (600, 800). And if the size of the acquired face image is not the preset size value, the size of the face image is adjusted in proportion so as to adjust the size of the face image to the preset size. For example, if the size of the face image is (a 1, b 1) and the preset size value is (a, b), the length and width of the face image are scaled by a/a1 and b/b1, respectively, and the face image is adjusted to the preset size value.
Step 120: and determining the coordinates of the key points of the front face in the face image to be recognized.
In this step, the coordinates of the positive face key points in the face image to be recognized are determined by the face key point positioning model. The embodiment of the invention is not limited to the specific type of the face key point positioning model, and for example, the face key point positioning model can be an active appearance model (ACTIVE APPEARANCE models, AAMS), a constraint local model (constrained local models, CLMs) and the like. And after the key points of the face to be identified in the face image are positioned through the face key point positioning model, obtaining the key points of the face, wherein each key point is represented by a key point coordinate. The facial key points comprise facial contour key points and five sense organ key points, and the embodiment of the invention does not limit the form and the number of the obtained facial key point coordinates. For example, in one specific embodiment, the resulting facial key points are shown in FIG. 2. In fig. 2, 127 face key points are used to describe the facial contour and the five sense organs, respectively.
In some embodiments, the face in the face image to be recognized is a front face, and the key points obtained through the face key point positioning model are the front face key points.
In other embodiments, the face in the face image to be identified may be rotated to different degrees, and the keypoints obtained by the face keypoint location model are not frontal face keypoints. In this case, the face key point coordinates obtained by the face key point positioning model are adjusted according to the face rotation angle, so as to obtain the positive face key point coordinates. Specifically, after face key point coordinates are extracted according to the face key point positioning model, face rotation angles are calculated according to target face key point coordinates in the face key point coordinates. The coordinates of the target face key points are two key point coordinates which are symmetrical to each other in the front face key points, and the embodiment of the invention is not limited to specific key point positions. For example, the target face key point coordinates may be left mouth corner key point coordinates and right mouth corner key point coordinates, or may be left eye ball key point coordinates and right eye ball key point coordinates. Taking the left eyeball key point coordinate (x l,yl) and the right eyeball key point coordinate (x r,yr) as target face key point coordinates as an example, the face rotation angleAny one key point coordinate (x i,yi) in the key point coordinates of the human face is adjusted according to the rotation angle of the human face, and the corresponding key point coordinates of the positive face are obtained as (x i、,yi), wherein x i'=xicosθ-yisinθ,yi'=xisinθ+yi cos theta.
Step 130: and normalizing the face contour key point coordinates in the face key point coordinates to obtain normalized face contour key point coordinates.
In this step, the face sizes in the face image to be recognized may be different, and the face contour key point coordinates in the face key point coordinates are normalized to remove the influence of the face sizes on face recognition. In a specific embodiment, the face center coordinates are determined according to the face contour key point coordinates in the face key point coordinates. For example, the face contour key point coordinates include (x 1,y1)、(x2,y2)...(xn,yn), then the face center coordinates are (x c,yc), where,And calculating the average value of the distances between the key point coordinates of the face outline and the central coordinates of the face to obtain the normalization parameters. Normalized parameter is denoted by r, then/>And calculating the ratio of the key point coordinates of the face contour to the normalization parameters to obtain the key point coordinates of the normalization face contour. Taking any one face contour key point coordinate (x i,yi) as an example, the obtained normalized face contour key point coordinate is (x i *,yi *), wherein x i *=xi/r,yi *=yi/r.
In some embodiments, when calculating the normalization parameter, translating the face contour key point coordinates according to the direction from the face center coordinates to the coordinate origin to obtain translated face contour key point coordinates, and calculating an average value of distances between the translated face contour key point coordinates and the coordinate origin to obtain the normalization parameter. And translating the face center coordinate to the origin position of the coordinate, and obtaining the translated face center coordinate which is the origin coordinate. The translated face contour key point coordinate obtained after the face contour key point coordinate (x i,yi) is translated is (x i ^,yi ^), wherein x i ^=xi-xc,yi ^=yi-yc is the same. The calculation formula of the normalization parameter r obtained according to the key points of the translation face outline is as follows: calculation of normalization parameters is simplified by translation.
Step 140: and calculating the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape.
In this step, the coordinates of key points of the normalized face contour of the standard face are calculated according to the methods from step 110 to step 130. The similarity distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape is used for representing the similarity between the face image to be identified and each standard face shape. When the similar distance is calculated, the distance can be calculated by using the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face according to the corresponding relation of the key points, and the mean value of the distances between the key points corresponding to each group is used as the similar distance, or the variance of the distances between the key points corresponding to each group is used as the similar distance.
In other embodiments, the hausdorff distance of the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape are calculated to obtain the similarity distance. The calculation formula of the Haosdorf distance is as follows: h (a, B) =max (H (a, B), H (B, a)), wherein,A= (a 1,a2...an),B=(b1,b2,...bn),minb∈Ba-b represents the minimum distance from one point a in distance a in B 1~bn, where point a represents any one point in a 1~an for convenience of description, the minimum distance from point a i in B 1~bn is referred to as the distance of a i from B./>Represents the sum of the distances from each point in A to B, and h (A, B) represents the average value of the sum of the distances from each point in A to B. Similarly, min a∈A||b-a|| represents the minimum distance of one point B in distance B in a 1~an, where point B represents any one point in B 1~bn. For convenience of description, the minimum distance from point b i in a 1~an is referred to as the distance between b i and a. /(I)Represents the sum of the distances from each point in B to A, and h (B, A) represents the average value of the sum of the distances from each point in B to A. The maximum value in h (A, B) and h (B, A) is the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of the standard face. The Haoskov distance can measure and calculate the distances between all key points in the normalized face contour key points and all key points in the normalized face contour key points of the standard face, and the similar distances obtained by the method comprehensively consider the distances between each point in the normalized face contour key points and each point in the normalized face contour key points of the standard face, so that the randomness that the distance between the individual key points is used as the similar distance is avoided, and therefore, the similar distances obtained by the embodiment of the invention are more accurate.
Step 150: and determining the face shape corresponding to the face image to be recognized according to the standard face shape corresponding to the minimum similarity distance.
In this step, the standard face shape corresponding to the minimum similarity distance is determined as the face shape corresponding to the face image to be recognized.
The face model corresponding to the face image to be recognized is determined according to the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face model. The dimensions of the key point coordinates of the normalized face outline are the same, and the influence of the size of the face in the face image to be recognized on the calculation result of the similar distance is avoided. In addition, the similarity distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face can reflect the similarity between the face shape and the standard face shape in the face image to be recognized, even if the face shape is finely divided, the standard face shape which is most similar to the face shape in the face image to be recognized can be accurately recognized according to the similarity distance, and the recognition precision is high.
In some other embodiments, determining the face shape corresponding to the face image to be recognized according to the standard face shape corresponding to the minimum similarity distance further includes the following steps as shown in fig. 3:
step 210: and taking the standard face corresponding to the minimum similarity distance as a candidate face corresponding to the face image to be identified.
Step 220: and calculating the length value of the preset part in the face image to be recognized according to the coordinates of the key points of the front face.
In this step, the preset portion may be preset by a person skilled in the art, and the embodiment of the present invention does not limit the face portion of the person specifically represented by the preset portion. In a specific embodiment, the length value of the preset portion includes a length value of the forehead, a length value of the cheekbone, a length value of the chin, and an overall length value of the face. When calculating the length value, selecting the preset position of the human face can represent two key point coordinates of the length of the preset position to calculate the length value of the preset position. For example, when calculating the chin length value, the preset part length is calculated by selecting the coordinates of the key points corresponding to the key point No. 9 and the key point No. 23. Assuming that the coordinates of the key point No. 9 are (x q1,yq1) and the coordinates of the key point No. 23 are (x q2,yq2), the calculated chin length value is
In some embodiments, at least two sets of keypoints are selected to calculate the preset site length, and the distance between two keypoints in each set of keypoints can be used to characterize the preset site length. For example, when calculating the forehead length value, selecting the 105 # key point and the 125 # key point as a group of key points, calculating to obtain a first forehead length value, selecting the 106 # key point and the 124 # key point as another group of key points, calculating to obtain a second forehead length value, and taking the average value of the first forehead length value and the second forehead length value as the forehead length value. By the method, calculation errors during calculation of a group of key points are avoided, and accuracy of calculation results is improved.
Step 230: determining whether the length value of the preset part in the candidate face pattern is matched with the length value of the preset part in the face image to be recognized, if so, executing step 240, otherwise, executing step 250.
In this step, each standard face corresponds to a set of length values of the preset portion, and the candidate face is any standard face. And when determining whether the length value of the preset part in the candidate face shape is matched with the length value of the preset part in the face image to be identified, determining whether the face image is matched according to a preset matching rule. The matching rules may be set by those skilled in the art based on prior art length values from which the facial form is determined medically.
In a specific embodiment, the length value of the preset portion includes a length value of the forehead, a length value of the cheekbone, a length value of the chin, and an overall length value of the face. When the candidate face is a goose face, the corresponding length value of the candidate face meets the following conditions: the ratio of the length value of the forehead to the length value of the chin is in a preset first range, and the integral length value of the face and the length value of the cheekbones meet a preset first multiple. The preset range and the preset multiple may be determined according to a length value relationship of the goose face counted in the history, for example, in a specific embodiment, the preset first range is [0.9,1.1], and the preset first multiple is 1.5.
When the candidate face shape is a round face, the corresponding length value thereof satisfies the following conditions: the ratio of the forehead length value to the chin length value is within a preset second range, and the whole length value of the face and the length value of the cheekbones meet a preset second multiple. The preset second range and the preset second multiple may be determined according to a relationship between the length values of the face counted by the history, for example, in a specific embodiment, the preset second range is [0.9,1.1], and the preset second multiple is 1.
When the candidate face shape is a square face, the ratio of the length value of the forehead, the length value of the chin and the whole length value of the face meets the first ratio. The first ratio may be determined according to a length value relationship of the face of the history statistics, for example, in a specific embodiment, the first ratio is 1:1:1.
When the candidate face shape is a heart-shaped face, the length value of the forehead, the length value of the cheekbones and the length value of the chin are gradually decreased. Embodiments of the present invention are not limited to specific decrementing values.
It will be appreciated that the relationship between the length values described above may allow for some error. For example, if the preset first multiple is 1.5, then when a 5% error is allowed, if the actual first multiple is 1.43, then the preset first multiple is considered to be satisfied.
Step 240: and determining the candidate face shape as the face shape corresponding to the face image to be recognized.
In this step, if the length value of the preset part in the candidate face pattern matches the length value of the preset part in the face image to be recognized, determining the candidate face pattern as the face pattern corresponding to the face image to be recognized.
Step 250: determining whether a target standard face shape matched with the length value of the preset part in the face image to be recognized exists in the standard face shape, if so, executing step 260, otherwise, executing step 270.
In this step, if the length value of the preset part in the candidate face pattern does not match the length value of the preset part in the face image to be recognized, it is determined whether a target standard face pattern matching the length value of the preset part in the face image to be recognized exists in the standard face pattern. For example, the candidate face shape is a goose face, but the length value of the preset part in the face image to be recognized is not matched with the length value of the preset part corresponding to the goose face. And determining whether target standard facial forms matched with the length values of the preset parts in the face image to be identified exist in all the standard facial forms.
Step 260: and determining the target standard face shape as the face shape corresponding to the face image to be identified.
In this step, if there is a target standard face shape, the target standard face shape is taken as a face shape corresponding to the face image to be recognized.
Step 270: and determining the candidate face shape as the face shape corresponding to the face image to be recognized.
In this step, if the target standard face shape does not exist, the candidate face shape is taken as the face shape corresponding to the face image to be recognized.
According to the embodiment of the invention, the standard face corresponding to the minimum similarity distance is used as the candidate face, and whether the candidate face is used as the face corresponding to the face image to be identified is determined according to the matching result of the length value of the preset part and the length value of the preset part of the candidate face. Through the mode, the standard face model obtained by the minimum similarity distance is verified, the error of the face model identification result caused by the error of the minimum similarity distance calculation result is avoided, and the face model identification precision is further improved.
Fig. 4 is a schematic structural diagram of a face recognition device according to an embodiment of the present invention. As shown in fig. 4, the apparatus includes: the acquisition module 310, the first determination module 320, the normalization module 330, the calculation module 340, and the second determination module 350. The acquiring module 310 is configured to acquire a face image to be identified. The first determining module 320 is configured to determine coordinates of a frontal face key point in the face image to be recognized. The normalization module 330 is configured to normalize the translated face contour key point coordinates to obtain normalized face contour key point coordinates. The calculating module 340 is configured to calculate a similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face. The second determining module 350 is configured to determine a face shape corresponding to the face image to be identified according to a standard face shape corresponding to the minimum similarity distance.
In an alternative manner, the first determining module 310 is further configured to:
extracting face key point coordinates in the face image to be recognized;
calculating a face rotation angle according to the coordinates of the key points of the target face; the coordinates of the target face key points are the coordinates of two key points which are symmetrical to each other in the front face key points;
and adjusting the face key point coordinates according to the face rotation angle to obtain the positive face key point coordinates.
In an alternative manner, normalization module 330 is further to:
Calculating the average value of the face contour key point coordinates in the positive face key point coordinates to obtain the face center coordinates;
and normalizing the face contour key point coordinates according to the face center coordinates to obtain normalized face contour key point coordinates.
In an alternative manner, normalization module 330 is further to:
Calculating the average value of the distances between the key point coordinates of the face outline and the central coordinates of the face to obtain normalized parameters;
And calculating the ratio of the face contour key point coordinates to the normalization parameters to obtain the normalization face contour key point coordinates.
In an alternative manner, normalization module 330 is further to:
Translating the coordinates of the key points of the face contour according to the direction from the coordinates of the central point of the face to the origin of coordinates to obtain the coordinates of the key points of the face contour in translation;
And calculating the average value of the distances between the coordinates of the key points of the translational face contour and the origin of coordinates to obtain normalized parameters.
In an alternative approach, the computing module 340 is further to:
and calculating Hausdorff distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape to obtain the similar distance.
In an alternative manner, the second determining module 350 is further configured to:
taking the standard face corresponding to the minimum similar distance as a candidate face corresponding to the face image to be identified;
calculating a length value of a preset part in the face image to be recognized according to the positive face key point coordinates;
determining whether the length value of the preset part in the candidate face shape is matched with the length value of the preset part in the face image to be identified;
if the face images are matched, the candidate face forms are determined to be the face forms corresponding to the face images to be identified;
if the target standard face shape is not matched with the length value of the preset part in the face image to be identified, determining whether the target standard face shape matched with the length value of the preset part in the face image to be identified exists in the standard face shape;
If the face image to be recognized exists, the target standard face shape is determined to be the face shape corresponding to the face image to be recognized;
and if the face image does not exist, determining the candidate face shape as the face shape corresponding to the face image to be recognized.
The face model corresponding to the face image to be recognized is determined according to the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face model. The dimensions of the key point coordinates of the normalized face outline are the same, and the influence of the size of the face in the face image to be recognized on the calculation result of the similar distance is avoided. In addition, the similarity distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face can reflect the similarity between the face shape and the standard face shape in the face image to be recognized, even if the face shape is finely divided, the standard face shape which is most similar to the face shape in the face image to be recognized can be accurately recognized according to the similarity distance, and the recognition precision is high.
FIG. 5 illustrates a schematic diagram of a computing device in accordance with an embodiment of the invention, which is not limited to a particular implementation of the computing device.
As shown in fig. 5, the computing device may include: a processor 402, a communication interface (Communications Interface) 404, a memory 406, and a communication bus 408.
Wherein: processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. A communication interface 404 for communicating with network elements of other devices, such as clients or other servers. The processor 402 is configured to execute the program 410, and may specifically perform the relevant steps in the foregoing embodiment of the method for recognizing a face shape.
In particular, program 410 may include program code including computer-executable instructions.
The processor 402 may be a central processing unit CPU, or an Application-specific integrated Circuit ASIC (Application SPECIFIC INTEGRATED Circuit), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included by the computing device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
Memory 406 for storing programs 410. Memory 406 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Program 410 may be specifically invoked by processor 402 to cause a computing device to perform steps 110-150 of fig. 1, steps 210-270 of fig. 2, or to implement the functions of modules 310-350 of fig. 3.
The embodiment of the invention provides a computer readable storage medium, which stores at least one executable instruction, and when the executable instruction runs on a computing device/apparatus, the computing device/apparatus executes an operation corresponding to a face recognition method in any of the above method embodiments.
The embodiment of the invention provides a computer program which can be called by a processor to enable a computing device to execute the operation corresponding to the face recognition method in any of the method embodiments.
An embodiment of the present invention provides a computer program product, where the computer program product includes a computer program stored on a computer readable storage medium, where the computer program includes program instructions, when the program instructions are executed on a computer, cause the computer to perform operations corresponding to a face shape recognition method in any of the foregoing method embodiments.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component, and they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specifically stated.

Claims (9)

1. A method for identifying a face shape, the method comprising:
acquiring a face image to be identified;
determining positive face key point coordinates in the face image to be recognized;
Normalizing the face contour key point coordinates in the face key point coordinates by using the face center coordinates to obtain normalized face contour key point coordinates; the coordinates in the face are the average value of the face contour key point coordinates in the front face key point coordinates;
calculating the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape;
Determining the face shape corresponding to the face image to be identified according to the standard face shape corresponding to the minimum similarity distance, including: taking the standard face corresponding to the minimum similar distance as a candidate face corresponding to the face image to be identified; calculating a length value of a preset part in the face image to be recognized according to the positive face key point coordinates; determining whether the length value of the preset part in the candidate face shape is matched with the length value of the preset part in the face image to be identified; if the face images are matched, the candidate face forms are determined to be the face forms corresponding to the face images to be identified; if the target standard face shape is not matched with the length value of the preset part in the face image to be identified, determining whether the target standard face shape matched with the length value of the preset part in the face image to be identified exists in the standard face shape; if the face image to be recognized exists, the target standard face shape is determined to be the face shape corresponding to the face image to be recognized; and if the face image does not exist, determining the candidate face shape as the face shape corresponding to the face image to be recognized.
2. The method of claim 1, wherein the determining positive face keypoint coordinates in the face image to be identified further comprises:
extracting face key point coordinates in the face image to be recognized;
calculating a face rotation angle according to the coordinates of the key points of the target face; the coordinates of the target face key points are the coordinates of two key points which are symmetrical to each other in the front face key points;
and adjusting the face key point coordinates according to the face rotation angle to obtain the positive face key point coordinates.
3. The method according to claim 1, wherein normalizing the face contour key point coordinates in the face center key point coordinates to obtain normalized face contour key point coordinates includes:
calculating the average value of the face contour key point coordinates in the positive face key point coordinates to obtain face center coordinates;
and normalizing the face contour key point coordinates according to the face center coordinates to obtain normalized face contour key point coordinates.
4. A method according to claim 3, wherein normalizing the face contour key point coordinates with face center coordinates according to the face center coordinates comprises:
Calculating the average value of the distances between the key point coordinates of the face outline and the central coordinates of the face to obtain normalized parameters;
And calculating the ratio of the face contour key point coordinates to the normalization parameters to obtain the normalization face contour key point coordinates.
5. The method according to claim 4, wherein calculating an average value of distances between the face contour key point coordinates and the face center coordinates to obtain a normalized parameter includes:
Translating the coordinates of the key points of the face contour according to the direction from the coordinates of the central point of the face to the origin of coordinates to obtain the coordinates of the key points of the face contour in translation;
And calculating the average value of the distances between the coordinates of the key points of the translational face contour and the origin of coordinates to obtain normalized parameters.
6. The method of claim 1, wherein the calculating the similarity distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape comprises:
and calculating Hausdorff distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape to obtain the similar distance.
7. A face shape recognition device, the device comprising:
the acquisition module is used for acquiring the face image to be identified;
The first determining module is used for determining positive face key point coordinates in the face image to be recognized;
the normalization module is used for normalizing the coordinates of the key points of the translational face outline by the center coordinates of the face to obtain the coordinates of the key points of the normalized face outline; the coordinates in the face are the average value of the face contour key point coordinates in the front face key point coordinates;
the calculating module is used for calculating the similar distance between the normalized face contour key point coordinates and the normalized face contour key point coordinates of each standard face shape;
The second determining module is configured to determine a face shape corresponding to the face image to be identified according to a standard face shape corresponding to the minimum similarity distance, and includes: taking the standard face corresponding to the minimum similar distance as a candidate face corresponding to the face image to be identified; calculating a length value of a preset part in the face image to be recognized according to the positive face key point coordinates; determining whether the length value of the preset part in the candidate face shape is matched with the length value of the preset part in the face image to be identified; if the face images are matched, the candidate face forms are determined to be the face forms corresponding to the face images to be identified; if the target standard face shape is not matched with the length value of the preset part in the face image to be identified, determining whether the target standard face shape matched with the length value of the preset part in the face image to be identified exists in the standard face shape; if the face image to be recognized exists, the target standard face shape is determined to be the face shape corresponding to the face image to be recognized; and if the face image does not exist, determining the candidate face shape as the face shape corresponding to the face image to be recognized.
8. A computing device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
The memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform operations corresponding to a method for recognizing a face shape according to any one of claims 1 to 6.
9. A computer readable storage medium, wherein at least one executable instruction is stored in the storage medium, and when the executable instruction is executed on a computing device/apparatus, the computing device/apparatus is caused to perform operations corresponding to a face shape recognition method according to any one of claims 1-6.
CN202010849002.3A 2020-08-21 2020-08-21 Face shape recognition method and device, computing equipment and computer storage medium Active CN112101127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010849002.3A CN112101127B (en) 2020-08-21 2020-08-21 Face shape recognition method and device, computing equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010849002.3A CN112101127B (en) 2020-08-21 2020-08-21 Face shape recognition method and device, computing equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN112101127A CN112101127A (en) 2020-12-18
CN112101127B true CN112101127B (en) 2024-04-30

Family

ID=73753921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010849002.3A Active CN112101127B (en) 2020-08-21 2020-08-21 Face shape recognition method and device, computing equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN112101127B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705393A (en) * 2021-08-16 2021-11-26 武汉大学 3D face model-based depression angle face recognition method and system
CN114267066B (en) * 2021-12-24 2022-11-01 合肥的卢深视科技有限公司 Face recognition method, electronic device and storage medium
CN114267068B (en) * 2021-12-24 2022-11-01 合肥的卢深视科技有限公司 Face recognition method based on continuous frame information, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102339376A (en) * 2010-07-14 2012-02-01 上海一格信息科技有限公司 Classifying and processing method based on active shape model and K nearest neighbor algorithm for facial forms of human faces
CN106980840A (en) * 2017-03-31 2017-07-25 北京小米移动软件有限公司 Shape of face matching process, device and storage medium
WO2018001092A1 (en) * 2016-06-29 2018-01-04 中兴通讯股份有限公司 Face recognition method and apparatus
KR101943433B1 (en) * 2018-08-24 2019-01-29 전북대학교산학협력단 System for detecting suspects in real-time through face sketch recognition
WO2019090769A1 (en) * 2017-11-13 2019-05-16 深圳和而泰智能控制股份有限公司 Human face shape recognition method and apparatus, and intelligent terminal
CN110751009A (en) * 2018-12-20 2020-02-04 北京嘀嘀无限科技发展有限公司 Face recognition method, target recognition device and electronic equipment
CN111091055A (en) * 2019-11-13 2020-05-01 深圳数联天下智能科技有限公司 Face shape recognition method, device, equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102339376A (en) * 2010-07-14 2012-02-01 上海一格信息科技有限公司 Classifying and processing method based on active shape model and K nearest neighbor algorithm for facial forms of human faces
WO2018001092A1 (en) * 2016-06-29 2018-01-04 中兴通讯股份有限公司 Face recognition method and apparatus
CN106980840A (en) * 2017-03-31 2017-07-25 北京小米移动软件有限公司 Shape of face matching process, device and storage medium
WO2019090769A1 (en) * 2017-11-13 2019-05-16 深圳和而泰智能控制股份有限公司 Human face shape recognition method and apparatus, and intelligent terminal
KR101943433B1 (en) * 2018-08-24 2019-01-29 전북대학교산학협력단 System for detecting suspects in real-time through face sketch recognition
CN110751009A (en) * 2018-12-20 2020-02-04 北京嘀嘀无限科技发展有限公司 Face recognition method, target recognition device and electronic equipment
CN111091055A (en) * 2019-11-13 2020-05-01 深圳数联天下智能科技有限公司 Face shape recognition method, device, equipment and computer readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于ASM和K近邻算法的人脸脸型分类;张倩;丁友东;蓝建梁;涂意;;计算机工程(第11期);全文 *
基于主动形状模型和K近邻算法的人脸脸型分类;刘双成;蔡晓东;张力;毕伟伟;梁建勇;;桂林电子科技大学学报(第06期);全文 *
基于主动形状模型的人脸脸型自动分类算法;杜立强;贾鹏;周宗潭;胡德文;;计算机应用(第10期);全文 *

Also Published As

Publication number Publication date
CN112101127A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN112101127B (en) Face shape recognition method and device, computing equipment and computer storage medium
US10068128B2 (en) Face key point positioning method and terminal
CN107463865B (en) Face detection model training method, face detection method and device
JP3279913B2 (en) Person authentication device, feature point extraction device, and feature point extraction method
CN112232117A (en) Face recognition method, face recognition device and storage medium
CN108629336B (en) Face characteristic point identification-based color value calculation method
US11449590B2 (en) Device and method for user authentication on basis of iris recognition
JP6071002B2 (en) Reliability acquisition device, reliability acquisition method, and reliability acquisition program
CN109389018B (en) Face angle recognition method, device and equipment
CN111881789B (en) Skin color identification method, device, computing equipment and computer storage medium
WO2022257456A1 (en) Hair information recognition method, apparatus and device, and storage medium
US20200302218A1 (en) Fast curve matching for tattoo recognition and identification
JP2006085685A (en) System and method for identifying face
CN111598038A (en) Face feature point detection method, device, equipment and storage medium
CN112686191B (en) Living body anti-counterfeiting method, system, terminal and medium based on three-dimensional information of human face
WO2020164284A1 (en) Method and apparatus for recognising living body based on planar detection, terminal, and storage medium
Song et al. Robust 3D face landmark localization based on local coordinate coding
CN113298158A (en) Data detection method, device, equipment and storage medium
Samad et al. Frenet frame-based generalized space curve representation for pose-invariant classification and recognition of 3-D face
CN113128341A (en) Dog face identification method based on convolutional neural network
CN112102348A (en) Image processing apparatus
CN111460910A (en) Face type classification method and device, terminal equipment and storage medium
CN109460690B (en) Method and device for pattern recognition
CN113705466A (en) Human face facial feature occlusion detection method used for occlusion scene, especially under high-imitation occlusion
US20210097101A1 (en) Method and apparatus for searching for an image and related storage medium

Legal Events

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