Face contour key point determination method and device, equipment and storage medium

By identifying and mapping contour regions in face images, the problem of large amounts of facial contour key point data is solved, achieving efficient key point detection.

CN114332998BActive Publication Date: 2026-01-20BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111603977.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2026-01-20
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

Existing technologies involve processing excessive amounts of data for facial contour key points, resulting in wasted computing resources and cumbersome processing procedures.

Method used

By determining the contour region on the face image, a first mapping process is performed to obtain a standard-shaped face contour image, and on this basis, the first key points are determined. Finally, a second mapping process is performed to obtain the key points on the face image.

Benefits of technology

It effectively reduces computational load, increases processing speed, reduces resource waste, and improves the efficiency of facial contour key point detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332998B_ABST
    Figure CN114332998B_ABST
Patent Text Reader

Abstract

The present disclosure provides a face contour key point determination method and device, equipment and storage medium, and relates to the technical field of computers, to at least solve the problem of large data volume in related art face contour key point processing. The method comprises: obtaining a face image to be detected; determining a face contour region on the face image; performing first mapping processing on the face contour region on the face image to obtain a face contour image with a standard shape; determining first key points on the face contour image; the first key points are key points of the face contour on the face contour image; performing second mapping processing on the first key points on the face contour image to obtain second key points; the second key points correspond one-to-one to the first key points; and the second key points are key points of the face contour on the face image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of information processing, and particularly relates to a face contour key point determination method and device, equipment and a storage medium. BACKGROUND

[0002] In a computer vision task, face key point detection is the basis of various face tasks. At present, face key point detection is usually based on a sub-region detection and recognition model algorithm, and most of them can obtain high accuracy.

[0003] The so-called sub-region detection and recognition model is to cut out the images of the five features (eyebrows, glasses, nose, mouth and ears) of a person respectively, and detect each part of the image separately to obtain a detection result. However, for a face contour, it cannot be cut out separately like the five features, and the whole face image must be taken as input for processing to obtain a detection result. In this processing process, the data volume corresponding to the face image is large, and the processing process includes the five features that have been detected, which makes the whole processing process too cumbersome and causes resource waste. SUMMARY

[0004] The present disclosure provides a face contour key point determination method, device, equipment and storage medium to at least solve the problem of excessive data volume in related art face contour key point processing. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of the present disclosure, a face contour key point determination method is provided, which includes: an electronic device acquires a face image to be detected; determines a face contour region on the face image; performs first mapping processing on the face contour region on the face image to obtain a face contour image with a standard shape; determines first key points on the face contour image; the first key points are key points of the face contour on the face contour image; performs second mapping processing on the first key points on the face contour image to obtain second key points; the second key points correspond one-to-one to the first key points; and the second key points are key points of the face contour on the face image.

[0006] Optionally, determining the face contour region on the face image includes: determining the face contour region based on a plurality of third key points in the face image; the plurality of third key points at least include one point at a left ear root in the face image, one point at a right ear root in the face image, and one point at a chin in the face image.

[0007] Optionally, the face contour region is determined based on the plurality of third key points in the face image, including: determining an initial contour graph according to the plurality of third key points in the face image; determining a target contour region based on the first parameter, the second parameter and the initial contour graph; the first parameter is used to expand the initial contour graph, and the second parameter is used to reduce the initial contour graph; the target contour region is a closed region between the expanded initial contour graph and the reduced initial contour graph; and the target contour region is cut based on a preset face contour boundary point to obtain the face contour region.

[0008] Optionally, the face contour region on the face image is subjected to first mapping processing to obtain a face contour image with a standard shape, including: determining the coordinates of the pixel points in the face contour region corresponding to the coordinates of each pixel point in the initial image based on the initial image with a preset size, the first value and the second value; the preset size is consistent with the size of the face contour image; the first value is a shape parameter of the expanded initial contour graph, and the second value is a shape parameter of the reduced initial contour graph; obtaining the pixel values corresponding to the coordinates of the pixel points in the face contour region, and mapping the pixel values to the pixel points in the corresponding initial image to obtain the face contour image.

[0009] Optionally, the coordinates of the pixel points in the face contour region corresponding to the coordinates of each pixel point in the initial image are determined based on the initial image with a preset size, the first value and the second value, including: obtaining the coordinates of each pixel point in the initial image based on the initial image with a preset size; determining the rotation angle and the height value corresponding to each pixel point in the initial image according to the coordinates of each pixel point in the initial image, the first value and the second value; and obtaining the coordinates of the pixel points in the face contour region corresponding to each pixel point in the initial image according to the rotation angle and the height value.

[0010] Optionally, in a case where the rotation angle of the pixel point in the initial image is less than or equal to a first threshold value, the coordinates of the pixel point in the face contour region are related to a first difference value, the first difference value being a value by which the first threshold value exceeds the rotation angle; in a case where the rotation angle of the pixel point in the initial image is greater than the first threshold value and less than or equal to a second threshold value, the coordinates of the pixel point in the face contour region are related to a second difference value, the second difference value being a value by which the rotation angle exceeds the first threshold value; in a case where the rotation angle of the pixel point in the initial image is greater than the second threshold value and less than or equal to a third threshold value, the coordinates of the pixel point in the face contour region are related to a third difference value, the third difference value being a value by which the rotation angle exceeds the second threshold value; and in a case where the rotation angle of the pixel point in the face contour region is greater than the third threshold value and less than or equal to a fourth threshold value, the coordinates of the pixel point in the face contour region are related to a fourth difference value, the fourth difference value being a value by which the rotation angle exceeds the third threshold value.

[0011] Optionally, the initial contour graph includes a circular ring, an elliptical shape or a parabola.

[0012] According to a second aspect of the present disclosure, a key point determination device for a face contour is provided, which comprises an acquisition module and a processing module. The acquisition module is configured to acquire a face image to be detected. The processing module is configured to determine a face contour region on the face image. The processing module is further configured to perform a first mapping process on the face contour region on the face image to obtain a face contour image with a standard shape. The processing module is further configured to determine first key points on the face contour image. The first key points are key points of the face contour on the face contour image. The processing module is further configured to perform a second mapping process on the first key points on the face contour image to obtain second key points. The second key points correspond to the first key points one by one. The second key points are key points of the face contour on the face image.

[0013] Optionally, the processing module is further configured to determine the face contour region based on a plurality of third key points in the face image. The plurality of third key points at least include one point at a left ear root in the face image, one point at a right ear root in the face image, and one point at a chin in the face image.

[0014] Optionally, the processing module is further configured to determine an initial contour graph according to the plurality of third key points in the face image. The processing module is further configured to determine a target contour region based on a first parameter, a second parameter, and the initial contour graph. The first parameter is used to expand the initial contour graph, and the second parameter is used to reduce the initial contour graph. The target contour region is a closed region between the expanded initial contour graph and the reduced initial contour graph. The processing module is further configured to cut the target contour region based on preset face contour boundary points to obtain the face contour region.

[0015] Optionally, the processing module is further configured to determine, based on an initial image with a preset size, a first numerical value, and a second numerical value, coordinates of a pixel point in the face contour region corresponding to coordinates of each pixel point in the initial image. The preset size is consistent with a size of the face contour image. The first numerical value is a shape parameter of the expanded initial contour graph, and the second numerical value is a shape parameter of the reduced initial contour graph. The processing module is further configured to acquire a pixel value corresponding to the coordinates of the pixel point in the face contour region, and map the pixel value to a corresponding pixel point in the initial image to obtain the face contour image.

[0016] Optionally, the processing module is further configured to obtain coordinates of each pixel point in the initial image based on the initial image with the preset size. The processing module is further configured to determine, according to the coordinates of each pixel point in the initial image, the first numerical value, and the second numerical value, a rotation angle and a height value corresponding to each pixel point in the initial image. The processing module is further configured to obtain coordinates of a pixel point in the face contour region corresponding to each pixel point in the initial image according to the rotation angle and the height value.

[0017] Optionally, in the case that the rotation angle of the pixel point in the initial image is less than or equal to the first threshold value, the coordinate of the pixel point in the face contour region is related to a first difference value, the first difference value being a value by which the first threshold value exceeds the rotation angle; in the case that the rotation angle of the pixel point in the initial image is greater than the first threshold value and less than or equal to a second threshold value, the coordinate of the pixel point in the face contour region is related to a second difference value, the second difference value being a value by which the rotation angle exceeds the first threshold value; in the case that the rotation angle of the pixel point in the initial image is greater than the second threshold value and less than or equal to a third threshold value, the coordinate of the pixel point in the face contour region is related to a third difference value, the third difference value being a value by which the rotation angle exceeds the second threshold value; in the case that the rotation angle of the pixel point in the face contour region is greater than the third threshold value and less than or equal to a fourth threshold value, the coordinate of the pixel point in the face contour region is related to a fourth difference value, the fourth difference value being a value by which the rotation angle exceeds the third threshold value.

[0018] Optionally, the initial contour shape includes a circle, an ellipse or a parabola.

[0019] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the key point determination method of the face contour as described in any of the optional aspects of the first aspect.

[0020] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium storing instructions, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the key point determination method of the face contour as described in any of the optional aspects of the first aspect.

[0021] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising instructions, when the instructions in the computer program product are executed by a processor of an electronic device, the key point determination method of the face contour as described in any of the optional aspects of the first aspect is implemented.

[0022] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:

[0023] In the above solution, the disclosure first determines the face contour region on the face image to be detected, and directly reduces the input data for detecting the face contour key points according to the determined face contour region; since the obtained face contour region is an irregular figure, the face contour data needs to be subjected to first mapping processing to obtain a face contour image; then the first key points on the face contour image are determined; finally, the first key points on the face contour image are subjected to second mapping processing to obtain second key points. The second key points are the key points of the face contour in the face image. Compared with the related art, the disclosure determines the face contour region, and only detects the key points of the face contour region to obtain the key points of the face contour. In this way, not only the calculation amount can be effectively reduced, but also the processing speed of the whole process can be improved.

[0024] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0025] The accompanying drawings incorporated in the specification and forming a part of it, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure without imposing undue limitation on the disclosure.

[0026] Figure 1 is a detection diagram of key points of each part of a face according to an exemplary embodiment;

[0027] Figure 2 is one of flowcharts of a face contour key point determination method according to an exemplary embodiment;

[0028] Figure 3 is another one of flowcharts of a face contour key point determination method according to an exemplary embodiment;

[0029] Figure 4 is still another one of flowcharts of a face contour key point determination method according to an exemplary embodiment;

[0030] Figure 5A is an initial contour figure based on a face image to be detected according to an exemplary embodiment;

[0031] Figure 5B is a face contour region figure based on a face image to be detected according to an exemplary embodiment;

[0032] Figure 5C is a face contour image figure according to an exemplary embodiment;

[0033] Figure 5Dis a face contour image schematic diagram containing first key points according to an exemplary embodiment;

[0034] Figure 5E is a face image to be detected containing second key points according to an exemplary embodiment;

[0035] Figure 6 is a flowchart of a key point determination method of a face contour according to an exemplary embodiment;

[0036] Figure 7 is a structural block diagram of a key point determination device of a face contour according to an exemplary embodiment;

[0037] Figure 8 is a structural schematic diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0038] In order to make the ordinary person in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings.

[0039] It should be noted that the terms "first", "second" and the like in the specification and claims of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein. The data involved in the present disclosure can be data authorized by the user or sufficiently authorized by all parties. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0040] It should also be understood that the term "comprising" indicates the presence of described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or components.

[0041] With the development of deep learning technology and the rapid improvement of computer operation capability, the fields of artificial intelligence, computer vision and image processing are developing rapidly. Among them, the face recognition technology as a classic topic in the field of computer vision has great researchability and application value.

[0042] The face recognition technology can detect key points of each part in a face image. After detecting the key points of each part, the face recognition technology can be used in 3D face reconstruction, face attribute, AI face changing and other face tasks. Generally, the key points of each part of the face can be obtained by a regional detection and recognition model. Figure 1 It can be known that by inputting each part of the face (such as eyebrows, glasses, nose, mouth and the like) into the regional detection and recognition model, the regional detection and recognition model outputs the key point detection result of each part of the face through deep learning, wherein the black circular pattern is used to represent the key points of each part.

[0043] For the face contour, since the face contour cannot be cut separately like other facial features, the whole face needs to be used as input data to obtain the key points of the face contour. However, the input data also includes other facial features such as eyebrows, glasses, nose and mouth that have been detected. Therefore, this method not only has a large amount of calculation, but also causes resource waste.

[0044] Based on the background technology, the embodiment of the present disclosure provides a key point determination method for a face contour. By determining a face contour region on a face image to be detected, the input data for detecting the key points of the face contour can be reduced according to the determined face contour region. Since the obtained face contour region is an irregular figure, the face contour data needs to be subjected to first mapping processing to obtain a face contour image. Then, first key points on the face contour image are determined. Finally, the first key points on the face contour image are subjected to second mapping processing to obtain second key points. The second key points are the key points of the face contour in the face image.

[0045] The key point determination method for a face contour provided by the embodiment of the present disclosure is exemplarily described as follows:

[0046] The key point determination method for a face contour provided by the present disclosure can be applied to an electronic device.

[0047] In some embodiments, the electronic device can be a server, a terminal or other electronic device for click rate estimation, and the present disclosure does not limit the electronic device.

[0048] The server can be a single server or a server cluster composed of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. The present disclosure does not limit the specific implementation of the server.

[0049] The terminal can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc., that can install and use content community applications (such as Kuaishou). This disclosure does not impose any special restrictions on the specific form of the electronic device. It can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction, or handwriting device.

[0050] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0051] like Figure 2 As shown, when the method for determining the key points of a face contour is applied to an electronic device, the method may include:

[0052] Step 21: The electronic device acquires the face image to be detected.

[0053] In one possible embodiment, the face image to be detected refers to an image that can be used for keypoint detection, and that image has a facial outline. The face image to be detected can be acquired in real time by a camera or image sensor configured in a terminal device, such as by directly capturing a raw image containing a face using a mobile phone camera as the face image to be detected; it can also be acquired from other specific image sources, such as from a locally stored photo album or historically captured images; it can also be downloaded from the cloud or network, or obtained from other data sources.

[0054] Step 22: The electronic device determines the facial contour region on the facial image.

[0055] In one possible embodiment, the electronic device can determine the facial contour region on a facial image in various ways. In this way, compared to related technologies that require inputting the entire facial data to confirm the key points of the facial contour, this disclosure only requires inputting the facial contour region to obtain the key points of the facial contour, greatly reducing the amount of input data.

[0056] Optionally, in combination with Figure 2 As shown in Figure 3 Step 22, the electronic device determines the face contour region on the face image, including:

[0057] Step 31, the electronic device determines the face contour region based on the plurality of third key points in the face image.

[0058] The plurality of third key points at least include one point at the left ear root in the face image, one point at the right ear root in the face image, and one point at the chin in the face image.

[0059] For example, the plurality of third key points are the key points of the face contour in the face image. According to the third key points, the face contour region can be fitted. Moreover, the face contour region is smaller than the face image and includes the face contour as much as possible. In the face image, there are many points on the face contour. In order to fit the face contour region with higher fitting degree as much as possible, the plurality of third key points in the present disclosure at least include one point at the left ear root in the face image, one point at the right ear root in the face image, and one point at the chin in the face image. The three points are basically at the edge points of the face contour, and the three points are also the minimum points for determining the face contour region. Meanwhile, the plurality of third key points can also include other points on the face contour. The present disclosure does not limit the selection of the specific third key points.

[0060] The technical scheme provided by the above embodiment can bring at least the following beneficial effects: a method for determining the face contour region based on the plurality of third key points in the face image is provided. The selected plurality of third key points provide a data basis for subsequently determining the accurate face contour region.

[0061] Optionally, in combination with Figure 2 As shown in Figure 4 Step 31, the electronic device determines the face contour region based on the plurality of third key points in the face image, including:

[0062] Step 41, the electronic device determines the initial contour graph according to the plurality of third key points in the face image.

[0063] In some embodiments, the electronic device can obtain the initial contour graph according to the plurality of third key points in the face image. The initial contour graph can be in various shapes, as long as it can fit the face contour as much as possible. The more the initial contour graph fits the face contour, the smaller the face contour region determined subsequently, and the more accurate the face contour key points obtained.

[0064] For example, as shown in Figure 5AAs shown, the initial contour figure fitted by the electronic device based on the plurality of third key points is a circle. And according to the fitted circle, a center C0 and a radius R0 of the circle are obtained.

[0065] Optionally, the initial contour figure includes a circle, an ellipse or a parabola.

[0066] In a possible embodiment, since each person usually has a different face contour, the face contour includes a cone shape, a goose egg shape, a circle, an oblong, a square and the like. The initial contour figure in the present disclosure is designed to fit the face contour as much as possible, and thus the initial contour figure can be a circle, an ellipse, a parabola and the like that fit the face contour. The present disclosure does not limit the shape of the initial contour figure, and the face contour can be fitted.

[0067] The technical solutions provided by the above embodiments can at least bring the following beneficial effects: in order to fit the face contour as much as possible, a plurality of optional initial contour figures are provided, thereby improving the accuracy of the subsequent obtained face contour region.

[0068] Step 42, the electronic device determines a target contour region based on the first parameter, the second parameter and the initial contour figure.

[0069] The first parameter is used to expand the initial contour figure, and the second parameter is used to reduce the initial contour figure; and the target contour region is a closed region between the expanded initial contour figure and the reduced initial contour figure.

[0070] In a possible embodiment, the initial contour figure is the face contour determined initially, and cannot completely include all the pixel points of the face contour. In order to include all the pixel points of the face contour, the target contour region is determined based on the initial contour figure.

[0071] For example, in the case where the initial contour figure is a circle, according to the first parameter and the attribute information (such as the radius of the circle) of the initial contour figure, the expanded initial contour figure is obtained. The attribute information of the expanded initial contour figure includes a first numerical value. According to the second parameter and the attribute information of the initial contour figure, the reduced initial contour figure is obtained. The attribute information of the reduced initial contour figure includes a second numerical value. According to the closed region between the expanded initial contour figure and the reduced initial contour figure, the target contour region, i.e. a circle ring, is obtained. The first parameter e1 = 1.05, and the second parameter e2 = 0.75. Based on the first parameter, the first numerical value, i.e. the first radius R1 = e1 * R0, is obtained. Based on the second parameter, the second numerical value, i.e. the second radius R2 = e2 * R0, is obtained. According to R1 and R2, the target contour figure, i.e. the circle ring, is obtained.

[0072] Step 43: The electronic device cuts the target contour region based on the preset face contour boundary points to obtain the face contour region.

[0073] In one possible embodiment, the boundaries of different standard facial contours are not the same. Therefore, the electronic device needs to process the obtained target contour region based on the required facial contour boundary points to obtain the facial contour region.

[0074] For example, when the target contour region is determined to be a ring, the ring is cut according to the required facial contour boundary points, and the start and end edges of the ring are determined after cutting. The facial contour region is then obtained based on the start and end edges of the ring. Figure 5B As shown, in an irregular shape where the preset facial contour boundary points are the highest point at the left ear root in the facial image as the starting point, a point at the chin in the facial image as the midpoint, and the highest point at the right ear root in the facial image as the ending point, a starting point (i1) and an ending point (i4) are created to ensure that all pixels of the facial contour are obtained. The starting point extends beyond the highest point at the left ear root in the facial image, and the ending point also extends beyond the highest point at the right ear root in the facial image. Connecting the starting point and the center of the circle yields two intersection points between the starting point and the circle (starting point i1 and first starting point i2); connecting the ending point and the center of the circle yields two intersection points between the starting point and the circle (ending point i4 and first ending point i3). Connecting starting point i1 and first starting point i2 yields the starting edge, and connecting ending point i4 and first ending point i3 yields the ending edge. The area between the starting edge and the ending edge is the facial contour area. For example, with C0 as the origin, the starting edge as the beginning, and the ending edge as the end, the angle between the starting edge and the ending edge is 270°. The facial contour area is the part between the start and end edges filled with diagonal lines.

[0075] The technical solution provided by the above embodiments can bring at least the following beneficial effects: it provides a method for obtaining an initial contour graphic through multiple third key points, and then obtaining a face contour region based on the initial contour graphic. This approach can reduce the input data used for detecting face contours, further reducing the waste of computational resources.

[0076] Step 23: The electronic device performs a first mapping process on the facial contour region on the facial image to obtain a facial contour with a standard shape.

[0077] In a possible embodiment, the electronic device performs first mapping on the determined face contour region to obtain a face contour with a standard shape. Since the face contour is an irregular figure, the face contour region obtained in the above step cannot be directly used for key point recognition, and the face contour region needs to be processed by first mapping to obtain a face contour with a standard shape. For example, the face contour region is mapped by using convolution processing to obtain a face contour with a standard shape. The standard shape can be a rectangle.

[0078] Optionally, in combination with Figure 4 Step 23, the electronic device performs first mapping processing on the face contour region in the face image to obtain a face contour with a standard shape, including:

[0079] Step 44, the electronic device determines, based on the initial image with the preset size, the first value and the second value, the coordinates of the pixel points in the face contour region corresponding to the coordinates of each pixel point in the initial image.

[0080] The preset size is consistent with the size of the deformed face contour region, the first value is a shape parameter of the expanded initial contour figure, and the second value is a shape parameter of the reduced initial contour figure.

[0081] In a possible embodiment, the mapping from the face contour region to the face contour image can be implemented in multiple ways, such as forward mapping and reverse mapping. The forward mapping is to find the coordinates of the pixel points in the initial image according to the coordinates of the pixel points in the face contour region, and then fill the pixel values of the pixel points in the face contour region into the pixel points in the initial image to obtain the face contour image. The reverse mapping is to determine the coordinates of the pixel points in the face contour region according to the coordinates of the pixel points in the initial image, and then fill the pixel values corresponding to the coordinates of the pixel points in the face contour region into the pixel points in the initial image to obtain the face contour image. In order to ensure that there is no loss of pixel values in the entire mapping process, the present disclosure processes by reverse mapping to obtain the face contour image.

[0082] Specifically, the reverse mapping needs to determine the preset size of the deformed initial image. After the preset size of the initial image is determined, the coordinates of each pixel point in the initial image are fixed values, and based on the fixed coordinates of each pixel point and the data in the face contour region, the coordinates of the pixel points in the face contour region corresponding to each pixel point in the initial image are finally obtained. For example, the preset size of the initial image can be 1000*200, and can also be 2000*500.

[0083] Optionally, in combination with Figure 4 For example, Figure 6As shown, step 44, the electronic device determines the coordinates of the pixel points in the face contour region corresponding to the coordinates of each pixel point in the initial image based on the initial image of the preset size, the first value and the second value, including:

[0084] Step 441, the electronic device obtains the coordinates of each pixel point in the initial image based on the initial image of the preset size.

[0085] In a possible embodiment, after the electronic device learns the preset size of the initial image, the initial image is divided according to the size of the pixel points to obtain a plurality of pixel points and the coordinates of each pixel point.

[0086] Step 442, the electronic device determines the rotation angle and the height value corresponding to each pixel point in the initial image according to the coordinates of each pixel point in the initial image, the first value and the second value.

[0087] In a possible embodiment, after the electronic device learns the coordinates of each pixel point in the initial image, the rotation angle and the height value corresponding to each pixel point can be obtained based on the coordinates of each pixel point, the first value and the second value.

[0088] For example, assuming that the length and width of the initial image are (w, h), and the coordinates of a pixel point in the initial image are (i, j), the following formulas are obtained:

[0089] radius=R1+(R2-R1)*(j / h)

[0090] phi=(i / w)*270

[0091] Wherein, radius is the height value corresponding to a pixel point in the initial image, and phi is the rotation angle corresponding to a pixel point in the initial image.

[0092] Step 443, the electronic device obtains the coordinates of the pixel points in the face contour region corresponding to each pixel point in the initial image according to the rotation angle and the height value.

[0093] In a possible embodiment, the rotation angle is a representation method in the face contour region, and the height value is obtained based on the first value and the second value of the circular ring. Therefore, after obtaining the rotation angle and the height value of a pixel point in the initial image, the coordinates of the pixel points in the corresponding face contour region can be directly determined.

[0094] The technical scheme provided by the above embodiment can at least bring the following beneficial effects: a method for determining the coordinates of the pixel points in the face contour region by using the rotation angle and the height value is provided. By coordinate transformation, the irregularly shaped face contour region is transformed into a standard shaped face contour image, so that the key points on the face contour are more easily determined.

[0095] Step 45, the electronic device obtains the pixel value corresponding to the coordinate of the pixel point in the face contour region, and maps the pixel value into the pixel point of the corresponding initial image to obtain the face contour image.

[0096] In a possible embodiment, after obtaining the coordinate of the pixel point in the face contour region corresponding to each pixel point in the initial image, since the initial image only has the size and does not have the actual pixel data, the electronic device needs to obtain the corresponding pixel value from the pixel point in the face contour region corresponding to each pixel point in the initial image, and map the pixel value into the pixel point of the corresponding initial image, so as to obtain the face contour image.

[0097] Specifically, in combination with Figure 5B As shown in FIG. 4, the pixel value filling is performed on the pixel points in the face contour region filled with the oblique line between the starting edge and the ending edge according to the manner of steps 44 and 45 to obtain the face contour image. For example, after performing the pixel value filling on 1 in the left eyebrow, 2 in the chin and 3 in the right eyebrow in the initial image, the positions of 1, 2 and 3 in the face contour image are obtained. The face contour image can be as shown in FIG. 5, or other regular patterns, and the disclosure does not limit the face contour image. Figure 5C Figure 5B As shown in FIG. 4, the pixel value filling is performed on the pixel points in the face contour region filled with the oblique line between the starting edge and the ending edge according to the manner of steps 44 and 45 to obtain the face contour image. For example, after performing the pixel value filling on 1 in the left eyebrow, 2 in the chin and 3 in the right eyebrow in the initial image, the positions of 1, 2 and 3 in the face contour image are obtained. The face contour image can be as shown in FIG. 5, or other regular patterns, and the disclosure does not limit the face contour image. Figure 5C

[0098] The technical solution provided by the above embodiment can bring at least the following beneficial effects: a method for deforming based on the coordinate of each pixel point in the initial image and the coordinate of the pixel point in the face contour region is provided. This method can make the process of mapping the face contour region into the face contour image not lose or shift the pixel points, and completely represent the face contour region.

[0099] Optionally, in the case that the rotation angle of the pixel point in the initial image is less than or equal to the first threshold value, the coordinate of the pixel point in the face contour region is related to a first difference value, and the first difference value is the value of the first threshold value exceeding the rotation angle.

[0100] In the case that the rotation angle of the pixel point in the face contour region is greater than the first threshold value and less than or equal to the second threshold value, the coordinate of the pixel point in the face contour region is related to a second difference value, and the second difference value is the value of the rotation angle exceeding the first threshold value.

[0101] In the case that the rotation angle of the pixel point in the face contour region is greater than the second threshold value and less than or equal to the third threshold value, the coordinate of the pixel point in the face contour region is related to a third difference value, and the third difference value is the value of the rotation angle exceeding the second threshold value.

[0102] ​​In a case that the rotation angle of the pixel point in the face contour region is greater than the third threshold value and less than or equal to the fourth threshold value, the coordinate of the pixel point in the face contour region is related to a fourth difference value, and the fourth difference value is a value that the rotation angle exceeds the third threshold value.

[0103] For example, in combination with Figure 5B In a case that the first threshold value is 45°, the second threshold value is 135°, the third threshold value is 225°, and the fourth threshold value is 270°, based on the rotation angle, the height value, four quadrants, and four threshold values, the coordinate of the pixel point in the face contour region can be divided into four cases.

[0104] In a case that the rotation angle of the pixel point in the face contour region is less than or equal to the first threshold value, the coordinate of the pixel point in the face contour region is related to a difference value obtained by subtracting the rotation angle from the first threshold value.

[0105] That is, when the rotation angle is <= 45°, the coordinate (m0, n0) of the pixel point in the face contour region is in the second quadrant of the coordinate system with C0(0, 0) as the origin and X0, Y0 as the coordinate system, and the calculation of the coordinate (m0, n0) of the pixel point in the face contour region satisfies the following expression:

[0106] m0 = -radius*cos(45-phi)

[0107] n0 = -radius*sin(45-phi)

[0108] In a case that the rotation angle of the pixel point in the face contour region is greater than the first threshold value and less than or equal to the second threshold value, the coordinate of the pixel point in the face contour region is related to a difference value obtained by subtracting the first threshold value from the rotation angle.

[0109] That is, when the rotation angle is 45°<phi<=135°, the coordinate (m0, n0) of the pixel point in the face contour region is in the second quadrant of the coordinate system with C0(0, 0) as the origin and X0, Y0 as the coordinate system, and the calculation of the coordinate (m0, n0) of the pixel point in the face contour region satisfies the following expression:

[0110] m0 = -radius*cos(phi-45)

[0111] n0 = radius*sin(phi-45)

[0112] The third case: in the case that the rotation angle of the pixel point in the face contour region is greater than the second threshold and less than or equal to the third threshold, the difference between the coordinate of the pixel point in the face contour region and the rotation angle minus the second threshold is related.

[0113] That is, when the rotation angle 135°<phi<=225°, the coordinate (m0, n0) of the pixel point in the face contour region is in the second quadrant of the coordinate system with X0, Y0 as the coordinate system and C0(0, 0) as the origin, the calculation of the coordinate (m0, n0) of the pixel point in the face contour region satisfies the following expression:

[0114] m0=radius*cos(phi-135)

[0115] n0=radius*sin(phi-135)

[0116] The fourth case: in the case that the rotation angle of the pixel point in the face contour region is greater than the third threshold and less than or equal to the fourth threshold, the difference between the coordinate of the pixel point in the face contour region and the rotation angle minus the third threshold is related.

[0117] That is, when the rotation angle 225°<phi<=270°, the coordinate (m0, n0) of the pixel point in the face contour region is in the second quadrant of the coordinate system with X0, Y0 as the coordinate system and C0(0, 0) as the origin, the calculation of the coordinate (m0, n0) of the pixel point in the face contour region satisfies the following expression:

[0118] m0=radius*cos(phi-225)

[0119] n0=-radius*sin(phi-225)

[0120] After calculating the coordinates of all pixel points (m0, n0) in the face contour region based on C0(0, 0) as the origin and X0, Y0 as the coordinate system, in actual calculation, in order to unify, the coordinates of the whole face image need to be calculated, that is, C1(0, 0) as the origin and X1, Y1 as the coordinate system, first determine the coordinates of C0 in the X1, Y1 coordinate system as (x, y), and then translate the calculated all pixel points (m0, n0) in the face contour region by the coordinates (x, y) of C0 to obtain the final coordinates (m1, n1) of the pixel points in the face contour region.

[0121] m1=m+x

[0122] n1=n+y

[0123] The technical scheme provided by the above embodiment can at least bring the following beneficial effects: a specific determination method of pixel point coordinates in a face contour region is provided, and a more accurate coordinate result can be obtained through this method.

[0124] Step 24, the electronic device determines the first key point on the face contour image.

[0125] The first key point is a key point of the face contour on the face contour image.

[0126] In a possible embodiment, after obtaining the face contour image, the electronic device inputs the face contour image into a target model, and the target model is a model used for key point extraction. Specifically, the target model is used to extract the key points of the face contour in the face contour image to obtain the first key point information on the face contour image.

[0127] For example, the target model can be a sub-region prediction model, and can also be other models with key point extraction function. The face contour image is input into the sub-region prediction model, and the output is as shown in Figure 5C Figure 5D The face contour image containing the first key point, wherein the first key point is shown in a plurality of black circular patterns.

[0128] Step 25, the electronic device performs second mapping processing on the first key point on the face contour image to obtain a second key point.

[0129] The second key point corresponds to the first key point one by one; and the second key point is a key point of the face contour on the face image.

[0130] In a possible embodiment, the electronic device performs second mapping processing on the first key point on the face contour image to obtain a second key point. Specifically, the face contour image containing the first key point is restored to the image before the first mapping processing, that is, the face contour image is restored to the original face contour region. Different from the original face contour region, the restored face contour region also contains the second key point for representing the face contour.

[0131] For example, the second mapping processing on the first key point on the face contour image can be obtained by deconvolution. The process of deconvolution is completely opposite to the process of convolution. In combination with Figure 5A - Figure 5D , after the electronic device performs inverse deformation on the first key point on the face contour image, the original face contour region containing the second key point is obtained as shown in Figure 5E The second key point is shown in a plurality of black circular patterns, that is, the key points of the face contour are shown in a plurality of black circular patterns.

[0132] ​The technical solutions provided by the above embodiments can bring at least the following beneficial effects: as can be known from steps 21 to 25, the disclosure first determines a face contour region on a face image to be detected, and directly reduces input data for detecting face contour key points according to the determined face contour region; since the obtained face contour region is an irregular figure, the face contour data needs to be subjected to first mapping processing to obtain a face contour image; then first key points on the face contour image are determined; and finally the first key points on the face contour image are subjected to second mapping processing to obtain second key points. The second key points are the key points of the face contour in the face image. Compared with the related art, the disclosure determines a face contour region, and only detects key points on the face contour region to obtain the key points of the face contour. In this way, the calculation amount can be effectively reduced, and the processing speed of the whole process can be improved.

[0133] The above Figure 1 - Figure 6 The method provided by the embodiments of the disclosure is described in detail. In order to achieve the above functions, the face contour key point determination apparatus includes hardware structures and / or software modules corresponding to each function, and these hardware structures and / or software modules corresponding to each function can constitute a face contour key point determination apparatus. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the disclosure can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the disclosure.

[0134] The embodiments of the disclosure can divide the face contour key point determination apparatus into functional modules according to the above method examples, for example, the face contour key point determination apparatus can divide each functional module corresponding to each function, or can integrate two or more functions in one processing module. The above integrated module can be realized in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in the embodiments of the disclosure is illustrative, and is only a logical functional division. Actual implementation can have another division manner.

[0135] The following describes the face contour key point determination apparatus provided by the embodiments of the disclosure in combination with Figure 7 The face contour key point determination apparatus provided by the embodiments of the disclosure is described in detail. It should be understood that the description of the apparatus embodiment corresponds to the description of the method embodiment, and therefore, the content not described in detail can be referred to the above method embodiment. For brevity, the description is not repeated here.

[0136] Figure 7is a logic structure block diagram of a face contour key point determination apparatus according to an exemplary embodiment. Referring to Figure 7 The face contour key point determination apparatus comprises an acquisition module 710 and a processing module 720. The acquisition module 710 is configured to acquire a face image to be detected; for example, in combination with Figure 2 The acquisition module 710 can be used to perform step 21.

[0137] The processing module 720 is configured to determine a face contour region on the face image; for example, in combination with Figure 2 The processing module 720 can be used to perform step 22.

[0138] The processing module 720 is configured to perform first mapping processing on the face contour region on the face image to obtain a face contour image with a standard shape; for example, in combination with Figure 2 The processing module 720 can be used to perform step 23.

[0139] The processing module 720 is configured to determine a first key point on the face contour image; the first key point is a key point of the face contour on the face contour image; for example, in combination with Figure 2 The processing module 720 can be used to perform step 24.

[0140] The processing module 720 is configured to perform second mapping processing on the first key point on the face contour image to obtain a second key point; the second key point corresponds to the first key point one by one; the second key point is a key point of the face contour on the face image. For example, in combination with Figure 2 The processing module 720 can be used to perform step 25.

[0141] Optionally, the processing module 720 is configured to determine the face contour region based on a plurality of third key points in the face image; the plurality of third key points at least include a point at a left ear root in the face image, a point at a right ear root in the face image, and a point at a chin in the face image; for example, in combination with Figure 3 The processing module 720 can be used to perform step 31.

[0142] Optionally, the processing module 720 is configured to determine an initial contour pattern according to the plurality of third key points in the face image; for example, in combination with Figure 4 The processing module 720 can be used to perform step 41.

[0143] The processing module 720 is configured to determine a target contour region based on a first parameter, a second parameter, and the initial contour pattern; the first parameter is used to expand the initial contour pattern, and the second parameter is used to reduce the initial contour pattern; the target contour region is a closed region between the expanded initial contour pattern and the reduced initial contour pattern; for example, in combination withFigure 4 The processing module 720 can be configured to perform step 42.

[0144] The processing module 720 is configured to cut the target contour region based on the preset face contour boundary points to obtain a face contour region. For example, in combination with Figure 4 The processing module 720 can be configured to perform step 43.

[0145] Optionally, the processing module 720 is configured to determine the coordinates of the pixel points in the face contour region corresponding to the coordinates of each pixel point in the initial image based on the initial image of the preset size, the first value and the second value; the preset size is consistent with the size of the face contour image; the first value is the shape parameter of the expanded initial contour image, and the second value is the shape parameter of the reduced initial contour image. For example, in combination with Figure 4 The processing module 720 can be configured to perform step 44.

[0146] The acquisition module 710 is configured to acquire the pixel value corresponding to the coordinates of the pixel points in the face contour region, and map the pixel value to the pixel points in the corresponding initial image to obtain a face contour image. For example, in combination with Figure 4 The acquisition module 710 can be configured to perform step 45.

[0147] Optionally, the processing module 720 is configured to obtain the coordinates of each pixel point in the initial image based on the initial image of the preset size. For example, in combination with Figure 6 The processing module 720 can be configured to perform step 441.

[0148] The processing module 720 is configured to determine the rotation angle and the height value corresponding to each pixel point in the initial image based on the coordinates of each pixel point in the initial image, the first value and the second value. For example, in combination with Figure 6 The processing module 720 can be configured to perform step 442.

[0149] The processing module 720 is configured to obtain the coordinates of the pixel points in the face contour region corresponding to each pixel point in the initial image based on the rotation angle and the height value. For example, in combination with Figure 6 The processing module 720 can be configured to perform step 443.

[0150] Optionally, in the case that the rotation angle of the pixel point in the initial image is less than or equal to the first threshold value, the coordinates of the pixel point in the face contour region are related to the first difference value, and the first difference value is the value of the first threshold value exceeding the rotation angle.

[0151] In a case where the rotation angle of the pixel point in the initial image is greater than the first threshold value and less than or equal to the second threshold value, the coordinate of the pixel point in the face contour region is related to a second difference value, and the second difference value is a value of the rotation angle exceeding the first threshold value.

[0152] In a case where the rotation angle of the pixel point in the initial image is greater than the second threshold value and less than or equal to the third threshold value, the coordinate of the pixel point in the face contour region is related to a third difference value, and the third difference value is a value of the rotation angle exceeding the second threshold value.

[0153] In a case where the rotation angle of the pixel point in the face contour region is greater than the third threshold value and less than or equal to the fourth threshold value, the coordinate of the pixel point in the face contour region is related to a fourth difference value, and the fourth difference value is a value of the rotation angle exceeding the third threshold value.

[0154] Optionally, the initial contour graph includes a circle, an ellipse or a parabola.

[0155] Of course, the path selection device provided by the embodiments of the present disclosure includes but is not limited to the above-mentioned modules. For example, the path selection device can further include a storage module 730. The storage module 730 can be used to store the program code of the path selection device, and can also be used to store the data generated by the path selection device during operation, such as data in a write request.

[0156] Figure 8 A possible structural schematic diagram of an electronic device involved in the above-mentioned embodiments is shown. As shown in Figure 8 The electronic device 80 includes a processor 801 and a memory 802.

[0157] It can be understood that Figure 8 The electronic device 80 shown can implement all functions of the face contour key point determination method. The functions of each module in the face contour key point determination device can be implemented in the processor 801 of the electronic device 80. The storage module of the face contour key point determination device is equivalent to the memory 802 of the electronic device 80.

[0158] The processor 801 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 80 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.

[0159] The memory 802 can include one or more computer-readable storage media that can be non-transitory. The memory 802 can also include high-speed random access memory and nonvolatile, computer-readable storage media such as one or more magnetic disk storage devices, flash memory devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction for being executed by the processor 801 to implement the face contour key point determination method provided by the method embodiments of the present disclosure.

[0160] In some embodiments, the electronic device 80 can also optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802, and the peripheral device interface 803 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 803 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 804, a touch display screen 805, a camera 808, an audio circuit 807, a positioning component 808, and a power supply 808.

[0161] The peripheral device interface 803 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 can be implemented on a separate chip or circuit board, and the present embodiment is not limited in this regard.

[0162] The radio frequency circuit 804 is configured to receive and send RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts electrical signals to electromagnetic signals for transmission, or converts electromagnetic signals received into electrical signals. Optionally, the radio frequency circuit 404 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 804 can communicate with other face contour key point determination apparatuses through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 8G), a wireless local area network, and / or a Wi-Fi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 can also include NFC (Near Field Communication) related circuitry, which is not limited by the present disclosure.

[0163] The display screen 805 is configured to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 also has the ability to collect touch signals on or above the surface of the display screen 805. The touch signals can be input to the processor 801 as control signals for processing. At this time, the display screen 805 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 805 can be one, which is arranged on the front panel of the electronic device 80; the display screen 805 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.

[0164] The camera component 806 is configured to capture images or videos. Optionally, the camera component 806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is disposed on the front panel of the key point determination apparatus for face contour, and the rear-facing camera is disposed on the back of the key point determination apparatus for face contour. The audio circuit 807 can include a microphone and a speaker. The microphone is configured to capture sound waves of the user and the environment, and convert the sound waves into an electrical signal input to the processor 801 for processing, or input to the radio frequency circuit 404 to realize voice communication. For the purpose of stereo sound capture or noise reduction, the microphone can be multiple, and is disposed at different parts of the electronic device 80. The microphone can also be an array microphone or an omnidirectional capture microphone. The speaker is configured to convert an electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker can be a conventional diaphragm speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert an electrical signal into a sound wave audible to humans, but also convert an electrical signal into an inaudible sound wave to humans for ranging purposes. In some embodiments, the audio circuit 807 can further include a headphone jack.

[0165] The positioning component 808 is configured to determine the current geographic location of the electronic device 80 to realize navigation or LBS (Location Based Service). The positioning component 808 can be a positioning component based on the GPS (Global Positioning System) of the United States, the Beidou system of China, the Glonass system of Russia, or the Galileo system of the European Union.

[0166] The power supply 808 is configured to supply power to each component in the electronic device 80. The power supply 808 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 808 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0167] In some embodiments, the electronic device 80 further includes one or more sensors 810. The one or more sensors 810 include, but are not limited to, an acceleration sensor, a gyroscope sensor, a pressure sensor, a fingerprint sensor, an optical sensor, and a proximity sensor.

[0168] The acceleration sensor can detect the acceleration magnitude in three coordinate axes of the coordinate system established by the electronic device 80. The gyro sensor can detect the body direction and rotation angle of the electronic device 80, and can collect the 3D motion of the user with respect to the electronic device 80 in cooperation with the acceleration sensor. The pressure sensor can be disposed at the side frame of the electronic device 80 and / or the lower layer of the touch display 808. When the pressure sensor is disposed at the side frame of the electronic device 80, the grip signal of the user with respect to the electronic device 80 can be detected. The fingerprint sensor is used to collect the fingerprint of the user. The optical sensor is used to collect the ambient light intensity. The proximity sensor, also referred to as the distance sensor, is usually disposed at the front panel of the electronic device 80. The proximity sensor is used to collect the distance between the user and the front of the electronic device 80.

[0169] The present disclosure also provides a computer readable storage medium having instructions stored thereon, which when executed by a processor of a key point determination apparatus of a face contour, enable the key point determination apparatus of the face contour to perform the face contour key point determination method provided by the present disclosure.

[0170] The present disclosure also provides a computer program product containing instructions, which when run on a key point determination apparatus of a face contour, enable the key point determination apparatus of the face contour to perform the face contour key point determination method provided by the present disclosure.

[0171] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure following, in general, the principles of the present disclosure and including such features to the extent that they are not disclosed in the prior art. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0172] It should be understood that the present disclosure is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims that follow.

Claims

1. A method for determining a key point of a face contour, characterized in that, The method comprises: obtaining a face image to be detected; determining a face contour region on the face image; determining, based on an initial image of a preset size, a first value and a second value, coordinates of a pixel point in the face contour region corresponding to coordinates of each pixel point in the initial image; the preset size is consistent with the size of a face contour image with a standard shape; the first value is a shape parameter of the initial contour image after expansion, and the second value is a shape parameter of the initial contour image after reduction; obtaining pixel values corresponding to the coordinates of the pixel point in the face contour region, and mapping the pixel values to the pixel point in the initial image to obtain the face contour image; determining a first key point on the face contour image; the first key point is a key point of the face contour on the face contour image; performing second mapping processing on the first key point on the face contour image to obtain a second key point; the second key point corresponds to the first key point one by one; the second key point is a key point of the face contour on the face image.

2. The method of claim 1, wherein, The method comprises: determining the face contour region based on a plurality of third key points in the face image; the plurality of third key points at least include one point at the left ear root in the face image, one point at the right ear root in the face image, and one point at the chin in the face image.

3. The method of claim 2, wherein, The method comprises: determining an initial contour image according to the plurality of third key points in the face image; determining a target contour region based on a first parameter, a second parameter and the initial contour image; the first parameter is used to expand the initial contour image, and the second parameter is used to reduce the initial contour image; the target contour region is a closed region between the initial contour image after expansion and the initial contour image after reduction; cutting the target contour region based on a preset face contour boundary point to obtain the face contour region.

4. The method of claim 1, wherein, The method comprises: obtaining the coordinates of each pixel point in the initial image based on the initial image of the preset size; determining a rotation angle and a height value corresponding to each pixel point in the initial image according to the coordinates of each pixel point in the initial image, the first value and the second value; obtaining the coordinates of the pixel point in the face contour region corresponding to each pixel point in the initial image according to the rotation angle and the height value.

5. The method of claim 4, wherein in a case where the rotation angle of the pixel point in the initial image is less than or equal to a first threshold value, the coordinates of the pixel point in the face contour region are related to a first difference value, and the first difference value is a value obtained by subtracting the rotation angle from the first threshold value. In a case where the rotation angle of the pixel point in the initial image is greater than the first threshold value and less than or equal to a second threshold value, the coordinate of the pixel point in the face contour region is related to a second difference value, and the second difference value is a value by which the rotation angle exceeds the first threshold value. In a case where the rotation angle of the pixel point in the initial image is greater than the second threshold value and less than or equal to a third threshold value, the coordinate of the pixel point in the face contour region is related to a third difference value, and the third difference value is a value by which the rotation angle exceeds the second threshold value. In a case where the rotation angle of the pixel point in the face contour region is greater than the third threshold value and less than or equal to a fourth threshold value, the coordinate of the pixel point in the face contour region is related to a fourth difference value, and the fourth difference value is a value by which the rotation angle exceeds the third threshold value.

6. The method of claim 3, wherein, The initial contour shape includes a circle, an ellipse or a parabola.

7. A device for determining key points of a human face contour, characterized in that, Comprise: an acquisition module configured to acquire a face image to be detected; a processing module configured to determine a face contour region on the face image; the processing module is further configured to determine, based on an initial image of a preset size, a first value and a second value, a coordinate of a pixel point in the face contour region corresponding to a coordinate of each pixel point in the initial image; the preset size is consistent with a size of a face contour image having a standard shape; the first value is a shape parameter of an expanded initial contour shape, and the second value is a shape parameter of a reduced initial contour shape; the processing module is further configured to acquire a pixel value corresponding to the coordinate of the pixel point in the face contour region, and map the pixel value to a pixel point of the initial image corresponding to the pixel value, to obtain a face contour image; the processing module is further configured to determine a first key point on the face contour image; the first key point is a key point of a face contour on the face contour image; the processing module is further configured to perform a second mapping process on the first key point on the face contour image to obtain a second key point; the second key point corresponds to the first key point one by one; and the second key point is a key point of a face contour on the face image.

8. The apparatus of claim 7, wherein the processing module is further configured to determine the face contour region based on a plurality of third key points in the face image; the plurality of third key points at least include one point at a left ear root in the face image, one point at a right ear root in the face image, and one point at a chin in the face image.

9. The apparatus of claim 8, wherein the processing module is further configured to determine an initial contour shape according to the plurality of third key points in the face image; the processing module is further configured to determine a target contour region based on a first parameter, a second parameter and the initial contour shape; the first parameter is used to expand the initial contour shape, and the second parameter is used to reduce the initial contour shape; and the target contour region is a closed region between the expanded initial contour shape and the reduced initial contour shape. The processing module is further configured to cut the target contour region based on preset face contour boundary points to obtain the face contour region.

10. The apparatus of claim 7, wherein, The processing module is further configured to obtain coordinates of each pixel point in the initial image based on the initial image of the preset size. The processing module is further configured to determine a rotation angle and a height value corresponding to each pixel point in the initial image according to the coordinates of each pixel point in the initial image, the first value and the second value. The processing module is further configured to obtain coordinates of a pixel point in the face contour region corresponding to each pixel point in the initial image according to the rotation angle and the height value.

11. The apparatus of claim 10, wherein, in a case where the rotation angle of the pixel point in the initial image is less than or equal to a first threshold value, the coordinates of the pixel point in the face contour region are related to a first difference value, the first difference value being a value by which the first threshold value exceeds the rotation angle; in a case where the rotation angle of the pixel point in the initial image is greater than the first threshold value and less than or equal to a second threshold value, the coordinates of the pixel point in the face contour region are related to a second difference value, the second difference value being a value by which the rotation angle exceeds the first threshold value; in a case where the rotation angle of the pixel point in the initial image is greater than the second threshold value and less than or equal to a third threshold value, the coordinates of the pixel point in the face contour region are related to a third difference value, the third difference value being a value by which the rotation angle exceeds the second threshold value; in a case where the rotation angle of the pixel point in the face contour region is greater than the third threshold value and less than or equal to a fourth threshold value, the coordinates of the pixel point in the face contour region are related to a fourth difference value, the fourth difference value being a value by which the rotation angle exceeds the third threshold value.

12. The apparatus of claim 9, wherein, The initial contour pattern includes a circular ring, an elliptical shape or a parabola.

13. An electronic device, comprising: The electronic device includes: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the method for determining key points of a face contour according to any one of claims 1-6.

14. A computer-readable storage medium having stored thereon instructions, the computer-readable storage medium comprising: When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the method for determining key points of a face contour according to any one of claims 1-6.

15. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the electronic device, the method for determining key points of a face contour according to any one of claims 1-6 is implemented.

Citation Information

Patent Citations

  • Three-dimensional model processing method and device, processor, electronic equipment and storage medium

    CN111311733A

  • Image detection method and related equipment

    CN112487847A

  • Three dimensional face modeling method

    KR1020020014844A