Medical beauty-oriented ai face diagnosis feature and aesthetic analysis method and system

By combining deep convolutional neural networks and optical flow estimation algorithms, the shortcomings of existing medical aesthetic AI facial diagnosis technologies in dynamic feature and 3D structure reconstruction are addressed, achieving accuracy and consistency in facial dynamic aesthetic analysis and enhancing the personalized customization capability of medical aesthetic solutions.

CN120673460BActive Publication Date: 2025-11-21BEIJING HUIREN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510782849.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-11-21
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

Current AI-powered facial diagnosis technologies in the medical aesthetics field are mainly based on static feature analysis of two-dimensional images, ignoring dynamic facial features and three-dimensional structures. This results in a lack of consideration for dynamic aesthetics in medical aesthetics solutions, and inconsistent analysis results, making it difficult to provide reliable decision-making basis for medical aesthetics professionals.

Method used

A temporal feature extraction model is constructed using a deep convolutional neural network. An optical flow estimation algorithm is combined to capture dynamic facial features. The three-dimensional facial structure is reconstructed through a depth estimation network. A dual-channel feature extractor is used to generate feature mapping vectors. A semantic similarity matrix is ​​calculated for block sparsity optimization. Finally, a facial diagnosis analysis report is generated by combining the medical aesthetics expert knowledge base.

Benefits of technology

It achieves precise capture of facial dynamic features and three-dimensional structure, improves the personalization capability of medical aesthetic solutions and the accuracy and consistency of analysis results, and provides comprehensive and three-dimensional facial aesthetic analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673460B_ABST
    Figure CN120673460B_ABST
Patent Text Reader

Abstract

The application provides a medical and beauty-oriented AI face diagnosis feature and aesthetic analysis method and system, relates to the technical field of intelligent medical and beauty, and comprises the following steps: acquiring and preprocessing user face image data to obtain standardized face data; constructing a time sequence feature extraction model based on a deep convolutional neural network, and extracting face dynamic features in combination with an optical flow estimation algorithm; constructing a face reconstruction model based on a depth estimation network, and reconstructing a three-dimensional structure of the face by using a back projection mechanism and a geodesic distance partition strategy.The application can realize accurate analysis of face features and improve the accuracy and individualization level of medical and beauty diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent medical aesthetics, and in particular to an AI face diagnosis feature and aesthetic analysis method and system for medical aesthetics. BACKGROUND

[0002] With the rapid development of the medical and aesthetic industry, people's demand for personalized medical aesthetic services is increasing. Traditional medical aesthetic diagnosis mainly relies on the experience and subjective judgment of doctors, lacking scientific and quantitative analysis methods. In recent years, the application of artificial intelligence technology in the medical aesthetic field has gradually emerged, and facial feature analysis has become an important research direction in the medical aesthetic industry. Currently, medical aesthetic diagnosis is mainly carried out through image acquisition, feature extraction and aesthetic analysis, etc. The accurate extraction of facial dynamic features and three-dimensional features is of great significance to the formulation of medical aesthetic programs.

[0003] Existing medical AI face diagnosis technology mainly analyzes static features based on two-dimensional images, identifies facial key points through deep learning algorithms, and evaluates them in combination with traditional aesthetic standards.

[0004] However, this kind of technology has some defects and deficiencies when facing complex facial features and personalized aesthetic needs. The existing technology mainly focuses on facial static features, ignores dynamic features in facial expression changes, and cannot fully capture important information such as facial muscle movement and skin elasticity, resulting in a lack of consideration of dynamic aesthetics in medical aesthetic programs; the existing facial feature extraction method is mainly based on two-dimensional image analysis, lacking the ability to accurately reconstruct and measure the three-dimensional structure of the face, making it difficult to accurately evaluate the three-dimensional features such as facial contour, volume and curvature, affecting the accuracy and individualization of the medical aesthetic program; the existing technology lacks a stability evaluation mechanism in the feature extraction process, and is easily affected by external factors such as light changes and posture differences, leading to inconsistent analysis results, making it difficult to provide reliable decision-making basis for medical professionals. SUMMARY

[0005] The embodiment of the present application provides an AI face diagnosis feature and aesthetic analysis method and system for medical aesthetics, which can solve the problems in the prior art.

[0006] In a first aspect, the embodiment of the present application provides an AI face diagnosis feature and aesthetic analysis method for medical aesthetics, comprising:

[0007] Collecting facial image data of a user, pre-processing the facial image data to obtain standardized facial data;

[0008] Constructing a time series feature extraction model based on a deep convolutional neural network, performing feature response and displacement estimation on the standardized facial data through multi-scale convolution operation, calculating the facial region deformation field in combination with an optical flow estimation algorithm, and obtaining facial dynamic features;

[0009] constructing a face reconstruction model based on a depth estimation network, reconstructing a three-dimensional structure of a face by using a back projection mechanism and a geodesic distance partitioning strategy, and obtaining three-dimensional features of the face by feature stability scoring and projection invariance matching;

[0010] mapping the face dynamic features and the three-dimensional features of the face to generate feature mapping vectors by using a double-channel feature extractor, calculating a semantic similarity matrix of the feature mapping vectors, and performing block sparse optimization and iterative contraction on the semantic similarity matrix to obtain a face comprehensive evaluation index;

[0011] based on the face comprehensive evaluation index, grading and evaluating the face region in combination with a preset medical expert knowledge base, generating a face diagnosis analysis report, and outputting a medical beauty suggestion scheme.

[0012] In an alternative embodiment, a time-series feature extraction model is constructed based on a deep convolutional neural network, feature responses and displacement estimations are performed on standardized face data by multi-scale convolution operations, and a face region deformation field is calculated in combination with an optical flow estimation algorithm to obtain face dynamic features including:

[0013] a plurality of convolution kernel arrays with continuously increasing scales are set in the deep convolutional neural network to perform convolution operations on the standardized face data to generate multi-level feature response maps;

[0014] feature cross-correlation operations are performed on adjacent frames in the multi-level feature response maps, a frame displacement correlation matrix is obtained by calculating the regional similarity of the feature responses, and an initial motion estimation map of the face region is generated according to the frame displacement correlation matrix;

[0015] the initial motion estimation map is subjected to adaptive threshold segmentation, an optimal segmentation threshold is obtained by iterative calculation of maximizing the inter-class variance, and a face region motion feature map is generated by using the optimal segmentation threshold;

[0016] the face region motion feature map is processed by using an optical flow estimation algorithm, a target function is constructed based on a self-attention mechanism and a deformation constraint, and a face region deformation field is obtained by solving the target function by using an iterative splitting algorithm;

[0017] the face region deformation field is subjected to region division, the deformation intensity values in each preset face key region are calculated, and the deformation intensity values of the regions are combined to form a face dynamic feature vector.

[0018] In an alternative embodiment, the face region motion feature map is processed by using an optical flow estimation algorithm, a target function is constructed based on a self-attention mechanism and a deformation constraint, and a face region deformation field is obtained by solving the target function by using an iterative splitting algorithm including:

[0019] A tensor representation is constructed for adjacent two frames of images in a facial region motion feature map, a self-attention mechanism is embedded in the tensor representation, attention weights are generated by calculating correlation coefficients between the images, global motion information is enhanced according to the attention weights, and an optical flow field initialization representation is constructed;

[0020] A topological structure relationship graph of the facial region is constructed based on predetermined facial anatomy features, a facial region deformation consistency constraint is established, node features in the topological structure relationship graph are aggregated by using a graph convolution network, and a motion constraint condition based on facial structure is generated;

[0021] The optical flow field initialization representation and the motion constraint condition are input into a variational optimization framework, an adaptive loss function including a data item based on an attention mechanism and a regularization item based on a topological structure is constructed, loss function gradients are calculated for the data item and the regularization item respectively, a weight update matrix is constructed based on the loss function gradients, data item weight coefficients and regularization item weight coefficients are determined and multiplied and combined, and a target optimization function dynamically adjusted according to a motion mode is obtained;

[0022] An iterative splitting algorithm is used to solve the target optimization function, and the optimization variable is split into multiple sub-variables, and a splitting sequence is constructed for each sub-variable for alternating update;

[0023] Based on the optimization result of the iterative splitting algorithm, an optical flow field of the facial region is obtained, and a facial region deformation field is obtained by amplitude calculation on the optical flow field.

[0024] In an optional embodiment, the iterative splitting algorithm includes:

[0025] The target optimization function is decomposed into variables, the optimization variable is decomposed into an original variable and a constraint variable, and a variable update path graph is constructed;

[0026] A branch optimization sequence is constructed in the variable update path graph, a local feature manifold is generated by adjacent point mapping for the original variable, and an optimization direction is obtained by gradient projection on the local feature manifold; the constraint variable is constructed by feature distance measurement to form a sparse reconstruction sequence;

[0027] A feature manifold projection operator is determined based on the curvature distribution of the local feature manifold, a sparse reconstruction operator is determined based on singular value decomposition of the sparse feature distribution, and the feature manifold projection operator and the sparse reconstruction operator are combined to form an adaptive adjacent operator;

[0028] The original variable and the constraint variable are alternately updated based on the adaptive adjacent operator, and the update step is determined by the geodesic distance on the feature manifold until the difference between the original variable and the constraint variable is less than a preset threshold;

[0029] The original variable after iteration convergence is taken as a final optical flow field solving result.

[0030] In an optional embodiment, a face reconstruction model is constructed based on a depth estimation network, a projection mechanism and a geodesic distance partition strategy are used to reconstruct a face three-dimensional structure, and face three-dimensional features are obtained through feature stability scores and projection invariance matching, including:

[0031] A standardized face image is input into a multi-layer convolutional network for feature extraction, and a face depth map is output. A projection face image is generated from the face depth map using a back projection mechanism. The mutual information loss of the projection face image and the standardized face image is calculated. A depth estimation loss function is constructed by combining the depth consistency loss of the face depth map. The multi-layer convolutional network is optimized to obtain an optimized face depth map.

[0032] The depth values in the optimized face depth map are combined with pixel coordinates to convert them into a three-dimensional point cloud. The geodesic distance between points in the three-dimensional point cloud is calculated to establish a point cloud partition strategy. The local surface principal curvature direction is calculated to construct a reconstruction reference base. The three-dimensional point cloud is fitted according to the direction information of the reconstruction reference base to obtain a face three-dimensional closed surface.

[0033] The local curvature is calculated along the reconstruction reference base direction on the face three-dimensional closed surface to construct a gradient response map. The feature stability score is calculated based on the curvature flow equation. Stable feature points are extracted through nonlinear diffusion filtering. Local deformation feature descriptions are extracted for the stable feature points.

[0034] A projection invariance matching criterion is established based on the local deformation feature descriptions. The local affine transformation matrix of the local deformation feature descriptions is calculated for feature matching. The matching point pairs are screened in combination with the spatial consistency constraint.

[0035] The local surface deformation intensity of the matching point pairs is calculated. Feature weight coefficients are assigned. The face three-dimensional feature representation is generated by combining the feature weight coefficients with the matching point pairs.

[0036] In an optional embodiment, a two-channel feature extractor is used to map face dynamic features and face three-dimensional features to generate a feature mapping vector. The semantic similarity matrix of the feature mapping vector is calculated. The semantic similarity matrix is block-sparse optimized and iteratively contracted to obtain a face comprehensive evaluation index, including:

[0037] The face dynamic features and the face three-dimensional features are input into a pre-determined two-channel feature extractor. Multi-layer feature extraction is performed through a time convolutional network and a spatial convolutional network to generate dynamic mapping features and spatial mapping features. The spatial mapping features are generated by performing multi-layer feature extraction through the spatial convolutional network. The feature mapping vector is generated by combining the dynamic mapping features and the spatial mapping features. A normalized dot product operation is performed to generate an initial semantic similarity matrix.

[0038] The initial semantic similarity matrix is divided into a feature sub-block matrix, the number of rows and the number of columns of the feature sub-block matrix are obtained, the minimum value of the number of rows and the number of columns is determined as a block size parameter, a square region is constructed as a first region with the block size parameter as the side length, other regions are second regions, sparse constraint operation is performed on the first region to generate a sparse matrix, and correlation constraint operation is performed on the second region to generate a correlation constraint matrix, the sparse matrix and the correlation constraint matrix are input into an iterative shrinkage algorithm for optimization to generate an optimized feature sub-block, and the optimized feature sub-blocks are fused to generate an optimized semantic similarity matrix.

[0039] According to the optimized semantic similarity matrix, a weight coefficient matrix is calculated, and the feature mapping vector is weighted and combined to generate a face comprehensive evaluation index.

[0040] In an optional embodiment, inputting the sparse matrix and the correlation constraint matrix into the iterative shrinkage algorithm for optimization to generate the optimized feature sub-block includes:

[0041] The maximum and minimum value normalization operation is performed on the sparse matrix and the correlation constraint matrix respectively to generate a first normalized matrix and a second normalized matrix, the first normalized matrix is arranged at the diagonal line position, the second normalized matrix is arranged at the non-diagonal line position to generate a to-be-optimized matrix;

[0042] The median of the absolute values of the elements in the to-be-optimized matrix is calculated as an initial threshold value, the matrix distribution parameter is calculated according to the dimension value of the to-be-optimized matrix and the cumulative sum of the absolute values of the elements in the to-be-optimized matrix, the initial threshold value is added to the matrix distribution parameter and multiplied by an exponential decay function to generate a dynamic shrinkage threshold value;

[0043] The element values greater than the dynamic shrinkage threshold value in the to-be-optimized matrix are kept unchanged, and the element values less than or equal to the dynamic shrinkage threshold value are set to zero to generate a sparse matrix, and the relative error value of the sparse matrix and the to-be-optimized matrix is calculated;

[0044] The iteration is repeated until the relative error value is less than or equal to a preset error threshold value, a final sparse matrix is determined, and the final sparse matrix is reconstructed according to the original position relationship to generate an optimized feature sub-block.

[0045] In a second aspect of the embodiment of the present application, an AI face diagnosis feature and aesthetic analysis system for medical beauty is provided, which includes:

[0046] The first unit is configured to collect user face image data, and pre-process the face image data to obtain standardized face data.

[0047] The second unit is configured to construct a time sequence feature extraction model based on a deep convolutional neural network, to perform feature response and displacement estimation on the standardized face data through multi-scale convolution operation, to calculate a face region deformation field in combination with an optical flow estimation algorithm, and to obtain face dynamic features;

[0048] The third unit is configured to construct a face reconstruction model based on a depth estimation network, to reconstruct a face three-dimensional structure by using a back projection mechanism and a geodesic distance partition strategy, and to obtain face three-dimensional features by feature stability scoring and projection invariance matching.

[0049] The fourth unit is configured to perform feature mapping on the face dynamic features and the face three-dimensional features by using a double-channel feature extractor to generate a feature mapping vector, to calculate a semantic similarity matrix of the feature mapping vector, and to obtain a face comprehensive evaluation index by block sparse optimization and iterative contraction on the semantic similarity matrix.

[0050] The fifth unit is configured to perform hierarchical evaluation on the face region based on the face comprehensive evaluation index in combination with a preset medical beauty expert knowledge base, to generate a face diagnosis analysis report, and to output a medical beauty suggestion scheme.

[0051] In a third aspect, an electronic device is provided, including:

[0052] a processor;

[0053] a memory for storing processor-executable instructions;

[0054] The processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0055] In a fourth aspect, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.

[0056] In the embodiment, the face image data of a user is collected and standardized preprocessed, the face data is normalized, a basis for subsequent feature extraction and analysis is laid, and the accuracy and consistency of the analysis result are improved. The time sequence feature extraction model based on the deep convolutional neural network and the optical flow estimation algorithm can accurately capture face dynamic features and deformation information, effectively identify face muscle activity and expression changes, and provide an evaluation basis in a dynamic dimension for medical beauty diagnosis. The face reconstruction model constructed by the depth estimation network can accurately reconstruct a face three-dimensional structure, and the geodesic distance partition strategy and the feature stability scoring mechanism are combined to overcome the limitations of traditional two-dimensional analysis, provide more comprehensive and three-dimensional face aesthetic analysis results, and significantly improve the individual customization capability of a medical beauty scheme. BRIEF DESCRIPTION OF DRAWINGS

[0057] Figure 1 A flowchart of an AI face diagnosis feature and aesthetic analysis method for medical beauty of an embodiment of the present application is shown in FIG. 1.

[0058] Figure 2 A schematic diagram of a simulation result of a facial region motion feature is shown in FIG. 4.

[0059] Figure 3 A schematic diagram of a simulation result of an iterative shrinkage algorithm performance is shown in FIG. 6. DETAILED DESCRIPTION

[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application and are not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0061] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.

[0062] Figure 1 A flowchart of an AI face diagnosis feature and aesthetic analysis method for medical beauty of an embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the method comprises:

[0063] Collecting facial image data of a user, pre-processing the facial image data to obtain standardized facial data;

[0064] Constructing a time-series feature extraction model based on a deep convolutional neural network, performing feature response and displacement estimation on the standardized facial data through multi-scale convolution operation, calculating a facial region deformation field in combination with an optical flow estimation algorithm, and obtaining facial dynamic features;

[0065] Constructing a facial reconstruction model based on a depth estimation network, reconstructing a three-dimensional structure of the face using a back-projection mechanism and a geodesic distance partitioning strategy, and obtaining three-dimensional features of the face through feature stability scoring and projection invariance matching;

[0066] Using a dual-channel feature extractor to perform feature mapping on the facial dynamic features and the three-dimensional features of the face to generate a feature mapping vector, calculating a semantic similarity matrix of the feature mapping vector, and performing block sparse optimization and iterative shrinkage on the semantic similarity matrix to obtain a facial comprehensive evaluation index;

[0067] Based on the facial comprehensive evaluation index, in combination with a pre-set medical beauty expert knowledge base, performing hierarchical evaluation on the facial region, generating a face diagnosis analysis report, and outputting a medical beauty recommendation scheme.

[0068] In an optional embodiment, a time-series feature extraction model is constructed based on a deep convolutional neural network, feature responses and displacement estimation are performed on the standardized facial data through multi-scale convolution operation, and a face region deformation field is calculated by combining an optical flow estimation algorithm to obtain facial dynamic features, including:

[0069] A plurality of convolution kernel arrays with continuously increasing scales are set in the deep convolutional neural network to perform convolution operation on the standardized facial data to generate multi-level feature response maps;

[0070] Feature cross-correlation operation is performed on adjacent frames in the multi-level feature response maps, and an inter-frame displacement correlation matrix is obtained by calculating the regional similarity of feature responses, and an initial motion estimation map of the facial region is generated according to the inter-frame displacement correlation matrix;

[0071] The initial motion estimation map is adaptively threshold segmented, the optimal segmentation threshold is obtained by iterative calculation of maximizing the inter-class variance, and the facial region motion feature map is generated using the optimal segmentation threshold;

[0072] The facial region motion feature map is processed using an optical flow estimation algorithm, a target function is constructed based on a self-attention mechanism and a deformation constraint, and a face region deformation field is obtained by solving the target function through an iterative splitting algorithm;

[0073] The face region deformation field is divided into regions, the deformation intensity value in each preset facial key region is calculated, and the deformation intensity values of the regions are combined to form a facial dynamic feature vector.

[0074] In a specific embodiment, the input facial image sequence is standardized. The standardization process includes face alignment and size unification. A 68-point facial key point detection algorithm is used to locate facial feature points, a standard coordinate system is established based on the inner corner points of the eyes and the nose tip point, the facial images are aligned to the standard position, and the resolution is adjusted to 256x256 pixels. The standardization process ensures that the subsequent feature extraction is not affected by pose changes and size differences.

[0075] The standardized facial data is input into a designed deep convolutional neural network, which contains 5 convolutional layers, each layer is set with different scale of convolution kernel array. The first layer uses 3x3, 5x5, 7x7 three scales of convolution kernel each 32; the second layer uses 5x5, 7x7, 9x9 three scales of convolution kernel each 64; the third layer uses 7x7, 9x9, 11x11 three scales of convolution kernel each 128; the fourth layer uses 9x9, 11x11, 13x13 three scales of convolution kernel each 256; the fifth layer uses 11x11, 13x13, 15x15 three scales of convolution kernel each 512. After each layer of convolution, the ReLU activation function is used to introduce non-linear characteristics, and the maximum pooling operation with a step of 2 is used to reduce the feature map size. Through this multi-scale convolution operation, the network can capture facial texture and structure features of different scales to generate multi-level feature response maps.

[0076] For consecutive facial image frames, the correlation between their feature response maps needs to be calculated to estimate the motion information. The feature cross-correlation operation is performed on the feature response maps of each pair of adjacent frames. Specifically, for the feature response maps of the t-th frame and the t+1-th frame, a 9x9 local region is taken at each position of the t-th frame feature map, and a 21x21 range is searched in the t+1-th frame feature map to find the best matching position by calculating the normalized cross-correlation coefficient. The normalized cross-correlation coefficient is obtained by calculating the dot product of the feature regions divided by the product of the norms of the two regions, with a value range of [-1, 1], and the larger the value, the higher the matching degree. For each local region, the maximum cross-correlation coefficient and its corresponding displacement vector are recorded to form an inter-frame displacement correlation matrix. For example, for a point in the eyebrow region of the face, if the best matching position offset from the t-th frame to the t+1-th frame is (2, -1), then the displacement vector of the point is (2, -1), indicating a movement of 2 pixels to the right and 1 pixel upward.

[0077] Based on the inter-frame displacement correlation matrix, an initial motion estimation map of the facial region is generated. The horizontal and vertical components of the displacement vector are mapped to two channels of the motion estimation map, respectively. To reduce the effect of noise, a 5x5 Gaussian filter is used to smooth the motion estimation map, and the standard deviation of the Gaussian filter is set to 1.5. The smoothed motion estimation map intuitively shows the motion trend of each region of the face, but needs to be further segmented to highlight the significant motion regions.

[0078] An adaptive threshold segmentation is applied to the initial motion estimation map to identify the significant motion regions of the face. The OTSU algorithm based on the maximum inter-class variance is adopted to determine the optimal segmentation threshold. Specifically, the gray histogram of the motion estimation map is calculated, and the number of pixels at each gray level is counted. For a possible threshold T, the image pixels are divided into two classes: the background class with values less than or equal to T and the foreground class with values greater than T. The average gray values of the two classes and their respective proportions in the whole are calculated, and then the inter-class variance is calculated. By traversing all possible thresholds (0-255), the threshold that maximizes the inter-class variance is selected as the optimal segmentation threshold. In practical applications, if the face is in a calm state, the optimal threshold is usually in the range of 10-20; while the face expression is rich, the optimal threshold may rise to the range of 30-50. The optimal threshold is used to binarize the motion estimation map to generate a face region motion feature map, where the pixels with a value of 1 represent the motion significant region, and the pixels with a value of 0 represent the static or small motion region.

[0079] To accurately capture the deformation information of the face region, an optical flow estimation algorithm is applied to the face region motion feature map. This algorithm combines the self-attention mechanism and deformation constraints to construct an objective function containing data terms, smooth terms, and self-attention terms. The data terms ensure the consistency of the deformation field with the observed data, the smooth terms ensure the local continuity of the deformation field, and the self-attention terms enhance the deformation consistency of similar regions. An iterative splitting algorithm is used to solve the objective function, which decomposes the large-scale optimization problem into a series of small-scale sub-problems. In each iteration, first fix the self-attention weight, update the deformation field; then fix the deformation field, update the self-attention weight. Usually after 20-30 iterations, the algorithm converges to a stable solution, obtaining an accurate face region deformation field. The deformation field is represented in the form of a two-dimensional vector field, describing the displacement direction and amplitude of each point on the face.

[0080] The face region deformation field is divided into regions and features are extracted. According to the anatomical features of the face, the face is divided into 8 key regions: left eyebrow region, right eyebrow region, left eye region, right eye region, nose region, left cheek region, right cheek region, and mouth region. The deformation intensity values in each region are counted, and the average amplitude and direction consistency of the deformation vector in the region are calculated. For example, during the expression change, the average deformation amplitude of the mouth region may reach 5-8 pixels, while the average deformation amplitude of the eyebrow region is usually in the range of 2-4 pixels. The deformation features of the 8 regions are combined into a 16-dimensional feature vector (2 feature values for each region: average amplitude and direction consistency), forming the final face dynamic feature vector. These feature vectors can be used for subsequent expression recognition, emotion analysis, and other applications.

[0081] In the embodiment, multi-level features are extracted by multi-scale convolution kernels, and inter-frame similarity is analyzed based on feature cross-correlation to achieve more accurate initial motion estimation; adaptive threshold segmentation and optical flow estimation are combined to enable the face motion feature map to effectively separate the significant motion region, thereby improving the delicacy and discriminability of dynamic feature extraction; a self-attention mechanism and deformation constraint are used to construct an optimization objective to make the deformation field estimation more stable and reasonable in structure, and adapt to complex facial expression changes; through region division and deformation intensity calculation, a dynamic feature vector with region distinction is generated to provide high-quality input for subsequent tasks such as emotion recognition and identity verification.

[0082] In an optional implementation, the face region motion feature map is processed by an optical flow estimation algorithm, an objective function is constructed based on a self-attention mechanism and a deformation constraint, and a face region deformation field is obtained by solving the objective function through an iterative splitting algorithm, including:

[0083] A tensor representation is constructed for adjacent two frames of images in the face region motion feature map, a self-attention mechanism is embedded in the tensor representation, attention weights are generated by calculating the correlation coefficients between the images, global motion information is enhanced according to the attention weights, and an optical flow field initialization representation is constructed;

[0084] A topological structure relationship graph of the face region is constructed based on predetermined facial anatomy features, a face region deformation consistency constraint is established, node features in the topological structure relationship graph are aggregated by a graph convolution network, and a motion constraint condition based on the face structure is generated;

[0085] The optical flow field initialization representation and the motion constraint condition are input into a variational optimization framework, an adaptive loss function is constructed including a data item based on the attention mechanism and a regularization term based on the topological structure, loss function gradients are calculated for the data item and the regularization term respectively, a weight update matrix is constructed based on the loss function gradients, data item weight coefficients and regularization term weight coefficients are determined and multiplied to be combined, and a target optimization function dynamically adjusted according to the motion mode is obtained;

[0086] An iterative splitting algorithm is used to solve the target optimization function, and the optimization variables are split into multiple sub-variables, and a splitting sequence is constructed for each sub-variable to be updated alternately;

[0087] Based on the optimization result of the iterative splitting algorithm, an optical flow field of the face region is obtained, and the optical flow field is subjected to amplitude calculation to obtain a face region deformation field.

[0088] In one specific embodiment, a video sequence containing human faces is acquired, and the video sequence is preprocessed, including performing size normalization processing on each frame of image to adjust the image size to 256x256 pixels, and performing brightness correction to reduce the influence of illumination changes on subsequent processing. The processed video sequence is extracted by a face detection algorithm to generate a facial region motion feature map. The face detection uses an improved HOG feature extractor combined with an SVM classifier, and the detection accuracy is above 98.5%.

[0089] A tensor representation is constructed for adjacent two frames of images in the facial region motion feature map. Specifically, the t-th frame and the t+1-th frame of images are represented as three-dimensional tensors It and It+1, respectively, where the dimension of each tensor is CxHxW, C represents the number of channels, and takes a value of 3, corresponding to the RGB three channels; H and W represent the height and width of the image, respectively, and both are 256. The two frames of images are connected into a four-dimensional tensor T with a dimension of 2xCxHxW.

[0090] A self-attention mechanism is embedded in the tensor representation to generate attention weights by calculating the correlation coefficients between images. In specific implementation, the tensor T is mapped to a query matrix Q, a key matrix K, and a value matrix V through a convolution layer, the convolution kernel size is 3x3, and the output channel number is 128. The dot product of Q and K is calculated, and divided by a scaling factor 8 (taking a value of the square root of the feature dimension), and the attention weight matrix A is obtained by normalization through a softmax function. The matrix represents the correlation coefficients between the regions of the images, and the numerical range is between 0 and 1. The attention weight matrix A is multiplied by the value matrix V to obtain a weighted feature representation, which enhances the global motion information, and constructs an optical flow field initialization representation F0 with a dimension of 2xHxW, representing the displacement estimation values in the horizontal and vertical directions, respectively.

[0091] A topological structure relationship graph G of the facial region is constructed based on predetermined facial anatomy features. The graph contains 68 nodes corresponding to facial key points, including eyebrow, eye, nose, mouth, and facial contour regions. The connection between the nodes is determined based on facial muscle anatomy knowledge, and a total of 134 edges are included. The initial feature vector of each node has a dimension of 128, which is obtained by extracting the image features of the surrounding 16x16 pixel region.

[0092] The node features in the topological structure relationship graph are aggregated by using a graph convolution network to generate motion constraint conditions based on the facial structure. The graph convolution network includes 3 layers of graph convolution layers, and the output feature dimensions of each layer are 64, 32, and 16, respectively. The information transmission weight between adjacent nodes is calculated based on the Euclidean distance between the nodes, and the weight is larger when the distance is closer. A Gaussian kernel function is used for normalization, and the kernel width parameter is set to 0.5. Through node feature aggregation, a feature matrix C reflecting the motion constraint of the facial structure is obtained, with a dimension of 68x16.

[0093] The optical flow field initialization representation F0 and the motion constraint condition C are input into a variational optimization framework to construct an adaptive loss function. The loss function includes two parts: a data term Ld based on an attention mechanism and a regularization term Lr based on a topological structure. The data term measures the consistency of the estimated optical flow field with the brightness constancy assumption, and the regularization term measures the smoothness of the optical flow field and the consistency with the facial structure constraint.

[0094] The loss function gradients grad_Ld and grad_Lr are calculated for the data term and the regularization term, respectively. Based on the gradients, a weight update matrix W is constructed, with dimensions HxW, where the weight of each position is dynamically adjusted according to the motion characteristics of the local region. Specifically, for regions with intense facial expression changes (such as the mouth and eyes), by calculating the local gradient amplitude, a higher data term weight α (value range 0.6-0.8) and a lower regularization term weight β (value range 0.2-0.4) are assigned; for regions with smaller changes (such as the forehead and cheeks), a lower data term weight α (value range 0.3-0.5) and a higher regularization term weight β (value range 0.5-0.7) are assigned. The weight coefficients α and β satisfy the constraint condition α+β=1. The weight coefficients are multiplied by the corresponding terms to obtain the target optimization function L=α×Ld+β×Lr, which is dynamically adjusted according to the motion pattern.

[0095] An iterative splitting algorithm is used to solve the target optimization function. This algorithm decomposes the optimization variable F (optical flow field) into three sub-variables F1, F2, and F3, and constructs an augmented Lagrangian function. The iterative process includes: updating the F1 sub-problem using the gradient descent method with a step size of 0.01; updating the F2 sub-problem using the soft threshold operator with a threshold parameter of 0.05; updating the F3 sub-problem by projection operation to ensure the validity of the solution; updating the Lagrange multiplier with a step size of 0.05. The iteration termination condition is the maximum number of iterations (set to 100) or the difference between the solutions of the adjacent two iterations is less than the preset threshold (set to 10^-4). In practical applications, the algorithm usually converges within 30-50 iterations.

[0096] Based on the optimization results of the iterative splitting algorithm, the optical flow field F* of the facial region is obtained, with dimensions 2xHxW. The optical flow field is subjected to amplitude calculation, i.e. the Euclidean distance of the horizontal displacement F*_x(i,j) and the vertical displacement F*_y(i,j) at each pixel point (i,j) is calculated, to obtain the deformation field D of the facial region, with dimensions HxW. The larger the value in the deformation field, the greater the motion amplitude of the region, which can directly reflect the intensity distribution of the facial expression changes.

[0097] Traditional optical flow methods lack accuracy in handling non-rigid deformations such as facial expressions, especially in scenarios with varying illumination and fast motion, and are prone to drift. Deep learning methods, while having strong feature extraction capabilities, lack explicit modeling of facial anatomical features and are difficult to capture complex dependencies between facial regions, resulting in poor performance in subtle expression analysis. In addition, existing methods typically use fixed-weight loss functions, which cannot adaptively adjust to the motion characteristics of different facial regions, limiting the application effect of the algorithm in complex expression change scenarios.

[0098] The method of the embodiment introduces a method combining self-attention mechanism and tensor representation, which enhances the ability to capture global motion information by explicitly calculating the correlation coefficient between image regions, solving the problem of insufficient local feature extraction in traditional methods. Secondly, based on the knowledge of human facial anatomy, a facial topological structure relationship graph is constructed, and graph convolution network is used for feature aggregation, which explicitly models the physiological constraints of facial muscle movement and improves the sensitivity to subtle expression changes. Based on the adaptive loss function framework, the weights of the data term and the regularization term are dynamically adjusted according to the motion characteristics of different facial regions, so that the algorithm can more accurately process areas with large expression changes and areas with small changes. Finally, an iterative splitting algorithm is used to solve the optimization problem, which decomposes the complex problem into multiple easy-to-handle sub-problems, improving the convergence and computational efficiency of the algorithm; in view of the particularity of facial expression analysis, the knowledge of facial anatomy is combined with advanced computer vision technology to construct an optical flow estimation framework that can adapt to complex expression changes.

[0099] Figure 2 The simulation results of the facial region motion characteristics are shown in the figure, and from the distribution characteristics, it can be seen that the scatter points of the mouth region are mainly concentrated in the high deformation field amplitude (0.7-0.9) and high attention weight (0.7-0.9) interval, which reflects the adaptive enhancement effect of the algorithm on the area with large expression changes; the scatter points of the eye region are distributed in the medium-high interval (0.5-0.8), indicating that the algorithm has good capture ability for small movements of the eyes; the nose and contour points are distributed in the lower interval (0.3-0.6), which is consistent with the characteristics of these regions being relatively stable in expression changes. This distribution characteristic verifies that the method proposed in the present application can adaptively adjust the attention weight and deformation constraint according to the motion characteristics of different facial regions, thereby improving the accuracy and robustness of facial expression dynamic analysis.

[0100] In an alternative embodiment, the iterative splitting algorithm comprises:

[0101] The variable decomposition is performed on the target optimization function, and the optimization variables are decomposed into original variables and constraint variables to construct a variable update path graph.

[0102] A branch optimization sequence is constructed in the variable update path graph. For the original variables, a local feature manifold is generated by a nearest neighbor mapping. A gradient projection is performed on the local feature manifold to obtain an optimization direction. For the constraint variables, a sparse reconstruction sequence is constructed by a feature distance metric.

[0103] A feature manifold projection operator is determined based on a curvature distribution of the local feature manifold. A sparse reconstruction operator is determined based on a singular value decomposition of the sparse feature distribution. The feature manifold projection operator and the sparse reconstruction operator are combined to form an adaptive proximal operator.

[0104] The original variables and the constraint variables are alternately updated based on the adaptive proximal operator. An update step is determined by a geodesic distance on the feature manifold. The iteration is stopped when a difference between the original variables and the constraint variables is less than a preset threshold.

[0105] The original variables after the iteration convergence are taken as a final optical flow field solution result.

[0106] In one specific embodiment, a target optimization function is subjected to variable decomposition processing. Specifically, the optimization variables are divided into original variables and constraint variables. The original variables represent basic structural features of the optical flow field, and the constraint variables represent constraint conditions of the optical flow field. After the variable decomposition, a variable update path graph is constructed, which describes the interdependence between the original variables and the constraint variables and respective update paths. The path graph is in a form of a directed acyclic graph, in which nodes represent variables and edges represent the dependence between variables. For example, in actual applications, the optical flow field can be represented as original variables u and constraint variables v. The path graph contains two update paths from u to v and from v to u.

[0107] After the variable update path graph is constructed, a branch optimization sequence is constructed in the path graph. For the original variables, a local feature manifold is generated by a nearest neighbor mapping. The nearest neighbor mapping refers to that, in the original variable space, for each variable point, k nearest points in the Euclidean distance are selected as a neighborhood point set. In practice, the value of k is usually set to be between 5 and 10, which can be adjusted according to the problem size. For example, for an image sequence with a resolution of 640x480, the algorithm performs best when k=8. The generated local feature manifold can be regarded as an approximate representation of the original variables in a local region. Subsequently, a gradient projection is performed on the local feature manifold to determine an optimization direction. The gradient projection process is to project the gradient vector of the target function onto the tangent space of the local feature manifold, thereby obtaining an optimization direction along the manifold. For the constraint variables, a sparse reconstruction sequence is constructed by a feature distance metric. The feature distance metric is based on the similarity between variables, and an improved cosine similarity calculation is used. The sparse reconstruction sequence refers to that the constraint variables are reconstructed by linear combination of a small number of basis vectors, and the reconstruction coefficients have sparsity. The number of non-zero coefficients is usually set to be no more than 10% of the total number of coefficients.

[0108] The algorithm then determines a feature manifold projection operator based on the curvature distribution of the local feature manifold. The curvature distribution reflects the degree of bending of the manifold in various directions and can be obtained by calculating the distance deviation between points in the local neighborhood and the center point. The greater the curvature value of a region, the greater the degree of bending of the manifold, and a more refined local approximation is required. The feature manifold projection operator is a matrix operator that projects vectors in the original space onto the local feature manifold. At the same time, the algorithm determines a sparse reconstruction operator based on the singular value decomposition of the sparse feature distribution. The specific operation is to perform singular value decomposition on the matrix formed by the sparse reconstruction sequence, and construct the sparse reconstruction operator by taking the singular vectors corresponding to the first r largest singular values. The selection of parameter r is related to the complexity of the data set, and is usually set to the minimum value that makes the cumulative explained variance reach 95%. In practical applications, for common optical flow data sets, r is usually between 15 and 25. The feature manifold projection operator and the sparse reconstruction operator are combined to form an adaptive neighborhood operator, which can adaptively adjust the projection direction and reconstruction weight to adapt to the feature distribution in different regions.

[0109] After obtaining the adaptive neighborhood operator, the algorithm alternately updates the original variable and the constraint variable based on the operator. During the update process, the original variable is updated to a new state by the adaptive neighborhood operator acting on the current state, and the constraint variable is also updated in a similar manner. The update step is determined by the geodesic distance on the feature manifold. The geodesic distance refers to the shortest path length along the surface of the manifold, which can be approximately calculated on a discrete point set by the Dijkstra algorithm. The step size is set to 0.1 to 0.5 times the geodesic distance, which is dynamically adjusted according to the number of iterations. The initial step size is larger to speed up convergence, and gradually decreases to ensure accuracy as the iteration proceeds. The algorithm will check the difference between the original variable and the constraint variable after each iteration, and stop the iteration when the difference is less than a pre-set threshold. In practical applications, the threshold is set to 10 -4 to 10 -6 , which can be adjusted according to the accuracy requirements of the application scenario.

[0110] After the iteration is completed, the algorithm outputs the converged original variable as the final optical flow field solution. This result represents the pixel displacement field between adjacent image frames and can be used for subsequent tasks such as motion analysis and target tracking.

[0111] Traditional optimization methods usually adopt fixed optimization paths, which are difficult to adapt to complex non-convex objective functions and are prone to fall into local optimum; most methods do not fully consider the geometric structure characteristics of the problem in the variable updating process, resulting in slow convergence speed and limited accuracy when processing high-dimensional data; although the existing splitting algorithm decomposes the problem into sub-problems, the collaborative optimization strategy between sub-problems is relatively simple, and the structural relationship between variables is not fully utilized; when processing non-rigid body motion such as face, due to the lack of modeling of the underlying manifold structure, the existing method is difficult to accurately capture the complex deformation characteristics.

[0112] By decomposing the optimization variables into original variables and constraint variables, and constructing a variable updating path diagram, a more flexible optimization framework is provided, which can dynamically adjust the optimization path according to the characteristics of the problem. The concept of local feature manifold is introduced, and by mapping adjacent points and gradient projection, the high-dimensional optimization problem is transformed into optimization on low-dimensional manifold, which better captures the intrinsic geometric structure of the data. At the same time, the feature distance metric and sparse reconstruction sequence are used for the constraint variables, which effectively reduces the dimension of the solution space and improves the computational efficiency of the algorithm. The method of the embodiment combines the feature manifold projection operator and the sparse reconstruction operator to form an adaptive neighbor operator, which can automatically adjust the optimization direction and step size according to the local data characteristics, and enhances the processing capability of the algorithm for complex nonlinear problems. The update step is determined by the geodesic distance, which fully considers the geometric characteristics of the data on the manifold, and avoids the distortion that may be caused by the traditional Euclidean space update.

[0113] Compared with the traditional Horn-Schunck algorithm, the average end point error of optical flow estimation is reduced; compared with deep learning methods such as FlowNet2.0, the method achieves comparable estimation accuracy with only 1 / 5 of the computational resource consumption; in terms of convergence speed, compared with the traditional ADMM algorithm, the number of iterations is reduced; especially on the facial micro-expression dataset, the method of the embodiment significantly improves the ability to capture subtle motion, and the expression change detection accuracy is improved. In addition, the method of the embodiment shows stronger robustness when processing large-scale motion and illumination change scenes, and provides a new idea for solving optical flow field efficiently and reliably in the field of video analysis and computer vision.

[0114] In an optional embodiment, a face reconstruction model is constructed based on a depth estimation network, a face three-dimensional structure is reconstructed by using a back projection mechanism and a geodesic distance partition strategy, and face three-dimensional features are obtained by feature stability score and projection invariance matching, including:

[0115] The standardized face image is input into a multi-layer convolutional network for feature extraction, and a face depth map is output. A projection face image is generated from the face depth map using a back projection mechanism. The mutual information loss of the projection face image and the standardized face image is calculated, and a depth estimation loss function is constructed by combining the depth consistency loss of the face depth map. The multi-layer convolutional network is optimized to obtain an optimized face depth map.

[0116] The depth values in the optimized face depth map are combined with pixel coordinates to convert them into a three-dimensional point cloud. The geodesic distance between points in the three-dimensional point cloud is calculated to establish a point cloud partition strategy. The local surface principal curvature direction is calculated to construct a reconstruction reference base. The three-dimensional point cloud is fitted to a face three-dimensional closed surface according to the direction information of the reconstruction reference base.

[0117] The local curvature is calculated along the reconstruction reference base direction on the face three-dimensional closed surface to construct a gradient response map. The feature stability score is calculated based on the curvature flow equation. Stable feature points are extracted through nonlinear diffusion filtering. Local deformation feature descriptions are extracted for the stable feature points.

[0118] A projection invariance matching criterion is established based on the local deformation feature descriptions. The local affine transformation matrix of the local deformation feature descriptions is calculated for feature matching. Matching point pairs are screened based on spatial consistency constraints.

[0119] The local surface deformation intensity of the matching point pairs is calculated. Feature weight coefficients are assigned. Face three-dimensional feature representations are generated by combining the matching point pair features.

[0120] In one specific embodiment, the standardized face image is input into a depth estimation network, which consists of an encoder and a decoder. The encoder contains 5 convolution modules, each consisting of two 3x3 convolution layers and one 2x2 max pooling layer. The decoder contains 5 up-sampling modules, each consisting of one 2x2 deconvolution layer and two 3x3 convolution layers. The network finally outputs a face depth map with the same size as the input image.

[0121] To optimize the depth estimation network, a joint loss function is designed. The estimated depth map is converted into a projected face image through a back-projection mechanism: the intrinsic matrix of the reference camera is selected (focal length is 500 pixels, principal point is at the center of the image), the three-dimensional point position is calculated according to the depth value and the pixel coordinates, and then the three-dimensional point is projected back to the two-dimensional plane to obtain the projected image. The mutual information loss between the projected image and the original normalized image is calculated, and the mutual information coefficient is used to measure the similarity between the two images. The mutual information coefficient ranges from 0 to 1, and the larger the value, the more similar it is. At the same time, the depth consistency loss is calculated, which ensures the rationality of the depth by comparing the difference between the current depth map and the prior depth template. The prior depth template is obtained by averaging 10,000 high-precision three-dimensional face scan models. The joint loss function is the weighted sum of the two losses, and the weights are 0.7 and 0.3 respectively. The Adam optimizer is used to train the network, and the initial learning rate is set to 0.001, which is reduced by 10% every 20 cycles, and a total of 100 cycles are trained.

[0122] After obtaining the optimized face depth map, the three-dimensional point cloud is generated. For each pixel in the depth map, the three-dimensional coordinates (X, Y, Z) are calculated according to its coordinates (u, v) and depth value d, combined with the camera intrinsic matrix. The generated original point cloud contains about 65,536 points (i.e. 256x256).

[0123] The point cloud partition strategy based on geodesic distance is used to divide the face area. The nose tip is selected as the reference point, and the geodesic distance of each point in the point cloud to the nose tip is calculated. The geodesic distance calculation uses Dijkstra algorithm, and a k-neighbor graph (k=8) is constructed with edge weights as Euclidean distance. According to the geodesic distance, the point cloud is divided into 5 regions: nose region (distance < 25mm), eye region (25-50mm), mouth region (50-75mm), cheek region (75-100mm) and edge region (>100mm).

[0124] For each region, the local surface principal curvature direction is calculated to construct the reconstruction reference base. For each point in the point cloud, a set of points with a radius of 5mm in its neighborhood is selected, and the local surface normal vector and principal curvature direction are calculated through principal component analysis. These directions form a local coordinate system, which serves as the reconstruction reference base.

[0125] Based on the partition and reconstruction reference base, the point cloud is fitted to a surface. The moving least squares method is used to reconstruct the surface for each region, and the Gaussian kernel function is selected for the weight function. The kernel width is set according to the characteristics of the region: 3mm for the nose region, 5mm for the eye region, 4mm for the mouth region, 8mm for the cheek region, and 10mm for the edge region. After surface fitting, the Poisson reconstruction algorithm is used to generate a closed face surface, and the mesh resolution is set to 0.5mm.

[0126] The feature extraction process starts from calculating the local curvature of the three-dimensional surface of the face. Along the reconstructed reference basis direction, the average curvature and Gaussian curvature are calculated to generate a curvature response map. To obtain stable feature points, the feature stability is evaluated based on the curvature flow equation, with a curvature flow time step of 0.05 and 10 iterations. The feature stability score of each point is calculated, and points with a score higher than the threshold of 0.75 are selected as candidate feature points.

[0127] Noise is suppressed by nonlinear diffusion filtering, with a diffusion coefficient of 0.2 and 20 iterations. For each stable feature point, a local deformation feature description is extracted: 32 points within a 8mm radius around the feature point are sampled, and the relative position and curvature difference of these points relative to the feature point are calculated to form a 128-dimensional feature vector.

[0128] A projection-invariant matching criterion is established based on the local deformation feature description. For the feature points of the two face models, the Euclidean distance between the feature descriptions is calculated, and the point pairs with a distance less than the threshold of 0.3 are selected as initial matches. The local affine transformation matrix of each matched point pair is calculated, and the transformation consistency is verified, and the matched pairs with a transformation error less than 2mm are retained. The matched point pairs are further filtered based on the spatial consistency constraint, requiring the geodesic distance ratio between the matched point pairs to be between 0.9 and 1.1.

[0129] The local surface deformation intensity of the matched point pairs is calculated, and the feature weight coefficients are assigned according to the deformation intensity, with smaller deformation intensity and higher weight. The three-dimensional coordinates, local curvature, feature description vector and weight coefficients of the matched point pairs are combined to generate a three-dimensional feature representation of the face, which is used for subsequent identification or verification tasks.

[0130] In this embodiment, the depth estimation network is optimized by joint optimization of mutual information loss and depth consistency, so that the generated face depth map is more accurate in geometry and image content to match the actual face morphology; the point cloud geodesic distance partitioning and surface fitting strategy guided by the principal curvature direction are used to construct a closed and continuous three-dimensional face surface, improving the reconstruction quality and structural integrity; stable feature points are extracted based on curvature gradient response and nonlinear diffusion filtering, effectively suppressing noise interference and improving the stability of feature points under different conditions such as pose and illumination; the feature points are matched by local affine transformation and spatial consistency constraint, and a weighted three-dimensional feature vector is generated by combining the local surface deformation intensity, improving the accuracy and robustness of three-dimensional face recognition and matching.

[0131] In an alternative embodiment, a two-channel feature extractor is used to map the face dynamic features and the three-dimensional face features to generate a feature mapping vector, and a semantic similarity matrix of the feature mapping vector is calculated. Block sparse optimization and iterative contraction are performed on the semantic similarity matrix to obtain a face comprehensive evaluation index, including:

[0132] The face dynamic features and the face three-dimensional features are input into a predetermined double-channel feature extractor, multi-layer feature extraction is performed through a time sequence convolution network and a space convolution network to generate dynamic mapping features and space mapping features, the space mapping features are generated through multi-layer feature extraction performed by the space convolution network, the dynamic mapping features and the space mapping features are combined to generate a feature mapping vector, and a normalized dot product operation is performed to generate an initial semantic similarity matrix;

[0133] The initial semantic similarity matrix is divided into feature sub-block matrices, the number of rows and the number of columns of the feature sub-block matrices are obtained, the minimum value of the number of rows and the number of columns is determined as a block size parameter, a square region is constructed as a first region with the block size parameter as the side length, other regions are second regions, a sparse constraint operation is performed on the first region to generate a sparse matrix, a correlation constraint operation is performed on the second region to generate a correlation constraint matrix, the sparse matrix and the correlation constraint matrix are input into an iterative shrinkage algorithm for optimization to generate optimized feature sub-blocks, and the optimized feature sub-blocks are fused to generate an optimized semantic similarity matrix.

[0134] According to the optimized semantic similarity matrix, a weight coefficient matrix is calculated, and the feature mapping vector is weighted and combined to generate a face comprehensive evaluation index.

[0135] In a specific embodiment, face dynamic feature data and face three-dimensional feature data are collected. The face dynamic features can include time sequence information such as facial expression changes, micro expressions, facial muscle movements, etc. The frame rate is 30 fps, and the collection time length of each sample is 5 seconds, forming 150 frame sequence data. The face three-dimensional features include spatial features such as depth information, surface texture, and stereo structure, with a resolution of 1024x1024 pixels and a depth accuracy of 0.1 mm.

[0136] After collection, the face dynamic features and the face three-dimensional features are input into a double-channel feature extractor. The feature extractor includes two parallel processing channels: a time sequence convolution network channel and a space convolution network channel. The time sequence convolution network channel is used to process dynamic features and includes 4 convolution layers, each with a kernel size of 3x3, a step size of 1, a padding of 1, and channel numbers of 32, 64, 128, and 256 in sequence. After each convolution layer, a BatchNorm and a ReLU activation function are connected, and a maximum pooling layer is used for down-sampling with a pooling kernel size of 2x2 and a step size of 2. The space convolution network channel is used to process three-dimensional features and also includes 4 convolution layers with the same structure parameters as the time sequence convolution network, but an additional global average pooling layer is added after the last layer.

[0137] After feature extraction, the time series convolution network outputs a 256-dimensional dynamic mapping feature vector, and the spatial convolution network outputs a 256-dimensional spatial mapping feature vector. The two feature vectors are combined to form a 512-dimensional feature mapping vector. Normalization processing is performed on the feature mapping vector, specifically by dividing each element of the vector by the L2 norm of the vector to ensure that the vector length is 1. The dot product of the normalized feature mapping vector with itself is calculated to generate an initial semantic similarity matrix of 512x512 dimensions.

[0138] The initial semantic similarity matrix is subjected to block sparse optimization. The matrix is divided into multiple 64x64 size feature sub-block matrices, forming a total of 8x8 sub-blocks. For each sub-block matrix, the number of rows and columns is obtained, and the minimum of the two is taken as the block size parameter, which is 64 in this example. A square region with the block size parameter as the side length is constructed as the first region, for example, for the sub-block located in the upper left corner of the matrix, the first region is the entire region of the sub-block; while for the sub-block located in the middle position of the matrix, the first region is a 64x64 square region with the center of the sub-block as the origin, and the rest is the second region.

[0139] Sparse constraint operation is performed on the first region, elements with similarity values greater than 0.7 are retained, and elements less than this threshold are set to 0 to generate a sparse matrix. The correlation constraint operation is performed on the second region, and the decay factor is calculated according to the relative position relationship between the elements, and the original similarity value is multiplied by the decay factor to generate a correlation constraint matrix. The sparse matrix and the correlation constraint matrix are combined to form the optimized sub-block matrix.

[0140] The iterative shrinkage algorithm is applied to the optimized sub-block matrix for further optimization. The algorithm sets the maximum number of iterations to 100 and the convergence threshold to 0.001. In each iteration, the difference between the current sub-block matrix and the ideal sparse structure is calculated, and the matrix elements are adjusted based on the difference value to gradually make the matrix tend to the ideal sparse distribution. When the difference between two consecutive iterations changes less than the convergence threshold or the maximum number of iterations is reached, the iteration stops. In practice, about 50-60 iterations are needed to reach convergence.

[0141] After the optimization of all sub-blocks is completed, the optimized sub-block matrix is recombined to generate an optimized semantic similarity matrix of 512x512 dimensions. Based on this matrix, a weight coefficient matrix is calculated, specifically by summing each row of the optimized semantic similarity matrix and then performing normalization processing to make the weight coefficient sum of each row equal to 1. Finally, the weight coefficient matrix and the feature mapping vector are combined by weighting to generate a face comprehensive evaluation index.

[0142] In the embodiment, the facial dynamic features and the three-dimensional spatial features are extracted by the double-channel feature extractor respectively, and a joint feature mapping vector is generated to enhance the multi-dimensional representation capability of facial information; the normalized dot product and the feature sub-block division strategy are adopted, combined with the sparse and correlation constraints, to optimize the semantic similarity matrix in fine granularity, effectively capturing complex semantic relationships; the feature sub-block is optimized by the iterative shrinkage algorithm to suppress redundant feature interference, highlight key feature regions, and improve the stability of subsequent matching and recognition; combined with the optimized semantic similarity and feature weight calculation, the effective fusion of multi-source features is realized, and a more discriminative and generalizable facial comprehensive evaluation index is output.

[0143] In an optional implementation, the sparse matrix and the correlation constraint matrix are input into an iterative shrinkage algorithm for optimization to generate the optimized feature sub-block, which includes:

[0144] The maximum and minimum value normalization operations are respectively performed on the sparse matrix and the correlation constraint matrix to generate a first normalized matrix and a second normalized matrix, the first normalized matrix is arranged at the diagonal line position, the second normalized matrix is arranged at the non-diagonal line position, and a to-be-optimized matrix is generated;

[0145] The median of the absolute values of the elements in the to-be-optimized matrix is calculated as an initial threshold value, the matrix distribution parameter is calculated according to the dimension value of the to-be-optimized matrix and the cumulative sum of the absolute values of the elements in the to-be-optimized matrix, the initial threshold value is added to the matrix distribution parameter and multiplied by an exponential decay function to generate a dynamic shrinkage threshold value;

[0146] The element values greater than the dynamic shrinkage threshold value in the to-be-optimized matrix are kept unchanged, and the element values less than or equal to the dynamic shrinkage threshold value are set to zero to generate a sparse matrix, and the relative error value of the sparse matrix and the to-be-optimized matrix is calculated;

[0147] The iteration is repeated until the relative error value is less than or equal to a preset error threshold value, the final sparse matrix is determined, and the final sparse matrix is reconstructed according to the original position relationship to generate an optimized feature sub-block.

[0148] In one specific embodiment, after obtaining the sparse matrix and the associated constraint matrix, it is necessary to perform maximum and minimum value normalization operation on the two matrices. For the sparse matrix, find the maximum and minimum values in the matrix, and in practical applications, the maximum value is about 0.95 and the minimum value is about 0.02. The normalization calculation subtracts each element in the matrix from the minimum value and divides it by the difference between the maximum value and the minimum value, so that all elements are mapped to the range of 0 to 1, generating a first normalized matrix. Similarly, the same normalization operation is performed on the associated constraint matrix to generate a second normalized matrix. Taking the sub-block matrix of the facial feature region as an example, if the element values in the original sparse matrix are distributed between 0.02 and 0.95, after normalization, all elements are mapped to between 0 and 1, preserving the relative relationship between elements while unifying the numerical range.

[0149] After normalization is completed, the first normalized matrix is set in the diagonal position, and the second normalized matrix is set in the non-diagonal position to form a to-be-optimized matrix. In practical applications, if the facial eye region 85x85 feature sub-block is processed, the to-be-optimized matrix is also 85x85 in size, of which the 85 elements in the diagonal position come from the first normalized matrix, and the remaining 7140 elements come from the second normalized matrix. This combination preserves the core autocorrelation information in the sparse matrix and the cross-correlation information in the associated constraint matrix.

[0150] Start the first iteration of the iterative shrinkage algorithm. First, calculate the median of the absolute values of all elements in the to-be-optimized matrix as the initial threshold value. The specific operation is to sort the 7225 elements in the matrix by absolute value, and take the value of the 3613th element after sorting, which is usually about 0.4 in the facial feature analysis scenario. The system calculates the matrix distribution parameter, multiplies the matrix dimension 85 by the scaling factor 0.01 to get 0.85, and then calculates the average value of the absolute values of all elements in the matrix (about 0.25), and the product is about 0.21. The system adds the initial threshold value 0.4 to the matrix distribution parameter 0.21 to get 0.61, and then multiplies it by the exponential decay factor. The exponential decay factor for the first iteration is calculated as e to the power of -0.1 (-0.1 is equal to -1 divided by 10, where 1 is the current iteration number and 10 is the decay rate parameter), which is about 0.905. 0.61 multiplied by 0.905 gives the dynamic shrinkage threshold for the first iteration, which is about 0.552.

[0151] The dynamic shrinkage threshold 0.552 is used to process the matrix to be optimized, and each element in the matrix is traversed. The absolute value of the element is set to 0 if it is less than or equal to 0.552, and the element is kept unchanged if it is greater than the threshold. After processing, the first iteration sparse matrix is obtained, in which about 18% of the elements remain non-zero, mainly concentrated in the positions representing the key medical and beauty areas such as eye contour, eye bag features and eyebrow shape. The relative error value of the sparse matrix and the matrix to be optimized is calculated. The calculation method is to first calculate the square sum of the difference between the corresponding elements of the two matrices, then calculate the square sum of the elements of the matrix to be optimized, and take the square root of the ratio of the two. The relative error value of the first iteration is about 0.35.

[0152] The relative error value is compared with the preset error threshold 0.05, and it is found that it is greater than the threshold, and the second iteration is entered. The same matrix to be optimized as the first iteration is used to recalculate the median threshold, and it is found that it is still 0.4. The matrix distribution parameter is calculated, which is still 0.21. The initial threshold is added to the matrix distribution parameter to obtain 0.61, but the exponential decay factor becomes e to the power of -0.2 (-0.2 is equal to -2 divided by 10, where 2 is the current iteration number), which is approximately equal to 0.819. 0.61 multiplied by 0.819 gives the dynamic shrinkage threshold of the second iteration about 0.50.

[0153] The new dynamic shrinkage threshold 0.50 is used to process the matrix to be optimized to obtain the second iteration sparse matrix, in which about 22% of the elements remain non-zero. The calculated relative error value is reduced to about 0.31. Since the error value is still greater than the preset threshold 0.05, the third iteration is continued.

[0154] In subsequent iterations, the dynamic shrinkage threshold gradually decreases: about 0.46 in the third iteration, about 0.41 in the fifth iteration, about 0.33 in the tenth iteration, and about 0.27 in the fifteenth iteration. As the threshold decreases, the number of non-zero elements retained in the sparse matrix gradually increases, about 26%, 33%, 45% and 52% respectively. The relative error value also decreases, about 0.28, 0.22, 0.13 and 0.08 respectively.

[0155] When the iteration is performed to the eighteenth time, the calculated dynamic shrinkage threshold is about 0.24, the sparse matrix retains about 56% of the non-zero elements, and the calculated relative error value is about 0.048, which is lower than the preset error threshold 0.05. At this time, the iteration process stops, and the sparse matrix obtained in the eighteenth iteration is determined as the final sparse matrix.

[0156] The final sparse matrix is reconstructed according to the original position relationship to generate an optimized feature sub-block. In the example of the facial eye region, the 56% non-zero elements retained are mainly distributed in positions representing key medical and beauty evaluation points such as eye wrinkle, eye bag shape, upper eyelid droop degree, eyebrow shape, and glabella lines. These optimized features can provide more accurate facial age feature quantification indicators in subsequent face analysis, for example, in a 45-year-old female face analysis case, it can distinguish between 0.2mm deep fine lines and 0.5mm deep lines, providing a data basis for fine medical beauty program design.

[0157] The method of the present embodiment is mainly based on compressed sensing and sparse representation theory. There are mainly two types of methods for processing feature matrices in the prior art: one is hard thresholding based on fixed thresholding, which directly sets elements below the threshold to zero; the other is a shrinkage algorithm based on soft thresholding, which subtracts a fixed value from all elements before thresholding. These methods have obvious shortcomings when processing facial features: fixed thresholding is difficult to adapt to the feature differences of different facial regions, and fine texture information is easily lost; while simple soft thresholding can retain more information, it cannot effectively remove noise interference, resulting in unstable aesthetic evaluation results.

[0158] The method of the present embodiment introduces an adaptive dynamic shrinkage threshold mechanism that can automatically adjust the threshold according to the matrix characteristics and the iteration process; innovatively incorporates matrix distribution parameters into threshold calculation, enabling the algorithm to perceive the feature distribution differences of different facial regions; and uses an exponential decay function to control the threshold change rate, achieving smooth progression of the shrinkage process. The improvement is aimed at solving the problem of regional differences in facial feature extraction, and in view of the high sensitivity to fine features in medical beauty applications, a more accurate feature optimization method is designed.

[0159] Figure 3 The performance simulation results of the iterative shrinkage algorithm are shown in the figure, which shows the trend of the key parameters of the algorithm with the number of iterations: dynamic shrinkage threshold (black curve), relative error (red curve), and non-zero element ratio (blue curve). As can be seen from the curve changes, the dynamic shrinkage threshold shows a smooth downward trend, gradually decreasing from 0.552 to 0.24, reflecting the adaptive characteristics of the algorithm; the relative error curve shows the convergence performance of the optimization process, which continuously decreases from 0.35 to 0.048, meeting the preset error threshold requirement of 0.05; the non-zero element ratio curve reflects the dynamic change process of feature retention, which gradually increases from 18% to 56%, indicating that the algorithm retains sufficient feature information while maintaining a high degree of sparsity. Overall, the trend of the three curves is consistent, which verifies that the algorithm achieves the expected optimization goal after 18 iterations, ensuring the accuracy of feature extraction while maintaining a moderate degree of sparsity, providing a reliable data basis for fine analysis of facial features.

[0160] The AI face diagnosis feature and aesthetic analysis system for medical beauty of the embodiment of the application comprises:

[0161] The first unit is configured to collect user face image data, pre-process the face image data, and obtain standardized face data.

[0162] The second unit is configured to construct a time sequence feature extraction model based on a deep convolutional neural network, perform feature response and displacement estimation on the standardized face data through multi-scale convolution operation, calculate a face region deformation field in combination with an optical flow estimation algorithm, and obtain face dynamic features.

[0163] The third unit is configured to construct a face reconstruction model based on a depth estimation network, reconstruct a face three-dimensional structure by using a back projection mechanism and a geodesic distance partition strategy, and obtain face three-dimensional features through feature stability scoring and projection invariance matching.

[0164] The fourth unit is configured to perform feature mapping on the face dynamic features and the face three-dimensional features by using a double-channel feature extractor to generate a feature mapping vector, calculate a semantic similarity matrix of the feature mapping vector, and obtain a face comprehensive evaluation index through block sparse optimization and iterative contraction of the semantic similarity matrix.

[0165] The fifth unit is configured to perform hierarchical evaluation on a face region based on the face comprehensive evaluation index in combination with a preset medical beauty expert knowledge base, generate a face diagnosis analysis report, and output a medical beauty suggestion scheme.

[0166] In a third aspect, the embodiment of the application provides an electronic device, comprising:

[0167] a processor;

[0168] a memory for storing processor-executable instructions;

[0169] The processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0170] In a fourth aspect, the embodiment of the application provides a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions are executed by a processor to implement the method described above.

[0171] The application can be a method, device, system and / or computer program product. The computer program product can include a computer readable storage medium having computer readable program instructions loaded thereon for executing various aspects of the application.

[0172] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A medical beauty-oriented AI face diagnosis feature and aesthetic analysis method, characterized in that, The method comprises the following steps: Collecting facial image data of a user, preprocessing the facial image data to obtain standardized facial data; Constructing a time-series feature extraction model based on a deep convolutional neural network, performing feature response and displacement estimation on the standardized facial data through multi-scale convolution operation, calculating the face region deformation field by combining the optical flow estimation algorithm to obtain the facial dynamic features, including: Setting multiple convolution kernel arrays with continuously increasing scales in the deep convolutional neural network to perform convolution operation on the standardized facial data to generate multi-level feature response maps; Performing feature cross-correlation operation on adjacent frames in the multi-level feature response maps to obtain an inter-frame displacement correlation matrix by calculating the regional similarity of feature responses, and generating an initial motion estimation map of the face region according to the inter-frame displacement correlation matrix; Performing adaptive threshold segmentation on the initial motion estimation map to obtain an optimal segmentation threshold through iterative calculation of maximizing the inter-class variance, and generating a face region motion feature map using the optimal segmentation threshold; Processing the face region motion feature map using the optical flow estimation algorithm, constructing an objective function based on the self-attention mechanism and deformation constraint, and solving to obtain the face region deformation field through an iterative splitting algorithm; Dividing the face region deformation field into regions, calculating the deformation intensity value in each preset face key region, and combining the deformation intensity values of each region to form a face dynamic feature vector; Constructing a face reconstruction model based on a depth estimation network, reconstructing the face three-dimensional structure using the back projection mechanism and geodesic distance partitioning strategy, and obtaining the face three-dimensional features through feature stability scoring and projection invariance matching; Using a double-channel feature extractor to perform feature mapping on the face dynamic features and the face three-dimensional features to generate a feature mapping vector, calculating a semantic similarity matrix of the feature mapping vector, and performing block sparse optimization and iterative contraction on the semantic similarity matrix to obtain a face comprehensive evaluation index; Based on the face comprehensive evaluation index, combining a pre-set medical expert knowledge base, performing hierarchical evaluation on the face region to generate a face diagnosis analysis report and output a medical beauty suggestion scheme.

2. The method of claim 1, wherein, Processing the face region motion feature map using the optical flow estimation algorithm, constructing an objective function based on the self-attention mechanism and deformation constraint, and solving to obtain the face region deformation field through an iterative splitting algorithm includes: Constructing a tensor representation for adjacent two frames of images in the face region motion feature map, embedding a self-attention mechanism in the tensor representation, generating attention weights by calculating the correlation coefficients between the images, enhancing the global motion information according to the attention weights, and constructing an optical flow field initialization representation; Constructing a topological structure relationship graph of the face region based on pre-determined facial anatomy features, establishing a face region deformation consistency constraint, aggregating node features in the topological structure relationship graph using a graph convolution network, and generating a motion constraint condition based on the face structure; The optical flow field initialization representation is input into the motion constraint condition input variational optimization framework, an adaptive loss function is constructed including a data item based on an attention mechanism and a regular term based on a topological structure, loss function gradients are calculated for the data item and the regular term respectively, a weight update matrix is constructed based on the loss function gradients, data item weight coefficients and regular term weight coefficients are determined and multiplied to combine, and a target optimization function dynamically adjusted according to a motion mode is obtained; An iterative splitting algorithm is used to solve the target optimization function, and the optimization variable is split into multiple sub-variables, and a splitting sequence is constructed for each sub-variable for alternating update; Based on the optimization result of the iterative splitting algorithm, the optical flow field of the face region is obtained, and the amplitude of the optical flow field is calculated to obtain the face region deformation field.

3. The method of claim 2, wherein, The iterative splitting algorithm comprises: The target optimization function is decomposed into variables, the optimization variable is decomposed into an original variable and a constraint variable, and a variable update path graph is constructed; A branch optimization sequence is constructed in the variable update path graph, the original variable is mapped to generate a local feature manifold through adjacent points, and an optimization direction is obtained by gradient projection on the local feature manifold; the constraint variable is constructed by feature distance measurement to construct a sparse reconstruction sequence; A feature manifold projection operator is determined based on the curvature distribution of the local feature manifold, a sparse reconstruction operator is determined based on singular value decomposition of the sparse feature distribution, and the feature manifold projection operator and the sparse reconstruction operator are combined to form an adaptive adjacent operator; The original variable and the constraint variable are alternately updated based on the adaptive adjacent operator, and the update step is determined by the geodesic distance on the feature manifold until the difference between the original variable and the constraint variable is less than a preset threshold; The original variable after iteration convergence is taken as the final optical flow field solving result.

4. The method of claim 1, wherein, A face reconstruction model is constructed based on a depth estimation network, a three-dimensional structure of the face is reconstructed by using a back projection mechanism and a geodesic distance partition strategy, and three-dimensional features of the face are obtained by feature stability scoring and projection invariance matching, comprising: A standardized face image is input into a multi-layer convolutional network for feature extraction, and a face depth map is output, a projection face image is generated from the face depth map by using a back projection mechanism, an mutual information loss of the projection face image and the standardized face image is calculated, a depth consistency loss of the face depth map is combined to construct a depth estimation loss function, the multi-layer convolutional network is optimized based on the depth estimation loss function, and an optimized face depth map is obtained by using the optimized multi-layer convolutional network; The depth value in the optimized face depth map is combined with the pixel coordinates to convert into a three-dimensional point cloud, the geodesic distance between points in the three-dimensional point cloud is calculated to establish a point cloud partition strategy, a local surface principal curvature direction is calculated to construct a reconstruction reference base, and the three-dimensional point cloud is surface fitted according to the direction information of the reconstruction reference base to obtain a face three-dimensional closed surface; The local curvature is calculated along the reconstruction reference base direction on the face three-dimensional closed surface to construct a gradient response map, the feature stability score is calculated based on the curvature flow equation, the stable feature points are extracted by nonlinear diffusion filtering, and the local deformation feature description of the stable feature points is extracted. A projection invariance matching criterion is established based on a local deformation feature description, a local affine transformation matrix of the local deformation feature description is calculated to perform feature matching, and matching point pairs are screened in combination with a spatial consistency constraint; A local surface deformation intensity of the matching point pairs is calculated, a feature weight coefficient is assigned, and a face three-dimensional feature representation is generated by combining the matching point pairs and the feature.

5. The method of claim 1, wherein, A feature mapping vector is generated by performing feature mapping on the face dynamic feature and the face three-dimensional feature by using a double-channel feature extractor, a semantic similarity matrix of the feature mapping vector is calculated, and the semantic similarity matrix is subjected to block sparse optimization and iterative shrinkage to obtain a face comprehensive evaluation index including: The face dynamic feature and the face three-dimensional feature are input into a pre-determined double-channel feature extractor, a dynamic mapping feature is generated by performing multi-layer feature extraction on the face dynamic feature by using a time convolution network, a spatial mapping feature is generated by performing multi-layer feature extraction on the face three-dimensional feature by using a space convolution network, the dynamic mapping feature and the spatial mapping feature are combined to generate a feature mapping vector, and an initial semantic similarity matrix is generated by performing a normalized dot product operation; The initial semantic similarity matrix is divided into a feature sub-block matrix, a row number and a column number of the feature sub-block matrix are obtained, a minimum value of the row number and the column number is determined as a block size parameter, a square region is constructed as a first region with the block size parameter as a side length, and other regions are second regions, a sparse matrix is generated by performing a sparse constraint operation on the first region, a correlation constraint matrix is generated by performing a correlation constraint operation on the second region, the sparse matrix and the correlation constraint matrix are input into an iterative shrinkage algorithm for optimization to generate an optimized feature sub-block, and the optimized feature sub-block is fused to generate an optimized semantic similarity matrix; A weight coefficient matrix is calculated according to the optimized semantic similarity matrix, and a face comprehensive evaluation index is generated by performing weighted combination on the feature mapping vector.

6. The method of claim 5, wherein, The sparse matrix and the correlation constraint matrix are input into an iterative shrinkage algorithm for optimization to generate an optimized feature sub-block, including: A maximum and minimum value normalization operation is performed on the sparse matrix and the correlation constraint matrix respectively to generate a first normalized matrix and a second normalized matrix, the first normalized matrix is arranged at a diagonal line position, the second normalized matrix is arranged at a non-diagonal line position to generate a to-be-optimized matrix; An initial threshold value is calculated as a median of absolute values of elements in the to-be-optimized matrix, a matrix distribution parameter is calculated according to a dimension value of the to-be-optimized matrix and an accumulated sum of absolute values of elements in the to-be-optimized matrix, the initial threshold value is added to the matrix distribution parameter and multiplied by an exponential decay function to generate a dynamic shrinkage threshold value; Element values greater than the dynamic shrinkage threshold value in the to-be-optimized matrix are kept unchanged, element values less than or equal to the dynamic shrinkage threshold value are set to zero to generate a sparse matrix, and a relative error value of the sparse matrix and the to-be-optimized matrix is calculated; The iteration is repeated until the relative error value is less than or equal to a preset error threshold value, a final sparse matrix is determined, and the final sparse matrix is reconstructed according to an original position relationship to generate an optimized feature sub-block.

7. The AI face-to-face feature and aesthetic analysis system for medical beauty, for implementing the method of any one of the preceding claims 1-6, characterized in that, including: A first unit is configured to acquire face image data of a user, and perform preprocessing on the face image data to obtain standardized face data. The second unit is configured to construct a time sequence feature extraction model based on a deep convolutional neural network, perform feature response and displacement estimation on standardized face data through multi-scale convolution operation, calculate a face region deformation field in combination with an optical flow estimation algorithm, and obtain face dynamic features. The third unit is configured to construct a face reconstruction model based on a depth estimation network, reconstruct a face three-dimensional structure by using a back projection mechanism and a geodesic distance partition strategy, and obtain face three-dimensional features by using feature stability scoring and projection invariance matching. The fourth unit is configured to perform feature mapping on the face dynamic features and the face three-dimensional features by using a double-channel feature extractor to generate a feature mapping vector, calculate a semantic similarity matrix of the feature mapping vector, perform block sparse optimization and iterative contraction on the semantic similarity matrix, and obtain a face comprehensive evaluation index. The fifth unit is configured to perform hierarchical evaluation on a face region based on the face comprehensive evaluation index in combination with a preset medical beauty expert knowledge base, generate a face diagnosis analysis report, and output a medical beauty suggestion scheme.

8. An electronic device, comprising: The computer program instructions are executed by the processor to implement the method in any one of claims 1-6. The computer program instructions are executed by the processor to implement the method in any one of claims 1-6. ​ ​ 9. A computer-readable storage medium having stored thereon computer program instructions, wherein, ​

Citation Information

Patent Citations

  • Medical image deformation registration method and system based on deep learning feature optical flow

    CN111127532A

  • Three-dimensional face reconstruction method based on depth image data

    CN116958413A