Facial form detection method and device, computer equipment and storage medium

By acquiring and correcting the feature points in the two-dimensional coordinate system of the human face to perform face shape detection, the problem of low face shape detection accuracy in the existing technology is solved, and a more accurate and fast detection effect is achieved.

CN118736635APending Publication Date: 2024-10-01NANJING OPPO SOFTWARE TECH CORP LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310322753.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The accuracy of facial shape detection in the prior art is low, and it is difficult to effectively avoid detection inaccuracies caused by facial posture deflection.

Method used

By obtaining multiple face contour feature points in the two-dimensional coordinate system of the face to be detected in the target image, performing posture correction and matching two-dimensional coordinate data, the matching face shape is determined from a variety of target face shapes, reducing the amount of data processing. Improve detection speed and accuracy.

Benefits of technology

It effectively improves the accuracy of face shape detection, avoids detection errors caused by posture deflection, reduces the amount of calculation through two-dimensional coordinate data processing, and improves detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736635A_ABST
    Figure CN118736635A_ABST
Patent Text Reader

Abstract

The invention discloses a facial form detection method and device, computer equipment and a storage medium, and relates to the technical field of image information processing. The method comprises the following steps: acquiring a target image containing a to-be-detected face; based on the target image, acquiring a face contour feature point set of the to-be-detected face in the target attitude; and determining a target facial form corresponding to a first contour feature point set matched with the face contour feature point set from a plurality of target facial forms as the facial form of the to-be-detected face. Therefore, while the accuracy of face shape detection is improved, the speed of face shape detection is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image information processing, and in particular to a face shape detection method, device, computer equipment and storage medium. Background Art

[0002] Face shape detection is an important part of face image analysis, which can be widely used in beauty and hairdressing, glasses fitting, plastic surgery and other fields. However, in related technologies, the accuracy of face shape detection is still low, and the accuracy of face shape detection needs to be improved. Summary of the invention

[0003] The present application proposes a face shape detection method, apparatus, computer equipment and storage medium to improve the accuracy of face shape detection of human faces.

[0004] In a first aspect, an embodiment of the present application provides a face shape detection method, comprising: obtaining a target image containing a face to be detected; based on the target image, obtaining a set of facial contour feature points of the face to be detected in a target posture, the facial contour feature point set comprising multiple facial contour feature points and coordinate information of each facial contour feature point in a first coordinate system, wherein the first coordinate system is a two-dimensional coordinate system; from a plurality of target face shapes, determining a target face shape corresponding to a first contour feature point set matching the facial contour feature point set as the face shape of the face to be detected, the plurality of target face shapes corresponding one-to-one to a plurality of second contour feature point sets, the first contour feature point set being any feature point set in the plurality of second contour feature point sets, and each of the second contour feature point sets comprising a plurality of facial contour feature points of a face of one of the target face shapes in the target posture and coordinate information of each facial contour feature point in the first coordinate system.

[0005] In a second aspect, an embodiment of the present application provides a face shape detection device, including: an image acquisition module, used to acquire a target image containing a face to be detected; a feature point set acquisition module, used to acquire a face contour feature point set of the face to be detected in a target posture based on the target image, the face contour feature point set including multiple face contour feature points and coordinate information of each face contour feature point in a first coordinate system, the first coordinate system being a two-dimensional coordinate system; a face shape detection module, used to determine, from multiple target face shapes, a target face shape corresponding to a first contour feature point set matching the face contour feature point set as the face shape of the face to be detected, the multiple target face shapes corresponding one-to-one to multiple second contour feature point sets, the first contour feature point set being any feature point set in the multiple second contour feature point sets, each of the second contour feature point sets including multiple face contour feature points of a face of one of the target face shapes in the target posture and coordinate information of each face contour feature point in the first coordinate system.

[0006] In a third aspect, an embodiment of the present application provides a computer device, comprising: one or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the above method.

[0008] In the solution provided by the present application, a target image containing a face to be detected is obtained; based on the target image, a set of facial contour feature points of the face to be detected in a target posture is obtained, the facial contour feature point set includes multiple facial contour feature points and coordinate information of each facial contour feature point in a first coordinate system, and the first coordinate system is a two-dimensional coordinate system; from a plurality of target face shapes, a target face shape corresponding to a first contour feature point set matching the facial contour feature point set is determined as the face shape of the face to be detected, the plurality of target face shapes correspond one-to-one to a plurality of second contour feature point sets, the first contour feature point set is any feature point set in the plurality of second contour feature point sets, and each second contour feature point set includes a plurality of facial contour feature points of a face of one of the target face shapes in a target posture and coordinate information of each facial contour feature point in the first coordinate system. In this way, the facial contour feature point set of the face to be detected is obtained on the face to be detected under the target posture, and the second contour feature point set corresponding to each target face type is also obtained on the face of the corresponding target face type under the same target posture. Based on this, after matching the facial contour feature point set with multiple second contour feature point sets, the face shape of the face to be detected is determined to be more accurate, that is, the occurrence of problems such as inaccurate face shape detection due to posture deflection of the face to be detected is effectively avoided. In addition, by obtaining multiple facial contour feature points in the two-dimensional coordinate system of the face to be detected in the target image, the two-dimensional coordinate data is used for face shape detection. Compared with the technical means of face shape recognition through three-dimensional facial coordinate data, the amount of data processing in the face shape recognition process is greatly reduced, thereby improving the speed of face shape detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A flow chart of a face shape detection method provided in an embodiment of the present application is shown.

[0011] Figure 2 Shows Figure 1 A schematic flow chart of the sub-steps of step S120 in one implementation manner.

[0012] Figure 3 A schematic diagram of a target image provided by an embodiment of the present application is shown.

[0013] Figure 4 Shows Figure 3Schematic diagram of a set of facial feature points of a face to be detected.

[0014] Figure 5 A schematic diagram of a three-dimensional model of a face to be detected at different viewing angles provided by an embodiment of the present application is shown.

[0015] Figure 6 A schematic diagram of a standard face model provided in an embodiment of the present application is shown.

[0016] Figure 7 Shows Figure 3 Schematic diagram of the two-dimensional key points corresponding to the face to be detected in the preset area.

[0017] Figure 8 Shows Figure 4 Schematic diagram of the facial feature point set after correction of the face to be detected.

[0018] Fig. 9 Shows Figure 2 A flowchart of the sub-steps of step S124 in one implementation manner.

[0019] Fig.10 Shows Figure 8 Schematic diagram of a set of facial contour feature points of a face to be detected.

[0020] Fig.11 A schematic diagram showing various target face shapes provided by an embodiment of the present application is shown.

[0021] Fig.12 A flow chart of a face shape detection method provided in another embodiment of the present application is shown.

[0022] Fig.13 Shows Fig.12 A flowchart of the sub-steps of step S230 in one implementation manner.

[0023] Fig.14 A schematic diagram of a face contour curve provided in an embodiment of the present application is shown.

[0024] Fig.15 Shows Fig.14 Schematic diagram of inserting dense feature points into the face contour curve.

[0025] Fig.16 Shows Fig.12 A flowchart of the sub-steps of step S240 in one implementation manner.

[0026] Fig.17 Shows Fig.16 A flowchart of the sub-steps of step S241 in one implementation manner.

[0027] Fig.18 A structural block diagram of a face shape detection device provided in an embodiment of the present application is shown.

[0028] Fig.19 A structural block diagram of a computer device provided in an embodiment of the present application is shown.

[0029] Fig. 20 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0031] It should be noted that in some processes described in the specification, claims and the above-mentioned drawings of the present application, multiple operations that appear in a specific order are included, and these operations may not be executed or executed in parallel in the order in which they appear in this article. The sequence numbers of operations such as S110, S120, etc. are only used to distinguish different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or less operations, and these operations may be executed in sequence or in parallel. And, the terms "first", "second", etc. in the specification, claims and the above-mentioned drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or sub-modules is not necessarily limited to those steps or sub-modules explicitly listed, but may include other steps or sub-modules that are not explicitly listed or that are inherent to these processes, methods, products, or devices.

[0032] The inventor proposes a face shape detection method, device, computer equipment and storage medium, which improves the accuracy of face shape detection by obtaining multiple face contour feature points in a two-dimensional coordinate system of a face to be detected in a target image, and making multiple target face shapes preset during face shape matching be in the same target posture as the face to be detected. The face shape detection method provided in the embodiment of the present application is described in detail below.

[0033] Please refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of a face shape detection method provided by an embodiment of the present application. Figure 1 The face shape detection method provided in the embodiment of the present application is described in detail. The face shape detection method may include the following steps:

[0034] Step S110: Acquire a target image containing a face to be detected.

[0035] In this embodiment, the target image that needs to perform face shape detection contains a face to be detected. The target image can be a face image in a natural scene manually input into the computer device by a user, or it can be a face image automatically acquired by the computer device from an image acquisition device that is communicatively connected to the computer device.

[0036] Step S120: Based on the target image, obtain a set of facial contour feature points of the face to be detected in the target posture, wherein the set of facial contour feature points includes multiple facial contour feature points and coordinate information of each facial contour feature point in a first coordinate system, and the first coordinate system is a two-dimensional coordinate system.

[0037] In this embodiment, based on the acquisition of a target image containing a face to be detected, it is necessary to perform feature extraction on the target image, obtain multiple facial feature points of the face to be detected in the target image and the coordinate information of each facial feature point in a three-dimensional coordinate system, as a facial feature point set of the face to be detected, and confirm the current posture of the face to be detected in the target image based on the facial feature point set of the face to be detected. Among them, the facial feature points can reflect the facial features of each part of the face to be detected. Further, based on the current posture of the face to be detected in the target image and the facial feature point set of the face to be detected in the current posture, a set of multiple facial contour feature points of the face to be detected in the target posture and the coordinate information of each facial feature point in the first coordinate system, that is, the coordinate information in the two-dimensional coordinate system, are obtained as the current posture of the face to be detected in the target image.

[0038] In some embodiments, see Figure 2 , step S120 may include the following steps S121 to S124:

[0039] Step S121: Based on the target image, obtain the current posture of the face to be detected in the target image and a set of facial feature points of the face to be detected in the current posture, wherein the set of facial feature points includes multiple facial feature points and coordinate information of each facial feature point in a second coordinate system, wherein the second coordinate system is a three-dimensional coordinate system, and the multiple facial feature points include at least the multiple facial contour feature points.

[0040] like Figure 3 As shown, Figure 3 A schematic diagram of a target image provided by an embodiment of the present application is shown. After acquiring a target image containing a face to be detected, the facial feature points of the face to be detected in the target image are detected by image recognition to obtain multiple facial feature points of the face to be detected in the target image and the coordinate information of each facial feature point in the second coordinate system, that is, the coordinate information in the three-dimensional coordinate system, as a facial feature point set of the face to be detected. Figure 4 As shown, Figure 4 Shows Figure 3 Schematic diagram of the facial feature point set of the face to be detected in . The method of detecting facial feature points of the target image can be a face alignment method, that is, using a model obtained through a certain amount of training sets to detect facial feature points of the input target image, the training set includes multiple face images and multiple facial feature points corresponding to each image, so that the model can mark the facial feature points in the image after inputting a face image in any posture.

[0041] In some application scenarios, when collecting facial images of the same target object, if multiple target images corresponding to the same target object are obtained, and the multiple target images are facial images obtained by photographing the target object from different perspectives, the current posture of the face to be detected corresponding to the target object in each of the obtained target images is different. Figure 5 As shown, Figure 5 A schematic diagram of a three-dimensional model of a face to be detected at different viewing angles provided by an embodiment of the present application is shown. Figure 5 The figure in the figure shows the 3D model of the face to be detected in the target image obtained when the target object is photographed from the right, left, upward and downward angles. The posture of the face to be detected is different in each viewing angle. When the face to be detected is photographed from different viewing angles, the target image obtained may have regional occlusion and deformation, which leads to inconsistency in the facial contour curves corresponding to the face to be detected in different postures, and ultimately causes differences in the face shape judgment of the face to be detected.

[0042] Optionally, the present application confirms the current posture of the face to be detected in the target image based on the set of facial feature points of the face to be detected. A three-dimensional face model with three-dimensional key points of multiple preset areas is defined as a standard face model, and the two-dimensional key points of multiple preset areas corresponding to the face to be detected and the standard face model on the input target image are obtained through a face alignment method, so as to match the three-dimensional key points of each preset area on the standard face model with the two-dimensional key points of the corresponding preset area on the face to be detected. According to the correspondence between the three-dimensional key points on the standard face model and the two-dimensional key points on the face to be detected, the posture information of the face to be detected is calculated by the PNP (Pespective-n-Point) algorithm. Among them, the more facial feature points are defined in the standard face model, the more accurate the judgment of the posture information of the face to be detected in the target image is.

[0043] In this embodiment, when calculating the posture information of the face to be detected by the PNP algorithm, the corresponding relationship between the three-dimensional key points on the standard face model and the two-dimensional key points on the face to be detected is obtained by extracting the key points of the preset area. Based on this, the process of calculating the posture information of the face to be detected is simple, the calculation speed is fast, and it is only based on a simple standard face model, without using a large amount of training data.

[0044] like Figure 6 As shown, Figure 6 A schematic diagram of a standard face model provided in an embodiment of the present application is shown. Figure 6 The standard face model in the 3D face model defines 6 preset areas of 3D key points, including the left eye corner, right eye corner, nose tip, left mouth corner, right mouth corner and mandible. In other embodiments, the standard face model can also be a 3D face model that defines 68 preset areas of 3D key points, which is not limited here. Figure 3 After obtaining the two-dimensional key points of the target image shown in FIG. 1 , the two-dimensional key points of the preset area corresponding to the face to be detected are obtained as follows: Figure 7 As shown, Figure 7 Shows Figure 3 Schematic diagram of the two-dimensional key points corresponding to the face to be detected in the preset area.

[0045] Optionally, the determination of the facial posture information is mainly used to obtain the angle information of the facial orientation. In the present embodiment, the facial posture information can be represented by three Euler angles (Pitch, Yaw, Roll). Among them, the pitch angle (Pitch) represents the angle of rotation of the object around the X-axis; the yaw angle (Yaw) represents the angle of rotation of the object around the Y-axis; and the roll angle (Roll) represents the angle of rotation of the object around the Z-axis. According to the correspondence between the three-dimensional key points on the standard face model and the two-dimensional key points on the face to be detected, the rotation vector is calculated based on the coordinate information of the three-dimensional key points of the standard face model in the three-dimensional coordinate system, the coordinate information of the two-dimensional key points on the face to be detected in the two-dimensional coordinate system, and the internal parameters of the image acquisition device. After the rotation vector is converted into a rotation matrix, the Euler angle of the face to be detected is calculated as the posture information of the face to be detected.

[0046] Step S122: If the current posture does not match the target posture, based on the target posture, the coordinate information of each facial feature point in the facial feature point set in the second coordinate system is corrected to obtain the corrected facial feature point set as the first feature point set to be processed.

[0047] In this embodiment, if the current posture of the face to be detected does not match the target posture, the current posture of the face to be detected is corrected to the target posture, and the coordinate information of each facial feature point in the facial feature point set in the second coordinate system, that is, the three-dimensional coordinate system, is corrected, and the corrected facial feature point set is used as the first feature point set to be processed. Figure 8 As shown, Figure 8 Shows Figure 4 Schematic diagram of the facial feature point set after correction of the face to be detected.

[0048] In some embodiments, the target posture may be a preset posture, and when face shape detection is performed based on the facial feature point set of the face to be detected under the target posture, the difference between the obtained detection result and the actual face shape of the face to be detected in the target image is minimal. Figure 8 In the embodiment, the target posture may be the posture of the face to be detected corresponding to the frontal view angle, at which the deformation of the facial contour of the face to be detected is minimal. In other embodiments, the target posture may also be the posture of the face to be detected corresponding to the right view, left view, upward view, and downward view angles, which are not limited here.

[0049] Optionally, when correcting the coordinate information of each facial feature point in the facial feature point set in the three-dimensional coordinate system, based on the acquired posture information of the face to be detected, that is, the Euler angle of the face to be detected, each facial feature point is spatially transformed, and the transformation formula is:

[0050] X ′=X*R(Roll,Pitch,Yaw);

[0051] Among them, X' is the coordinate information of the facial feature points in the target posture; X is the coordinate information of the facial feature points in the current posture; R (Roll, Pitch, Yaw) is the transformation matrix when correcting the facial feature points.

[0052] Specifically, the three rotation matrices of the Euler angles are multiplied to obtain the transformation matrix for spatial transformation of each facial feature point:

[0053] R(Roll,Pitch,Yaw)=R(Roll)*R(Pitch)*R(Yaw);

[0054] The rotation matrix of the facial feature points around the X-axis is:

[0055]

[0056] The rotation matrix of the facial feature points around the Y axis is:

[0057]

[0058] The rotation matrix of the facial feature points around the Z axis is:

[0059]

[0060] Among them, Pitch represents the rotation angle of the facial feature points around the X-axis; Yaw represents the rotation angle of the facial feature points around the Y-axis; Roll represents the rotation angle of the facial feature points around the Z-axis.

[0061] Step S123: If the current posture matches the target posture, the facial feature point set is determined as the first feature point set to be processed.

[0062] Optionally, if the current posture of the face to be detected matches the target posture, there is no need to correct the current posture of the face to be detected, and the facial feature point set of the face to be detected in the current posture is directly used as the first feature point set to be processed.

[0063] Step S124: Based on the first set of feature points to be processed, a set of facial contour feature points of the face to be detected in the target posture is obtained.

[0064] In this embodiment, the first set of feature points to be processed for the face to be detected in the target posture includes multiple corrected facial feature points and coordinate information of each facial feature point in a three-dimensional coordinate system. By projecting the facial feature points of the facial contour area of ​​the face to be detected onto a plane in a preset direction, a set of facial contour feature points of the face to be detected in the target posture can be obtained. The facial contour feature point set includes multiple facial contour feature points and coordinate information of each facial contour feature point in a two-dimensional coordinate system.

[0065] In some embodiments, see Fig. 9 , step S124 may include the following contents from step S124-1 to step S124-2:

[0066] Step S124-1: Project the first set of feature points to be processed in a two-dimensional manner in a preset direction to obtain a second set of feature points to be processed, wherein the second set of feature points to be processed includes coordinate information of the multiple facial feature points in the first coordinate system.

[0067] In this embodiment, since the first set of feature points to be processed of the face to be detected in the target posture includes multiple corrected facial feature points and the coordinate information of each facial feature point in the three-dimensional coordinate system, the first set of feature points to be processed is projected in a preset direction to obtain the coordinate information of the multiple facial feature points and each facial feature point in the first coordinate system, that is, the two-dimensional coordinate system. Among them, the preset direction for projection when performing two-dimensional projection can be the Y-axis direction in the three-dimensional coordinate system. Based on this, the matching of feature points in three-dimensional space is converted into the matching of feature points in two-dimensional plane during face shape detection, which reduces the amount of calculation during matching and improves the matching accuracy.

[0068] Optionally, when the first feature point set to be processed is projected and converted into two dimensions, a mapping relationship between the spatial parameters and the plane parameters of each facial feature point in the first feature point set to be processed is obtained based on the principle of orthogonal projection, and the coordinate information of each facial feature point in a preset direction in the three-dimensional coordinate system is obtained. In some embodiments, the first feature point set to be processed may also be projected and converted into two dimensions based on perspective projection, which is not limited here.

[0069] Step S124 - 2 : Acquire feature point information corresponding to the plurality of facial contour feature points in the second feature point set to be processed as the facial contour feature point set of the face to be detected.

[0070] Optionally, when performing face shape detection on the face to be detected in the target image, it is only necessary to obtain multiple face contour feature points corresponding to the face contour area in the second feature point set to be processed and feature point information corresponding to each face contour feature point, as the face contour feature point set of the face to be detected when performing face shape detection. Fig.10 As shown, Fig.10 Shows Figure 8 Schematic diagram of a set of facial contour feature points of a face to be detected.

[0071] In some embodiments, when the first set of feature points to be processed is projected two-dimensionally in a preset direction, only multiple facial contour feature points corresponding to the facial contour area are projected, so that the second set of feature points to be processed obtained is the facial contour feature point set of the face to be detected, thereby reducing the amount of data processing and improving the face shape detection speed.

[0072] Step S130: Determine, from a plurality of target face shapes, a target face shape corresponding to a first contour feature point set that matches the facial contour feature point set, as the face shape of the face to be detected, the plurality of target face shapes correspond one-to-one to a plurality of second contour feature point sets, the first contour feature point set is any feature point set in the plurality of second contour feature point sets, each of the second contour feature point sets includes a plurality of facial contour feature points of a face of one of the target face shapes in the target posture and coordinate information of each facial contour feature point in the first coordinate system.

[0073] In this embodiment, when a face contour feature point set of a face to be detected is obtained for face shape detection, by obtaining a preset plurality of target face shapes, the face contour feature point set of the face to be detected is matched with a second contour feature point set corresponding to each target face shape, so as to determine a target face shape corresponding to a first contour feature point set matching the face contour feature point set as the face shape of the face to be detected. Each second contour feature point set includes a plurality of face contour feature points of a face of one of the target face shapes in a target posture and coordinate information of each face contour feature point in the first coordinate system.

[0074] In some embodiments, each acquired face of a target face type may be set to be in a preset posture, and when acquiring a set of facial contour feature points of a face to be detected in a target posture, the current posture of the face to be detected is used as the target posture, and the posture correction of the face to be detected is no longer performed. Furthermore, by correcting the posture of the face of each target face type to the same posture as the current posture of the face to be detected, and then matching the facial contour feature point set of the face to be detected with the second contour feature point set corresponding to each target face type after correction, the face type of the face to be detected is detected. Based on this, the facial contour feature point set of the face to be detected in the target image is not corrected, thereby avoiding deformation of the facial contour of the face to be detected in the target image during the correction process.

[0075] See also Fig.11 , Fig.11 FIG. 1 is a schematic diagram showing various target face shapes provided by an embodiment of the present application. Fig.11 In the figure, the target posture is the posture of the target face shape corresponding to the frontal view angle. In the schematic diagram of multiple target face shapes, the gray curve L1 is the face contour curve of the square face shape at the frontal view angle; the dashed curve L2 is the face contour curve of the round face shape at the frontal view angle; the black curve L3 is the face contour curve of the oval face shape at the frontal view angle. In some embodiments, by expanding the number of target face shapes, the accuracy of face shape detection can be improved in the detection of the face shape to be detected.

[0076] Optionally, before obtaining a plurality of target face shapes, the face contour image corresponding to the face contour feature point set of the face to be detected can also be standardized, the current resolution of the face contour image corresponding to the face to be detected is obtained, and it is reduced or enlarged to the size of the preset resolution. Therefore, when obtaining a plurality of target face shapes, based on the size of the preset resolution, the face contour images corresponding to a plurality of target face shapes with the same resolution as the face contour image corresponding to the face to be detected are obtained. In some embodiments, the preset resolution size can be flexibly adjusted, for example, when the current resolution of the face contour image corresponding to the face to be detected is higher than the preset resolution, the preset resolution is adjusted to the current resolution size of the face contour image corresponding to the face to be detected, thereby improving the face shape matching accuracy when the face shape detection is performed on the face to be detected. Among them, the number of templates for the same target face shape can be expanded, that is, the face contour images corresponding to the same target face shape at different resolution sizes can be pre-stored.

[0077] In this embodiment, by obtaining multiple facial contour feature points of the face to be detected in the target image in the two-dimensional coordinate system, obtaining the current posture of the face to be detected by the PNP algorithm, and correcting the facial feature point set of the face to be detected based on the current posture of the face to be detected and the target posture, the problem of poor detection robustness caused by the posture difference of the face to be detected is avoided, and the multiple target face shapes preset during face shape matching are in the same target posture as the face to be detected, thereby improving the accuracy of face shape detection. At the same time, during face shape detection, the matching of feature points in three-dimensional space is converted into matching of feature points in two-dimensional plane, reducing the amount of calculation during matching.

[0078] Please refer to Fig.12 , Fig.12 FIG. 2 is a flow chart of a face shape detection method provided by another embodiment of the present application. Fig.12 The face shape detection method provided in the embodiment of the present application is described in detail. The face shape detection method may include the following steps:

[0079] Step S210: Acquire a target image containing a face to be detected.

[0080] Step S220: Based on the target image, obtain a set of facial contour feature points of the face to be detected in the target posture, wherein the set of facial contour feature points includes multiple facial contour feature points and coordinate information of each facial contour feature point in a first coordinate system, and the first coordinate system is a two-dimensional coordinate system.

[0081] In this embodiment, the specific implementation of step S210 and step S220 can refer to the content of the above-mentioned embodiment, which will not be repeated here.

[0082] Step S230: densifying the face contour feature point set to obtain a dense contour feature point set.

[0083] In this embodiment, when the facial contour feature point set of the face to be detected in the target image is obtained, the facial contour feature point set can be densified to obtain a dense contour feature point set. When the dense contour feature point set is subsequently used to perform face shape detection on the face to be detected, the problem of poor matching accuracy caused by uneven distribution of facial contour feature points can be avoided.

[0084] In some embodiments, see Fig.13 , step S230 may include the following contents from step S231 to step S233:

[0085] Step S231: performing curve fitting processing on the plurality of facial contour feature points to obtain a facial contour curve.

[0086] Optionally, when performing densification processing on the face contour feature point set, since multiple face contour feature points are unevenly distributed in the face contour image, the face contour curve formed by connecting multiple face contour feature points does not fit the actual face contour curve of the face to be detected. By performing curve fitting processing on multiple face contour feature points corresponding to the face to be detected, the ups and downs distribution of the obtained face contour curve fits the actual face contour curve of the face to be detected. In this embodiment, a quadratic polynomial function can be used as a fitting function to perform curve fitting processing on three adjacent face contour feature points:

[0087] y=a0+a1x+a2x 2 ;

[0088] Among them, a0, a1, a2 are the fitting coefficients of the fitting function calculated based on the coordinate information of three adjacent facial contour feature points, which are constants; x is the coordinate information of the facial contour feature points on the X-axis of the two-dimensional coordinate system; y is the coordinate information of the facial contour feature points on the Y-axis of the two-dimensional coordinate system.

[0089] See also Fig.14 , Fig.14 FIG. 1 is a schematic diagram of a face contour curve provided by an embodiment of the present application. Fig.14 As shown, N1 to N11 are multiple facial contour feature points in the facial contour image, and the facial contour curve formed by their connection does not fit the actual facial contour curve of the face to be detected. After curve fitting processing is performed on multiple facial contour feature points, multiple facial contour feature points P1 to P11 are obtained after the curve fitting processing, which are evenly distributed feature points, and the final facial contour curve is formed by connecting them.

[0090] Step S232: inserting a plurality of dense feature points into the face contour curve according to a target dense algorithm.

[0091] In this embodiment, based on the face contour curve obtained by curve fitting, multiple dense feature points are inserted between two adjacent face contour feature points according to the target dense algorithm. Fig.15 As shown, Fig.15 Shows Fig.14 Schematic diagram of inserting dense feature points into the face contour curve. Directly insert n dense feature points, i.e., dense feature points Q1, Q2, ..., Qn, into the adjacent face contour feature points P1 and P2. The coordinate information (x, y) of the inserted dense feature point Q1 can be confirmed based on the target dense algorithm:

[0092]

[0093] in, is the coordinate information of the facial contour feature point P1; d is the straight-line distance between P1 and Q1; a0, a1, and a2 are function coefficients of the quadratic polynomial function calculated based on the coordinate information of three adjacent facial contour feature points.

[0094] Optionally, when calculating the coordinate information of the inserted dense feature point Q2, the coordinate information of the facial contour feature point P1 can be replaced by the calculated coordinate information of the dense feature point Q1, and then the coordinate information of multiple dense feature points inserted into the facial contour curve in the first coordinate system, that is, the two-dimensional coordinate system, is calculated in turn.

[0095] Step S233: Acquire coordinate information of the plurality of dense feature points in the first coordinate system and a set of facial contour feature points of the face to be detected as the set of dense contour feature points.

[0096] Optionally, the coordinate information of the plurality of dense feature points inserted according to the calculated face contour curve in the first coordinate system and the original face contour feature point set of the face to be detected are used as the original dense contour feature point set for face shape detection of the face to be detected. Among them, the straight-line distance values ​​d between adjacent dense contour feature points are equal. Based on different precision requirements for the dense contour feature point set, the straight-line distance values ​​d between adjacent dense contour feature points can be modified. When the value of the straight-line distance value d is smaller, the denser the dense contour feature point set of the face to be detected is, the higher the precision is.

[0097] Step S240: Determine, from a plurality of target face shapes, a target face shape corresponding to a first contour feature point set that matches the facial contour feature point set, as the face shape of the face to be detected, the plurality of target face shapes corresponding one-to-one to a plurality of second contour feature point sets, the first contour feature point set being any feature point set in the plurality of second contour feature point sets, each of the second contour feature point sets comprising a plurality of facial contour feature points of a face of one of the target face shapes in the target posture and coordinate information of each facial contour feature point in the first coordinate system.

[0098] In some embodiments, see Fig.16 , step S240 may include the following contents from step S241 to step S242:

[0099] Step S241: Based on the face contour feature point set and multiple second contour feature point sets, determine the difference degree value between the face contour of the face to be detected and the face contour of each of the target face types, and obtain multiple difference degree values, and the multiple difference degree values ​​correspond one-to-one to the multiple target face types.

[0100] In this embodiment, based on a face contour feature point set and multiple second contour feature point sets, the difference degree value between the face contour of the face to be detected and the face contour corresponding to each target face shape is obtained, and each difference degree value obtained corresponds to a target face shape.

[0101] Step S242: From the multiple target face shapes, determine the target face shape corresponding to the smallest difference degree value among the multiple difference degree values ​​as the face shape of the face to be detected.

[0102] In this embodiment, based on the multiple difference degree values ​​obtained, it is confirmed that the target face shape corresponding to the smallest difference degree value among the multiple difference degree values ​​is the face shape that matches the face to be detected among the multiple target face shapes, and it is used as the face shape of the face to be detected.

[0103] In some embodiments, see Fig.17 , step S241 may include the following contents from step S241-1 to step S241-2:

[0104] Step S241-1: Obtain the distance difference between each facial contour feature point of the face to be detected and the target feature point in the face of each target face type, and obtain multiple distance differences corresponding to each target face type, where the target feature point is the facial contour feature point that is closest to each facial contour feature point of the face to be detected among the multiple facial contour feature points of the face of each target face type.

[0105] In this embodiment, the distance difference between each facial contour feature point of the face to be detected and the target feature point in the face of each target face type is obtained to obtain multiple distance differences corresponding to each target face type, and the target feature point is the facial contour feature point that is closest to each facial contour feature point of the face to be detected among the multiple facial contour feature points of the face of each target face type. That is, when matching a target face type with the face to be detected, the facial contour feature point that is closest to the facial contour feature point to be matched of the face to be detected among the multiple facial contour feature points of the face of the target face type is the target feature point that matches the facial contour feature point among the multiple facial contour feature points of the face of the target face type.

[0106] It should be noted that if the facial contour feature point set of the face to be detected for matching is a dense contour feature point set obtained after densification, then the facial contour feature point set of each target face type in the obtained multiple target face shapes is also a dense contour feature point set after densification. The straight-line distance value between adjacent dense contour feature points in each target face type is also d, which avoids poor matching effect due to uneven distribution of facial contour feature points when performing face shape detection.

[0107] Step S241 - 2: Obtain the mean of multiple distance difference values ​​corresponding to each target face shape as the difference degree value between the facial contour of the face corresponding to each target face shape and the facial contour of the face to be detected, and obtain the multiple difference degree values.

[0108] In this embodiment, the difference value between the facial contour of the face corresponding to each target face shape and the facial contour of the face to be detected is the average of multiple distance difference values ​​corresponding to each target face shape, that is, the chamfer distance value, to obtain multiple difference values. That is, the calculation formula for the difference value between the facial contour of the face corresponding to each target face shape and the facial contour of the face to be detected is:

[0109]

[0110] Among them, U is the facial contour feature point set of the face to be detected; V is the facial contour feature point set of the target face type; min|u i -v i | is the minimum value of the distance difference between each facial contour feature point of the face to be detected and the facial contour feature points in the face of the target face type, and n is the number of facial contour feature points of the face to be detected.

[0111] Optionally, based on the chamfer distance value between the facial contour of the face corresponding to each target face shape and the facial contour of the face to be detected, the target face shape corresponding to the facial contour of the face with the smallest chamfer distance value between the facial contour of the face to be detected can be used as the face shape of the face to be detected.

[0112] In this embodiment, when performing face shape detection, curve fitting processing is performed on the set of facial contour feature points and multiple dense feature points are inserted to complete densification processing, which effectively avoids the uneven distribution of facial contour feature points of the face to be detected, thereby improving the accuracy of face shape detection of the face to be detected. At the same time, the calculated chamfer distance value is used as a value to evaluate the degree of difference between the facial contour of the face corresponding to each target face shape and the facial contour of the face to be detected, thereby further improving the accuracy of face shape detection of the face to be detected.

[0113] Please refer to Fig.18 , Fig.18 FIG. 3 is a structural block diagram of a face shape detection device provided by an embodiment of the present application. The face shape detection device 300 may include: an image acquisition module 310 , a feature point set acquisition module 320 , and a face shape detection module 330 .

[0114] The image acquisition module 310 is used to acquire a target image containing a face to be detected.

[0115] The feature point set acquisition module 320 is used to acquire the facial contour feature point set of the face to be detected in the target posture based on the target image, and the facial contour feature point set includes multiple facial contour feature points and the coordinate information of each facial contour feature point in a first coordinate system, and the first coordinate system is a two-dimensional coordinate system.

[0116] The face shape detection module 330 is used to determine, from a plurality of target face shapes, a target face shape corresponding to a first contour feature point set that matches the face contour feature point set as the face shape of the face to be detected. The plurality of target face shapes correspond one-to-one to a plurality of second contour feature point sets, the first contour feature point set being any feature point set among the plurality of second contour feature point sets, each of the second contour feature point sets including a plurality of face contour feature points of a face of one of the target face shapes in the target posture and coordinate information of each face contour feature point in the first coordinate system.

[0117] In this manner, the feature point set acquisition module 320 may further include: a posture and feature point acquisition module, a to-be-processed feature point set acquisition module 320 and a face contour feature point set acquisition module 320 . Among them, the posture and feature point acquisition module is used to obtain the current posture of the face to be detected in the target image and the facial feature point set of the face to be detected in the current posture based on the target image, the facial feature point set including multiple facial feature points and coordinate information of each facial feature point in a second coordinate system, the second coordinate system is a three-dimensional coordinate system, and the multiple facial feature points at least include the multiple facial contour feature points; the module for obtaining the set of feature points to be processed 320 is used to correct the coordinate information of each facial feature point in the set of facial feature points in the second coordinate system based on the target posture if the current posture does not match the target posture, and obtain the corrected facial feature point set as the first set of feature points to be processed; if the current posture matches the target posture, the facial feature point set is determined as the first set of feature points to be processed; the module for obtaining the set of facial contour feature points 320 is used to obtain the set of facial contour feature points of the face to be detected in the target posture based on the first set of feature points to be processed.

[0118] In this manner, the facial contour feature point set acquisition module 320 can be specifically used to: project the first feature point set to be processed in a two-dimensional manner in a preset direction to obtain a second feature point set to be processed, wherein the second feature point set to be processed includes the coordinate information of the multiple facial feature points in the first coordinate system; obtain the feature point information corresponding to the multiple facial contour feature points in the second feature point set to be processed as the facial contour feature point set of the face to be detected.

[0119] In some implementations, the face shape detection device 300 may further include a densification module, which is used to perform densification processing on the face contour feature point set to obtain a dense contour feature point set.

[0120] In this manner, the face shape detection module 330 can be specifically used to: determine, from the multiple target face shapes, a target face shape corresponding to a first contour feature point set matching the dense contour feature point set as the face shape of the face to be detected.

[0121] In this manner, the densification module can be specifically used to: perform curve fitting processing on the multiple facial contour feature points to obtain a facial contour curve; insert multiple dense feature points into the facial contour curve according to a target dense algorithm; obtain the coordinate information of the multiple dense feature points in the first coordinate system and the facial contour feature point set of the face to be detected as the dense contour feature point set.

[0122] In some other embodiments, the face shape detection module 330 may further include: a difference degree value acquisition module and a face shape determination module. The difference degree value acquisition module is used to determine the difference degree value between the face contour of the face to be detected and the face contour of each of the target face shapes based on the face contour feature point set and the plurality of second contour feature point sets, and obtain a plurality of difference degree values, wherein the plurality of difference degree values ​​correspond to the plurality of target face shapes one by one; the face shape determination module is used to determine, from the plurality of target face shapes, the target face shape corresponding to the difference degree value with the smallest value among the plurality of difference degree values ​​as the face shape of the face to be detected.

[0123] In this manner, the difference degree value acquisition module can be specifically used to: obtain the distance difference between each facial contour feature point of the face to be detected and the target feature point in the face of each target face type, and obtain multiple distance difference values ​​corresponding to each target face type, wherein the target feature point is the facial contour feature point among the multiple facial contour feature points of the face of each target face type that is closest to each facial contour feature point of the face to be detected; obtain the average of the multiple distance difference values ​​corresponding to each target face type as the difference degree value between the facial contour of the face corresponding to each target face type and the facial contour of the face to be detected, and obtain the multiple difference degree values.

[0124] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0125] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0126] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0127] To summarize, in the solution provided in the embodiment of the present application, a target image containing a face to be detected is obtained; based on the target image, a set of facial contour feature points of the face to be detected in a target posture is obtained, the facial contour feature point set includes multiple facial contour feature points and coordinate information of each facial contour feature point in a first coordinate system, and the first coordinate system is a two-dimensional coordinate system; from a plurality of target face shapes, a target face shape corresponding to a first contour feature point set matching the facial contour feature point set is determined as the face shape of the face to be detected, the plurality of target face shapes correspond one-to-one to a plurality of second contour feature point sets, the first contour feature point set is any feature point set in the plurality of second contour feature point sets, and each second contour feature point set includes a plurality of facial contour feature points of a face of one of the target face shapes in a target posture and coordinate information of each facial contour feature point in the first coordinate system. In this way, the facial contour feature point set of the face to be detected is obtained on the face to be detected under the target posture, and the second contour feature point set corresponding to each target face type is also obtained on the face of the corresponding target face type under the same target posture. Based on this, after matching the facial contour feature point set with multiple second contour feature point sets, the face shape of the face to be detected is determined to be more accurate, that is, the occurrence of problems such as inaccurate face shape detection due to posture deflection of the face to be detected is effectively avoided. In addition, by obtaining multiple facial contour feature points in the two-dimensional coordinate system of the face to be detected in the target image, the two-dimensional coordinate data is used for face shape detection. Compared with the technical means of face shape recognition through three-dimensional facial coordinate data, the amount of data processing in the face shape recognition process is greatly reduced, thereby improving the speed of face shape detection.

[0128] The following will be combined Fig.19 A computer device 400 provided in the present application is described.

[0129] Reference Fig.19 , Fig.19 A structural block diagram of a computer device 400 provided in an embodiment of the present application is shown. The above method provided in an embodiment of the present application can be executed by the computer device 400.

[0130] The computer device 400 in the embodiment of the present application may include one or more of the following components: a processor 401, a memory 402, and one or more applications, wherein the one or more applications may be stored in the memory 402 and configured to be executed by one or more processors 401, and the one or more programs are configured to execute the method as described in the aforementioned method embodiment.

[0131] The processor 401 may include one or more processing cores. The processor 401 uses various interfaces and lines to connect the various parts of the entire computer device 400, and executes various functions and processes data of the computer device 400 by running or executing instructions, programs, code sets or instruction sets stored in the memory 402, and calling data stored in the memory 402. Optionally, the processor 401 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 401 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem can also be integrated into the processor 401 and implemented separately through a communication chip.

[0132] The memory 402 may include a random access memory (RAM) or a read-only memory (ROM). The memory 402 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as the various corresponding relationships described above) created by the computer device 400 during use.

[0133] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0134] In several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or modules, which may be electrical, mechanical or other forms.

[0135] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0136] Please refer to Fig. 20 , Fig. 20 The structure block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown. The computer-readable storage medium 500 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0137] The computer readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 500 includes a non-transitory computer-readable storage medium. The computer readable storage medium 500 has storage space for program code 510 that performs any method step of the above method. These program codes can be read from or written to one or more computer program products. The program code 510 can be compressed, for example, in an appropriate form.

[0138] In some embodiments, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the steps in the above-mentioned method embodiments.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A face shape detection method, characterized in that: The method comprises: Obtain a target image containing a face to be detected; Based on the target image, a face contour feature point set of the face to be detected in the target posture is obtained, wherein the face contour feature point set includes a plurality of face contour feature points and coordinate information of each face contour feature point in a first coordinate system, wherein the first coordinate system is a two-dimensional coordinate system; From a plurality of target face shapes, a target face shape corresponding to a first contour feature point set matching the face contour feature point set is determined as the face shape of the face to be detected, the plurality of target face shapes corresponding one-to-one to a plurality of second contour feature point sets, the first contour feature point set being any feature point set in the plurality of second contour feature point sets, each of the second contour feature point sets comprising a plurality of face contour feature points of a face of one of the target face shapes in the target posture and coordinate information of each face contour feature point in the first coordinate system.

2. The method according to claim 1, characterized in that The step of acquiring a set of facial contour feature points of the to-be-detected face in a target posture based on the target image comprises: Based on the target image, obtaining a current posture of the face to be detected in the target image and a set of facial feature points of the face to be detected in the current posture, wherein the set of facial feature points includes a plurality of facial feature points and coordinate information of each of the facial feature points in a second coordinate system, wherein the second coordinate system is a three-dimensional coordinate system, and the plurality of facial feature points at least include the plurality of facial contour feature points; If the current posture does not match the target posture, based on the target posture, correcting the coordinate information of each facial feature point in the facial feature point set in the second coordinate system to obtain the corrected facial feature point set as the first feature point set to be processed; If the current posture matches the target posture, determining the facial feature point set as the first feature point set to be processed; Based on the first set of feature points to be processed, a set of facial contour feature points of the to-be-detected face in the target posture is obtained.

3. The method according to claim 2, characterized in that The step of acquiring a face contour feature point set of the face to be detected in the target posture based on the first feature point set to be processed includes: Projecting the first set of feature points to be processed in a preset direction to obtain a second set of feature points to be processed, wherein the second set of feature points to be processed includes coordinate information of the plurality of facial feature points in the first coordinate system; The feature point information corresponding to the plurality of facial contour feature points in the second feature point set to be processed is obtained as the facial contour feature point set of the face to be detected.

4. The method according to claim 1, characterized in that: Before determining, from among the plurality of target face shapes, a target face shape corresponding to a first contour feature point set matching the face contour feature point set as the face shape of the face to be detected, the method further comprises: Densifying the face contour feature point set to obtain a dense contour feature point set; The step of determining, from among a plurality of target face shapes, a target face shape corresponding to a first contour feature point set matching the face contour feature point set as the face shape of the face to be detected comprises: From the multiple target face shapes, a target face shape corresponding to a first contour feature point set matching the dense contour feature point set is determined as the face shape of the to-be-detected face.

5. The method according to claim 4, characterized in that The densification process is performed on the face contour feature point set to obtain a dense contour feature point set, including: Performing curve fitting processing on the plurality of facial contour feature points to obtain a facial contour curve; According to a target dense algorithm, inserting a plurality of dense feature points into the face contour curve; The coordinate information of the plurality of dense feature points in the first coordinate system and a face contour feature point set of the face to be detected are obtained as the dense contour feature point set.

6. The method according to any one of claims 1 to 5, characterized in that: The step of determining, from among a plurality of target face shapes, a target face shape corresponding to a first contour feature point set matching the face contour feature point set as the face shape of the face to be detected comprises: Based on the face contour feature point set and the plurality of second contour feature point sets, determining a difference degree value between the face contour of the face to be detected and the face contour of each of the target face shapes, and obtaining a plurality of difference degree values, wherein the plurality of difference degree values ​​correspond one to one to the plurality of target face shapes; From the multiple target face shapes, determine the target face shape corresponding to the smallest difference degree value among the multiple difference degree values ​​as the face shape of the human face to be detected.

7. The method according to claim 6, characterized in that The step of determining the difference between the face contour of the face to be detected and the face contour of each of the target face types based on the face contour feature point set and the plurality of second contour feature point sets, and obtaining a plurality of difference degree values, comprises: Obtaining a distance difference between each of the facial contour feature points of the face to be detected and a target feature point in the face of each of the target face shapes, and obtaining a plurality of distance differences corresponding to each of the target face shapes, wherein the target feature point is a facial contour feature point that is closest to each of the facial contour feature points of the face to be detected among the plurality of facial contour feature points of the face of each of the target face shapes; The mean of the multiple distance difference values ​​corresponding to each of the target face shapes is obtained as the difference degree value between the facial contour of the face corresponding to each of the target face shapes and the facial contour of the face to be detected, thereby obtaining the multiple difference degree values.

8. A face shape detection device, characterized in that: The device comprises: An image acquisition module is used to acquire a target image containing a face to be detected; A feature point set acquisition module, used for acquiring a face contour feature point set of the to-be-detected face in a target posture based on the target image, wherein the face contour feature point set includes a plurality of face contour feature points and coordinate information of each face contour feature point in a first coordinate system, wherein the first coordinate system is a two-dimensional coordinate system; A face shape detection module is used to determine, from a plurality of target face shapes, a target face shape corresponding to a first contour feature point set that matches the face contour feature point set as the face shape of the face to be detected, wherein the plurality of target face shapes correspond one-to-one to a plurality of second contour feature point sets, the first contour feature point set being any feature point set among the plurality of second contour feature point sets, each of the second contour feature point sets comprising a plurality of face contour feature points of a face of one of the target face shapes in the target posture and coordinate information of each face contour feature point in the first coordinate system.

9. A computer device, characterized in that: The device comprises: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • High-precision face recognition method based on binocular vision

    CN119942621A

  • A high-precision face recognition method based on binocular vision

    CN119942621B