A face shape recognition method, device, equipment and storage medium

By extracting edge points, normalizing coordinates, and correcting symmetry in facial images, a unified normalized coordinate system is established, which solves the accuracy problem caused by image differences in face recognition and achieves more efficient face recognition.

CN116778542BActive Publication Date: 2026-06-16BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
Filing Date
2022-03-10
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing face recognition technologies suffer from asymmetry in the coordinates of extracted key points due to differences in the position, size, angle, and pose of faces in different images, which affects recognition accuracy.

Method used

By acquiring the target face image, the original coordinate information of the face contour edge points is extracted, and coordinate normalization and symmetry correction are performed to establish a unified normalized coordinate system, eliminate image differences, and use a preset network model for face recognition.

Benefits of technology

It improves the accuracy of facial recognition, avoids inaccurate recognition caused by differences in facial position, size, angle and posture, and achieves more accurate facial recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116778542B_ABST
    Figure CN116778542B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a face shape recognition method, device, equipment and storage medium. The method comprises: obtaining a target face image of a target user; extracting a face contour edge point in the target face image to obtain original coordinate information corresponding to each edge point; performing coordinate normalization and symmetric correction processing on each original coordinate information to determine target coordinate information corresponding to each edge point; and performing face shape recognition based on each target coordinate information to determine a target face shape category corresponding to the target user. The technical scheme of the embodiments of the present application can effectively ensure the accuracy of face shape recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to computer technology, and more particularly to a face recognition method, apparatus, device, and storage medium. Background Technology

[0002] With the rapid development of computer technology, it is now possible to automatically generate 3D virtual digital human models based on user images. Facial recognition is a crucial step in the automatic generation of 3D human models.

[0003] Currently, existing face recognition methods typically involve extracting the coordinates of facial landmarks from a user's face image and then directly performing face recognition based on the extracted coordinates. For example, the extracted coordinates can be directly input into a neural network model for face recognition.

[0004] However, in the process of realizing this invention, the inventors discovered at least the following problems in the prior art:

[0005] Because the position, size, angle, and pose of the face vary in different images, and the extracted key point coordinates are not strictly symmetrical due to pose differences, the existing technology of directly performing face recognition based on the extracted facial key point coordinate information cannot effectively guarantee the accuracy of face recognition. Summary of the Invention

[0006] This invention provides a face recognition method, apparatus, device, and storage medium to effectively ensure the accuracy of face recognition.

[0007] In a first aspect, embodiments of the present invention provide a face recognition method, including:

[0008] Obtain the target user's facial image;

[0009] The facial contour edge points in the target facial image are extracted to obtain the original coordinate information corresponding to each edge point;

[0010] The original coordinate information is normalized and symmetry corrected to determine the target coordinate information corresponding to each edge point.

[0011] Based on the coordinate information of each target, facial recognition is performed to determine the target face category corresponding to the target user.

[0012] Secondly, embodiments of the present invention also provide a face recognition device, comprising:

[0013] The target face image acquisition module is used to acquire the target face image of the target user;

[0014] The edge point extraction module is used to extract the facial contour edge points in the target face image and obtain the original coordinate information corresponding to each edge point;

[0015] The coordinate processing module is used to perform coordinate normalization and symmetry correction on each of the original coordinate information to determine the target coordinate information corresponding to each edge point;

[0016] The face recognition module is used to perform face recognition based on the coordinate information of each target and determine the target face category corresponding to the target user.

[0017] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:

[0018] One or more processors;

[0019] Memory, used to store one or more programs;

[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the face recognition method as provided in any embodiment of the present invention.

[0021] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the face recognition method as provided in any embodiment of the present invention.

[0022] The embodiments of the above invention have the following advantages or beneficial effects:

[0023] By extracting the facial contour edge points from the target user's facial image, the original coordinate information corresponding to each edge point is obtained. Then, coordinate normalization and symmetry correction are performed on each original coordinate information to obtain standardized target coordinate information. Based on the target coordinate information, face recognition can be performed more accurately, avoiding the problem of inaccurate face recognition caused by differences in face position, size, angle, and posture, and effectively ensuring the accuracy of face recognition. Attached Figure Description

[0024] Figure 1 This is a flowchart of a face recognition method provided in an embodiment of the present invention;

[0025] Figure 2 This is a flowchart of a face recognition method provided in an embodiment of the present invention;

[0026] Figure 3 This is an example of coordinate normalization and symmetry correction involved in the embodiments of the present invention;

[0027] Figure 4This is a flowchart of a face recognition method provided in an embodiment of the present invention;

[0028] Figure 5 This is a schematic diagram of the structure of a face recognition device provided in an embodiment of the present invention;

[0029] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0030] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0031] Figure 1 This is a flowchart illustrating a face recognition method provided in an embodiment of the present invention. This embodiment is applicable to situations involving face recognition based on user facial images, particularly in applications such as face recognition during the generation of 3D virtual digital human figures. The method can be executed by a face recognition device, which can be implemented in software and / or hardware and integrated into an electronic device. Figure 1 As shown, the method specifically includes the following steps:

[0032] S110. Obtain the target user's facial image.

[0033] In this context, the target user can refer to any user whose face is to be identified. The target face image can be an image taken of the target user's face. For example, the image used to generate a 3D virtual digital human can be used as the target face image.

[0034] S120. Extract the facial contour edge points in the target face image to obtain the original coordinate information corresponding to each edge point.

[0035] Here, edge points refer to key feature points on the facial contour in the target face image. The original coordinate information corresponding to the edge points refers to the coordinate information of the edge point's location in the original coordinate system (i.e., the image coordinate system). In this embodiment, the extracted edge points can be used to represent the facial contour, and since the facial contour is usually symmetrical, the original coordinate information of the extracted edge points is also symmetrical.

[0036] Specifically, edge points on the facial contour of the target face image can be extracted based on edge point extraction methods. For example, edge enhancement operators, such as the Sobel operator and the Robert operator, can be used to highlight local edges in the target face image, and each edge point can be extracted by setting a threshold, while obtaining the original coordinate information corresponding to each edge point.

[0037] For example, "extracting facial contour edge points from the target face image" in S120 may include: detecting whether the target face image is a frontal face image; if so, extracting facial contour edge points from the target face image.

[0038] Specifically, by detecting whether the target face image is a frontal image, the accuracy of face recognition can be further ensured. For example, the accuracy of a target face image can be determined by detecting whether it contains the target user's two eyes. If the target face image is detected as a frontal image, it indicates that the complete facial contour can be extracted, and then the edge points of the facial contour can be extracted. If the target face image is detected as not a frontal image, image replacement information can be generated to remind relevant personnel to replace it with a frontal image, thereby further ensuring the accuracy of face recognition.

[0039] S130. Perform coordinate normalization and symmetry correction on each original coordinate information to determine the target coordinate information corresponding to each edge point.

[0040] Specifically, coordinate system transformation can be used to transform the original coordinate information in the original coordinate system to coordinate information in a unified normalized coordinate system. Then, the normalized coordinate information is symmetrically corrected to obtain strictly symmetrical target coordinate information at a unified scale. This eliminates the differences in face position, size, angle, and pose in different images and obtains standardized target coordinate information that can be used for face recognition.

[0041] S140. Based on the coordinate information of each target, perform face recognition to determine the target face category corresponding to the target user.

[0042] Specifically, preset face recognition methods, such as coordinate feature comparison or network model detection, can be used to more accurately determine the target face category of the target user based on standardized target coordinate information. This avoids the problem of inaccurate face recognition caused by differences in face position, size, angle, and posture, thus effectively ensuring the accuracy of face recognition.

[0043] For example, S140 may include: inputting the coordinate information of each target into a preset network model for face recognition, wherein the preset network model is obtained by pre-training based on sample data; and obtaining the target face category corresponding to the target user according to the output of the preset network model.

[0044] The preset network model can be a pre-set convolutional neural network model used for face shape classification. Sample data can include: sample coordinate information corresponding to the sample face image and the corresponding standard face shape category. The sample coordinate information can be obtained by processing the sample face image based on the processing methods described in S120-S130 above.

[0045] Specifically, in this embodiment, a preset network model can be trained in advance based on a large amount of sample data to ensure the accuracy of face recognition. After the preset network model is trained, the coordinate information of each target can be input into the trained preset network model for face recognition. The output of the preset network model is used as the target face category corresponding to the target user. Thus, the target face category can be obtained quickly using the preset network model, thereby improving the efficiency of face recognition.

[0046] The technical solution of this embodiment extracts the facial contour edge points in the target user's facial image to obtain the original coordinate information corresponding to each edge point. Then, it performs coordinate normalization and symmetry correction on each original coordinate information to obtain standardized target coordinate information. Based on the target coordinate information, face recognition can be performed more accurately, avoiding the problem of inaccurate face recognition caused by differences in face position, size, angle, and posture, and effectively ensuring the accuracy of face recognition.

[0047] Based on the above technical solution, step S130 may include: establishing a normalized coordinate system and determining the coordinate transformation matrix corresponding to the normalized coordinate system; performing coordinate transformation on each original coordinate information based on the coordinate transformation matrix to determine the normalized coordinate information corresponding to each edge point in the normalized coordinate system; performing symmetric correction processing on each normalized coordinate information to determine the target coordinate information corresponding to each edge point.

[0048] Specifically, a unified normalized coordinate system can be established, the coordinate transformation matrix from the original coordinate system to the normalized coordinate system can be determined, and the original coordinate information corresponding to each edge point can be multiplied with the coordinate transformation matrix. The result of the multiplication is the corresponding normalized coordinate information, thus achieving coordinate normalization. This transformation process can be a linear transformation, that is, it can be achieved through rotation, translation, and scaling. Therefore, the coordinate transformation process can be represented as:

[0049]

[0050] Where (x,y) represents the original coordinate information of the edge point; (x′,y′) represents the normalized coordinate information of the edge point. This is the coordinate transformation matrix. Due to the pose differences of faces in images, the normalized edge points are usually not strictly symmetrical. Therefore, it is necessary to perform symmetry correction on the normalized coordinate information corresponding to the edge points to further improve the accuracy of face recognition.

[0051] Figure 2 This is a flowchart of a face recognition method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment optimizes the step "establishing a normalized coordinate system and determining the coordinate transformation matrix corresponding to the normalized coordinate system," and further optimizes the step "performing symmetric correction processing on each normalized coordinate information to determine the target coordinate information corresponding to each edge point." Explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0052] See Figure 2 The face recognition method provided in this embodiment specifically includes the following steps:

[0053] S210. Obtain the target user's facial image.

[0054] S220. Extract the facial contour edge points in the target face image to obtain the original coordinate information corresponding to each edge point.

[0055] S230. Select two symmetrical first edge points and second edge points from each edge point, and a third edge point that is not collinear with the first edge points and second edge points.

[0056] The first edge point and the second edge point can refer to two symmetrical edge points on the facial contour, namely a symmetrical left face edge point and a symmetrical right face edge point.

[0057] Specifically, from all the extracted edge points, two corresponding edge points can be arbitrarily selected as the first edge point and the second edge point. After selecting the first and second edge points, any edge point that is not collinear with the first and second edge points can be selected as the third edge point, so that the coordinate transformation matrix can be determined subsequently based on the three non-collinear edge points.

[0058] For example, "selecting two symmetrical first edge points and second edge points from each edge point" in S230 may include: among the edge points, selecting two symmetrical edge points located at the top of the facial contour as the first edge point and the second edge point, respectively.

[0059] Specifically, Figure 3An example of coordinate normalization and symmetry correction is given. For example... Figure 3 As shown, two symmetrical edge points A and B at the very top of the facial contour can be selected as the first and second edge points, respectively. This simplifies the normalized coordinates and improves the efficiency of coordinate transformation. Figure 3 As shown, the edge point C at the bottom of the facial contour can also be taken as the third edge point.

[0060] It should be noted that in this embodiment, the first edge point and the second edge point at the same location are selected each time coordinate normalization is performed, so as to ensure the comparability of normalized coordinates and further improve the accuracy of face recognition.

[0061] S240. Establish a normalized coordinate system with the line connecting the first edge point and the second edge point as the X-axis and the perpendicular bisector of the line as the Y-axis.

[0062] Specifically, such as Figure 3 As shown, a normalized coordinate system, i.e. a new unified coordinate system, can be established by taking the straight line connecting the first edge point A and the second edge point B as the X-axis and the perpendicular bisector of the straight line as the Y-axis.

[0063] S250. Determine the normalized coordinate information corresponding to the first edge point and the normalized coordinate information corresponding to the second edge point.

[0064] Specifically, this embodiment establishes a normalized coordinate system based on the first edge point and the second edge point, thereby directly determining the normalized coordinate information corresponding to the first edge point and the second edge point. For example, S250 may include: determining the normalized abscissa of the first edge point as -1 and the normalized ordinate as 0, and determining the normalized abscissa of the second edge point as 1 and the normalized ordinate as 0. Figure 3 As shown, the normalized coordinate information corresponding to the first edge point A can be directly determined as (-1, 0), and the normalized coordinate information corresponding to the second edge point B is (1, 0).

[0065] S260. Based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the original coordinate information of the third edge point, determine the coordinate transformation matrix corresponding to the normalized coordinate system.

[0066] Specifically, the original coordinate information of the three non-collinear edge points A, B, and C are as follows: (x A ,y A ), (x B ,y B ) and (x C ,y CThe transformed normalized coordinate information is as follows: (x′) A ,y′ A ), (x′ B ,y′ B ) and (x′ C ,y′ C The coordinate transformation process can be represented as follows:

[0067]

[0068] According to the rules of matrix operations, we can conclude that:

[0069]

[0070] Based on the original and normalized coordinate information of three non-collinear edge points A, B, and C, this embodiment can determine the coordinate transformation matrix.

[0071] For example, S260 may include: determining the normalized coordinate information corresponding to the third edge point based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the original coordinate information of the third edge point, using a similar triangle approach; and determining the coordinate transformation matrix corresponding to the normalized coordinate system based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the normalized coordinate information and original coordinate information corresponding to the third edge point.

[0072] Specifically, such as Figure 3 As shown, based on the similarity between triangle ABC and the transformed triangle A′B′C′, and knowing the original coordinates of points A, B, C, and D, and the normalized coordinates of points A′B′, the normalized coordinates (x′) of C′ can be determined. C ,y′ C This refers to the normalized coordinate information corresponding to the third edge point. After obtaining the original coordinate information (x, y) of points A, B, and C... A ,y A ), (x B ,y B ) and (x C ,y C ), and normalized coordinate information (x′) A ,y′ A ), (x′ B ,y′ B ) and (x′ C ,y′ C After that, the coordinate transformation matrix can be determined based on the above formula.

[0073] S270. Based on the coordinate transformation matrix, perform coordinate transformation on each original coordinate information to determine the normalized coordinate information corresponding to each edge point in the normalized coordinate system.

[0074] Specifically, the original coordinate information corresponding to each edge point is multiplied with the coordinate transformation matrix, and the result of the multiplication is the corresponding normalized coordinate information, thereby achieving coordinate normalization.

[0075] S280. If the normalized abscissa corresponding to the fourth edge point at the bottom of the facial contour is not zero, then based on the normalized abscissa corresponding to the fourth edge point, move each remaining edge point except the first edge point and the second edge point along the X-axis so that the normalized abscissa corresponding to the fourth edge point is zero.

[0076] The fourth edge point can refer to the lowest point of the chin in the facial contour. The symmetrical edge point of the fourth edge point is itself.

[0077] Specifically, such as Figure 3 As shown, the fourth edge point located at the bottom of the facial contour is edge point C′. Figure 3 As can be seen, the fourth edge point C′ is not on the Y-axis, that is, its normalized x-coordinate is x′. C If the value is not zero, then the normalized x-coordinate x′ can be subtracted from the normalized x-coordinate of each remaining edge point other than the first and second edge points. C This makes the normalized x-coordinate of the fourth edge point zero. For example, Figure 3 The normalized x-coordinate of the edge point D′ after the middle movement is x′ D -x′ C The normalized x-coordinate of edge point E′ is x′. E -x′ C By moving each of the remaining edge points except for the first and second edge points, the fourth edge point, located at the bottom of the facial contour, can be positioned on the Y-axis, achieving a symmetrical effect for the fourth edge point.

[0078] S290. Using the Y-axis of the normalized coordinate system as the axis of symmetry, perform symmetrical correction on the current coordinate information corresponding to each remaining edge point after the movement, and determine the target coordinate information corresponding to each edge point after correction.

[0079] Specifically, the current coordinate information corresponding to each remaining edge point after movement is adjusted so that the target coordinate information of the two symmetrical edge points after adjustment is symmetrical about the Y-axis. For example... Figure 3 As shown, the target x-coordinate of the corrected edge point D″ is x″. D for: The target x-coordinate of edge point E″, which is symmetrical to edge point D″E for: The target ordinates of edge point D″ and edge point E″ are both: By following the steps above, standardized target coordinate information at a uniform scale can be obtained, further improving the accuracy of face recognition.

[0080] It should be noted that if the normalized x-coordinate of the fourth edge point at the bottom of the facial contour is zero, it means that there is no need to perform symmetry correction on the fourth edge point. In this case, the Y-axis of the normalized coordinate system can be used as the axis of symmetry to perform symmetry correction on the current coordinate information of each remaining edge point, and the target coordinate information corresponding to each edge point after correction can be determined.

[0081] S291. Based on the coordinate information of each target, perform face recognition to determine the target face category corresponding to the target user.

[0082] The technical solution of this embodiment establishes a normalized coordinate system based on two symmetrical first and second edge points, and determines the coordinate transformation matrix based on three non-collinear edge points. This allows for more convenient and accurate coordinate normalization, improving normalization efficiency. By using the Y-axis of the normalized coordinate system as the axis of symmetry, symmetrical corrections are applied to each remaining edge point other than the first and second edge points, ensuring strict symmetry among all edge points. This further enhances the comparability of the normalized coordinates, thereby improving the accuracy of face recognition.

[0083] Figure 4 This is a flowchart of a face recognition method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment further optimizes the step of "performing face recognition based on the coordinate information of each target to determine the target face category corresponding to the target user". Explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0084] See Figure 4 The face recognition method provided in this embodiment specifically includes the following steps:

[0085] S410, Obtain the target user's facial image.

[0086] S420. Extract the facial contour edge points in the target face image to obtain the original coordinate information corresponding to each edge point.

[0087] S430. Perform coordinate normalization and symmetry correction on each original coordinate information to determine the target coordinate information corresponding to each edge point.

[0088] S440. Obtain the standard data corresponding to each face shape category. The standard data includes the standard coordinate information of each edge point in each standard face shape.

[0089] Specifically, in this embodiment, standard face images for each face shape category can be pre-selected, and each standard face image can be processed using the same coordinate normalization and symmetry correction methods as described above to obtain the standard coordinate information corresponding to each edge point in each standard face shape. The standard coordinate information corresponding to each standard face shape can be stored in a face shape database so that the standard data corresponding to each face shape category can be directly obtained from the face shape database during actual face shape recognition.

[0090] S450. Compare the coordinates of each standard data with each target coordinate information to determine the face similarity corresponding to each face type category.

[0091] Specifically, based on feature similarity metrics, such as Euclidean distance, Housdorff distance, or Frechet distance, the distance between each set of standard data and each target coordinate can be determined as the face similarity for each face shape category. For example, the smaller the distance between the standard data corresponding to a face shape category and each target coordinate, the higher the similarity between that face shape category and the target user's face.

[0092] For example, S450 may include: determining the Fraser distance between standard data and individual target coordinate information for each face type category.

[0093] Specifically, the Frechet distance can be used to describe the similarity of curves. Since the edge points in this embodiment are discrete, a discrete Frechet distance metric can be used to determine the Frechet distance between the standard data corresponding to each face shape category and the target coordinate information, thereby improving face shape recognition performance. For example, for two curves P and Q, curve P consists of the standard coordinate information of p edge points, and curve Q consists of the target coordinate information of q edge points, denoted as P = {u1, u2, ..., u...}. p}, Q={v1,v2,...,v q}, point pairs can be formed between edge points of P and edge points of Q, that is Where a1 = 1, b1 = 1, a m =1, b m =1, for any i = 1, 2, ..., m, there exists a i+1 =a i Or a i+1 =a i +1, b i+1 =b i Or b i+1 =b i+1. For each pair of points, the Euclidean distance between them can be determined based on the standard coordinates and the target coordinates. The maximum value of ||L||, that is The maximum values ​​of each pair of points are compared, and the minimum value is taken as the final Frescher distance δ. dF (P,Q), i.e., δ dF (P,Q)=min{||L||}.

[0094] S460. Based on facial similarity, determine the target facial category corresponding to the target user.

[0095] Specifically, the face category with the highest facial similarity can be used as the target face category for the target user. For example, S460 may include: determining the face category with the smallest Frechet distance as the target face category for the target user. Using a Frechet distance-based metric allows for more accurate face recognition, improving the overall performance.

[0096] It should be noted that if a new face shape category needs to be identified, it is only necessary to obtain the standard data corresponding to the new face shape category and dynamically update the face shape database. There is no need to retrain the network model. Thus, by using coordinate comparison, face shape recognition can be achieved based on a small number of samples, and the categories of face shape recognition can be dynamically expanded.

[0097] The technical solution of this embodiment determines the face similarity of each face type by comparing the standard data corresponding to each face type with the coordinate information of each target. Based on the face similarity, the target face type corresponding to the target user is determined. Thus, by using the coordinate comparison method, face recognition can be achieved based on a small number of samples and supports the dynamic expansion of the face recognition categories.

[0098] The following are embodiments of the face recognition device provided in this invention. This device and the face recognition methods in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the face recognition device, please refer to the embodiments of the face recognition methods described above.

[0099] Figure 5 This is a schematic diagram of a face recognition device provided in an embodiment of the present invention. This embodiment is applicable to situations where face recognition is performed based on user facial images, and is particularly suitable for applications involving face recognition during the generation of 3D virtual digital human figures. Figure 5 As shown, the device specifically includes: a target face image acquisition module 510, an edge point extraction module 520, a coordinate processing module 530, and a face recognition module 540.

[0100] The system includes a target face image acquisition module 510 for acquiring a target face image of a target user; an edge point extraction module 520 for extracting facial contour edge points from the target face image to obtain the original coordinate information corresponding to each edge point; a coordinate processing module 530 for performing coordinate normalization and symmetry correction on each original coordinate information to determine the target coordinate information corresponding to each edge point; and a face shape recognition module 540 for performing face shape recognition based on each target coordinate information to determine the target face shape category corresponding to the target user.

[0101] Optionally, the coordinate processing module 530 includes:

[0102] The coordinate transformation matrix determination unit is used to establish a normalized coordinate system and determine the coordinate transformation matrix corresponding to the normalized coordinate system.

[0103] The coordinate transformation unit is used to perform coordinate transformation on each original coordinate information based on the coordinate transformation matrix, and determine the normalized coordinate information corresponding to each edge point in the normalized coordinate system.

[0104] The target coordinate information determination unit is used to perform symmetrical correction processing on each normalized coordinate information to determine the target coordinate information corresponding to each edge point.

[0105] Optionally, the coordinate transformation matrix determination unit includes:

[0106] The edge point selection sub-unit is used to select two symmetrical first edge points and second edge points from each edge point, as well as a third edge point that is not collinear with the first edge points and second edge points;

[0107] A normalized coordinate system is established using a sub-unit, with the line connecting the first and second edge points as the X-axis and the perpendicular bisector of the line as the Y-axis.

[0108] The normalized coordinate information determination sub-unit is used to determine the normalized coordinate information corresponding to the first edge point and the normalized coordinate information corresponding to the second edge point;

[0109] The coordinate transformation matrix determines the sub-unit, which is used to determine the coordinate transformation matrix corresponding to the normalized coordinate system based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the original coordinate information of the third edge point.

[0110] Optionally, the edge point selection sub-unit is specifically used to: among the various edge points, select the two symmetrical edge points at the top of the facial contour as the first edge point and the second edge point, respectively.

[0111] Optionally, the normalized coordinate information determines the sub-unit, specifically for: determining the normalized abscissa of the first edge point as -1 and the normalized ordinate as 0, and determining the normalized abscissa of the second edge point as 1 and the normalized ordinate as 0.

[0112] Optionally, the coordinate transformation matrix determines the sub-unit, specifically for: determining the normalized coordinate information corresponding to the third edge point based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the original coordinate information of the third edge point, using a similar triangle approach; and determining the coordinate transformation matrix corresponding to the normalized coordinate system based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the normalized coordinate information and original coordinate information corresponding to the third edge point.

[0113] Optionally, the target coordinate information determination unit is specifically used for: if the normalized abscissa corresponding to the fourth edge point at the bottom of the facial contour is not zero, then based on the normalized abscissa corresponding to the fourth edge point, moving each remaining edge point except the first edge point and the second edge point along the X-axis so that the normalized abscissa corresponding to the fourth edge point is zero; using the Y-axis of the normalized coordinate system as the axis of symmetry, symmetrically correcting the current coordinate information corresponding to each remaining edge point after the movement, and determining the target coordinate information corresponding to each edge point after correction.

[0114] Optionally, the face recognition module 540 includes:

[0115] The standard data acquisition unit is used to acquire standard data corresponding to each face shape category. The standard data includes standard coordinate information corresponding to each edge point in each standard face shape.

[0116] The face shape similarity determination unit is used to compare each standard data with each target coordinate information to determine the face shape similarity corresponding to each face shape category;

[0117] The target face shape category determination unit is used to determine the target face shape category corresponding to the target user based on face shape similarity.

[0118] Optionally, the face shape similarity determination unit is specifically used to: determine the Fraser distance between standard data and each target coordinate information for each face shape category;

[0119] The target face category determination unit is specifically used to: determine the face category with the smallest Fraser distance as the target face category corresponding to the target user.

[0120] Optionally, the face recognition module 540 is further specifically used to: input the coordinate information of each target into a preset network model for face recognition, wherein the preset network model is obtained by pre-training based on sample data; and obtain the target face category corresponding to the target user based on the output of the preset network model.

[0121] Optionally, the edge point extraction module 520 is specifically used to: detect whether the target face image is a frontal face image; if so, extract the facial contour edge points in the target face image.

[0122] The face recognition device provided in the embodiments of the present invention can execute the face recognition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the face recognition method.

[0123] It is worth noting that in the above embodiments of the face recognition device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0124] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 6 A block diagram is shown of an exemplary electronic device 12 suitable for implementing embodiments of the present invention. Figure 6 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0125] like Figure 6 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0126] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0127] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0128] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 6 Not shown; usually referred to as a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0129] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0130] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0131] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing the steps of a face recognition method provided in this embodiment, the method including:

[0132] Obtain the target user's facial image;

[0133] Extract the facial contour edge points from the target facial image to obtain the original coordinate information corresponding to each edge point;

[0134] The original coordinate information is normalized and symmetry correction is performed to determine the target coordinate information corresponding to each edge point.

[0135] Face recognition is performed based on the coordinate information of each target to determine the target face category corresponding to the target user.

[0136] Of course, those skilled in the art will understand that the processor can also implement the technical solutions of the face recognition method provided in any embodiment of the present invention.

[0137] This embodiment provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the program implements the face recognition method steps provided in any embodiment of the present invention. The method includes:

[0138] Obtain the target user's facial image;

[0139] Extract the facial contour edge points from the target facial image to obtain the original coordinate information corresponding to each edge point;

[0140] The original coordinate information is normalized and symmetry correction is performed to determine the target coordinate information corresponding to each edge point.

[0141] Face recognition is performed based on the coordinate information of each target to determine the target face category corresponding to the target user.

[0142] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0143] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0144] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0145] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0146] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0147] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A face recognition method, characterized in that, include: Obtain the target user's facial image; The facial contour edge points in the target facial image are extracted to obtain the original coordinate information corresponding to each edge point; Select two symmetrical first edge points and second edge points from each edge point, and a third edge point that is not collinear with the first edge point and the second edge point; A normalized coordinate system is established using the straight line connecting the first edge point and the second edge point as the X-axis and the perpendicular bisector of the straight line as the Y-axis. Determine the normalized coordinate information corresponding to the first edge point and the normalized coordinate information corresponding to the second edge point; Based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the original coordinate information of the third edge point, determine the coordinate transformation matrix corresponding to the normalized coordinate system; Based on the coordinate transformation matrix, each of the original coordinate information is transformed to determine the normalized coordinate information corresponding to each edge point in the normalized coordinate system. If the normalized x-coordinate of the fourth edge point at the bottom of the facial contour is not zero, then based on the normalized x-coordinate of the fourth edge point, each remaining edge point other than the first edge point and the second edge point is moved along the X-axis so that the normalized x-coordinate of the fourth edge point is zero; wherein, the fourth edge point is the lowest point of the chin in the facial contour. Using the Y-axis of the normalized coordinate system as the axis of symmetry, the current coordinate information corresponding to each remaining edge point after the movement is symmetrically corrected to determine the target coordinate information corresponding to each edge point after correction. Based on the coordinate information of each target, facial recognition is performed to determine the target face category corresponding to the target user.

2. The method according to claim 1, characterized in that, The step of selecting two symmetrical first edge points and second edge points from each edge point includes: Among the various edge points, the two symmetrical edge points at the top of the facial contour are designated as the first edge point and the second edge point, respectively.

3. The method according to claim 1, characterized in that, Determining the normalized coordinate information corresponding to the first edge point and the normalized coordinate information corresponding to the second edge point includes: The normalized x-coordinate of the first edge point is set to -1 and the normalized y-coordinate is set to 0. The normalized x-coordinate of the second edge point is set to 1 and the normalized y-coordinate is set to 0.

4. The method according to claim 1, characterized in that, The step of determining the coordinate transformation matrix corresponding to the normalized coordinate system based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the original coordinate information of the third edge point includes: Based on the similar triangle method, the normalized coordinate information corresponding to the third edge point is determined according to the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the original coordinate information of the third edge point. Based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the normalized coordinate information and original coordinate information corresponding to the third edge point, the coordinate transformation matrix corresponding to the normalized coordinate system is determined.

5. The method according to claim 1, characterized in that, The step of performing facial recognition based on the coordinate information of each target to determine the target user's corresponding face type includes: Obtain standard data corresponding to each face shape category, the standard data including standard coordinate information of each edge point in each standard face shape; Each set of standard data is compared with each set of target coordinate information to determine the face similarity corresponding to each face shape category; Based on the facial similarity, the target facial category corresponding to the target user is determined.

6. The method according to claim 5, characterized in that, The step of comparing each type of standard data with each type of target coordinate information to determine the face shape similarity corresponding to each face shape category includes: For each of the stated face shape categories, determine the Fraser distance between the standard data and each of the stated target coordinate information; The step of determining the target face shape category corresponding to the target user based on the face shape similarity includes: The face category with the smallest Fraser distance is determined as the target face category corresponding to the target user.

7. The method according to claim 1, characterized in that, The step of performing face recognition based on the coordinate information of each target to determine the target face category corresponding to the target user further includes: The coordinate information of each target is input into a preset network model for face recognition, wherein the preset network model is obtained by pre-training based on sample data; Based on the output of the preset network model, the target face type category corresponding to the target user is obtained.

8. The method according to any one of claims 1-7, characterized in that, The extraction of facial contour edge points from the target facial image includes: Detect whether the target face image is a frontal face image; If so, the facial contour edge points in the target facial image are extracted.

9. A facial recognition device, characterized in that, include: The target face image acquisition module is used to acquire the target face image of the target user; The edge point extraction module is used to extract the facial contour edge points in the target face image and obtain the original coordinate information corresponding to each edge point; The coordinate processing module is used to perform coordinate normalization and symmetry correction on each of the original coordinate information to determine the target coordinate information corresponding to each edge point; The face recognition module is used to perform face recognition based on the coordinate information of each target and determine the target face category corresponding to the target user. The coordinate processing module includes: The coordinate transformation matrix determination unit is used to establish a normalized coordinate system and determine the coordinate transformation matrix corresponding to the normalized coordinate system. The coordinate transformation unit is used to perform coordinate transformation on each of the original coordinate information based on the coordinate transformation matrix, and determine the normalized coordinate information corresponding to each edge point in the normalized coordinate system. The target coordinate information determination unit is used to perform symmetric correction processing on each of the normalized coordinate information to determine the target coordinate information corresponding to each edge point; The coordinate transformation matrix determination unit includes: The edge point selection subunit is used to select two symmetrical first edge points and second edge points from each edge point, as well as a third edge point that is not collinear with the first edge point and the second edge point; A normalized coordinate system establishment sub-unit is used to establish a normalized coordinate system with the straight line connecting the first edge point and the second edge point as the X-axis and the perpendicular bisector of the straight line as the Y-axis. The normalized coordinate information determination subunit is used to determine the normalized coordinate information corresponding to the first edge point and the normalized coordinate information corresponding to the second edge point; The coordinate transformation matrix determination subunit is used to determine the coordinate transformation matrix corresponding to the normalized coordinate system based on the normalized coordinate information and original coordinate information corresponding to the first edge point, the normalized coordinate information and original coordinate information corresponding to the second edge point, and the original coordinate information of the third edge point. The target coordinate information determination unit is specifically used for: If the normalized x-coordinate of the fourth edge point at the bottom of the facial contour is not zero, then based on the normalized x-coordinate of the fourth edge point, each remaining edge point other than the first and second edge points is moved along the X-axis so that the normalized x-coordinate of the fourth edge point is zero; wherein, the fourth edge point is the lowest point of the chin in the facial contour; with the Y-axis of the normalized coordinate system as the axis of symmetry, the current coordinate information corresponding to each remaining edge point after the movement is symmetrically corrected to determine the target coordinate information corresponding to each edge point after the correction.

10. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the face recognition method as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the face recognition method as described in any one of claims 1-8.