A method and system for face image recognition
By performing illumination equalization processing and feature extraction on facial images, and utilizing the biometric contours and topological features of concave regions, a multi-dimensional feature set is generated, which solves the problem of insufficient facial recognition accuracy under complex lighting conditions and achieves higher recognition stability and accuracy.
Patent Information
- Application Number
- CN202511174683.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-21
AI Technical Summary
Existing facial recognition technology lacks accuracy in complex lighting conditions and fails to fully utilize the concave structural features of the face, resulting in insufficient recognition stability and accuracy.
By analyzing the brightness distribution to determine the threshold and baseline values, the image is partitioned and the brightness is adjusted differently before the color space is reorganized to generate an image with balanced illumination. The grid deformation features and biometric contours of the face region are extracted, and the directional gradient texture fusion algorithm is used to generate a micro-feature encoding sequence. The biometric feature set is generated by combining the topological relationship feature vector and the local curvature feature vector, and multi-scale similarity calculation is performed.
It improves the stability and accuracy of facial recognition, enhances its resistance to changes in posture and expression, and improves recognition precision.
Smart Images

Figure CN120726684B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a method and system for face image recognition. BACKGROUND
[0002] As a biometric-based identity authentication method, face recognition technology has been widely and deeply applied in many fields such as security monitoring, financial payment, intelligent terminal unlocking, public safety management, etc. due to its non-contact, convenience and high efficiency. With the rapid development of information technology and the increasing demand for identity authentication, face recognition technology has become a research hotspot and core development direction in the field of biometric recognition. However, in actual application scenarios, face recognition technology still faces many severe challenges. The interference of complex environmental factors and the limitations of existing technology make it difficult to meet the growing demand for high security and high reliability. Therefore, in-depth research and solution have important theoretical significance and practical value for promoting the further development and application of face recognition technology.
[0003] Existing feature extraction technology does not make full use of the concave structure of the face. The concave areas of the face, such as the eye socket, nasolabial sulcus and below the cheekbone, contain rich personalized information, and the shape and structure of the region are stable and unique. However, traditional methods often treat the concave area as a disturbance factor or only perform rough processing, failing to fully exploit the effective features therein, limiting the further improvement of face recognition accuracy. SUMMARY
[0004] The technical problem to be solved by the present application is to provide a method and system for face image recognition, which improves the stability and accuracy of face recognition in complex lighting environments.
[0005] To solve the above technical problems, the technical solution of the present application is as follows:
[0006] In a first aspect, a method for face image recognition, the method comprising:
[0007] Step 1, obtaining an initial image containing a face;
[0008] Step 2, determining a threshold value and a reference value by analyzing the brightness distribution, adjusting the color space of the image after partitioning the difference in brightness, and generating an illumination balanced image;
[0009] Step 3, extracting the face region of the illumination balanced image using a segmentation algorithm; constructing a dynamic deformation grid based on the face region to generate a grid deformation feature; generating a biometric feature contour based on the grid deformation feature; and generating a micro-feature encoding sequence in the concave region defined by the biometric feature contour using a directional gradient texture fusion algorithm;
[0010] Step 4, extract the nonlinear spatial constraint relationship between the grid nodes in the grid deformation feature, generate the topological relationship feature vector;
[0011] Step 5, fuse the topological relationship feature vector with the biological feature contour, calculate the curvature manifold of the facial feature concave area, and generate the local curvature feature vector through differential geometry transformation;
[0012] Step 6, input the topological relationship feature vector, local curvature feature vector and micro-feature coding sequence into the evolvable biological feature library, fuse the space-time weight and update the comparison template;
[0013] Step 7, fuse the micro-feature coding sequence, topological relationship feature vector and local curvature feature vector to obtain a biological feature set, calculate the multi-scale similarity between the biological feature set and the updated comparison template; if the multi-scale similarity exceeds the adaptive threshold, generate a face recognition result.
[0014] Further, by analyzing the brightness distribution to determine the threshold and the reference value, the image is subjected to partitioned differential brightness adjustment and reorganization of the color space to generate an illumination balanced image, including:
[0015] The obtained initial image is subjected to color space conversion and separation to generate a brightness information set; the brightness information set is subjected to filtering processing to generate a new brightness information set;
[0016] The new brightness information set of the light distribution is subjected to global statistical analysis, the specific quantile of all pixel values in the set is calculated, the demarcation threshold for distinguishing the extremely dark and extremely bright regions in the image is determined respectively, and the average value of all pixel values in the set is calculated to generate a reference value representing the overall illumination intensity of the image;
[0017] Based on the demarcation threshold and the reference value, each pixel point in the original separated brightness information set is classified and judged to obtain the regional category label of each original brightness pixel point;
[0018] According to the regional category label of each pixel point, each pixel point in the original separated brightness information set is subjected to differential brightness adjustment to generate a new brightness information set after partitioned adjustment;
[0019] The partitioned new brightness information set and the original color information set separated during color space conversion without any processing are recombined, and the combined information is converted back to the original RGB color space to generate an illumination balanced image.
[0020] Further, the step 3 comprises:
[0021] The light-illumination balanced image is processed by pixel-level semantic segmentation to generate a probability map of each pixel belonging to a face region; an adaptive threshold segmentation operation is performed on the probability map to generate a binary mask image; and the binary mask image is processed to finally obtain a face region boundary point set.
[0022] The face region boundary point set is taken as an initial constraint condition to generate a discrete surface representation in the boundary inner region; and a mesh deformation feature set is calculated;
[0023] Based on the mesh deformation feature set, a displacement significant point set with a displacement amount exceeding a preset threshold is extracted; a curve fitting operation is performed on the point set to generate a biological feature contour; and a closed polygon set defining a concave region is generated by calculating the zero-crossing points of the curvature derivative of the contour;
[0024] In the concave region closed polygon, a multi-scale multi-direction gradient calculation is performed, a weighted fusion strategy is adopted to fuse the gradient amplitudes of each direction to obtain a single direction invariant feature value; the single direction invariant feature value is spatially blocked and counted in the concave region to generate a local texture spatial distribution statistical feature; and the statistical features of each block are sequentially connected according to a preset spatial scanning rule to finally generate a micro-feature encoding sequence.
[0025] Further, a nonlinear spatial constraint relationship between mesh nodes in the mesh deformation feature is extracted to generate a topological relationship feature vector, including:
[0026] From the mesh deformation feature set, all mesh nodes with a displacement amount exceeding a preset deformation threshold are extracted and marked as a key deformation node set;
[0027] Each node in the key deformation node set is taken as a center node, and for each center node, a relative spatial vector between the center node and all key deformation node set member nodes within a preset neighborhood radius range centered on the center node is calculated to obtain a neighborhood spatial vector set corresponding to each center node;
[0028] According to each spatial vector pair in the neighborhood spatial vector set, a distance proportion factor and a change amount of the included angle of the spatial vector pair before and after deformation are calculated, and a preset nonlinear function is mapped to obtain a neighborhood relationship coefficient set corresponding to each center node;
[0029] According to the neighborhood relationship coefficient set, the relationship coefficients in the set are sequentially arranged according to the spatial orientation order of the neighborhood nodes relative to the center node to obtain a local topological vector corresponding to each key deformation node; and all local topological vectors are sequentially concatenated to generate a topological relationship feature vector.
[0030] Further, the topological relationship feature vector is fused with the biometric feature contour, curvature manifolds of the facial feature concave regions are calculated, and local curvature feature vectors are generated through differential geometry transformation, including:
[0031] The topological relationship feature vector is fused with the biometric feature contour, and based on the fused feature information, a closed contour line set defining the concave regions is positioned on the biometric feature contour to obtain a target concave region set;
[0032] According to each concave region in the target concave region set, a parametric surface reconstruction operation is performed on the boundary defined by the closed contour line and the biometric feature contour points and grid deformation feature points inside the boundary to generate a continuous surface approximation, and the operation is performed on all target concave regions to obtain a local parametric surface;
[0033] The principal curvatures of the sampling points on the local parametric surface are calculated and integrated into spatial distribution relationships to generate a curvature manifold, and key feature points are positioned on the curvature manifold and differential geometry characteristics are calculated to generate a geometric feature set;
[0034] The geometric feature set is generated into a local curvature feature vector according to a preset spatial order of the concave regions.
[0035] Further, the topological relationship feature vector, the local curvature feature vector, and the micro-feature code sequence are input into an evolvable biometric feature library, and a spatiotemporal weight is updated to compare the template, including:
[0036] The topological relationship feature vector, the local curvature feature vector, and the micro-feature code sequence are input into an evolvable biometric feature library, and a spatiotemporal weight is updated to compare the template, including:
[0037] A time decay factor is calculated according to the storage duration of the historical biometric feature template, a spatial distribution factor is calculated according to the neighborhood density of the historical biometric feature template in the feature space, and the time decay factor and the spatial distribution factor are multiplied to obtain a spatiotemporal weight;
[0038] The historical biometric feature template is weighted and attenuated using the spatiotemporal weight, and the topological relationship feature vector, the local curvature feature vector, and the micro-feature code sequence are fused to generate a current biometric feature template;
[0039] The weighted and attenuated historical biometric feature template and the current biometric feature template are weighted and fused to generate an updated biometric feature template, and the updated biometric feature template is used to replace the original historical biometric feature template to generate an updated comparison template.
[0040] Further, the micro-feature code sequence, the topological relationship feature vector and the local curvature feature vector are fused to obtain a biological feature set, and multi-scale similarity between the biological feature set and the updated comparison template is calculated; if the multi-scale similarity exceeds an adaptive threshold, a face recognition result is generated, including:
[0041] The micro-feature code sequence, the topological relationship feature vector and the local curvature feature vector are subjected to feature concatenation operation in a preset order to generate a fused biological feature set;
[0042] Based on the biological feature set and the updated comparison template, feature segments representing overall facial contours in a macro scale, feature segments representing organ deformation in a meso scale and feature segments representing texture curvature in a micro scale are extracted, and a corresponding scale feature subset pair is generated;
[0043] According to the scale feature subset pair, a scale similarity score is calculated and weighted fusion is performed according to a preset weight to generate a comprehensive multi-scale similarity value; if the comprehensive multi-scale similarity value is not lower than the adaptive threshold, a face recognition result is generated.
[0044] In a second aspect, a system for face image recognition includes:
[0045] A collection module is configured to acquire an initial image containing a face;
[0046] An analysis module is configured to determine a threshold value and a reference value by analyzing a brightness distribution, to perform differential brightness adjustment on the image after partitioning, to reorganize a color space, and to generate an illumination balanced image;
[0047] A processing module is configured to extract a face region from the illumination balanced image using a segmentation algorithm, to construct a dynamic deformation grid based on the face region, to generate grid deformation features, and to generate a biological feature contour based on the grid deformation features; and to generate a micro-feature code sequence in a concave region defined by the biological feature contour using a directional gradient texture fusion algorithm;
[0048] An extraction module is configured to extract a non-linear spatial constraint relationship between grid nodes in the grid deformation features to generate a topological relationship feature vector;
[0049] A fusion module is configured to fuse the topological relationship feature vector and the biological feature contour, to calculate a curvature manifold of the five facial concave regions, and to generate a local curvature feature vector through differential geometry transformation;
[0050] An update module is configured to input the topological relationship feature vector, the local curvature feature vector and the micro-feature code sequence into an evolvable biological feature library, and to fuse and update a comparison template with a space-time weight;
[0051] An output module is configured to fuse the micro-feature code sequence, the topological relationship feature vector and the local curvature feature vector to obtain a biological feature set, calculate a multi-scale similarity between the biological feature set and the updated comparison template, and generate a face recognition result if the multi-scale similarity exceeds an adaptive threshold.
[0052] In a third aspect, a computing device includes:
[0053] one or more processors;
[0054] a memory device storing one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method.
[0055] In a fourth aspect, a computer-readable storage medium stores a program, which, when executed by a processor, implements the method.
[0056] The above scheme of the present application at least has the following beneficial effects:
[0057] By extracting the flexible biological feature profile containing the concave structure, and analyzing the skin texture in the concave area to obtain the micro-feature code sequence, the rich personalized information contained in the concave areas such as the eye socket and the nasolabial groove of the face is fully mined, and the domain shape and structure have strong stability and uniqueness, overcoming the limitations of interference factors or rough processing in some traditional methods.
[0058] In addition, by extracting the spatial topological relationship feature vector of the facial key points and the local curvature feature vector of the concave area of the five organs, the fusion of multi-dimensional features is realized. Compared with some traditional single geometric feature, texture feature or deep learning feature method, the multi-dimensional feature can more comprehensively describe the face features, enhance the resistance to posture and expression changes, improve the uniqueness and distinguishability of the features, and thus improve the face recognition accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 is a method flow diagram for face image recognition provided by an embodiment of the present application.
[0060] Figure 2 is a system diagram for face image recognition provided by an embodiment of the present application. DETAILED DESCRIPTION
[0061] Exemplary embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, the embodiments are provided so that the present disclosure can be more thoroughly understood, and so that the scope of the present disclosure can be completely conveyed to those skilled in the art.
[0062] As shown in Figure 1 An embodiment of the present application proposes a method for face image recognition, the method comprising the following steps:
[0063] Step 1, obtaining an initial image containing a face;
[0064] Step 2, determining a threshold value and a reference value by analyzing the brightness distribution, reorganizing the color space after differentiating the brightness of the image by partition, and generating an illumination balanced image;
[0065] Step 3, extracting the face region of the illumination balanced image using a segmentation algorithm; constructing a dynamic deformation grid based on the face region to generate a grid deformation feature; generating a biological feature contour based on the grid deformation feature; and generating a micro-feature encoding sequence in the concave region defined by the biological feature contour using a directional gradient texture fusion algorithm;
[0066] Step 4, extracting the nonlinear spatial constraint relationship between the grid nodes in the grid deformation feature to generate a topological relationship feature vector;
[0067] Step 5, fusing the topological relationship feature vector and the biological feature contour to calculate the curvature manifold of the facial concave region, and generating a local curvature feature vector through differential geometry transformation;
[0068] Step 6, inputting the topological relationship feature vector, the local curvature feature vector and the micro-feature encoding sequence into an evolvable biological feature library to fuse and update the comparison template with a space-time weight;
[0069] Step 7, fusing the micro-feature encoding sequence, the topological relationship feature vector and the local curvature feature vector to obtain a biological feature set, calculating the multi-scale similarity between the biological feature set and the updated comparison template, and generating a face recognition result if the multi-scale similarity exceeds an adaptive threshold.
[0070] In an embodiment of the present application, by extracting a flexible biological feature contour containing a concave structure and analyzing the skin texture in the concave region to obtain a micro-feature encoding sequence, the rich personalized information contained in the concave regions such as the eye sockets and the nasolabial folds of the face is fully mined, and the domain morphology and structure have strong stability and uniqueness, overcoming the limitations of interference factors or rough processing in some traditional methods.
[0071] In addition, by extracting the spatial topological relation feature vector of the facial key points and the local curvature feature vector of the facial feature concave region, multi-dimensional feature fusion is realized.
[0072] In a preferred embodiment of the present application, the threshold value and the reference value are determined by analyzing the brightness distribution, the image is subjected to differential brightness adjustment and reorganization of the color space after being partitioned, and an illumination balanced image is generated, comprising:
[0073] The obtained initial image is subjected to color space conversion and separation to generate a brightness information set; the brightness information set is subjected to filtering processing to generate a new brightness information set;
[0074] The new brightness information set of the illumination distribution is subjected to global statistical analysis, the specific quantile of all pixel values in the set is calculated, the demarcation threshold value for distinguishing the extremely dark region and the extremely bright region in the image is determined respectively, and the average value of all pixel values in the set is calculated to generate a reference value representing the overall illumination intensity of the image;
[0075] Based on the demarcation threshold value and the reference value, each pixel point in the original separated brightness information set is subjected to classification judgment to obtain the region category label to which each original brightness pixel point belongs;
[0076] According to the region category label of each pixel point, each pixel point in the original separated brightness information set is subjected to differential brightness adjustment to generate a new brightness information set after partition adjustment;
[0077] The new brightness information set after partition adjustment and the original color information set separated during color space conversion and not subjected to any processing are recombined, the combined information is converted back to the original RGB color space to generate an illumination balanced image.
[0078] In the embodiment of the present application, the initial image is in RGB format, wherein the pixel values of the R (red), G (green) and B (blue) channels are all in the range of 0-255 (8-bit image standard), which is converted into a color space containing an independent brightness component (such as YCrCb): the brightness component (such as Y component) is separated, the value range of which is consistent with the RGB channel, i.e. 0-255, constituting a brightness information set (0 represents the darkest and 255 represents the brightest); the color component (such as Cr and Cb components) is retained, the value range of which is also 0-255 (reflecting the chroma characteristics of color), serving as an original color information set (not modified throughout).
[0079] Filtering the set of luminance information (0~255), steps as follows:
[0080] Selecting filter window: commonly 3x3, 5x5 or 7x7 square grid (window size adjusted according to image noise level, less noise use 3x3, more noise use 5x5, avoid exceeding 11x11 to prevent over-blurring details);
[0081] Selecting filter type (such as mean filter or Gaussian filter):
[0082] Mean filter: average the luminance values (0~255) of the pixels in the window (such as 3x3 window contains 9 pixels), the result is still in the range of 0~255; Gaussian filter: the pixels in the window are weighted according to distance (the center pixel has the largest weight, the edge has the smallest weight, and the total weight is 1), calculate the sum of "luminance value x weight" (result 0~255); pixel by pixel replacement: replace the original pixel luminance value with the window calculation result, finally generate a new set of luminance information, still taking values 0~255, but the distribution is smoother.
[0083] Based on the new set of filtered luminance information (0~255), statistics are made:
[0084] Extremely dark area threshold: select 1%~10% quantile (commonly 5%), corresponding luminance value is usually 0~50 (specific to the image, such as dark image may be 0~30, bright image may be 20~50); Extremely bright area threshold: select 90%~99% quantile (commonly 95%), corresponding luminance value is usually 200~255 (dark image may be 180~230, bright image may be 220~255); Reference value (average value): calculate the average value of all pixel luminance, taking values 0~255 (dark image may be 30~80, bright image may be 150~220), representing the overall illumination level.
[0085] Classify each pixel in the original set of luminance information (0~255): if the luminance value is less than the extremely dark area threshold (such as less than 30), mark it as an extremely dark area; if the luminance value is greater than the extremely bright area threshold (such as greater than 220), mark it as an extremely bright area; if the luminance value is between the two thresholds (such as 30~220), mark it as a normal luminance area.
[0086] Adjust the luminance for different areas (ensure that the adjusted luminance is still in the range of 0~255):
[0087] Dark area (brightness < dark threshold value): increase the brightness to approach the reference value (such as from 20 to the reference value ± 20 range, avoid exceeding 255); bright area (brightness > bright threshold value): reduce the brightness to approach the reference value (such as from 240 to the reference value ± 20 range, avoid less than 0); normal brightness area (between thresholds): small fine tuning (adjustment amplitude is usually within ± 20), balance the overall illumination while retaining details; generate a new brightness information set after partition adjustment, the value is still 0-255.
[0088] Recombine the partition-adjusted brightness information (0-255) and the original color information (0-255) into the converted color space, and then convert it back to RGB format; the pixel values of the three channels of the converted RGB are still limited to the range of 0-255 (otherwise they are truncated to 0 or 255), and finally a light balance image is generated.
[0089] Through partition differential adjustment, the problem of local overexposure, overdarkness or detail loss caused by global brightness adjustment is avoided: dark area brightness increase can enhance dark details, bright area brightness reduction can suppress high light overexposure, and normal area fine tuning can maintain natural texture. Retaining the original color information ensures color authenticity, and the final generated image is light balanced, detailed and natural in color, suitable for subsequent image analysis (such as target detection) or visual effect optimization.
[0090] In a preferred embodiment of the present application, step 3 comprises:
[0091] The light balance image is processed by pixel-level semantic segmentation to generate a probability map of each pixel belonging to the face region; an adaptive threshold segmentation operation is performed on the probability map to generate a binary mask image; and the binary mask image is processed to finally obtain a set of face region boundary points.
[0092] The set of face region boundary points is used as an initial constraint condition to generate a discrete surface representation in the boundary internal region; a set of mesh deformation features is calculated;
[0093] Based on the set of mesh deformation features, a set of displacement salient points with displacement exceeding a preset threshold is extracted; a curve fitting operation is performed on the point set to generate a biological feature contour; by calculating the zero-crossing points of the curvature derivative of the contour, a set of closed polygons defining the concave region is generated;
[0094] In the closed polygon of the concave region, a multi-scale multi-direction gradient calculation is performed, and a weighted fusion strategy is adopted to fuse the gradient amplitudes of each direction to obtain a single direction invariant feature value; the single direction invariant feature value is spatially block-statistically processed in the concave region to generate a local texture spatial distribution statistical feature; according to a preset spatial scanning rule, the statistical features of each block are sequentially connected to finally generate a micro-feature encoding sequence.
[0095] In the embodiment of the present application, the light illumination balanced image (pixel value 0~255) is subjected to pixel-level semantic segmentation, and the probability of each pixel belonging to the face region is calculated; the probability value is between 0 and 1, wherein 0 indicates that the pixel is determined as background, 1 indicates that it is determined as face, and about 0.5 indicates the fuzzy uncertain region. The probability values of all pixels jointly form a face region probability map, and the probability value of each pixel is strictly within the interval of 0 to 1.
[0096] An adaptive threshold segmentation operation is performed on the face probability map; first, the image is divided into sub-regions of 8x8 to 32x32 pixels in size (the specific size is adjusted according to the image resolution), and a local threshold is calculated for each sub-region, which is usually between 0.3 and 0.7; the pixels in the sub-region whose probability value is higher than the local threshold are marked as 1 (representing the face region), and the pixels whose probability value is lower than the threshold are marked as 0 (representing the background region), and finally a binary mask image containing only two pixel values of 0 and 1 is generated.
[0097] The binary mask image is processed, first by a 3x3 to 7x7 pixel size kernel for morphological erosion and expansion operations to remove noise points and small holes; then an edge detection algorithm is used to extract the continuous boundary of the face region, and then the boundary is discretely sampled (every 3-10 pixels take one point) to obtain a set of face region boundary points; the coordinates (x, y) of the boundary points must be within the size range of the image, if the image size is HxW, then the value of x is between 0 and W-1, and the value of y is between 0 and H-1.
[0098] The face region is evenly divided into 20x20 to 200x200 grids (the grid size depends on the image resolution), and the coordinates (x, y) of each grid vertex are within the range defined by the face region boundary, i.e. x is between the minimum and maximum x values of the boundary points, y is between the minimum and maximum y values of the boundary points, and both are within the size range of the image (0 to W-1, 0 to H-1); a two-dimensional discrete surface covering the entire face region is constructed by grid interpolation.
[0099] According to the width (maximum x value of the boundary - minimum x value of the boundary) and height (maximum y value of the boundary - minimum y value of the boundary) of the face region, the grid size (such as 20x20 to 200x200) is determined, for example, when the face width is 200 pixels and the height is 200 pixels, a 50x50 grid can be generated, and the adjacent vertices are separated by about 4 pixels in x and about 4 pixels in y.
[0100] The initial vertex coordinates (x, y) are arranged from left to right and from top to bottom. The x value gradually increases from the minimum x value to the maximum x value, and the y value gradually increases from the minimum y value to the maximum y value. All vertices are strictly limited to [minimum x value, maximum x value] × [minimum y value, maximum y value] and do not exceed the image size (0≤x≤W-1, 0≤y≤H-1).
[0101] Select key constraint points from the set of boundary points of the face region (usually 20-50 points with even spacing, covering the entire contour), and assign weights to each constraint point:
[0102] The weight values range from 0.6 to 1.0, with higher weights (0.8 to 1.0) for constraint points near the corners of the face contour (such as the corners of the eyes and mouth), and slightly lower weights (0.6 to 0.8) for constraint points at the edges of straight lines, to ensure that the contour features at the corners are more prominent.
[0103] The coordinates of all constraint points must strictly fall on the boundary of the original face region, that is, x is within [minimum x value of the boundary, maximum x value of the boundary], and y is within [minimum y value of the boundary, maximum y value of the boundary].
[0104] For all internal vertices (non-boundary points) in the initial mesh, adjust their coordinates to fit the shape of the face region as follows:
[0105] Distance calculation: For each internal vertex, find the 4 to 8 nearest constraint points (distance range 1 to 50 pixels, depending on the size of the face). For example, the nearest constraint points around a vertex are (x1, y1), (x2, y2), (x3, y3), and (x4, y4).
[0106] The weights are assigned based on distance, with closer constraint points having a larger weight (the total weight is 1). For example, a constraint point 10 pixels away might have a weight of 0.4, 20 pixels away might have a weight of 0.2, and 30 pixels away might have a weight of 0.1, ensuring that the nearest neighbor has a more significant impact on the internal vertices.
[0107] Coordinate interpolation: Calculate the target coordinates of the internal vertices using a weighted average: x = (x1 × weight 1) + (x2 × weight 2) + ... + (xn × weight n), and the y coordinate is calculated similarly. For example, if the constraint points (50, 80) have a weight of 0.4, (60, 90) have a weight of 0.3, and (70, 85) have a weight of 0.3, then the target x = 50 × 0.4 + 60 × 0.3 + 70 × 0.3 = 59, and the target y = 80 × 0.4 + 90 × 0.3 + 85 × 0.3 = 84.5.
[0108] For vertices located at the edge of the face in the initial mesh (such as the outermost vertices of the mesh), directly correct them according to the boundary point coordinates:
[0109] If the x-coordinate of an edge vertex deviates from the x-value of the nearest boundary point by more than 3 pixels (e.g., boundary point x = 50, vertex x = 54), then its x-value is forcibly corrected to 50; the y-coordinate is treated similarly to ensure that the edge vertex perfectly fits the contour of the face.
[0110] After correction, the deviation between the coordinates of all edge vertices and the coordinates of the corresponding boundary points does not exceed 1 pixel, and is strictly limited to [minimum x value of boundary, maximum x value of boundary] × [minimum y value of boundary, maximum y value of boundary].
[0111] To avoid local bulges or depressions at internal vertices, the interpolated mesh is smoothed:
[0112] Calculate the distance between each internal vertex and its four adjacent vertices (top, bottom, left, and right). The normal distance should be within ±20% of the initial grid spacing (e.g., if the initial spacing is 4 pixels, the distance should be between 3.2 and 4.8 pixels).
[0113] If the distance between a vertex and its adjacent vertices exceeds the range (e.g., 6 pixels), then fine-tune it towards the adjacent vertex (moving 1-2 pixels each time), repeating the adjustment 2-3 times until the distance between all adjacent vertices is within the range; ensure that the vertices of the entire grid are evenly distributed, the distance deviation between adjacent vertices does not exceed 2 pixels, and the surface is smooth without abrupt changes; the final two-dimensional discrete surface can accurately fit the contour of a human face.
[0114] Each grid vertex is compared with a preset reference grid (such as a grid representing the average shape of a human face) to obtain the displacement of each vertex in the x and y directions. The displacement in the x direction is typically between -W / 10 and W / 10, and the displacement in the y direction is between -H / 10 and H / 10 (W and H are the width and height of the image, respectively). The relative displacement between adjacent vertices is calculated, where the normalized change in relative distance is between 0 and 1 (0 indicates no change, 1 indicates maximum change), and the change in angle is between -180° and 180°. These displacements and relative changes together constitute the set of grid deformation features.
[0115] A preset displacement threshold is set. The threshold in the x-direction is usually between W / 50 and W / 20, and the threshold in the y-direction is between H / 50 and H / 20 (determined according to the overall distribution of the mesh deformation characteristics). Mesh vertices whose displacement exceeds this preset threshold are filtered out. These vertices constitute a set of points with significant displacement, and their coordinates are still within the coordinate range of the face region.
[0116] If a polynomial curve is used for fitting, the order is usually 3 to 5; if a Bézier curve is used, the number of control points is 5 to 15 (adjusted according to the contour length). The coordinates of each point on the biometric contour generated by fitting are all within the range defined by the boundary of the face region, that is, x is between the minimum x value and the maximum x value of the boundary, and y is between the minimum y value and the maximum y value of the boundary.
[0117] The curvature value of the biometric contour is calculated, and after normalization, it falls between -2 and 2 (negative values indicate concavity, and positive values indicate convexity). The derivative of curvature is then calculated, and after normalization, it falls between -1 and 1. The inflection points of the contour are determined by finding the zero-crossing points of the derivative of curvature (i.e., the points where the derivative changes from negative to positive or vice versa). The zero-crossing points belonging to the same concave region are connected sequentially to form closed polygons. Each polygon has between 4 and 20 vertices, and the coordinates of all vertices are within the range of the corresponding biometric contour.
[0118] The multi-scale window size uses 3×3, 5×5, and 7×7 pixels; the multi-directional selection includes 4 main directions (or 8 directions) of 0°, 45°, 90°, and 135°, with the angle error controlled within 5°; the calculated gradient magnitude is between 0 and 255 (the maximum difference is 255, such as the pixel change from black to white); when using a weighted fusion strategy, the weight of each direction is between 0 and 1, and the sum of the weights of all directions is 1 (usually the weight of the center direction is between 0.3 and 0.5, and the weight of the edge direction is between 0.1 and 0.2). After fusing the gradient magnitudes of each direction, a single-direction invariant feature value is obtained, with a value range of 0 to 255.
[0119] The sub-block size is 2×2 or 4×4 pixels (determined based on the size of the recessed area, typically each block contains 5 to 20 pixels); statistical features include mean (0 to 255) and variance (0 to (255 / 2)). 2 ), maximum value (0~255), entropy value (0~log2(number of pixels in sub-block), such as the entropy value of a 4×4 sub-block does not exceed 4).
[0120] According to preset spatial scanning rules (such as from left to right, from top to bottom, or according to the order of facial physiological features), the statistical features of each sub-block are sequentially connected to generate a micro-feature encoding sequence; the sequence length is the product of the number of sub-blocks and the number of statistical features (e.g., 10 sub-blocks × 4 features = 40 dimensions), and the value range of each feature is consistent with the range of the corresponding statistical feature, such as the mean being between 0 and 255, and the variance being between 0 and (255 / 2). 2 Between, etc.
[0121] Illumination equalization preprocessing reduces the impact of illumination on feature extraction, while semantic segmentation and masking ensure accurate extraction of facial regions. From mesh deformation to micro-feature encoding, the focus gradually shifts to areas of significant change and concave textures, capturing both overall morphological features and preserving local micro-texture details. Furthermore, multi-scale and multi-directional fusion reduces interference from changes in direction and scale. The micro-feature encoding sequence transforms complex facial features into ordered quantified features, facilitating storage and comparison. This can be effectively used for tasks such as face recognition and expression analysis, improving recognition accuracy.
[0122] In a preferred embodiment of the present invention, nonlinear spatial constraint relationships between mesh nodes are extracted from mesh deformation features to generate a topological relationship feature vector, including:
[0123] From the set of mesh deformation features, extract all mesh nodes whose displacement exceeds a preset deformation threshold and mark them as a set of key deformation nodes. Specifically, this includes: obtaining the displacement of mesh nodes: extracting the displacement data of each mesh node from the set of mesh deformation features. This displacement includes the positional changes in the horizontal (x-axis) and vertical (y-axis) directions. For example, if a mesh node's coordinates before deformation are (100, 150) and its coordinates after deformation are (108, 156), then its horizontal displacement is 8 pixels and its vertical displacement is 6 pixels. The preset deformation threshold is a pre-set critical value for judging whether a node has undergone significant deformation. The horizontal threshold is set to 5 pixels, and the vertical threshold is set to 5 pixels (the threshold can be adjusted according to the resolution of the face image, such as using this threshold for a 200×200 pixel face image). The horizontal and vertical displacements of each mesh node are compared with the preset thresholds for the corresponding directions. For example, if the horizontal displacement of a node is 8 pixels > 5 pixels and the vertical displacement is 6 pixels > 5 pixels, it is determined that the displacement exceeds the threshold. If another node has a horizontal displacement of 3 pixels < 5 pixels and a vertical displacement of 4 pixels < 5 pixels, it is determined that the displacement does not exceed the threshold. All grid nodes with a horizontal displacement > 5 pixels or a vertical displacement > 5 pixels are selected and marked as critical deformation nodes. For example, after comparison, 80 nodes that meet the conditions are selected from 1000 grid nodes, and these nodes together constitute the critical deformation node set.
[0124] Using each node in the key deformation node set as the center node, for each center node, calculate the relative spatial vector between it and all member nodes of the key deformation node set within a preset neighborhood radius centered on itself, to obtain the neighborhood spatial vector set corresponding to each center node. Specifically, this includes: setting the center node: selecting any node from the key deformation node set as the center node, for example, selecting the node with coordinates (120, 180) as the current center node; setting the preset neighborhood radius to 15 pixels (this radius is adjusted according to the size of the face region and is suitable for dividing the neighborhood range of key nodes in a 200×200 pixel face image); in the key deformation node set, calculate the straight-line distance between each node and the center node (120, 180), and filter out nodes with a distance ≤ 15 pixels. For example, if node A (125, 185) is approximately 7.07 pixels away from the center node, node B (130, 190) is approximately 14.14 pixels away, and node C (140, 200) is approximately 28.28 pixels away, then nodes A and B are selected as neighboring nodes, while node C is excluded because the distance exceeds 15 pixels. For each neighboring node, the relative spatial vector is obtained by subtracting the coordinates of the center node from its coordinates. For example, the relative spatial vector between node A (125, 185) and the center node (120, 180) is +5 pixels horizontally and +5 pixels vertically; the relative spatial vector between node B (130, 190) is +10 pixels horizontally and +10 pixels vertically. All the relative spatial vectors corresponding to the center node are summed to form the neighborhood spatial vector set. For example, the neighborhood space vector set of the central node (120, 180) contains vector data such as (+5, +5) and (+10, +10). Repeat the above steps for each node in the key deformation node set to generate their respective neighborhood space vector sets.
[0125] For each pair of spatial vectors in the neighborhood spatial vector set, calculate the distance scaling factor and the change in the angle between the connecting lines before and after deformation. Obtain the neighborhood relation coefficient set corresponding to each central node through a preset nonlinear function mapping. Specifically, this includes: selecting any two different spatial vectors from the neighborhood spatial vector set corresponding to the central node, where each spatial vector contains both horizontal and vertical components; forming a spatial vector pair by treating the selected two spatial vectors as a set of associated vectors; performing the above selection operation on all possible combinations of two different spatial vectors in the neighborhood spatial vector set to ensure coverage of all pairwise vector combinations within the set; determining the spatial coordinates of the two neighboring nodes before deformation for each formed spatial vector pair, and calculating the straight-line distance between the two nodes before deformation based on these coordinates; simultaneously determining the spatial coordinates of the two neighboring nodes after deformation, and calculating the straight-line distance between the two nodes after deformation based on these coordinates; dividing the straight-line distance after deformation by the straight-line distance before deformation, and obtaining the quotient is the distance scaling factor for the spatial vector pair. This factor characterizes the relative change in distance between the two nodes before and after deformation.
[0126] For the aforementioned spatial vector pair, based on the spatial coordinates of its two corresponding neighboring nodes before deformation, the angle formed by the lines connecting these two nodes to the central node is calculated, i.e., the angle of the connecting lines before deformation. Based on the spatial coordinates of these two neighboring nodes after deformation, the angle formed by the lines connecting these two nodes to the central node is calculated, i.e., the angle of the connecting lines after deformation. Subtracting the angle of the connecting lines before deformation, the difference is the change in the angle of the connecting lines of the spatial vector pair. This change is used to characterize the angle of the connecting lines between the two nodes relative to the central node before and after deformation. The degree of change in degree; the distance scaling factor and the change in the angle between the connecting lines obtained above are used as input parameters and input into a preset nonlinear function; the preset nonlinear function is a pre-configured mapping function used to convert the distance scaling factor and the change in the angle between the connecting lines into quantized coefficients, and its mapping rules are preset based on the characteristics of the deformation constraint of the face mesh nodes; the input parameters are processed by the nonlinear function to output a quantized value, which is the neighborhood relationship coefficient, used to characterize the strength of the spatial constraint relationship between the two corresponding neighborhood nodes of the spatial vector.
[0127] For all spatial vector pairs already formed in the neighborhood spatial vector set, repeat the above operations of calculating the distance scaling factor, the change in the angle between the connecting lines, and the neighborhood relation coefficients one by one; collect and summarize the neighborhood relation coefficients obtained from the calculation of all spatial vector pairs to form a set containing all quantified relation coefficients, which is the neighborhood relation coefficient set corresponding to the current center node.
[0128] Let the neighborhood relation coefficient be . The formula for the pre-defined nonlinear function is as follows:
[0129] ;
[0130] in, This represents the comprehensive impact value, and the formula for calculating the comprehensive impact value is:
[0131] ;
[0132] in, This represents the initial threshold for the overall impact value, and its value is 0 (because...). The minimum value after normalization is 0, representing the initial state where both distance and angle changes are minimal; This represents the first segment critical threshold, which is the upper limit of the low range of the comprehensive influence value, representing the critical state where the changes in distance and angle are small (at this time, the constraint relationship is usually strong). This represents the critical threshold of the second segment, which is the upper limit of the medium range of the comprehensive influence value, representing a critical state with moderate changes in distance and angle (at which point the constraint relationship weakens as the change intensifies). The termination threshold for the comprehensive impact value is 1 (since S is normalized to a maximum of 1), representing the extreme state where the distance and angle changes are the greatest. The slope coefficient of the first segment is positive, indicating that when S is in the range [S0, S1] (when the change is small), the neighborhood relation coefficient y increases slowly with the increase of S (reflecting the characteristic that the constraint strength is slightly enhanced under small changes). This represents the intercept coefficient of the first segment. It is a large positive value to ensure that y is at a high level when S=S0 (corresponding to the strongest constraint when the change is minimal). b1 represents the slope coefficient of the second segment, which is negative, indicating that when S is in the range (S1, S2] (when the change is moderate), the neighborhood relation coefficient y decreases linearly as S increases (reflecting that the constraint strength weakens as the change increases under moderate change); b2 represents the intercept coefficient of the second segment, which is moderately positive, ensuring the continuity of the y value at the segment junction (avoiding abrupt changes); k3 represents the slope coefficient of the third segment, which is negative and its absolute value is greater than k2, indicating that when S is in the range (S2, S3] (when the change is large), the neighborhood relation coefficient y decreases more rapidly as S increases (reflecting that the constraint strength weakens rapidly under significant change). This represents the intercept coefficient of the third segment, which is a small value to ensure that y is at a low level when S=S3 (corresponding to the weakest constraint when the change is greatest); w d The weighting coefficient for the distance scaling factor ranges from 0.6 to 0.8 (based on the characteristics of facial deformation, the impact of distance changes on the constraint relationship is more significant). The weighting coefficient represents the change in the angle between the connecting lines, and its value ranges from 0.2 to 0.4 (compared to w).d Complementary, reflecting the auxiliary effect of changes in angle); This represents the normalized value of the distance scaling factor, ranging from [0, 1], which is obtained by linear transformation of the preprocessed distance scaling factor (eliminating the influence of dimensions). The normalized value representing the change in the included angle is in the range of [0, 1] and is obtained by linear transformation of the preprocessed change in the included angle (eliminating the influence of dimensions).
[0133] Based on the set of neighborhood relation coefficients, the coefficients are arranged in order according to the spatial orientation of the neighboring nodes relative to the central node, resulting in a local topological vector corresponding to each key deformation node. All local topological vectors are then concatenated sequentially to generate a topological relation feature vector. This process includes: determining the spatial orientation of the neighboring nodes relative to the central node for the set of neighborhood relation coefficients. This order is a pre-defined arrangement rule based on spatial orientation (e.g., clockwise, left to right, then top to bottom). Following this spatial orientation order, all neighborhood relation coefficients in the set are arranged in order to form a local topological vector corresponding to the key deformation node. Finally, according to the pre-defined order of the key deformation nodes in the key deformation node set (e.g., node number order, spatial distribution order), all local topological vectors corresponding to the key deformation nodes are concatenated sequentially, with the end of one local topological vector connected to the beginning of the next, ultimately forming a continuous vector sequence. This sequence is the topological relation feature vector.
[0134] In this embodiment of the invention, the non-uniform deformation relationship between nodes is accurately characterized by distance scaling factor, angle change and nonlinear mapping, which is more in line with the elastic deformation characteristics of facial soft tissue than linear methods; the complex spatial relationship is transformed into an ordered coefficient sequence, reducing redundant information, facilitating subsequent feature comparison and analysis, and improving the efficiency of tasks such as face recognition and expression classification.
[0135] In a preferred embodiment of the present invention, topological relation feature vectors are fused with biometric contours to calculate the curvature manifold of the facial feature depression region, and local curvature feature vectors are generated through differential geometric transformations, including:
[0136] The topological feature vector is fused with the biometric contour; based on the fused feature information, a set of closed contour lines that define the concave region is located on the biometric contour to obtain the target concave region set.
[0137] For each concave region in the target concave region set, a parametric surface reconstruction operation is performed using the boundary defined by its closed contour line and the biometric contour points and mesh deformation feature points within the boundary region to generate a continuous surface approximation; the operation is performed on all target concave regions to obtain a local parametric surface.
[0138] Calculate the principal curvatures of sampling points on the locally parameterized surface and integrate their spatial distribution relationships to generate a curvature manifold; locate key feature points on the curvature manifold and calculate their differential geometric properties to generate a set of geometric features;
[0139] The geometric feature set is arranged in a pre-defined spatial order of concave regions to generate local curvature feature vectors.
[0140] In this embodiment of the invention, the topological relationship feature vector (an ordered sequence of coefficients reflecting nonlinear spatial constraints between key nodes) is fused with biological feature contours (such as continuous contour lines of the eye socket, nose, and lips):
[0141] Based on the geometric coordinates of biometric contours, the relation coefficients in the topological relation feature vectors are assigned as weights to the corresponding nodes on the contour (e.g., points with significant curvature changes on the contour are matched with high coefficient values in the topological vectors), strengthening the association between key deformation areas and contour morphology. By adjusting the spatial weights of contour points (weight range 0 to 1, with the weight of areas with stronger topological relationships being closer to 1), the fused features retain both the overall shape of the contour and the structural constraint relationships between nodes.
[0142] Based on the fused feature information, the target concave region is located on the biometric contour:
[0143] Based on the enhanced depression markers in the fusion features (such as low coefficient values in the topological vector corresponding to loosely constrained regions, combined with depression segments with negative curvature on the contour), the previously defined set of closed contour lines (such as the closed curve of the eye socket, the ring contour around the nostrils, etc.) is identified and extracted; the area enclosed by each closed contour line is the target depression area, and finally a set of target depression areas containing 3 to 5 core areas is formed (usually corresponding to typical facial depressions such as eye sockets, nasolabial grooves, and sublipal depressions).
[0144] Perform parametric surface reconstruction for each target concave region:
[0145] Using the boundary points of the closed contour line of the region (with coordinates within the corresponding biometric contour) as hard constraints, we ensure that the surface boundary fits the contour perfectly. We collect biometric contour points (such as curve points on the inner edge of the eye socket) and mesh deformation feature points (key deformation nodes) inside the boundary as reference points for surface reconstruction. Through surface fitting (such as connecting each point with a smooth surface according to the spatial distribution of the reference points to ensure continuous curvature change of adjacent points), we generate a continuous surface approximation covering the entire concave region. This surface can reflect the natural curvature of the concave region (such as the arc-shaped concave of the eye socket and the sloping concave of the nasal ala). We repeat the above operation for all target concave regions to obtain the local parameterized surface corresponding to each region (the spatial range of the surface is strictly limited to each concave region).
[0146] Extracting curvature-related features from locally parametric surfaces:
[0147] 50–200 sampling points are uniformly selected on each local surface (density adjusted according to region size; 50 points for small regions such as the sublipal depression, and 200 points for large regions such as the eye socket); the two principal curvatures of each sampling point are calculated (reflecting the degree of curvature of the surface in two perpendicular directions, with curvature values ranging from -5 to 5, negative values indicating depression, and larger absolute values indicating more severe curvature); the principal curvatures of all sampling points and their spatial distribution relationships (such as the curvature difference between adjacent sampling points and the trend of curvature direction changes) are integrated to form a curvature manifold that includes curvature magnitude, direction, and spatial relationships (which can be understood as a holistic description of the surface curvature characteristics); key feature points are located on the curvature manifold (such as the point with the largest absolute value of principal curvature and the point where the curvature direction changes abruptly), and the differential geometric properties of these points are calculated (such as curvature gradient and rate of change of curvature, ranging from 0 to 2, with larger values indicating more severe changes), and the results are summarized to form a geometric feature set.
[0148] Arrange the geometric features of each region in an ordered manner according to a pre-defined spatial order of the concave regions (e.g., from left to right, top to bottom: left eye socket, right eye socket, left nasal groove, right nasal groove, sublabial depression):
[0149] The feature set of each region is sorted according to the spatial location of the sampling points (e.g., from the edge of the region to the center);
[0150] By concatenating the ordered features of all regions end to end, a continuous sequence of feature values is formed, namely the local curvature feature vector (the length of which is the number of regions × the number of features in each region, usually 300 to 1000 dimensions).
[0151] By integrating topological relationships (structural constraints) with biological feature contours (morphological basis), it not only preserves global structural relationships but also accurately captures local morphology, solving the problem of incomplete information from a single feature. Through curvature manifolds and differential geometry properties, it can capture subtle curvature differences in the concave areas of the facial features (such as the depth of the eye sockets and the curvature of the nasolabial folds).
[0152] In a preferred embodiment of the present invention, topological relationship feature vectors, local curvature feature vectors, and micro-feature encoding sequences are input into an evolvable biological feature library, and a spatiotemporal weighted update comparison template is fused, including:
[0153] Input the topological relation feature vector, local curvature feature vector and micro-feature encoding sequence into the evolutionary biological feature library, and retrieve the historical biological feature template that is most similar to the input feature from the library;
[0154] The time decay factor is calculated based on the storage duration of the historical biometric templates; the spatial distribution factor is calculated based on the neighborhood density of the historical biometric templates in the feature space; and the spatiotemporal weight is obtained by multiplying the time decay factor and the spatial distribution factor.
[0155] The historical biometric template is weighted and attenuated using spatiotemporal weights, and the topological relationship feature vector, local curvature feature vector, and micro-feature encoding sequence are fused to generate the current biometric template.
[0156] The weighted and attenuated historical biometric template is weighted and fused with the current biometric template to generate an updated biometric template; the updated biometric template is then used to replace the original historical biometric template to generate an updated comparison template.
[0157] In this embodiment of the invention, three features are input into an evolvable biological feature library:
[0158] Topological relationship feature vector (length 100-500, element value 0-1), local curvature feature vector (length 300-1000, element value -5-5, reflecting curvature magnitude), micro-feature encoding sequence (length 40-200, element value 0-255, reflecting local texture); retrieve the historical biometric template most similar to the input feature from the library: by comparing the overall differences between features (such as the sum of the differences of corresponding elements in the sequence), select the template with the smallest difference (similarity must be ≥70%, if it is less than 50%, it is considered a new template and no further update is performed).
[0159] Storage duration is measured in days, ranging from 1 to 365 days (exceeding 365 days is considered expired, and the time decay factor is directly set to 0.1). The shorter the duration, the larger the time decay factor, i.e.: storage duration of 1 to 30 days, time decay factor is 0.8 to 1.0; storage duration of 31 to 180 days, time decay factor is 0.5 to 0.8; storage duration of 181 to 365 days, time decay factor is 0.1 to 0.5 (e.g., storage duration of 10 days, time decay factor is 0.9; storage duration of 200 days, time decay factor is 0.3).
[0160] Neighborhood density refers to the number of other templates whose features differ from the template by ≤30%. The neighborhood density ranges from 1 to 20 (the higher the neighborhood density, the more similar features the template has around it, and the lower its uniqueness). The lower the neighborhood density, the larger the spatial distribution factor. Specifically, when the neighborhood density is 1 to 5, the spatial distribution factor is 0.8 to 1.0; when the neighborhood density is 6 to 15, the spatial distribution factor is 0.5 to 0.8; when the neighborhood density is 16 to 20, the spatial distribution factor is 0.3 to 0.5 (e.g., when the neighborhood density is 3, the spatial distribution factor is 0.9; when the neighborhood density is 18, the spatial distribution factor is 0.4).
[0161] The spatiotemporal weight is the product of the time decay factor and the spatial distribution factor, and its value ranges from 0.03 to 1.0.
[0162] For example, if the storage duration is 10 days (time decay factor is 0.9) and the neighborhood density is 3 (spatial distribution factor is 0.9), the spatiotemporal weight = 0.9 × 0.9 = 0.81; if the storage duration is 200 days (time decay factor is 0.3) and the neighborhood density is 18 (spatial distribution factor is 0.4), the spatiotemporal weight = 0.3 × 0.4 = 0.12.
[0163] Weighted decay historical template: Each feature element of the historical template is scaled using spatiotemporal weights (0.03~1.0). (For example, if a certain element in the historical template has a value of 0.5 and a weight of 0.81, it will be 0.5×0.81=0.405 after decay.) The range of feature element values after decay remains consistent with the original template (e.g., the topological relationship element is still 0~1). Generate current template: The three input features are fused according to the ratio of topological vector (30%), local curvature vector (40%), and micro-feature sequence (30%) (the ratio can be fine-tuned to ensure a total proportion of 100%). By aligning the feature dimensions (e.g., padding with zeros or truncating to a uniform length), the current biometric template is generated (the range of element values is consistent with the input features).
[0164] Weighted fusion is performed between the historical template after weighted attenuation and the current template:
[0165] The attenuated historical template accounts for 30% to 50%, and the current template accounts for 50% to 70% (e.g., historical template accounts for 40%, current template accounts for 60%). The corresponding elements are added proportionally (e.g., historical element 0.405 × 40% + current element 0.6 × 60% = 0.522) to generate an updated biometric template (the element value range is consistent with the input feature).
[0166] Replace the original historical template in the library with the updated biometric template as the new comparison template: if the original template is being updated for the first time, replace it directly; if it has been updated multiple times, ensure that the new template retains more than 80% of the core features (such as key curvature and topological relationships), and only update the subtle features that change over time (such as texture details).
[0167] By using a time decay factor to weaken the influence of old templates and a spatial distribution factor to highlight unique features, the templates can be dynamically updated with time and feature changes, adapting to natural variations in biological characteristics (such as changes in facial texture due to aging); thus improving the information integrity and comparison accuracy of the templates.
[0168] In a preferred embodiment of the present invention, a biometric feature set is obtained by fusing micro-feature encoding sequences, topological relationship feature vectors, and local curvature feature vectors; the multi-scale similarity between the biometric feature set and the updated comparison template is calculated; if the multi-scale similarity exceeds an adaptive threshold, a face recognition result is generated, including:
[0169] The micro-feature encoding sequence, topological relationship feature vector, and local curvature feature vector are concatenated in a preset order to generate a fused set of biofeatures.
[0170] Based on the biometric set and the updated comparison template, feature segments representing the overall facial contour at the macro scale, feature segments representing organ deformation at the meso scale, and feature segments representing texture curvature at the micro scale are extracted to generate corresponding scale feature subset pairs.
[0171] Based on feature subsets at each scale, the similarity scores at each scale are calculated and fused according to preset weights to generate a comprehensive multi-scale similarity value. If the comprehensive multi-scale similarity value is not lower than the adaptive threshold, a face recognition result is generated.
[0172] In this embodiment of the invention, the three features are concatenated in a preset order (e.g., first the micro-feature encoding sequence, then the topological relation feature vector, and finally the local curvature feature vector):
[0173] Micro-feature encoding sequences (length 40–200, element values 0–255), topological relation feature vectors (length 100–500, element values 0–1), and local curvature feature vectors (length 300–1000, element values -5–5) are sequentially concatenated to form a set of biological features. The total length is the sum of the lengths of the three (440–1700), and the element value range covers 0–255, 0–1, and -5–5 (the order is ensured by dimensional alignment, such as padding with zeros to the longest feature length before concatenation).
[0174] Based on the biometric feature set and the updated comparison template (with the same set structure and length), feature segments at three scales are extracted:
[0175] Macroscale (overall facial contour): Select the first 30% of the feature segments of the corresponding topological relation feature vector in the set (e.g., the first 150 elements of the topological vector) to represent the overall structure of the facial contour and generate macroscale feature subset pairs (each subset length 30-150, element value 0-1); Mesoscale (organ deformation): Select the middle 40% of the feature segments of the local curvature feature vector (e.g., the middle 400 elements of the curvature vector) to represent the morphological changes of organs such as eyes, nose, and mouth and generate mesoscale feature subset pairs (each subset length 120-400, element value -5-5); Microscale (texture curvature): Select the entire micro-feature encoding sequence plus the edge 30% of the feature segments of the local curvature feature vector to represent the subtle curvature of skin texture and concave areas and generate microscale feature subset pairs (each subset length 120-600, element value 0-255).
[0176] Macro-scale similarity: By comparing the degree of matching of overall structural features (such as the orderliness of topological relationships), the score ranges from 0 to 1 (1 is a complete match, 0 is a complete mismatch, and ≥0.7 is usually considered structurally similar); Meso-scale similarity: By comparing the consistency of organ deformation features (such as curvature change trends), the score ranges from 0 to 1 (≥0.6 is considered organ morphological similarity); Micro-scale similarity: By comparing the degree of matching between texture details and subtle curvature, the score ranges from 0 to 1 (≥0.5 is considered texture detail similarity).
[0177] Weighted fusion: Calculate the comprehensive multi-scale similarity value according to the preset weights (macro 30%, meso 40%, micro 30%, total weight 100%), ranging from 0 to 1 (e.g., macro 0.8×30% + meso 0.7×40% + micro 0.6×30% = 0.7).
[0178] The threshold is dynamically adjusted according to the scenario. For access control scenarios, it is typically 0.6 to 0.7, while for high-security scenarios such as payment, it is 0.8 to 0.9 (the threshold is optimized based on the false recognition rate and rejection rate of historical recognition data to ensure that more than 99% of correct matches are not falsely rejected). If the comprehensive multi-scale similarity value is greater than or equal to the adaptive threshold (such as 0.85 in the payment scenario), it is considered a successful match, and a face recognition result containing identity information is generated. If it is lower than the threshold, it is considered a failed match, and a non-recognition prompt is returned.
[0179] Multi-scale feature comparison, from macroscopic outlines to microscopic textures, takes into account both overall structure and local details, avoiding misjudgments caused by the lack of single-scale features (such as relying solely on outlines may confuse similar face shapes, while supplementing texture details can accurately distinguish them), thus improving the balance between convenience and security.
[0180] like Figure 2 As shown, embodiments of the present invention also provide a system for face image recognition, comprising:
[0181] The acquisition module is used to acquire an initial image containing human faces;
[0182] The analysis module is used to determine the threshold and reference value by analyzing the brightness distribution, perform regional differential brightness adjustment on the image, reorganize the color space, and generate an image with balanced illumination.
[0183] The processing module is used to extract the face region from the illumination-equalized image using a segmentation algorithm; construct a dynamic deformation mesh based on the face region, generate mesh deformation features, and generate biometric contours based on the mesh deformation features; and generate micro-feature encoding sequences within the concave regions defined by the biometric contours using an directional gradient texture fusion algorithm.
[0184] The extraction module is used to extract the nonlinear spatial constraint relationships between mesh nodes from the mesh deformation features and generate topological relationship feature vectors.
[0185] The fusion module is used to fuse topological feature vectors with biological feature contours, calculate the curvature manifold of the concave region of the facial features, and generate local curvature feature vectors through differential geometric transformations.
[0186] The update module is used to input the topological relationship feature vector, local curvature feature vector and micro-feature encoding sequence into the evolvable biological feature library, and to update the comparison template by fusing spatiotemporal weights.
[0187] The output module is used to fuse the micro-feature encoding sequence, topological relationship feature vector, and local curvature feature vector to obtain a biometric feature set, calculate the multi-scale similarity between the biometric feature set and the updated comparison template; if the multi-scale similarity exceeds the adaptive threshold, the face recognition result is generated.
[0188] It should be noted that this system is a system corresponding to the above method. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0189] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0190] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0191] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for facial image recognition, characterized in that, The method includes: Step 1: Obtain an initial image containing a human face; Step 2: By analyzing the brightness distribution, the threshold and reference value are determined. The image is then subjected to regional differential brightness adjustment and the color space is reorganized to generate an image with balanced illumination. Step 3: Extract the face region from the illumination-equalized image using a segmentation algorithm; construct a dynamic deformation mesh based on the face region to generate mesh deformation features; generate biometric contours based on the mesh deformation features; and generate micro-feature encoding sequences within the concave regions defined by the biometric contours using an directional gradient texture fusion algorithm. Step 4: Extract the nonlinear spatial constraint relationship between mesh nodes from the mesh deformation features and generate a topological relationship feature vector; Step 5: Fuse the topological feature vector with the biometric contour, calculate the curvature manifold of the facial concave region, and generate local curvature feature vectors through differential geometric transformations, including: The topological feature vector is fused with the biometric contour; based on the fused feature information, a set of closed contour lines that define the concave region is located on the biometric contour to obtain the target concave region set. For each concave region in the target concave region set, a parametric surface reconstruction operation is performed using the boundary defined by its closed contour line and the biometric contour points and mesh deformation feature points within the boundary region to generate a continuous surface approximation; the operation is performed on all target concave regions to obtain a local parametric surface. Calculate the principal curvatures of sampling points on the locally parameterized surface and integrate their spatial distribution relationships to generate a curvature manifold; locate key feature points on the curvature manifold and calculate their differential geometric properties to generate a set of geometric features; The geometric feature set is arranged in a pre-defined spatial order of concave regions to generate local curvature feature vectors. Step 6: Input the topological relationship feature vector, local curvature feature vector and micro-feature encoding sequence into the evolvable biological feature library, and update the comparison template by fusing spatiotemporal weights; Step 7: Fuse the micro-feature encoding sequence, topological relation feature vector, and local curvature feature vector to obtain a biometric feature set, and calculate the multi-scale similarity between the biometric feature set and the updated comparison template; if the multi-scale similarity exceeds the adaptive threshold, generate the face recognition result.
2. The method for facial image recognition according to claim 1, characterized in that, By analyzing the brightness distribution to determine the threshold and baseline values, the image undergoes regionally differentiated brightness adjustment, and the color space is reconstructed to generate an illumination-balanced image, including: The acquired initial image is subjected to color space conversion and separation to generate a set of brightness information; the set of brightness information is then filtered to generate a new set of brightness information. A global statistical analysis is performed on the new set of brightness information of illumination distribution, the specific quantiles of all pixel values in the set are calculated, the boundary thresholds for distinguishing between extremely dark and extremely bright areas in the image are determined, and the average value of all pixel values in the set is calculated to generate a benchmark value representing the overall illumination intensity of the image. Based on the boundary threshold and the baseline value, each pixel in the original separated brightness information set is classified and judged to obtain the region category label to which each original brightness pixel belongs; Based on the region category label of each pixel, the brightness of each pixel in the original separated brightness information set is adjusted differently to generate a new brightness information set after partition adjustment; The new set of brightness information after partition adjustment is recombined with the original set of unprocessed color information separated during color space conversion. The combined information is then converted back to the original RGB color space to generate a balanced illumination image.
3. The method for facial image recognition according to claim 2, characterized in that, Step 3 includes: The illumination-equalized image is processed by pixel-level semantic segmentation to generate a probability map of each pixel belonging to the face region; an adaptive threshold segmentation operation is performed on the probability map to generate a binarized mask image; the binarized mask image is processed to finally obtain the set of boundary points of the face region. Using the set of boundary points of the face region as initial constraints, a discrete surface representation is generated within the boundary region; the set of mesh deformation features is calculated. Based on the set of mesh deformation features, extract the set of significant displacement points whose displacement exceeds a preset threshold; perform curve fitting operation on the set of points to generate bio-feature contours; and generate a set of closed polygons that define the concave region by calculating the zero-crossing points of the contour curvature derivative. Within the concave region and its closed polygon, multi-scale and multi-directional gradient calculations are performed. A weighted fusion strategy is adopted to fuse the gradient magnitudes of each direction to obtain a single-directional invariant feature value. The single-directional invariant feature value is then spatially segmented and statistically analyzed within the concave region to generate statistical features representing the spatial distribution of local texture. The statistical features of each segment are sequentially connected according to a preset spatial scanning rule to finally generate a micro-feature encoding sequence.
4. The method for face image recognition according to claim 3, characterized in that, Extract the nonlinear spatial constraint relationships between mesh nodes from the mesh deformation features to generate a topological relationship feature vector, including: Extract all mesh nodes whose displacement exceeds the preset deformation threshold from the mesh deformation feature set and mark them as the key deformation node set; Taking each node in the set of key deformation nodes as the center node, for each center node, calculate the relative space vector between it and all member nodes of the set of key deformation nodes within a preset neighborhood radius centered on itself, and obtain the neighborhood space vector set corresponding to each center node. For each spatial vector pair in the neighborhood spatial vector set, calculate the distance scaling factor and the change in the angle between the connecting lines before and after the deformation of the spatial vector pair, and obtain the neighborhood relationship coefficient set corresponding to each central node through a preset nonlinear function mapping. Based on the set of neighborhood relationship coefficients, the relationship coefficients in the set are arranged in order according to the spatial orientation of the neighboring nodes relative to the central node, so as to obtain the local topological vector corresponding to each key deformation node; all local topological vectors are concatenated in sequence to generate a topological relationship feature vector.
5. The method for face image recognition according to claim 4, characterized in that, The topological relationship feature vector, local curvature feature vector, and micro-feature encoding sequence are input into an evolutionary biological feature library, and the comparison template is updated by fusing spatiotemporal weights, including: Input the topological relation feature vector, local curvature feature vector and micro-feature encoding sequence into the evolutionary biological feature library, and retrieve the historical biological feature template that is most similar to the input feature from the library; The time decay factor is calculated based on the storage duration of the historical biometric templates; the spatial distribution factor is calculated based on the neighborhood density of the historical biometric templates in the feature space; and the spatiotemporal weight is obtained by multiplying the time decay factor and the spatial distribution factor. The historical biometric template is weighted and attenuated using spatiotemporal weights, and the topological relationship feature vector, local curvature feature vector, and micro-feature encoding sequence are fused to generate the current biometric template. The weighted and attenuated historical biometric template is weighted and fused with the current biometric template to generate an updated biometric template; the updated biometric template is then used to replace the original historical biometric template to generate an updated comparison template.
6. The method for face image recognition according to claim 5, characterized in that, A biometric feature set is obtained by fusing micro-feature encoding sequences, topological relation feature vectors, and local curvature feature vectors. The multi-scale similarity between the biometric feature set and the updated comparison template is calculated. If the multi-scale similarity exceeds an adaptive threshold, a face recognition result is generated, including: The micro-feature encoding sequence, topological relationship feature vector, and local curvature feature vector are concatenated in a preset order to generate a fused set of biofeatures. Based on the biometric set and the updated comparison template, feature segments representing the overall facial contour at the macro scale, feature segments representing organ deformation at the meso scale, and feature segments representing texture curvature at the micro scale are extracted to generate corresponding scale feature subset pairs. Based on feature subsets at each scale, the similarity scores at each scale are calculated and fused according to preset weights to generate a comprehensive multi-scale similarity value. If the comprehensive multi-scale similarity value is not lower than the adaptive threshold, a face recognition result is generated.
7. A system for facial image recognition, the system implementing the method as described in any one of claims 1 to 6, characterized in that, include: The acquisition module is used to acquire an initial image containing human faces; The analysis module is used to determine the threshold and reference value by analyzing the brightness distribution, perform regional differential brightness adjustment on the image, reorganize the color space, and generate an image with balanced illumination. The processing module is used to extract the face region from the illumination-equalized image using a segmentation algorithm; A dynamic deformation mesh is constructed based on the face region, generating mesh deformation features, and then a biometric contour is generated based on these features; Within the concave region defined by the biometric contour, a micro-feature encoding sequence is generated using a gradient directional texture fusion algorithm. The extraction module is used to extract the nonlinear spatial constraint relationships between mesh nodes from the mesh deformation features and generate topological relationship feature vectors. The fusion module is used to fuse topological feature vectors with biological feature contours, calculate the curvature manifold of the concave region of the facial features, and generate local curvature feature vectors through differential geometric transformations. The update module is used to input the topological relationship feature vector, local curvature feature vector and micro-feature encoding sequence into the evolvable biological feature library, and to update the comparison template by fusing spatiotemporal weights. The output module is used to fuse the micro-feature encoding sequence, topological relationship feature vector, and local curvature feature vector to obtain a biometric feature set, calculate the multi-scale similarity between the biometric feature set and the updated comparison template; if the multi-scale similarity exceeds the adaptive threshold, the face recognition result is generated.
8. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Self-adaptive topological graph matching method and system suitable for face comparison of old people
CN111476175A
Face filling method and system of face image, and storage medium
CN116311474A