A face feature acquisition method, device, equipment and medium

By using 3D flexible object modeling and convolutional expert network technology, the problem of inaccurate 2D facial feature extraction was solved, achieving more accurate facial feature extraction and improving the objectivity and quantitative diagnostic effect of TCM facial diagnosis.

CN117351544BActive Publication Date: 2026-11-20BEIJING INST OF NANOENERGY & NANOSYST
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311311419.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2026-11-20
Estimated Expiration
2043-10-10

AI Technical Summary

Technical Problem

Existing facial feature extraction methods rely on two-dimensional segmentation, which is affected by model selection, facial pose, and lighting, resulting in the inability to extract certain facial features and leading to insufficient accuracy in the results of physiological and pathological changes.

Method used

Three-dimensional flexible object modeling technology is used to reconstruct two-dimensional facial images into three dimensions. By combining convolutional expert networks and non-uniform regularized marker point average shift algorithm, a three-dimensional point distribution model and a local appearance model are fitted to determine the target location information of multiple facial key points and extract facial color, deformation and texture features.

Benefits of technology

It improves the accuracy of facial feature information and enhances the accuracy of physiological and pathological change results based on facial features, tongue diagnosis, and pulse diagnosis data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117351544B_ABST
    Figure CN117351544B_ABST
Patent Text Reader

Abstract

The application discloses a face feature acquisition method, device, equipment and medium. The method comprises the following steps: acquiring a two-dimensional face image of a user; using a three-dimensional flexible object modeling technology to perform three-dimensional reconstruction on the two-dimensional face image to obtain a three-dimensional point distribution model corresponding to the two-dimensional face image; using a convolution expert network to establish a local appearance model for each facial key point of the three-dimensional face image, fitting the three-dimensional point distribution model and the local appearance model through a non-uniform regularization marker point average shift algorithm to determine target position information of multiple facial key points; performing feature extraction on the three-dimensional face image based on the target position information of the multiple facial key points to obtain face features corresponding to multiple target key points; and the multiple target key points are determined according to a preset corresponding relationship between each part of the face and each organ in traditional Chinese medicine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device and medium for acquiring facial features. Background Technology

[0002] With the development of computer technology and artificial intelligence in the medical field, the objectification and quantification of TCM facial diagnosis are gradually becoming a research trend.

[0003] Facial diagnosis is an important method in Traditional Chinese Medicine (TCM) diagnosis and differentiation of syndromes, and an indispensable part of TCM diagnostics. The color and luster of the face, as well as the color of the lips, can well reflect the state of Qi and blood within the body. The five colors of the face (blue, red, yellow, white, and black) are closely related to the physiological and pathological conditions of the five internal organs (liver, heart, spleen, lungs, and kidneys). By observing changes in the five colors of a patient's face, one can infer the physiological and pathological changes of the corresponding internal organs.

[0004] Traditional Chinese medicine facial diagnosis requires obtaining facial features and then combining these features with data from tongue diagnosis, medical history taking, and pulse diagnosis to infer the physiological and pathological changes of the corresponding internal organs. For example, facial swelling is often a symptom of various diseases such as heart disease, liver disease, kidney disease, and endocrine disorders; a deviated nasal bridge can lead to difficulty breathing through the nose, rhinitis, dry mouth, and mouth breathing.

[0005] In related technologies, most existing facial feature extraction methods rely on facial segmentation methods. However, the accuracy of segmentation is affected by factors such as model selection, facial pose, and lighting, resulting in unsatisfactory segmentation results. Furthermore, methods that segment facial images before extracting features often fail to extract certain facial features, such as a crooked nose, leading to a lack of feature information and insufficient accuracy in inferring physiological and pathological changes. Summary of the Invention

[0006] This invention application provides a method, apparatus, and readable storage medium for acquiring facial features, in order to solve the problem in related technologies that certain facial features cannot be extracted, resulting in a lack of feature information and insufficient accuracy in inferred physiological and pathological changes.

[0007] Firstly, this application provides a method for obtaining facial features, the method comprising:

[0008] Obtain the user's two-dimensional facial image;

[0009] Using 3D flexible object modeling technology, the 2D facial image is reconstructed in 3D to obtain a 3D point distribution model corresponding to the 2D facial image; the 3D point distribution model includes the user's 3D facial image.

[0010] Facial key point detection is performed on the three-dimensional facial image to obtain the estimated location information of the multiple facial key points;

[0011] Based on the estimated location information of the multiple facial key points, the three-dimensional point distribution model is subjected to convolution processing to determine the target location information of the multiple facial key points of the three-dimensional point distribution model.

[0012] Based on the target location information of the multiple facial key points, feature extraction is performed on the three-dimensional facial image to obtain facial features corresponding to the multiple target key points; the multiple target key points are determined according to the pre-defined correspondence between various parts of the face and various organs in traditional Chinese medicine; the location information of the multiple target key points is determined based on the target location information of the multiple facial key points.

[0013] In some embodiments, the step of using three-dimensional flexible object modeling technology to reconstruct the two-dimensional facial image in three dimensions to obtain a three-dimensional point distribution model corresponding to the two-dimensional facial image includes:

[0014] The two-dimensional facial image is transformed into three dimensions using the Non-Rigid Structure from Motion (NRSfM) algorithm to obtain a first reference three-dimensional point distribution model corresponding to the two-dimensional facial image; the first reference three-dimensional point distribution model includes the average position information of the multiple facial key points and multiple deformation feature vectors;

[0015] Using the three-dimensional Procrustes Analysis (PA) method, the first reference three-dimensional point distribution model is aligned to obtain the second reference three-dimensional point distribution model and the transformation parameters of each deformation feature vector;

[0016] Using Principal Component Analysis (PCA), the plurality of deformation feature vectors are sorted and analyzed to determine at least one target deformation feature vector.

[0017] Based on the second reference three-dimensional point distribution model and the at least one target deformation feature vector, the three-dimensional point distribution model corresponding to the two-dimensional facial image is determined.

[0018] In some embodiments, based on the estimated location information of the plurality of facial key points, a local appearance model is established for each facial key point, and the target location information of the plurality of facial key points is determined, including:

[0019] For each person's key facial features:

[0020] Based on the estimated location information of the facial key points, a region of interest of a preset size corresponding to the facial key points is extracted from the three-dimensional point distribution model;

[0021] Multiple convolution and activation processes are performed on the region of interest to obtain the probability that each pixel in the region of interest is aligned with the target position information of the facial key points.

[0022] Based on the probability that each pixel in the region of interest is aligned with the target location information of the facial key points, a local appearance model is established for each facial key point.

[0023] The Non-Uniform Regularized Marker Average Shift (NU-RLMS) algorithm is used to fit the three-dimensional point distribution model and the local appearance model of each facial key point to determine the target location information of multiple facial key points.

[0024] In some embodiments, the facial features include facial color features; the step of extracting features from the three-dimensional facial image based on the positional information of the plurality of facial key points to obtain facial features corresponding to the plurality of target key points includes:

[0025] For each of the multiple target key points:

[0026] Based on the location information of the target key point and the target location information of the multiple facial key points, the distance from the target key point to each facial key point is obtained respectively;

[0027] Using the location information of the target key point as the center and the minimum distance from the target key point to each facial key point as the radius, the region of interest of the target key point is determined.

[0028] The average pixel value of the pixels within the region of interest of the target key point is used as the facial color feature of the target key point.

[0029] In some embodiments, the facial features include facial deformation features; the step of extracting features from the three-dimensional facial image based on the positional information of the plurality of facial key points to obtain facial features corresponding to the plurality of target key points includes:

[0030] For each of the multiple target key points:

[0031] Based on the location information of the target key point and the target location information of the plurality of facial key points, the relative position between the target key point and each facial key point is determined;

[0032] Based on the relative position between the target key point and each facial key point, the facial deformation features of the target key point are determined.

[0033] In some embodiments, the facial features include facial texture features; the step of extracting features from the three-dimensional facial image based on the positional information of the plurality of facial key points to obtain facial features corresponding to the plurality of target key points includes:

[0034] For each of the multiple target key points:

[0035] Based on the location information of the target key points, a preset area of ​​the target key points is determined;

[0036] For each pixel in the preset region: based on the grayscale value of the pixel and the grayscale values ​​of multiple neighboring pixels in the region after each rotation transformation, determine multiple reference coding values ​​for the pixel; and take the smallest reference coding value as the target coding value for the pixel;

[0037] The minimum target encoding value among the target encoding values ​​of multiple pixels in the preset region is taken as the target encoding value of the preset region;

[0038] The Support Vector Machine (SVM) classification method is used to classify the target encoding values ​​of the preset regions corresponding to the multiple target key points, thereby obtaining the facial texture features corresponding to each of the multiple target key points.

[0039] In some embodiments, before performing three-dimensional reconstruction on the two-dimensional facial image to obtain a three-dimensional point distribution model corresponding to the two-dimensional facial image, the method further includes:

[0040] The two-dimensional facial image is subjected to color correction and filtering.

[0041] Secondly, embodiments of this application provide a facial feature acquisition device, the device comprising:

[0042] The acquisition unit is used to acquire the user's two-dimensional facial image;

[0043] The 3D reconstruction unit is used to perform 3D reconstruction of the 2D facial image using 3D flexible object modeling technology to obtain a 3D point distribution model corresponding to the 2D facial image; the 3D point distribution model includes the user's 3D facial image.

[0044] A key point location estimation unit is used to perform facial key point detection on the three-dimensional facial image to obtain estimated location information of the multiple facial key points;

[0045] The key point location determination unit is used to establish a local appearance model for each facial key point based on the estimated location information of the plurality of facial key points, and determine the target location information of the plurality of facial key points; the target location information is three-dimensional location information.

[0046] The feature extraction unit is used to extract features from the three-dimensional facial image based on the target location information of the multiple facial key points to obtain facial features corresponding to the multiple target key points; the multiple target key points are determined according to the correspondence between various parts of the face and various organs as preset in traditional Chinese medicine; the location information of the multiple target key points is determined based on the target location information of the multiple facial key points.

[0047] In some embodiments, the three-dimensional reconstruction unit is specifically used for:

[0048] The two-dimensional facial image is transformed into three dimensions using the NRSfM algorithm to obtain a first reference three-dimensional point distribution model corresponding to the two-dimensional facial image; the first reference three-dimensional point distribution model includes the average position information of the multiple facial key points and multiple deformation feature vectors.

[0049] Using the PA method, the first reference three-dimensional point distribution model is aligned to obtain the second reference three-dimensional point distribution model, as well as the transformation parameters of each deformation feature vector;

[0050] PCA is used to sort and analyze the plurality of deformation feature vectors to determine at least one target deformation feature vector.

[0051] Based on the second reference three-dimensional point distribution model and the at least one target deformation feature vector, the three-dimensional point distribution model corresponding to the two-dimensional facial image is determined.

[0052] In some embodiments, the key point location determination unit is specifically used for:

[0053] For each person's key facial features:

[0054] Based on the estimated location information of the facial key points, a region of interest of a preset size corresponding to the facial key points is extracted from the three-dimensional point distribution model;

[0055] Multiple convolution and activation processes are performed on the region of interest to obtain the probability that each pixel in the region of interest is aligned with the target position information of the facial key points.

[0056] Based on the probability that each pixel in the region of interest is aligned with the target location information of the facial key points, a local appearance model is established for each facial key point.

[0057] Using the NU-RLMS algorithm, the three-dimensional point distribution model and the local appearance model of each facial key point are fitted to determine the target location information of multiple facial key points.

[0058] In some embodiments, the facial features include facial color features; the feature extraction unit is specifically used for:

[0059] For each of the multiple target key points:

[0060] Based on the location information of the target key point and the target location information of the multiple facial key points, the distance from the target key point to each facial key point is obtained respectively;

[0061] Using the location information of the target key point as the center and the minimum distance from the target key point to each facial key point as the radius, the region of interest of the target key point is determined.

[0062] The average pixel value of the pixels within the region of interest of the target key point is used as the facial color feature of the target key point.

[0063] In some embodiments, the facial features include facial deformation features; the feature extraction unit is specifically used for:

[0064] For each of the multiple target key points:

[0065] Based on the location information of the target key point and the target location information of the plurality of facial key points, the relative position between the target key point and each facial key point is determined;

[0066] Based on the relative position between the target key point and each facial key point, the facial deformation features of the target key point are determined.

[0067] In some embodiments, the facial features include facial texture features; the feature extraction unit is specifically used for:

[0068] For each of the multiple target key points:

[0069] Based on the location information of the target key points, a preset area of ​​the target key points is determined;

[0070] For each pixel in the preset region: based on the grayscale value of the pixel and the grayscale values ​​of multiple neighboring pixels in the region after each rotation transformation, determine multiple reference coding values ​​for the pixel; and take the smallest reference coding value as the target coding value for the pixel;

[0071] The minimum target encoding value among the target encoding values ​​of multiple pixels in the preset region is taken as the target encoding value of the preset region;

[0072] Using the SVM classification method, the target encoding values ​​of the preset regions corresponding to the multiple target key points are classified to obtain the facial texture features corresponding to each of the multiple target key points.

[0073] In some embodiments, the apparatus further includes:

[0074] The preprocessing unit is used to perform color correction and filtering on the two-dimensional facial image before performing three-dimensional reconstruction on the two-dimensional facial image to obtain the three-dimensional point distribution model corresponding to the two-dimensional facial image.

[0075] Thirdly, embodiments of this application provide an electronic device, including: at least one processor, and a memory communicatively connected to the at least one processor, wherein:

[0076] The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform a facial feature acquisition method as described in any of the first aspects.

[0077] Fourthly, embodiments of this application provide a computer storage medium in which, when a computer program in the computer storage medium is executed by a processor of an electronic device, the electronic device is able to perform a facial feature acquisition method as described in any of the first aspects.

[0078] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:

[0079] In this embodiment, a three-dimensional point distribution model corresponding to a two-dimensional facial image is obtained by reconstructing the two-dimensional facial image into three dimensions. The target location information of multiple facial key points in the three-dimensional point distribution model is located. Finally, based on the target location information of multiple facial key points and the location information of multiple target key points, facial features such as facial color features, facial deformation features, and facial texture features corresponding to multiple target key points are extracted. This increases the extracted feature information, which significantly improves the accuracy of the physiological and pathological changes inferred by combining the feature information with the user's tongue diagnosis, medical history, and pulse diagnosis data.

[0080] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0081] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0082] Figure 1 A schematic diagram illustrating an application scenario of a facial feature acquisition method provided in this application embodiment;

[0083] Figure 2 A flowchart illustrating a method for obtaining facial features provided in an embodiment of this application;

[0084] Figure 3 A flowchart illustrating a three-dimensional reconstruction method provided in an embodiment of this application;

[0085] Figure 4 A structural block diagram of a point distribution model training process provided in an embodiment of this application;

[0086] Figure 5 A schematic diagram of the structure of three sub-networks included in a multi-task convolutional neural network provided in an embodiment of this application;

[0087] Figure 6 This application provides a flowchart illustrating the process of determining target location information for multiple facial key points in an embodiment of the present application.

[0088] Figure 7 A schematic diagram of a CEN network structure provided in an embodiment of this application;

[0089] Figure 8 A structural block diagram of a CEN training process provided in this application embodiment;

[0090] Figure 9 A comparative diagram of the face and various organ regions provided for embodiments of this application;

[0091] Figure 10 A schematic diagram of the location of a target key point provided in an embodiment of this application;

[0092] Figure 11 A flowchart illustrating a method for extracting facial color features provided in an embodiment of this application;

[0093] Figure 12 A facial color feature for each target key point provided in the embodiments of this application;

[0094] Figure 13 A flowchart illustrating a method for extracting facial deformation features provided in an embodiment of this application;

[0095] Figure 14A flowchart illustrating a method for extracting facial texture features provided in an embodiment of this application;

[0096] Figure 15 A schematic diagram illustrating the LBP algorithm concept provided in this application embodiment;

[0097] Figure 16 A schematic diagram illustrating the calculation process of an LBP mode provided in an embodiment of this application;

[0098] Figure 17 A schematic diagram illustrating a classification result for obtaining facial texture features, provided in an embodiment of this application;

[0099] Figure 18 A structural block diagram of a method for obtaining facial features provided in an embodiment of this application;

[0100] Figure 19 A schematic diagram of a traditional Chinese medicine facial diagnosis auxiliary system provided in an embodiment of this application;

[0101] Figure 20 A schematic diagram of a facial feature acquisition device provided in an embodiment of this application;

[0102] Figure 21 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0103] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0104] Furthermore, in the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0105] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0106] With the development of computer technology and artificial intelligence in the medical field, the objectification and quantification of TCM facial diagnosis are gradually becoming research trends. For example, patent 202210104462.2 proposes a method, device, and storage medium for facial region segmentation in TCM facial diagnosis. This method uses a convolutional neural network structure to segment the TCM facial region. Patent 201911369529.X provides a method and system for facial segmentation in TCM facial diagnosis based on facial feature point detection. This method ultimately segments and locates 68 two-dimensional coordinate points of the TCM facial region.

[0107] Facial diagnosis is an important method in Traditional Chinese Medicine (TCM) diagnosis and differentiation of syndromes, and an indispensable part of TCM diagnostics. The color and luster of the face, as well as the color of the lips, can well reflect the state of Qi and blood within the body. The five colors of the face (blue, red, yellow, white, and black) are closely related to the physiological and pathological conditions of the five internal organs (liver, heart, spleen, lungs, and kidneys). By observing changes in the five colors of a patient's face, one can infer the physiological and pathological changes of the corresponding internal organs.

[0108] Traditional Chinese medicine facial diagnosis requires obtaining facial features and then combining these features with data from tongue diagnosis, medical history taking, and pulse diagnosis to infer the physiological and pathological changes of the corresponding internal organs. For example, facial swelling is often a symptom of various diseases such as heart disease, liver disease, kidney disease, and endocrine disorders; a deviated nasal bridge can lead to difficulty breathing through the nose, rhinitis, dry mouth, and mouth breathing.

[0109] In related technologies, most existing facial feature extraction methods rely on facial segmentation methods. However, the accuracy of segmentation is affected by factors such as model selection, facial pose, and lighting, resulting in suboptimal segmentation performance. Furthermore, methods based on 2D face models have certain limitations. One limitation is that when capturing facial images, it's impossible to always obtain a frontal view; sometimes there's an angle of tilt, leading to the loss of important facial information. Another limitation is that, in addition to extracting color and texture features, traditional Chinese medicine facial diagnosis also needs to focus on facial deformation features. For example, facial swelling is often a symptom of various diseases such as heart disease, liver disease, kidney disease, and endocrine disorders; a crooked nose can cause difficulty breathing through the nose, rhinitis, dry mouth, and mouth breathing. However, accurately extracting these features requires three-dimensional depth information of the face, which can only be achieved using 3D face models. Compared to 2D face models, extracting facial deformation features is more difficult. 2D face models only provide information on color and texture features and cannot capture the three-dimensional shape of the face. Therefore, 2D images cannot accurately reflect facial deformation. The method of segmenting facial images and then extracting features cannot extract certain facial features, such as a crooked nose, resulting in a lack of feature information and insufficient accuracy in inferring physiological and pathological changes.

[0110] A 3D face model contains three-dimensional information about the face, which can more accurately describe facial shape and changes.

[0111] In view of this, embodiments of this application provide a method, apparatus and readable storage medium for obtaining facial features, in order to solve the problem in related technologies that certain facial features cannot be extracted, resulting in a lack of feature information and insufficient accuracy of inferred physiological and pathological changes.

[0112] The inventive concept of this application is as follows: A three-dimensional flexible object modeling technique is used to reconstruct a two-dimensional facial image into a three-dimensional point distribution model corresponding to the two-dimensional facial image. A convolutional expert network (CEN) is used to establish a local appearance model for each facial key point. The NU-RLMS algorithm is used to fit the three-dimensional point distribution model and the local appearance model to determine the target location information of multiple facial key points. Based on the target location information of multiple facial key points, feature extraction is performed on the three-dimensional facial image in the three-dimensional point distribution model to obtain facial features corresponding to multiple target key points. The multiple target key points are determined according to the pre-defined correspondence between various parts of the face and various organs in traditional Chinese medicine. The location information of the multiple target key points is determined based on the target location information of multiple facial key points. Therefore, by extracting facial features based on the three-dimensional point distribution model, the extracted feature information is increased, significantly improving the accuracy of the physiological and pathological changes inferred from the user's tongue diagnosis, medical history, and pulse diagnosis data.

[0113] After introducing the main inventive concepts of the embodiments of this application, the application scenarios of a facial feature acquisition method provided by the embodiments of this application will be described below with reference to the accompanying drawings. For example... Figure 1 The diagram shown is an application scenario illustration of a facial feature acquisition method provided in an embodiment of this application. Figure 1 It includes 100 servers, 200 data acquisition devices, 300 users, and 400 doctors;

[0114] The server 100 and the acquisition device 200 can communicate with each other. The communication method can be wired communication technology, such as communicating through a network cable or serial cable; or wireless communication technology, such as communicating through Bluetooth or WIFI. There are no specific restrictions.

[0115] Acquisition device 200 is used to acquire two-dimensional facial images of user 300;

[0116] Server 100 is used to acquire two-dimensional facial images of user 300; using three-dimensional flexible object modeling technology, the two-dimensional facial images are reconstructed into three dimensions to obtain a three-dimensional point distribution model corresponding to the two-dimensional facial images; the three-dimensional point distribution model includes the user's three-dimensional facial image; facial key point detection is performed on the three-dimensional facial images to obtain estimated position information of multiple facial key points; based on the estimated position information of multiple facial key points, a local appearance model is established for each facial key point to determine the target position information of multiple facial key points; the target position information is three-dimensional position information; based on the target position information of multiple facial key points, feature extraction is performed on the three-dimensional facial images to obtain facial features corresponding to multiple target key points; the multiple target key points are determined according to the pre-defined correspondence between various parts of the face and various organs in traditional Chinese medicine; the position information of multiple target key points is determined based on the target position information of multiple facial key points.

[0117] Afterwards, server 100 uses the facial features corresponding to multiple target key points and the stored data of user 300's tongue diagnosis, questioning, and pulse diagnosis to infer the physiological and pathological changes of user 300, and sends the physiological and pathological changes, user 300's two-dimensional facial image, and user 300's tongue diagnosis, questioning, and pulse diagnosis data to doctor 400.

[0118] Doctor 400, based on the results of physiological and pathological changes, the two-dimensional facial image of User 300, and the data from User 300's tongue diagnosis, inquiry, and pulse diagnosis, further diagnoses and obtains the final results of physiological and pathological changes, thus achieving the purpose of automatic diagnosis and treatment assistance.

[0119] It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the implementation of this application is not limited in any way.

[0120] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-inventive methods. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application.

[0121] See Figure 2 This is a flowchart illustrating a method for obtaining facial features according to an embodiment of this application. The method includes the following steps:

[0122] In step 201, a two-dimensional facial image of the user is acquired.

[0123] The user's two-dimensional facial image can be a directly captured image or an image frame extracted from a video file.

[0124] In some embodiments, two-dimensional facial images acquired under different light sources may cause interference. Therefore, in order to restore the color of the two-dimensional facial image to the greatest extent, before performing three-dimensional reconstruction of the two-dimensional facial image in step 202 to obtain the three-dimensional point distribution model corresponding to the two-dimensional facial image, the following can also be performed:

[0125] Color correction and filtering are performed on two-dimensional facial images.

[0126] In one scenario, after obtaining a user's two-dimensional facial image, the color of the two-dimensional facial image can be corrected using a color chart to correct the ambient light.

[0127] However, manually locating the color blocks on the color chart significantly increases the complexity of automated data acquisition. Therefore, in another scenario, this application embodiment can employ a method combining positioning identifiers and the color chart, using software to automatically detect color blocks on the color chart, thereby achieving color correction. For details, please refer to the patent application number 201910695090.3.

[0128] To mitigate the impact of noise in images on TCM diagnosis, filtering is required after color correction of the 2D facial image.

[0129] In practice, median filtering can be used to remove noise from images. Median filtering is a non-linear spatial domain filtering algorithm suitable for removing randomly distributed noise. First, a suitable window is selected, and the pixel values ​​are sorted within the window. Then, the median value is taken as the value of the window's center point. The calculation formula for median filtering is shown in formula (1):

[0130] f(u,v)=median(I(st)) (s,t)∈S uv (1)

[0131] Where f(u,v) represents the value of the center point of the denoised window, and S uv Represents the size of the rectangular window. I(st) represents the noisy image.

[0132] If the two-dimensional facial image contains Gaussian noise that is uniformly distributed across the image, mean filtering can be used for filtering. However, if the two-dimensional facial image contains salt-and-pepper noise, median filtering should be used for filtering.

[0133] In step 202, the two-dimensional facial image is reconstructed in three dimensions using three-dimensional flexible object modeling technology to obtain a three-dimensional point distribution model corresponding to the two-dimensional facial image; the three-dimensional point distribution model includes the user's three-dimensional facial image.

[0134] This study utilizes 3D flexible object modeling technology to construct a 3D flexible object keypoint model, aiming to establish a statistical model of the user's facial shape. In model building, the target contour of the face in a 2D facial image is first manually marked, and the marked points are correlated with facial features. Then, the 2D facial image is reconstructed into 3D using the NRSfM algorithm and PA method, resulting in a constructed 3D point distribution model. Finally, PCA is used to statistically analyze the aligned 3D point distribution model, selecting eigenvectors corresponding to the largest number of eigenvalues ​​to establish a feature representation model. Changes in model parameters reflect possible changes in the target contour of the face, thus avoiding arbitrary deformation. Simultaneously, the range of model parameter variations is limited, ensuring that the new shape generated by the model always resembles the original shape. In practical applications, a new contour shape is established to track the object contour in the image, using image features as conditions for external forces on the model, making the model shape approximate the image features.

[0135] Therefore, this application utilizes 3D flexible object modeling technology to reconstruct 3D facial images from 2D facial images, obtaining a 3D point distribution model corresponding to the 2D facial images, which can be executed as follows: Figure 3 The steps shown are as follows:

[0136] In step 301, the NRSfM algorithm is used to perform a three-dimensional transformation on the two-dimensional facial image to obtain the first reference three-dimensional point distribution model corresponding to the two-dimensional facial image; the first reference three-dimensional point distribution model includes the average position information of multiple facial key points and multiple deformation feature vectors;

[0137] In step 302, the first reference three-dimensional point distribution model is aligned using the PA method to obtain the second reference three-dimensional point distribution model and the transformation parameters of each deformation feature vector.

[0138] In step 303, PCA is used to sort and analyze multiple deformation feature vectors to determine at least one target deformation feature vector among the multiple deformation feature vectors.

[0139] In step 304, a three-dimensional point distribution model corresponding to the two-dimensional facial image is determined based on the second reference three-dimensional point distribution model and at least one target deformation feature vector.

[0140] Before building a 3D point distribution model (PDM) of the face, a large number of labeled 2D facial images are needed for training. The specific training process is as follows: Figure 4 As shown, the process begins by inputting a large number of 2D facial images and the 2D position information of multiple facial key points corresponding to each image. Next, based on these input images and the corresponding 2D position information, the NRSfM algorithm is used to reconstruct the 3D facial images from different angles, converting them into a 3D point distribution model to obtain a realistic representation of the face. Subsequently, the PA method is applied to the reconstructed 3D facial model, performing scaling transformations (translation, rotation, and scaling) on ​​the point distribution model, and conducting statistical analysis of the facial shape to obtain its distribution. Finally, the PCA method is used to sort multiple deformation feature vectors in descending order, selecting several feature vectors to establish the point distribution model of the face, obtaining the average shape and various possible deformations of the 3D facial model.

[0141] Specifically, assuming Q = [S1, S2, S3, ..., S...] N [N] represents the number of training samples (two-dimensional facial images), and S1 represents the two-dimensional position information of multiple facial key points in the two-dimensional facial image and their corresponding facial feature information. The NRSfM algorithm is used to perform three-dimensional transformation on the two-dimensional facial image to obtain the first reference three-dimensional point distribution model corresponding to the two-dimensional facial image, i.e., S1. P =[x1,y1,z1,...,x n ,y n ,z n ] T , where (x n ,y n ,z n () represents the coordinates of the nth facial landmark in the training samples, and the average shape of the N training samples. The point distribution model consists of the average positional information of facial key points and the main deformation feature vectors. Therefore, the first reference 3D point distribution model for the training samples is... Where p i Let λ represent the i-th deformation eigenvector matrix. i p i The corresponding weights, where M is the number of deformation feature vectors.

[0142] Next, the first reference 3D point distribution model of the training samples is aligned using the PA method. This involves translating, rotating, and scaling the point distribution model to make it as close as possible to the test samples, thus ensuring that the shape of each training sample is as close as possible to the average shape. The second reference three-dimensional point distribution model is obtained, that is Where R represents rotation transformation and T represents translation transformation. Since S′ P The shape is affected by λ i The influence of λ, therefore λ i As the shape parameter of the point distribution model, that is, the transformation parameter of the deformation feature vector.

[0143] Then, PCA is used to sort the deformation eigenvectors in descending order, with eigenvalues ​​satisfying λ. i >λ i+1 When λ i During rapid descent, the top G important target deformation feature vectors are selected to establish a three-dimensional point distribution model corresponding to the two-dimensional facial image.

[0144] Therefore, a three-dimensional reconstruction of a two-dimensional facial image is performed to obtain a three-dimensional point distribution model, which further reveals information about the position, pose angle, and shape changes of the face in three-dimensional space. By establishing a realistic facial point distribution model, facial morphological features can be located and analyzed more accurately.

[0145] The three-dimensional point distribution model includes the user's three-dimensional facial image.

[0146] In step 203, facial landmark detection is performed on the three-dimensional facial image to obtain the estimated location information of multiple facial landmarks.

[0147] In practice, after using 3D flexible object modeling technology to reconstruct 3D facial images and obtain a 3D point distribution model corresponding to the 2D facial images, it is necessary to more accurately locate the position information of multiple facial key points in the 3D point distribution model.

[0148] The widespread application of deep learning has enabled convolutional neural network algorithms to demonstrate excellent performance in image processing. Therefore, in this embodiment, MTCNN (Multi-Task Convolutional Neural Network) is used to detect the location information of multiple facial key points. MTCNN consists of three sub-networks: Proposal Network (P-Net), Refine Network (R-Net), and Output Network (O-Net), as follows... Figure 5 The diagram shows the structure of the three sub-networks in a multi-task convolutional neural network, from top to bottom: P-Net, R-Net, and O-Net. These three sub-networks detect the location information of multiple facial key points step by step through a coarse-to-fine processing method.

[0149] First, use Figure 5 The P-Net shown detects the location information of multiple facial key points in a 3D point distribution model. P-Net is primarily used to generate the bounding box containing the user's face and the initial location information of reference facial key points in the 3D point distribution model.

[0150] The three-dimensional point distribution model includes 68 facial key points, among which the reference facial key points are the key points of the facial features, namely the left eye, right eye, nose, and both sides of the mouth.

[0151] like Figure 5 As shown, P-Net detects each 12×12×3 3D facial image at different scales of the image pyramid. First, a 3×3 convolutional layer performs convolution processing, followed by a 3×3 pooling layer for max pooling, resulting in a 5×5×10 3D facial image. Then, a 3×3 convolutional layer performs convolution processing again, resulting in a 3×3×16 3D facial image. Finally, another 3×3 convolutional layer performs convolution processing again, resulting in a 1×1×32 3D facial image. Three detection results are obtained: one to determine whether the 3D facial image contains the user's face, one is the first location information of the bounding box, and the last is the first location information of the reference facial keypoints in the 3D facial image.

[0152] To further improve detection accuracy, the 3D facial images and detection results processed by P-Net are input into R-Net for further optimization of detection.

[0153] like Figure 5As shown, before inputting into R-Net, the 3D facial image generated by P-Net needs to be scaled to 24×24×3. First, it undergoes convolution processing with a 3×3 convolutional layer and max pooling processing with a 3×3 pooling layer, resulting in an 11×11×28 3D facial image. Then, it undergoes convolution processing with a 3×3 convolutional layer and max pooling processing with a 3×3 pooling layer, resulting in a 4×4×48 3D facial image. Next, it undergoes convolution processing with a 2×2 convolutional layer, resulting in a 3×3×64 3D facial image. Finally, a fully connected layer containing 128 neurons is used for fully connected processing, yielding three detection results: one for determining whether the 3D facial image contains the user's face, one for the second location information of the bounding box, and the last for the second location information of the reference facial landmarks in the 3D facial image.

[0154] Because R-Net adds a fully connected layer with 128 neurons after the last convolutional layer, it retains more image feature information, making the detection results more accurate than P-Net.

[0155] To further improve detection accuracy, the 3D facial images and detection results processed by R-Net are input into O-Net for further optimization of detection.

[0156] like Figure 5 As shown, before inputting into O-Net, the 3D facial image generated by R-Net needs to be scaled to 48×48×3. First, it undergoes convolution processing with a 3×3 convolutional layer and max pooling processing with a 3×3 pooling layer, resulting in a 23×23×32 3D facial image. Then, it undergoes convolution processing with a 3×3 convolutional layer and max pooling processing with a 3×3 pooling layer, resulting in a 10×10×64 3D facial image. Next, it undergoes convolution processing with a 3×3 convolutional layer and max pooling processing with a 2×2 pooling layer, resulting in a 4×4×64 3D facial image. Finally, it undergoes convolution processing with a 2×2 convolutional layer, resulting in a 3×3×128 3D facial image. Finally, a fully connected layer containing 256 neurons is used for fully connected processing, yielding three detection results: one for determining whether the 3D facial image contains the user's face, one for the third position information of the bounding box, and the last for the third position information of the reference facial landmarks in the 3D facial image.

[0157] Because O-Net adds a fully connected layer with 128 neurons after the last convolutional layer, it retains more image feature information, resulting in more accurate detection results compared to P-Net.

[0158] O-Net is similar in structure to R-Net, but it has an additional convolutional layer and more neurons in the fully connected layer, making it a more complex and accurate convolutional neural network. It retains more image feature information and the detection results are more accurate than those of R-Net. The output of O-Net is the final output of the MTCNN model, which obtains the third position information of the bounding box and the third position information of the reference facial key points in the 3D facial image.

[0159] In the training of the three sub-networks to classify whether a 3D facial image contains the user's face, the cross-entropy loss function is used for each sample, as shown in formula (2):

[0160]

[0161] Where, p i This represents the probability that the sample is a user's face. The labels represent the reference facial landmarks. For each candidate window, the offset between it and the ground truth reference facial landmarks is predicted, and each sample is updated using Euclidean loss.

[0162] The MTCNN network was used to obtain the location information of reference facial key points in a 3D facial image. Then, based on the location information of the reference facial key points and the location information of the bounding boxes, as well as the preset distances between multiple key points and the reference key points, the estimated location information of multiple facial key points can be estimated.

[0163] Therefore, by detecting the estimated location information of multiple facial key points, the detection speed of target location information of multiple facial key points is further improved.

[0164] In step 204, based on the estimated location information of multiple facial key points, a local appearance model is established for each facial key point to determine the target location information of multiple facial key points; the target location information is three-dimensional location information.

[0165] In some embodiments, this application establishes a local appearance model for each facial key point based on the estimated location information of multiple facial key points, and determines the target location information of the multiple facial key points; the target location information is three-dimensional location information, and can be processed separately for each facial key point, such as... Figure 6 The steps shown are as follows:

[0166] In step 601, based on the estimated location information of facial key points, a region of interest of a preset size corresponding to the facial key points is extracted from the three-dimensional point distribution model;

[0167] In step 602, the region of interest is subjected to multiple convolution and activation processes to obtain the probability that each pixel in the region of interest is aligned with the target position information of the facial key points.

[0168] In step 603, a local appearance model is established for each facial key point based on the probability of each pixel in the region of interest aligning with the target location information of the facial key points.

[0169] In step 604, the NU-RLMS algorithm is used to fit the three-dimensional point distribution model and the local appearance model of each facial key point to determine the target location information of multiple facial key points.

[0170] Specifically, the target location information of facial key points is determined using the Convolutional Expert Constrained Local Model (CE-CLM) algorithm, which consists of two parts: one part is the response map that calculates the alignment probability based on CEN, and the other part is the optimization based on the NU-RLMS model fitting algorithm.

[0171] Among them, the CEN structure is as follows Figure 7 As shown, the three-dimensional point distribution model and the estimated location information of multiple facial key points are first input into CEN. Then, a region of interest of a preset size corresponding to each facial key point is extracted from the three-dimensional facial image in the three-dimensional point distribution model. For example, a region of interest of size 1×n×n is extracted around the estimated location information of each facial key point.

[0172] Then, for each facial keypoint, the corresponding region of interest (ROI) is subjected to contrast-normalized convolution with a 500×11×11 convolutional kernel, and the result is denormalized using Z-score. Correlation calculation is then performed, outputting a 500×n×n response map. The activation function used is the Corrected Linear Unit (ReLU). The 500×n×n response map is then input into a 200×1×1 convolutional layer, outputting another 200×n×n response map. Next, the 200×n×n response map is input into a 100×1×1 convolutional layer to learn a set of parameters to capture changes in the ROI. A 100×1×1 sigmoid probabilistic decision kernel convolutional layer is then used to output a 100×n×n response map as a non-negative and non-linear combination of neurons in the expert layer. Finally, activation is performed using a sigmoid activation function to obtain an n×n response map, outputting the probability of each pixel within the ROI aligning with the target location information of the facial keypoint.

[0173] CEN is primarily used to train local facial appearance models. For multiple facial landmarks, its output is the probability that each pixel within the region of interest of each facial landmark aligns with the target location information of that landmark. The training process of CEN is as follows: Figure 8As shown, first, a flexible facial shape model generated by the training part of the 3D point distribution model is loaded, along with a 3D facial image containing multiple facial key points. Then, the image undergoes multi-scale transformation to construct an image pyramid. This means scaling each image to different sizes, including frontal, side, and different scales, such as 0.25x, 0.35x, 0.5x, and 1x. Next, random patches are generated for training the CEN patch expert, i.e., multiple convolutions are performed on the region of interest to obtain an n×n response map. Finally, parameters are set to train multiple facial key points on the face one by one, obtaining aligned probability response maps, so that the parameters tend to stabilize, thus constructing a local appearance model for each facial key point.

[0174] To obtain more accurate target location information for multiple facial key points, the NU-RLMS algorithm is needed to fit the 3D point distribution model and the local appearance model of each facial key point to obtain the target location information for multiple facial key points.

[0175] Specifically, optimization is performed using formula (3):

[0176]

[0177] Where p* is the optimal parameter set controlling the target location information of facial landmarks, p is the estimated location information of facial landmarks, and D i It calculates the x-axis of each pixel in the input 3D facial image. i The probability of aligning with the target location information of facial key points, where n is the number of pixels in the region of interest, and R is the regularization of the point distribution model.

[0178] This yields the target location information for multiple facial key points.

[0179] In step 205, feature extraction is performed on the three-dimensional facial image based on the target location information of multiple facial key points to obtain facial features corresponding to multiple target key points; the multiple target key points are determined according to the pre-defined correspondence between various parts of the face and various organs in traditional Chinese medicine; the location information of the multiple target key points is determined based on the target location information of multiple facial key points.

[0180] The *Suwen* (Plain Questions) chapter on "Acupuncture and Treatment of Heat" states: "For liver heat, the left cheek turns red first; for heart heat, the face turns red first; for spleen heat, the nose turns red first; for lung heat, the right cheek turns red first; and for kidney heat, the chin turns red first." Therefore, in Traditional Chinese Medicine, organ diseases can be reflected on the face. A diagram showing the correspondence between the face and various organ regions is shown below. Figure 9 As shown.

[0181] This application's embodiments are based on the 68-point face model proposed by the iBUG group, and are implemented under the guidance of a physician. Figure 9The diagram shows the correspondence between various parts of the face and various organs, and proposes 20 key target points related to facial features in traditional Chinese medicine, effectively delineating the facial regions of interest in the field of traditional Chinese medicine.

[0182] like Figure 10 As shown, the 20 target key points are represented by numbers 0-19. The specific locations of these 20 target key points, their corresponding colors, and detailed explanations of their association with the five internal organs are as follows:

[0183] Key point 0 is located between the eyebrows and hairline, representing the color of the forehead, which is related to psychological stress; Key point 1 is located at the midpoint of the line connecting the upper ends of the eyebrows, representing the color of the center of the eyebrow, which is related to the throat; Key point 2 is located at the midpoint of the line connecting the inner ends of the eyebrows, representing the color of the center of the eyebrow, which is related to the lungs; Key point 3 is located at the midpoint of the line connecting the outer corners of the eyes, representing the color of the root of the nose, which is related to the heart; Key point 4 is located on the ridge of the nose, representing the color of the bridge of the nose, which is related to the liver; Key points 5 and 6 are located on the outer part of the high part of the bridge of the nose, representing the color beside the bridge of the nose, which is related to the gallbladder; Key points 7 and 8 are located on the sides of the tip of the nose, representing the color of the nostrils, which is related to the stomach; Key points 9 and 1... Key point 0 is located on the inner side below the cheekbone, representing the color next to the nostrils; this area is related to the small intestine. Key point 11 is located on the left side of the face, representing the color of the left cheek; this area is related to the liver. Key point 12 is located on the right side of the face, representing the color of the right cheek; this area is related to the lungs. Key points 13 and 14 are located on the outer side below the cheekbone, representing the color of the lower cheek; this area is related to the large intestine. Key points 15 and 16 are located at the intersection of the horizontal line of the nostrils and the vertical line from the temple, representing the color of the outer cheek; this area is related to the kidneys. Key points 17 and 18 are located on both sides of the philtrum below the nose, representing the color of the philtrum; this area is related to the bladder. Key point 19 is located at the tip of the nose, representing the color of the tip of the nose; this area is related to the spleen.

[0184] In some embodiments, after obtaining the target location information of multiple facial key points, the location information of multiple target key points can be directly located based on the target location information of multiple facial key points, or the location information of multiple target key points can be marked based on the target location information of multiple facial key points under the guidance of a professional doctor.

[0185] Therefore, in this embodiment of the application, by locating the target location information of multiple facial key points and the location information of 20 target key points with traditional Chinese medicine characteristics, facial feature information of the 20 target key points is extracted for disease diagnosis.

[0186] In some embodiments, facial features in this application include facial color features. Facial color features include the color of the forehead, the center of the eyebrows, the root of the nose, the bridge of the nose, the tip of the nose, the wings of the nose, the cheeks, the lips, and the philtrum, etc.

[0187] According to Traditional Chinese Medicine (TCM) theory, facial colors are categorized into five colors: blue, red, yellow, white, and black, each corresponding to different ailments. For example, a bluish-purple complexion often indicates oxygen deficiency, a result of poor blood circulation and meridian blockage in TCM, commonly seen in cold syndromes, pain, and infantile convulsions. A red complexion results from blood filling the skin's veins, often seen on the cheeks and jawline, and is frequently a sign of heart disease. A yellow complexion is divided into two types: sallow and bright yellow, often caused by spleen and stomach weakness, and is also common in jaundice. A white complexion often indicates anemia; in TCM, a pale complexion signifies deficiency and cold syndromes. A black complexion is often seen in chronic diseases such as chronic cardiopulmonary insufficiency, chronic renal insufficiency, and cirrhosis; in TCM, a black complexion often indicates severe cold or blood stasis. Facial color diagnosis is valuable not only for chronic diseases but also for critical illnesses. For example, patients with heart failure have a dark complexion; patients with mitral stenosis or insufficiency have a sallow complexion with slightly red cheeks; patients with cirrhosis and liver cancer have an extremely dark complexion; and patients with chronic nephritis and uremia have a dark, sallow complexion.

[0188] Therefore, it is necessary to extract facial color features from 3D facial images. In this embodiment, feature extraction is performed on the 3D facial image based on the positional information of multiple facial key points to obtain facial features corresponding to multiple target key points. For each of the multiple target key points, the following steps can be performed separately: Figure 11 The steps shown are as follows:

[0189] In step 1101, based on the location information of the target key point and the target location information of multiple facial key points, the distance from the target key point to each facial key point is obtained respectively;

[0190] In step 1102, the location information of the target key point is used as the center of a circle, and the minimum distance from the target key point to each face key point is used as the radius to determine the region of interest of the target key point;

[0191] In step 1103, the average pixel value of the pixels in the region of interest of the target key point is used as the facial color feature of the target key point.

[0192] Specifically, the process involves first using the location information of 20 target key points as the center of a circle, and then selecting the minimum distance from this center to the location information of multiple facial key points as the radius to extract the circular area around each target key point, which is the region of interest (ROI). Next, the average RGB color of all pixels within the ROI is calculated to obtain the facial color features corresponding to each of the 20 target key points, such as the color information of the ROI for the forehead, the center of the eyebrows, the tip of the nose, the cheeks, the lips, and the philtrum.

[0193] For example, with Figure 10 Taking the 20 target key points shown as an example, the average color value of the region of interest surrounding each target key point is calculated, and the facial color features of the 20 target key points of the face in Traditional Chinese Medicine are extracted as follows: Figure 12 As shown.

[0194] Where A1-A10 represent the facial color features corresponding to target key points 0-9, with RGB values ​​of [163,102,79], [164,104,83], [170,111,96], [111,50,46], [141,77,71], [145,89,70], [159,103,85], [144,88,72], [158,102,87], and [169,110,95], respectively. 1-B10 represent the facial color features corresponding to key points of targets 10-19, with RGB values ​​of [164,107,91], [159,101,85], [173,118,103], [171,113,98], [177,122,108], [138,83,67], [150,97,82], [140,92,79], [152,105,93], and [160,102,89].

[0195] In some embodiments, facial features in this application include facial deformity features. Facial deformity features include facial eyelid edema, sunken cheeks, drooping jaw, and deviated nasal bridge.

[0196] Facial swelling refers to puffiness of the face and eyelids, often a symptom of various diseases such as heart disease, liver disease, kidney disease, and endocrine disorders. The most common cause of eyelid swelling is kidney disease, but it can also be caused by eye strain. Sunken cheeks refer to noticeable widening of the cheekbones and hollowing of the temples, mainly caused by aging, high cheekbones, and weight loss. A drooping jawline is the sagging of the jaw muscles, resulting in a blurred jawline, primarily a sign of facial skin aging. A deviated nose, also known as a crooked nose, is caused by congenital factors or trauma, leading to a deviation of the nasal bridge from the midline. This can cause problems such as difficulty breathing through the nose, rhinitis, dry mouth and mouth breathing, nasal congestion, and sleep disorders.

[0197] Therefore, it is necessary to extract facial deformation features from 3D facial images. In this embodiment, feature extraction is performed on the 3D facial image based on the positional information of multiple facial key points to obtain facial features corresponding to multiple target key points. For each of the multiple target key points, the following steps can be performed separately: Figure 13 The steps shown are as follows:

[0198] In step 1301, based on the location information of the target key point and the target location information of multiple facial key points, the relative position between the target key point and each facial key point is determined;

[0199] In step 1302, the facial deformation features of the target key point are determined based on the relative positions between the target key point and each facial key point.

[0200] Specifically, based on the location information of the target key point and the target location information of multiple facial key points, the relative position between the target key point and each facial key point can be directly determined. Then, based on the relative position between the target key point and each facial key point, and compared with the preset relative position, the facial deformation features of the target key point are determined.

[0201] For example, based on the location information of the target key point and the location information of multiple facial key points, a midline function can be fitted to determine whether the bridge of the nose is crooked.

[0202] The preset relative position can be set based on actual experience or obtained through big data; this application embodiment does not impose any restrictions on this.

[0203] In addition to color and deformation features, the face also has rich texture features, such as facial spots, moles, warts, acne, spider veins, horizontal lines, vertical lines, and wrinkles. Therefore, in some embodiments, facial features in this application include facial texture features.

[0204] Traditional Chinese medicine theory points out that these facial texture features are closely related to a person's health. Moles on the face indicate congenital insufficiency of the organs in the relevant area; spots on the face suggest that the relevant area may have undergone chronic damage, leading to chronic diseases (usually taking 3-5 years); acne on the face indicates that the organs in the relevant area are experiencing inflammation (usually forming in a short period); acne and spots all over the face may be caused by endocrine disorders or decreased liver immune function; wrinkles, spots, and changes in skin color on the face indicate possible organ dysfunction in that area; horizontal wrinkles between the corners of the eyes on the bridge of the nose may indicate arrhythmia or abnormal heart condition; vertical wrinkles between the eyebrows may indicate insufficient cardiovascular supply, headaches, or neurasthenia.

[0205] Therefore, it is necessary to extract facial texture features from 3D facial images. In this embodiment, feature extraction is performed on the 3D facial image based on the positional information of multiple facial key points to obtain facial features corresponding to multiple target key points. For each of the multiple target key points, the following steps can be performed separately: Figure 14 The steps shown are as follows:

[0206] In step 1401, a preset area of ​​the target key points is determined based on the location information of the target key points;

[0207] In step 1402, for each pixel in the preset area: based on the gray value of the pixel and the gray values ​​of multiple neighboring pixels in the area after each rotation transformation, multiple reference coding values ​​of the pixel are determined; and the smallest reference coding value is taken as the target coding value of the pixel.

[0208] In step 1403, the minimum target encoding value among the target encoding values ​​of multiple pixels in the preset area is taken as the target encoding value of the preset area;

[0209] In step 1404, the SVM classification method is used to classify the target encoding values ​​of the preset regions corresponding to multiple target key points, so as to obtain the facial texture features corresponding to each of the multiple target key points.

[0210] Specifically, in this embodiment, the target location information of multiple facial key points can directly obtain the location information of facial texture features such as spots, moles, warts, acne, red blood vessels, horizontal lines, vertical lines, and wrinkles, thereby obtaining their size and color. This embodiment employs the LBP (Local Binary Patterns) algorithm to extract facial texture features.

[0211] The LBP algorithm is a simple yet effective texture descriptor used in image analysis, computer vision, and pattern recognition. It can be used to describe the local texture of an image, offering advantages such as invariance, robustness, and high computational efficiency. Figure 15 As shown, the core idea of ​​the LBP algorithm is to compare the pixel value of each pixel with the pixel values ​​of multiple neighboring pixels to generate a binary code. Then, this binary code is converted into a decimal number as the LBP code for that pixel.

[0212] The LBP algorithm is expressed by formula (4):

[0213]

[0214]

[0215] Where, x c ,y c Let p be the coordinates of the center pixel, p be the number of adjacent pixels, k be the weighting coefficient, and i be the weighting coefficient. p i represents the grayscale value of adjacent pixels. c Let be the gray value of the center pixel, and s(x) be the sign function.

[0216] However, since different texture features have different sizes and frequencies, in order to adapt to texture features of different scales, this embodiment further employs a circular rotation-invariant LBP algorithm to extract facial texture features. Through the LBP rotation mode, the binarized circular region can be continuously rotated to obtain a series of corresponding LBP values. The minimum value is selected as the LBP value of this region, expressed using formula (5):

[0217]

[0218] in, This represents the LBP rotation mode algorithm, where `totate(x,i)` is the rotation function that cyclically shifts `x` to the right by `i` positions to obtain the minimum LBP value. `P` represents the number of pixels, and `R` represents the template radius. Figure 16 The example uses 8 pixels to illustrate the calculation process of rotation-invariant LBP modes. The pixels in the circular neighborhood are rotated to obtain the following 8 LBP values: 3, 6, 12, 24, 48, 96, 192, and 129. The minimum value, 00000011, corresponding to the decimal value 3, is then taken as the rotation-invariant mode value for the 8 LBP modes.

[0219] It's important to note that in actual calculations, the calculated coordinates may not all be integers. Therefore, bilinear interpolation is generally used to obtain the pixel value of the sampling point, and then to obtain the LBP value. For 8 sampling points, there are 36 rotation-invariant LBP coding patterns.

[0220] By obtaining the LBP feature histogram of a pattern, the dimensionality of the feature values ​​in the feature vector can be reduced, thereby decreasing the computational complexity and workload of the subsequent classification model and improving classification efficiency. After obtaining the LBP feature histogram, a parameter-optimized SVM classification model can be used to train the data for classification. For example, algorithms such as web search can be used to optimize the SVM parameters to achieve the best classification results. After the model is trained, it can be used to classify new data to obtain the final classification result. By using LBP feature histograms and an SVM classification model, efficient and accurate image classification can be achieved. The specific process is as follows... Figure 17As shown, the acquired images are first divided into training and testing sets. The images in the training set are preprocessed, such as color correction and 3D reconstruction. Then, LBP features are extracted from the preprocessed 3D facial images. These LBP features are then input into an SVM for training to obtain the corresponding classification prediction results and the types of facial texture features in the region of interest.

[0221] For ease of understanding, according to Figure 18 The structural diagram shown illustrates the method for obtaining facial features provided in the embodiments of this application.

[0222] like Figure 18 As shown, in this application, the acquired two-dimensional facial image is sent to a cloud server. The cloud server first performs color correction using a color chart with positioning identifiers. Then, the two-dimensional facial image is reconstructed into three dimensions using the NRSfM algorithm combined with the PA method. Next, a convolutional neural network is used to locate the target position information of multiple facial key points, thereby extracting the facial features of the target key points. Finally, the data from tongue diagnosis, consultation, and pulse diagnosis are combined for machine learning processing of the four diagnostic methods.

[0223] like Figure 19 As shown in the embodiments of this application, a TCM facial image intelligent diagnostic auxiliary system is also proposed. This system uses an APP or WeChat mini-program to collect a user's two-dimensional facial image and sends it to a cloud server for color correction processing. Next, based on the color-calibrated two-dimensional facial image, the cloud server performs three-dimensional reconstruction using three-dimensional flexible object modeling technology to obtain a three-dimensional point distribution model. Then, it uses a convolutional neural network to locate the target position information of multiple facial key points. Then, based on the target position information of multiple facial key points and some information about the surrounding areas, facial features such as facial color features, facial deformation features, and facial texture features are extracted, including features like dark complexion, facial eyelid edema, sunken cheeks, and facial erythema. The extracted facial features are then input into the neural network and combined with stored user tongue diagnosis data, consultation data, and pulse diagnosis data for four-in-one diagnostic processing to obtain the diagnostic result. The color-calibrated 2D facial image, tongue diagnosis data, consultation data, pulse diagnosis data, facial features, and neural network diagnostic results are then sent to the doctor's app or WeChat mini-program. The doctor then conducts further diagnosis, verifies the neural network diagnostic results to ensure accuracy, and generates a diagnostic result.

[0224] In this way, the facial feature acquisition method provided in this application can extract more facial features, which can play an auxiliary role in the diagnosis of most common diseases and improve the accuracy of the diagnostic results.

[0225] Based on the foregoing description, this application embodiment obtains a three-dimensional point distribution model by reconstructing a two-dimensional facial image into three dimensions, and locates the target position information of multiple facial key points in the three-dimensional point distribution model. Finally, based on the target position information of multiple facial key points and the position information of multiple target key points, facial features such as facial color features, facial deformation features, and facial texture features of multiple target key points are extracted. This increases the extracted feature information, which significantly improves the accuracy of the physiological and pathological changes inferred from the user's tongue diagnosis, medical history, and pulse diagnosis data.

[0226] Based on the same inventive concept, this application provides a facial feature acquisition device, which is similar to the aforementioned... Figure 1 The method for acquiring facial features shown corresponds to the beneficial effects of this device, which can be found in the description of the aforementioned method embodiments. Repeated descriptions will not be repeated here. See [link to relevant documentation]. Figure 20 The device includes:

[0227] Acquisition unit 2001 is used to acquire a two-dimensional facial image of the user;

[0228] The 3D reconstruction unit 2002 is used to perform 3D reconstruction on the 2D facial image using 3D flexible object modeling technology to obtain a 3D point distribution model corresponding to the 2D facial image; the 3D point distribution model includes the user's 3D facial image.

[0229] The key point location estimation unit 2003 is used to perform facial key point detection on the three-dimensional facial image to obtain the estimated location information of the multiple facial key points;

[0230] The key point location determination unit 2004 is used to establish a local appearance model for each facial key point based on the estimated location information of the plurality of facial key points, and determine the target location information of the plurality of facial key points; the target location information is three-dimensional location information.

[0231] The feature extraction unit 2005 is used to extract features from the three-dimensional facial image based on the target location information of the multiple facial key points to obtain facial features corresponding to the multiple target key points; the multiple target key points are determined according to the correspondence between various parts of the face and various organs as preset in traditional Chinese medicine; the location information of the multiple target key points is determined based on the target location information of the multiple facial key points.

[0232] In some embodiments, the three-dimensional reconstruction unit 2002 is specifically used for:

[0233] A non-rigid motion structure algorithm is used to perform a three-dimensional transformation on the two-dimensional facial image to obtain a first reference three-dimensional point distribution model corresponding to the two-dimensional facial image; the first reference three-dimensional point distribution model includes the average position information of the multiple facial key points and multiple deformation feature vectors.

[0234] Using the three-dimensional Pluke analysis method, the first reference three-dimensional point distribution model is aligned to obtain the second reference three-dimensional point distribution model, as well as the transformation parameters of each deformation feature vector;

[0235] Using principal component analysis, the plurality of deformation feature vectors are sorted and analyzed to determine at least one target deformation feature vector.

[0236] Based on the second reference three-dimensional point distribution model and the at least one target deformation feature vector, the three-dimensional point distribution model corresponding to the two-dimensional facial image is determined.

[0237] In some embodiments, the key point location determination unit 2004 is specifically used for:

[0238] For each person's key facial features:

[0239] Based on the estimated location information of the facial key points, a region of interest of a preset size corresponding to the facial key points is extracted from the three-dimensional point distribution model;

[0240] Multiple convolution and activation processes are performed on the region of interest to obtain the probability that each pixel in the region of interest is aligned with the target position information of the facial key points.

[0241] Based on the probability that each pixel in the region of interest is aligned with the target location information of the facial key points, a local appearance model is established for each facial key point.

[0242] By using a non-uniform regularized marker point average displacement algorithm, the three-dimensional point distribution model and the local appearance model of each facial key point are fitted to determine the target location information of multiple facial key points.

[0243] In some embodiments, the facial features include facial color features; the feature extraction unit 2005 is specifically used for:

[0244] For each of the multiple target key points:

[0245] Based on the location information of the target key point and the target location information of the multiple facial key points, the distance from the target key point to each facial key point is obtained respectively;

[0246] Using the location information of the target key point as the center and the minimum distance from the target key point to each facial key point as the radius, the region of interest of the target key point is determined.

[0247] The average pixel value of the pixels within the region of interest of the target key point is used as the facial color feature of the target key point.

[0248] In some embodiments, the facial features include facial deformation features; the feature extraction unit 2005 is specifically used for:

[0249] For each of the multiple target key points:

[0250] Based on the location information of the target key point and the target location information of the plurality of facial key points, the relative position between the target key point and each facial key point is determined;

[0251] Based on the relative position between the target key point and each facial key point, the facial deformation features of the target key point are determined.

[0252] In some embodiments, the facial features include facial texture features; the feature extraction unit 2005 is specifically used for:

[0253] For each of the multiple target key points:

[0254] Based on the location information of the target key points, a preset area of ​​the target key points is determined;

[0255] For each pixel in the preset region: based on the grayscale value of the pixel and the grayscale values ​​of multiple neighboring pixels in the region after each rotation transformation, determine multiple reference coding values ​​for the pixel; and take the smallest reference coding value as the target coding value for the pixel;

[0256] The minimum target encoding value among the target encoding values ​​of multiple pixels in the preset region is taken as the target encoding value of the preset region;

[0257] The target encoding values ​​of the preset regions corresponding to the multiple target key points are classified using the support vector machine classification method to obtain the facial texture features corresponding to each of the multiple target key points.

[0258] In some embodiments, the apparatus further includes:

[0259] The preprocessing unit is used to perform color correction and filtering on the two-dimensional facial image before performing three-dimensional reconstruction on the two-dimensional facial image to obtain the three-dimensional point distribution model corresponding to the two-dimensional facial image.

[0260] After introducing the facial feature acquisition method and apparatus according to exemplary embodiments of this application, the electronic device corresponding to the exemplary embodiments of this application will be introduced next.

[0261] The following reference Figure 21 To describe an electronic device 2100 implemented according to this embodiment of the present application. Figure 21 The electronic device 2100 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0262] like Figure 21 As shown, the electronic device 2100 is manifested in the form of a general electronic device. The components of the electronic device 2100 may include, but are not limited to: at least one processor 2101, at least one memory 2102, a bus 2103 connecting different system components (including memory 2102 and processor 2101), a camera 2104, WIFI or 4G / 5G wireless communication 2105, and a display 2106.

[0263] Among them, camera 2104 is used to capture two-dimensional facial images of the user;

[0264] WIFI or 4G / 5G wireless communication 2105, used for communication between electronic devices and base stations;

[0265] Display 2106 is used to display two-dimensional and three-dimensional facial images, facial features, etc. of a user in the display interface of an electronic device.

[0266] Bus 2103 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the multiple bus structures.

[0267] The memory 2102 may include a readable medium in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).

[0268] The memory 2102 may also include a program / utility having a set (at least one) of program modules, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

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

[0270] In an exemplary embodiment, a computer storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device to perform any of the facial feature acquisition methods described above. Optionally, the computer storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0271] In an exemplary embodiment, the electronic device of this application may include at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, it enables the at least one processor to perform the steps of any facial feature acquisition method provided in the embodiments of this application.

[0272] In an exemplary embodiment, a computer program product is also provided, which, when executed by an electronic device, enables the electronic device to implement any of the facial feature acquisition methods provided in this application.

[0273] Furthermore, computer program products may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM), flash memory, optical fiber, compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0274] The program product for device discovery in this application embodiment may be a CD-ROM and include program code, and may run on a computing device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

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

[0276] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency (RF), or any suitable combination thereof.

[0277] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0278] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0279] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0280] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0281] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0282] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0283] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0284] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0285] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, then this application also includes such modifications and variations.

Claims

1. A method for obtaining facial features, characterized in that, The method includes: Obtain the user's two-dimensional facial image; Using 3D flexible object modeling technology, the 2D facial image is reconstructed in 3D to obtain a 3D point distribution model corresponding to the 2D facial image; the 3D point distribution model includes the user's 3D facial image. Facial landmark detection is performed on the three-dimensional facial image to obtain estimated location information of multiple facial landmarks; Based on the estimated location information of the multiple facial key points, a local appearance model is established for each facial key point to determine the target location information of the multiple facial key points; the target location information is three-dimensional location information; the process of establishing a local appearance model for each facial key point and determining the target location information of the multiple facial key points based on the estimated location information of the multiple facial key points includes: for each facial key point: based on the estimated location information of the facial key point, a region of interest of a preset size corresponding to the facial key point is extracted from the three-dimensional facial image; multiple convolution and activation processes are performed on the region of interest to obtain the probability that each pixel in the region of interest is aligned with the target location information of the facial key point; based on the probability that each pixel in the region of interest is aligned with the target location information of the facial key point, a local appearance model is established for each facial key point; using a non-uniform regularized marker point average shift algorithm, the three-dimensional point distribution model and the local appearance model of each facial key point are fitted to determine the target location information of the multiple facial key points; Based on the target location information of the multiple facial key points, feature extraction is performed on the three-dimensional facial image to obtain facial features corresponding to the multiple target key points; the multiple target key points are determined according to the pre-defined correspondence between various parts of the face and various organs in traditional Chinese medicine; the location information of the multiple target key points is determined based on the target location information of the multiple facial key points.

2. The method as described in claim 1, characterized in that, The method of using 3D flexible object modeling technology to reconstruct the 3D facial image to obtain a 3D point distribution model corresponding to the 2D facial image includes: A non-rigid motion structure algorithm is used to perform a three-dimensional transformation on the two-dimensional facial image to obtain a first reference three-dimensional point distribution model corresponding to the two-dimensional facial image; the first reference three-dimensional point distribution model includes the average position information of the multiple facial key points and multiple deformation feature vectors. Using the three-dimensional Pluke analysis method, the first reference three-dimensional point distribution model is aligned to obtain the second reference three-dimensional point distribution model, as well as the transformation parameters of each deformation feature vector; Using principal component analysis, the plurality of deformation feature vectors are sorted and analyzed to determine at least one target deformation feature vector. Based on the second reference three-dimensional point distribution model and the at least one target deformation feature vector, the three-dimensional point distribution model corresponding to the two-dimensional facial image is determined.

3. The method as described in claim 1, characterized in that, The facial features include facial color features; the feature extraction of the three-dimensional facial image based on the target location information of the multiple facial key points to obtain facial features corresponding to the multiple target key points includes: For each of the multiple target key points: Based on the location information of the target key point and the target location information of the multiple facial key points, the distance from the target key point to each facial key point is obtained respectively; Using the location information of the target key point as the center and the minimum distance from the target key point to each facial key point as the radius, the region of interest of the target key point is determined. The average pixel value of the pixels within the region of interest of the target key point is used as the facial color feature of the target key point.

4. The method as described in claim 1, characterized in that, The facial features include facial deformation features; the feature extraction of the three-dimensional facial image based on the target location information of the multiple facial key points to obtain facial features corresponding to the multiple target key points includes: For each of the multiple target key points: Based on the location information of the target key point and the target location information of the plurality of facial key points, the relative position between the target key point and each facial key point is determined; Based on the relative position between the target key point and each facial key point, the facial deformation features of the target key point are determined.

5. The method as described in claim 1, characterized in that, The facial features include facial texture features; the feature extraction of the three-dimensional facial image based on the target location information of the multiple facial key points to obtain facial features corresponding to the multiple target key points includes: For each of the multiple target key points: Based on the location information of the target key points, a preset area of ​​the target key points is determined; For each pixel in the preset region: based on the grayscale value of the pixel and the grayscale values ​​of multiple neighboring pixels in the region after each rotation transformation, determine multiple reference coding values ​​for the pixel; and take the smallest reference coding value as the target coding value for the pixel; The minimum target encoding value among the target encoding values ​​of multiple pixels in the preset region is taken as the target encoding value of the preset region; The target encoding values ​​of the preset regions corresponding to the multiple target key points are classified using the support vector machine classification method to obtain the facial texture features corresponding to each of the multiple target key points.

6. The method as described in claim 1, characterized in that, Before performing three-dimensional reconstruction on the two-dimensional facial image to obtain the three-dimensional point distribution model corresponding to the two-dimensional facial image, the method further includes: The two-dimensional facial image is subjected to color correction and filtering.

7. A facial feature acquisition device, characterized in that, The device includes: The acquisition unit is used to acquire the user's two-dimensional facial image; The 3D reconstruction unit is used to perform 3D reconstruction of the 2D facial image using 3D flexible object modeling technology to obtain a 3D point distribution model corresponding to the 2D facial image; the 3D point distribution model includes the user's 3D facial image. The key point location estimation unit is used to detect facial key points in the three-dimensional facial image and obtain estimated location information of multiple facial key points; A key point location determination unit is used to establish a local appearance model for each facial key point based on the estimated location information of the plurality of facial key points, and to determine the target location information of the plurality of facial key points; the target location information is three-dimensional location information; the key point location determination unit is specifically used for: for each facial key point: based on the estimated location information of the facial key point, extracting a region of interest of a preset size corresponding to the facial key point from the three-dimensional facial image; performing multiple convolution and activation processes on the region of interest to obtain the probability that each pixel in the region of interest is aligned with the target location information of the facial key point; establishing a local appearance model for each facial key point based on the probability that each pixel in the region of interest is aligned with the target location information of the facial key point; and using a non-uniform regularized marker point average shift algorithm to fit the three-dimensional point distribution model and the local appearance model of each facial key point to determine the target location information of the plurality of facial key points; The feature extraction unit is used to extract features from the three-dimensional facial image based on the target location information of the multiple facial key points to obtain facial features corresponding to the multiple target key points; the multiple target key points are determined according to the correspondence between various parts of the face and various organs as preset in traditional Chinese medicine; the location information of the multiple target key points is determined based on the target location information of the multiple facial key points.

8. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to said at least one processor, wherein: The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-6.

9. A computer storage medium, characterized in that, When the computer program in the computer storage medium is executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Full-automatic correction method and device for image color and geometric distortion, and equipment

    CN110400278A

  • Traditional Chinese medicine face diagnosis face partitioning method and system based on face feature point detection

    CN111191571A

  • Face region segmentation method and device for traditional Chinese medicine face diagnosis auxiliary diagnosis, and storage medium

    CN114446469A

  • Traditional Chinese medicine face diagnosis auxiliary diagnosis method and device based on face feature detection and storage medium

    CN114121269A

  • Tongue diagnosis image processing method and device based on key point detection and medium

    CN115661142A