Method and system for face image recognition
By performing illumination balancing and multi-dimensional feature fusion on facial images, the problem of insufficient accuracy of face recognition in complex lighting environments is solved, and higher recognition stability and accuracy are achieved.
Patent Information
- Application Number
- CN202511174683.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-21
AI Technical Summary
Existing face recognition technology lacks recognition accuracy in complex lighting environments and fails to fully utilize the rich personalized information of the facial concave structure, resulting in insufficient recognition stability and accuracy.
By analyzing the brightness distribution to determine the threshold and reference value, the image is partitioned and the brightness is adjusted differentially, and then the color space is reorganized to generate a lighting-balanced image; the grid deformation features and biometric contours of the face area are extracted, and the directional gradient texture fusion algorithm is used to generate a micro-feature coding sequence; the topological relationship feature vector and the local curvature feature vector are combined to generate multi-scale similarity for face recognition.
It improves the stability and accuracy of face recognition, enhances resistance to changes in posture and expression, and improves the uniqueness and discrimination of features.
Smart Images

Figure CN120726684A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for facial image recognition. Background Art
[0002] As a biometric-based authentication method, facial recognition technology, with its contactless nature, convenience, and efficiency, has found widespread and in-depth application in numerous fields, including security monitoring, financial payments, smart terminal unlocking, and public safety management. With the rapid development of information technology and the increasing demand for identity authentication, facial recognition has become a research hotspot and a core development direction in the field of biometric identification. However, in practical application scenarios, facial recognition technology still faces numerous challenges. Interference from complex environmental factors and the inherent limitations of existing technologies make it difficult to meet the growing demand for high security and reliability. Therefore, in-depth research and resolution of these issues are of great theoretical and practical value in promoting the further development and application of facial recognition technology.
[0003] Existing feature extraction technologies underutilize facial concave structures. Concave areas such as the eye sockets, nasolabial grooves, and the area below the cheekbones contain rich, personalized information, and their morphology and structure are both stable and unique. However, some traditional methods often treat concave areas as interference factors or only perform rough processing on them, failing to fully exploit their effective features and limiting further improvements in facial recognition accuracy. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and system for facial image recognition, which improves the stability and accuracy of facial recognition in complex lighting environments.
[0005] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0006] In a first aspect, a method for facial image recognition is provided, the method comprising:
[0007] Step 1: Obtain an initial image containing a face;
[0008] Step 2: Determine the threshold and reference value by analyzing the brightness distribution, perform differential brightness adjustment on the image, and reconstruct the color space to generate a lighting balanced image;
[0009] Step 3: Use a segmentation algorithm to extract the facial region from the illumination-balanced image; construct a dynamically deformable mesh based on the facial region to generate mesh deformation features; and generate a biometric contour based on the mesh deformation features. Within the concave region defined by the biometric contour, use a directional gradient texture fusion algorithm to generate a micro-feature coding sequence.
[0010] Step 4: extract the nonlinear spatial constraint relationship between mesh nodes from the mesh deformation features and generate a topological relationship feature vector;
[0011] Step 5: Fuse the topological relationship feature vector with the biometric feature contour, calculate the curvature manifold of the facial features 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, and integrate the spatiotemporal weight to update the alignment template;
[0013] Step 7: The micro-feature coding sequence, topological relationship feature vector and local curvature feature vector are integrated to obtain a biometric feature set, and the multi-scale similarity between the biometric feature set and the updated comparison template is calculated; if the multi-scale similarity exceeds the adaptive threshold, a face recognition result is generated.
[0014] Furthermore, by analyzing the brightness distribution to determine the threshold and reference value, the image is partitioned and differentially adjusted for brightness, and the color space is reorganized to generate a lighting balanced image, including:
[0015] The acquired initial image is subjected to color space conversion and separation to generate a brightness information set; the brightness information set is subjected to filtering to generate a new brightness information set;
[0016] Perform a global statistical analysis on the new set of brightness information of the light distribution, calculate the specific quantiles of all pixel values in the set, determine the demarcation thresholds used to distinguish between extremely dark and extremely bright areas in the image, and calculate the average of all pixel values in the set to generate a baseline value representing the overall light intensity of the image;
[0017] Based on the demarcation threshold and the reference 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;
[0018] According to the regional category label of each pixel, each pixel in the original separated brightness information set is subjected to differential brightness adjustment to generate a new brightness information set after partition adjustment;
[0019] The new brightness information set after partition adjustment is recombined with the original color information set separated and not processed during color space conversion, and the combined information is converted back to the original RGB color space to generate a lighting balanced image.
[0020] Furthermore, the step 3 includes:
[0021] The illumination-balanced image is processed through pixel-level semantic segmentation to generate a probability map of each pixel belonging to the face area; an adaptive threshold segmentation operation is performed on the probability map to generate a binary mask image; the binary mask image is processed to finally obtain a set of face area boundary points.
[0022] The face region boundary point set is used as the initial constraint condition, and a discrete surface representation is generated in the region inside the boundary; a mesh deformation feature set is calculated;
[0023] Based on the grid deformation feature set, a set of significantly displaced points with displacement exceeding a preset threshold is extracted; a curve fitting operation is performed on the point set to generate a biometric profile; and a set of closed polygons defining the concave area is generated by calculating the zero-crossing points of the profile curvature derivative.
[0024] In the closed polygon of the concave area, multi-scale and multi-directional gradient calculation is performed, and a weighted fusion strategy is adopted to fuse the gradient amplitudes in each direction to obtain a single directional invariant eigenvalue. The single directional invariant eigenvalue is spatially divided and counted in the concave area to generate statistical features representing the spatial distribution of local textures. The statistical features of each block are sequentially connected according to the preset spatial scanning rules to finally generate a micro-feature coding sequence.
[0025] Furthermore, the nonlinear spatial constraint relationship between mesh nodes is extracted from the mesh deformation features to generate a topological relationship feature vector, including:
[0026] From the mesh deformation feature set, all mesh nodes whose displacement exceeds the preset deformation threshold are extracted and marked as the key deformation node set;
[0027] Taking each node in the key deformation node set as the central node, for each central node, calculate the relative space vector between it and all the key deformation node set member nodes within the preset neighborhood radius with itself as the center, and obtain the neighborhood space vector set corresponding to each central node;
[0028] According to each space vector pair in the neighborhood space vector set, the distance scale factor and the change in the connecting angle before and after the deformation of the space vector pair are calculated, and the neighborhood relationship coefficient set corresponding to each central node is obtained through a preset nonlinear function mapping;
[0029] According to the neighborhood relationship coefficient set, the relationship coefficients in the set are arranged in order according to the spatial orientation order of their neighborhood nodes relative to the central node 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.
[0030] Furthermore, the topological relationship feature vector is fused with the biometric feature contour to calculate the curvature manifold of the concave area of the facial features, and the local curvature feature vector is generated through differential geometry transformation, including:
[0031] The topological relationship feature vector is fused with the biometric contour; based on the fused feature information, a set of closed contour lines defining the concave area is located on the biometric contour to obtain a set of target concave areas;
[0032] For each concave area in the target concave area 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 of the area inside the boundary to generate a continuous surface approximation; the operation is performed on all target concave areas to obtain a local parametric surface;
[0033] Calculate the principal curvature of the sampling points on the local parameterized surface and integrate the spatial distribution relationship to generate a curvature manifold; locate key feature points on the curvature manifold and calculate the differential geometric properties to generate a geometric feature set;
[0034] The geometric feature set is arranged in a preset spatial order of the concave area to generate a local curvature feature vector.
[0035] Furthermore, the topological relationship feature vector, local curvature feature vector and micro-feature coding sequence are input into the evolvable biological feature library, and the spatiotemporal weight is integrated to update the comparison template, including:
[0036] Input the topological relationship feature vector, local curvature feature vector and micro-feature coding sequence into the evolvable biometric feature library, and search the library for the historical biometric feature template that is most similar to the input feature;
[0037] Calculate a time decay factor based on the storage duration of the historical biometric template; calculate a spatial distribution factor based on the neighborhood density of the historical biometric template in the feature space; multiply the time decay factor and the spatial distribution factor to obtain a spatiotemporal weight;
[0038] Use spatiotemporal weights to perform weighted attenuation on historical biometric templates, and fuse topological relationship feature vectors, local curvature feature vectors, and micro-feature coding sequences to generate the current biometric template;
[0039] The weighted attenuated historical biometric template is weightedly fused with the current biometric template to generate an updated biometric template; the updated biometric template is used to replace the original historical biometric template to generate an updated comparison template.
[0040] Furthermore, the micro-feature coding sequence, topological relationship feature vector, and local curvature feature vector are fused to obtain a biometric feature set, and the multi-scale similarity between the biometric feature set and the updated comparison template is calculated; if the multi-scale similarity exceeds the adaptive threshold, a face recognition result is generated, including:
[0041] Perform a feature concatenation operation on the micro-feature coding sequence, the topological relationship feature vector, and the local curvature feature vector in a preset order to generate a fused biometric feature set;
[0042] Based on the biometric feature 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 from the two, generating corresponding scale feature subset pairs;
[0043] Based on the feature subset pairs at each scale, the similarity scores at each scale are calculated and weighted fused according to the preset weights to generate a comprehensive multi-scale similarity value; if the comprehensive multi-scale similarity value is not lower than the adaptive threshold, the face recognition result is generated.
[0044] In a second aspect, a system for facial image recognition includes:
[0045] An acquisition module, used to obtain an initial image containing a human face;
[0046] An analysis module is used to determine the threshold and reference value by analyzing the brightness distribution, perform differential brightness adjustment on the image, and then reconstruct the color space to generate a lighting-balanced image;
[0047] A processing module is configured to extract the facial region from the illumination-balanced image using a segmentation algorithm; construct a dynamically deformable mesh based on the facial region, generate mesh deformation features, and generate a biometric profile based on the mesh deformation features; and generate a micro-feature coding sequence using a directional gradient texture fusion algorithm within the concave region defined by the biometric profile.
[0048] An extraction module is used to extract the nonlinear spatial constraint relationship between mesh nodes from the mesh deformation features and generate a topological relationship feature vector;
[0049] The fusion module is used to fuse the topological relationship feature vector with the biometric feature contour, calculate the curvature manifold of the facial concave area, and generate the local curvature feature vector through differential geometry transformation;
[0050] An updating module is used to input the topological relationship feature vector, the local curvature feature vector and the micro-feature coding sequence into the evolvable biological feature library, and to integrate the spatiotemporal weight to update the comparison template;
[0051] The output module is used to fuse the micro-feature coding sequence, topological relationship 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, a face recognition result is generated.
[0052] According to a third aspect, a computing device includes:
[0053] one or more processors;
[0054] The storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method.
[0055] In a fourth aspect, a computer-readable storage medium stores a program, which implements the method when executed by a processor.
[0056] The above solution of the present invention includes at least the following beneficial effects:
[0057] By extracting flexible biometric contours containing concave structures and analyzing the skin texture in the concave areas to obtain micro-feature coding sequences, the rich personalized information contained in concave areas such as the eye sockets and nasolabial grooves of the face is fully exploited. The domain morphology and structure are highly stable and unique, overcoming the interference factors or rough processing limitations of some traditional methods.
[0058] Furthermore, by extracting the spatial topological relationship feature vectors of facial key points and the local curvature feature vectors of concave areas of the facial features, a fusion of multi-dimensional features is achieved. Compared to traditional single geometric features, texture features, or deep learning feature methods, multi-dimensional features can more comprehensively describe facial features, enhance resistance to changes in posture and expression, and improve the uniqueness and discrimination of features, thereby improving facial recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 The present invention provides a flow chart of a method for facial image recognition.
[0060] Figure 2 1 is a schematic diagram of a system for facial image recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0061] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, the embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0062] like Figure 1 As shown, an embodiment of the present invention provides a method for facial image recognition, the method comprising the following steps:
[0063] Step 1: Obtain an initial image containing a face;
[0064] Step 2: Determine the threshold and reference value by analyzing the brightness distribution, perform differential brightness adjustment on the image, and reconstruct the color space to generate a lighting balanced image;
[0065] Step 3: Use a segmentation algorithm to extract the facial region from the illumination-balanced image; construct a dynamically deformable mesh based on the facial region to generate mesh deformation features; and generate a biometric contour based on the mesh deformation features. Within the concave region defined by the biometric contour, use a directional gradient texture fusion algorithm to generate a micro-feature coding sequence.
[0066] Step 4: extract the nonlinear spatial constraint relationship between mesh nodes from the mesh deformation features and generate a topological relationship feature vector;
[0067] Step 5: Fuse the topological relationship feature vector with the biometric feature contour, calculate the curvature manifold of the facial features concave area, and generate the local curvature feature vector through differential geometry transformation;
[0068] Step 6: Input the topological relationship feature vector, local curvature feature vector, and micro-feature coding sequence into the evolvable biological feature library, and integrate the spatiotemporal weight to update the alignment template;
[0069] Step 7: The micro-feature coding sequence, topological relationship feature vector and local curvature feature vector are integrated to obtain a biometric feature set, and the multi-scale similarity between the biometric feature set and the updated comparison template is calculated; if the multi-scale similarity exceeds the adaptive threshold, a face recognition result is generated.
[0070] In an embodiment of the present invention, by extracting a flexible biometric contour containing a concave structure and analyzing the skin texture in the concave area to obtain a micro-feature coding sequence, the rich personalized information contained in concave areas such as the eye sockets and nasolabial grooves of the human face is fully excavated. The domain morphology and structure have strong stability and uniqueness, overcoming the interference factors or rough processing limitations of some traditional methods.
[0071] Furthermore, by extracting the spatial topological relationship feature vectors of facial key points and the local curvature feature vectors of concave areas of the facial features, a fusion of multi-dimensional features is achieved. Compared to traditional single geometric features, texture features, or deep learning feature methods, multi-dimensional features can more comprehensively describe facial features, enhance resistance to changes in posture and expression, and improve the uniqueness and discrimination of features, thereby improving facial recognition accuracy.
[0072] In a preferred embodiment of the present invention, a threshold value and a reference value are determined by analyzing brightness distribution, and the image is subjected to differential brightness adjustment by partitioning and then the color space is reconstructed to generate a lighting balanced image, including:
[0073] The acquired initial image is subjected to color space conversion and separation to generate a brightness information set; the brightness information set is subjected to filtering to generate a new brightness information set;
[0074] Perform a global statistical analysis on the new set of brightness information of the light distribution, calculate the specific quantiles of all pixel values in the set, determine the demarcation thresholds used to distinguish between extremely dark and extremely bright areas in the image, and calculate the average of all pixel values in the set to generate a baseline value representing the overall light intensity of the image;
[0075] Based on the demarcation threshold and the reference 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;
[0076] According to the regional category label of each pixel, each pixel 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 is recombined with the original color information set separated and not processed during color space conversion, and the combined information is converted back to the original RGB color space to generate a lighting balanced image.
[0078] In an embodiment of the present invention, the initial image is in RGB format, where the pixel values of the three channels R (red), G (green), and B (blue) are all in the range of 0 to 255 (8-bit image standard), and is converted into a color space with an independent brightness component (such as YCrCb): the brightness component (such as the Y component) is separated, and its value range is consistent with the RGB channel, that is, 0 to 255, forming a brightness information set (0 represents the darkest and 255 represents the brightest); the color components (such as the Cr and Cb components) are retained, and their value range is also 0 to 255 (reflecting the chromaticity characteristics of the color) as the original color information set (no modification is made throughout the process).
[0079] Filter the brightness information set (values range from 0 to 255) as follows:
[0080] Select the filter window: a 3×3, 5×5, or 7×7 square grid is commonly used (the window size is adjusted based on the noise level of the image; use 3×3 for less noise and 5×5 for more noise; avoid exceeding 11×11 to prevent excessive blurring of details);
[0081] Select the filter type (such as mean filter or Gaussian filter):
[0082] Mean filtering: Take the average brightness value (0-255) of the pixels in the window (such as a 3×3 window containing 9 pixels), and the result is still in the range of 0-255; Gaussian filtering: Pixels in the window are weighted according to distance (the center pixel has the largest weight, the edge pixel has the smallest weight, and the total weight is 1), and the sum of "brightness value × weight" is calculated (the result is 0-255); pixel-by-pixel replacement: Replace the original pixel brightness value with the window calculation result, and finally generate a new brightness information set, which still has a value of 0-255, but with a smoother distribution.
[0083] Statistics are performed based on the new brightness information set (0 to 255) after filtering:
[0084] Extremely dark area demarcation threshold: Select the 1% to 10% quantile (5% is commonly used), and the corresponding brightness value is usually between 0 and 50 (the specific value varies depending on the image, for example, dark images may be 0 to 30, and bright images may be 20 to 50); Extremely bright area demarcation threshold: Select the 90% to 99% quantile (95% is commonly used), and the corresponding brightness value is usually between 200 and 255 (dark images may be 180 to 230, and bright images may be 220 to 255); Baseline value (average value): Calculate the average brightness of all pixels, with a value range of 0 to 255 (dark images may be 30 to 80, and bright images may be 150 to 220), which represents the overall light level.
[0085] Each pixel in the original brightness information set (0-255) is classified as follows: if the brightness value is less than the extremely dark area demarcation threshold (e.g., less than 30), it is marked as an extremely dark area; if the brightness value is greater than the extremely bright area demarcation threshold (e.g., greater than 220), it is marked as an extremely bright area; if the brightness value is between the two thresholds (e.g., 30-220), it is marked as a normal brightness area.
[0086] Adjust the brightness for different areas (make sure the brightness remains within the range of 0 to 255 after adjustment):
[0087] In extremely dark areas (brightness < extremely dark threshold), the brightness is increased to approach the reference value (e.g., from 20 to within ±20 of the reference value, avoiding exceeding 255). In extremely bright areas (brightness > extremely bright threshold), the brightness is decreased to approach the reference value (e.g., from 240 to within ±20 of the reference value, avoiding falling below 0). In areas of normal brightness (between thresholds), small adjustments are made (usually within ±20) to balance the overall lighting while preserving details. After the adjustments, a new set of brightness information is generated after the partition adjustment, with values still ranging from 0 to 255.
[0088] The partition-adjusted brightness information (0-255) and the original color information (0-255) are recombined into the converted color space and then converted back to RGB format; after conversion, the pixel values of the three RGB channels are still limited to the range of 0-255 (if exceeded, they are truncated to 0 or 255), and finally a lighting-balanced image is generated.
[0089] Differentiated adjustments to each region avoid localized overexposure, darkening, or loss of detail caused by global brightness adjustments: Boosting the brightness of extremely dark areas enhances shadow detail, reducing the brightness of extremely bright areas suppresses highlight overexposure, and fine-tuning normal areas maintains a natural texture. Preserving original color information ensures color fidelity, resulting in images with balanced lighting, rich detail, and natural colors, making them suitable for subsequent image analysis (such as object detection) or visual optimization.
[0090] In a preferred embodiment of the present invention, step 3 includes:
[0091] The illumination-balanced image is processed through pixel-level semantic segmentation to generate a probability map of each pixel belonging to the face area; an adaptive threshold segmentation operation is performed on the probability map to generate a binary mask image; the binary mask image is processed to finally obtain a set of face area boundary points.
[0092] The face region boundary point set is used as the initial constraint condition, and a discrete surface representation is generated in the region inside the boundary; a mesh deformation feature set is calculated;
[0093] Based on the grid deformation feature set, a set of significantly displaced points with displacement exceeding a preset threshold is extracted; a curve fitting operation is performed on the point set to generate a biometric profile; and a set of closed polygons defining the concave area is generated by calculating the zero-crossing points of the profile curvature derivative.
[0094] In the closed polygon of the concave area, multi-scale and multi-directional gradient calculation is performed, and a weighted fusion strategy is adopted to fuse the gradient amplitudes in each direction to obtain a single directional invariant eigenvalue. The single directional invariant eigenvalue is spatially divided and counted in the concave area to generate statistical features representing the spatial distribution of local textures. The statistical features of each block are sequentially connected according to the preset spatial scanning rules to finally generate a micro-feature coding sequence.
[0095] In this embodiment of the present invention, pixel-level semantic segmentation is performed on the illumination-balanced image (pixel values 0-255), and the probability of each pixel belonging to a face region is calculated. The probability value ranges from 0 to 1, where 0 indicates that the pixel is definitely background, 1 indicates that it is definitely a face, and around 0.5 indicates a fuzzy and uncertain region. The probability values of all pixels together form a face region probability map, and the probability value of each pixel strictly lies between 0 and 1.
[0096] An adaptive threshold segmentation operation is performed on the face probability map. The image is first divided into sub-regions ranging from 8×8 to 32×32 pixels (the specific size is adjusted according to the image resolution). A local threshold is calculated for each sub-region, which is usually between 0.3 and 0.7. Pixels in the sub-region with probability values higher than this local threshold are marked as 1 (representing the face area), and pixels below the threshold are marked as 0 (representing the background area). Finally, a binary mask image containing only pixel values 0 and 1 is generated.
[0097] The binary mask image is processed by first performing morphological corrosion and dilation operations on a kernel size of 3×3 to 7×7 pixels to remove noise points and small holes. An edge detection algorithm is then used to extract the continuous boundary of the face area. Subsequently, the boundary is discretely sampled (one point is taken every 3 to 10 pixels) to obtain a set of boundary points in the face area. The coordinates (x, y) of the boundary points must be within the image size range. If the image size is H×W, the value of x is between 0 and W-1, and the value of y is between 0 and H-1.
[0098] The facial area is evenly divided into 20×20 to 200×200 grids (the grid size depends on the image resolution). The coordinates (x, y) of each grid vertex are within the range defined by the boundary of the facial area, that is, x is between the minimum x value and the maximum x value of the boundary point, and y is between the minimum y value and the maximum y value of the boundary point, and neither exceeds the image size range (0 to W-1, 0 to H-1). A two-dimensional discrete surface covering the entire facial area is constructed through grid interpolation.
[0099] Determine the grid size (e.g., 20×20 to 200×200) based on the width (maximum x-value - minimum x-value) and height (maximum y-value - minimum y-value) of the face area. For example, if the face is 200 pixels wide and 200 pixels high, a 50×50 grid can be generated, with adjacent vertices separated by approximately 4 pixels in x and 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 increases gradually from the minimum x value of the boundary to the maximum x value, and the y value increases gradually from the minimum y value of the boundary to the maximum y value. All vertices are strictly limited to [minimum x value of the boundary, maximum x value of the boundary] × [minimum y value of the boundary, maximum y value of the boundary] and do not exceed the image size (0≤x≤W-1, 0≤y≤H-1).
[0101] Filter key constraint points from the face region boundary point set (usually select 20 to 50 points evenly spaced to cover the entire contour) and assign a weight to each constraint point:
[0102] The weight value range is 0.6 to 1.0, among which the constraint points close to the corners of the face contour (such as the corners of the eyes and the corners of the mouth) have higher weights (0.8 to 1.0), and the constraint points at the straight edges have slightly lower weights (0.6 to 0.8), ensuring 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 area, that is, x is within [boundary minimum x value, boundary maximum x value], and y is within [boundary minimum y value, boundary maximum y value].
[0104] For all internal vertices (non-boundary points) in the initial mesh, adjust the coordinates to fit the face region in the following way:
[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] Weights are assigned based on distance, with closer constraint points receiving greater weights (the sum of weights is 1). For example, a constraint point at a distance of 10 pixels may have a weight of 0.4, one at a distance of 20 pixels may have a weight of 0.2, and one at a distance of 30 pixels may have a weight of 0.1, ensuring that neighboring points have a more significant influence on internal vertices.
[0107] Coordinate interpolation: Use weighted averaging to calculate the target coordinates of the internal vertices: x = (x1 × weight1) + (x2 × weight2) + ... + (xn × weightn). The same applies to the y coordinate. For example, if the constraint points (50, 80) have a weight of 0.4, (60, 90) has a weight of 0.3, and (70, 85) has a weight of 0.3, then target x = 50 × 0.4 + 60 × 0.3 + 70 × 0.3 = 59, and target y = 80 × 0.4 + 90 × 0.3 + 85 × 0.3 = 84.5.
[0108] For the vertices on the edge of the face in the initial mesh (such as the outermost vertices of the mesh), they are directly corrected according to the coordinates of the boundary points:
[0109] If the x-coordinate of an edge vertex deviates from the x-value of the nearest boundary point by more than 3 pixels (for example, boundary point x=50, vertex x=54), its x-value is forcibly corrected to 50; the same applies to the y-coordinate to ensure that the edge vertex completely fits the face contour.
[0110] After correction, the deviation between the coordinates of all edge vertices and the corresponding boundary point coordinates does not exceed 1 pixel, and is strictly limited to [boundary minimum x value, boundary maximum x value] × [boundary minimum y value, boundary maximum y value].
[0111] To avoid local convexity or concavity at internal vertices, smooth correction is performed on the interpolated mesh:
[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 (for example, if the initial spacing is 4 pixels, the distance needs to be between 3.2 and 4.8 pixels).
[0113] If the distance between a vertex and its adjacent vertex exceeds the range (for example, reaching 6 pixels), fine-tune the distance in the direction of the adjacent vertex (1 to 2 pixels each time) and repeat the adjustment 2 to 3 times until the distances between all adjacent vertices are within the range; ensure that the vertices of the entire mesh are evenly distributed, the deviation in the distance between adjacent vertices does not exceed 2 pixels, and the overall surface is smooth without mutations; the final two-dimensional discrete surface can accurately fit the contours of the face.
[0114] Each mesh vertex is compared to a preset reference mesh (such as a mesh of a standard average face shape) to determine its x- and y-direction displacement. The x-direction displacement typically ranges from -W / 10 to W / 10, and the y-direction displacement ranges from -H / 10 to H / 10 (W and H are the width and height of the image, respectively). The relative displacement between adjacent vertices is calculated, with the relative distance change normalized to between 0 and 1 (0 represents no change, 1 represents maximum change). The angular change ranges from -180° to 180°. These displacements and relative changes together constitute a set of mesh deformation features.
[0115] A displacement threshold is preset, which is usually between W / 50 and W / 20 in the x-direction and between H / 50 and H / 20 in the y-direction (determined based on the overall distribution of mesh deformation features). Mesh vertices whose displacement exceeds this preset threshold are filtered out. These vertices constitute the set of significant displacement points, whose coordinates are still within the coordinate range of the face area.
[0116] If polynomial curve fitting is used, the order is usually 3 to 5; if Bezier 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 facial area, 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 normalized to between -2 and 2 (negative values indicate concavity, positive values indicate convexity). The curvature derivative is then calculated and normalized to between -1 and 1. The turning points of the contour's concavity and convexity are determined by finding the zero-crossing points of the curvature derivative (i.e., the points where the derivative changes from negative to positive or from positive to negative). Zero-crossing points belonging to the same concave area are sequentially connected to form closed polygons. Each polygon has between 4 and 20 vertices, and the vertex coordinates are all within the range of the corresponding biometric contour.
[0118] The multi-scale window sizes are 3×3, 5×5, and 7×7 pixels. Four main directions (or eight directions) of 0°, 45°, 90°, and 135° are selected for multi-direction analysis, and the angular error is controlled within 5°. The calculated gradient amplitude is between 0 and 255 (the maximum difference is 255, such as the change from black to white pixels). 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 0.3-0.5, and the weight of the edge direction is 0.1-0.2). After fusing the gradient amplitudes of each direction, a single directional invariant eigenvalue is obtained, whose value range is 0-255.
[0119] The sub-block size is 2×2, 4×4 pixels (determined by the size of the concave area, usually each block contains 5 to 20 pixels); the statistical features include mean (0 to 255), variance (0 to (255 / 2) 2 ), maximum value (0 to 255), entropy value (0 to log2 (number of sub-block pixels), such as the entropy value of a 4×4 sub-block does not exceed 4).
[0120] According to the 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 coding sequence; the sequence length is the product of the number of sub-blocks and the number of statistical features (such as 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 is between 0 and 255, and the variance is between 0 and (255 / 2). 2 In between, etc.
[0121] Through illumination balancing preprocessing, the impact of illumination on feature extraction is reduced, and semantic segmentation and mask processing ensure the accurate extraction of facial areas; from grid deformation to micro-feature coding, it gradually focuses on areas with significant changes and concave textures, capturing both overall morphological features and retaining local micro-texture details, and multi-scale and multi-directional fusion reduces the interference of direction and scale changes; the micro-feature coding sequence converts complex facial features into ordered quantitative features, which is convenient for storage and comparison, and can be effectively used in tasks such as face recognition and expression analysis to improve recognition accuracy.
[0122] In a preferred embodiment of the present invention, the nonlinear spatial constraint relationship between mesh nodes is extracted from the mesh deformation feature to generate a topological relationship feature vector, including:
[0123] From the mesh deformation feature set, all mesh nodes whose displacement exceeds a preset deformation threshold are extracted and marked as the key deformable node set. This process involves: Obtaining mesh node displacement: Extracting displacement data for each mesh node from the mesh deformation feature set. This displacement includes position 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 after deformation are (108, 156), its horizontal displacement is 8 pixels and its vertical displacement is 6 pixels. The preset deformation threshold is a pre-set critical value for determining whether a node has been significantly deformed. The horizontal threshold is set to 5 pixels, and the vertical threshold is set to 5 pixels (the threshold can be adjusted based on the resolution of the facial image, such as a 200×200 pixel facial 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 the node is 8 pixels greater than 5 pixels and the vertical displacement is 6 pixels greater than 5 pixels, the displacement is determined to have exceeded the threshold. If the horizontal displacement of another node is 3 pixels less than 5 pixels and the vertical displacement is 4 pixels less than 5 pixels, the displacement is determined to have not exceeded the threshold. All grid nodes with a horizontal displacement greater than 5 pixels or a vertical displacement greater than 5 pixels are screened out and marked as key deformation nodes. For example, after comparison, 80 nodes that meet the conditions are screened out from 1000 grid nodes, and these nodes together constitute the key deformation node set.
[0124] Each node in the key deformation node set is taken as the central node. For each central node, the relative space vector between it and all the member nodes of the key deformation node set within a preset neighborhood radius with itself as the center is calculated to obtain a neighborhood space vector set corresponding to each central node. Specifically, the method includes: setting the central node: selecting any node from the key deformation node set as the central node, for example, selecting the node with coordinates (120, 180) as the current central node; the preset neighborhood radius is set to 15 pixels (this radius is adjusted according to the size of the face area and is suitable for the neighborhood range division of the key nodes in a 200×200 pixel face image); in the key deformation node set, the straight-line distance between each node and the central node (120, 180) is calculated, and nodes with a distance ≤ 15 pixels are screened out. For example, the straight-line distance between node A (125, 185) and the center node is approximately 7.07 pixels, the distance between node B (130, 190) is approximately 14.14 pixels, and the distance between node C (140, 200) is approximately 28.28 pixels. Nodes A and B are then selected as neighboring nodes, while node C is excluded because its 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 relative spatial vectors corresponding to the center node are aggregated to form a 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 corresponding neighborhood space vector sets.
[0125] According to each space vector pair in the neighborhood space vector set, the distance scaling factor and the change in the connecting angle before and after the deformation of the space vector pair are calculated, and a set of neighborhood relationship coefficients corresponding to each central node is obtained through a preset nonlinear function mapping. Specifically, the method includes: selecting any two different space vectors from the neighborhood space vector set corresponding to the central node, where each space vector contains horizontal and vertical components; using the selected two space vectors as a set of associated vectors to form a space vector pair; performing the above selection operation on all possible combinations of two different space vectors in the neighborhood space vector set to ensure that all pairwise combinations of vectors in the set are covered; for the formed space vector pair, determining the spatial position coordinates of the two neighborhood nodes corresponding to the vector pair before deformation, and calculating the straight-line distance between the two nodes before deformation based on the coordinates; at the same time, determining the spatial position coordinates of the two neighborhood nodes after deformation, and calculating the straight-line distance between the two nodes after deformation based on the coordinates; dividing the straight-line distance after deformation by the straight-line distance before deformation, and the resulting quotient is the distance scaling factor of the space vector pair, which is used to characterize the relative change in the distance between the two nodes before and after deformation.
[0126] For the above-mentioned space vector pair, based on the spatial position coordinates of the two corresponding neighboring nodes before deformation, calculate the angle formed by the line connecting the two nodes and the central node, that is, the line angle before deformation; based on the spatial position coordinates of the two neighboring nodes after deformation, calculate the angle formed by the line connecting the two nodes and the central node, that is, the line angle after deformation; subtract the line angle after deformation from the line angle before deformation, and the difference obtained is the change in the line angle of the space vector pair, which is used to characterize the line angle of the two nodes relative to the central node before and after deformation. The distance scale factor and the change in the connecting angle obtained by the above calculation are input as input parameters to a preset nonlinear function; the preset nonlinear function is a preconfigured mapping function for converting the distance scale factor and the change in the connecting angle into a quantization coefficient, and its mapping rule is pre-set based on the characteristics of the deformation constraint of the face mesh node; 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 neighborhood nodes corresponding to the space vector pair.
[0127] For all the space vector pairs in the neighborhood space vector set, the above operations of calculating the distance scale factor, the change in the connecting angle and the neighborhood relationship coefficient are repeated one by one; the neighborhood relationship coefficients obtained by the operation of all space vector pairs are collected and summarized to form a set containing all quantized relationship coefficients, which is the neighborhood relationship coefficient set corresponding to the current central node.
[0128] Among them, let the neighborhood relationship coefficient be , the formula of the preset nonlinear function is as follows: ;
[0129] in, Represents the comprehensive impact value, and the calculation formula for the comprehensive impact value is: ;
[0130] in, Indicates the starting threshold of the comprehensive impact value, which is 0 (because After normalization, the minimum is 0), representing the initial state where both distance and angle changes are minimal; Indicates the critical threshold of the first segment, which is the upper limit of the low range of the comprehensive influence value and represents the critical state with small changes in distance and angle (the constraint relationship is usually stronger at this time); Indicates the critical threshold of the second segment, which is the upper limit of the middle range of the comprehensive impact value and represents the critical state of moderate distance and angle changes (at this time, the constraint relationship weakens as the change increases); Indicates the termination threshold of the comprehensive impact value, which is set to 1 (because the maximum value of S after normalization is 1), representing the extreme state with the maximum change in distance and angle; It represents the slope coefficient of the first segment, which is a positive value, indicating that when S is in the range of [S0, S1] (when the change is small), the neighborhood relationship coefficient y increases slowly as S increases (reflecting the characteristic that the constraint strength is slightly enhanced under small changes); It represents the intercept coefficient of the first segment, which is a large positive value, ensuring that y is at a high level when S=S0 (the constraint is strongest when the corresponding change is minimum); represents the slope coefficient of the second segment, which is a negative value, indicating that when S is in the range of [S1, S2] (moderate change), the neighborhood relationship coefficient y decreases linearly with the increase of S (reflecting that the constraint strength weakens with the increase of change under moderate change); b2 represents the intercept coefficient of the second segment, which is a moderate positive value to ensure the continuity of the y value at the junction of the segments (avoiding sudden changes); k3 represents the slope coefficient of the third segment, which is a negative value and has an absolute value greater than k2, indicating that when S is in the range of [S2, S3] (large change), the neighborhood relationship coefficient y decreases rapidly with the increase of S (reflecting that the constraint strength weakens rapidly under significant change); represents the intercept coefficient of the third segment, which is a smaller value, ensuring that y is at a lower level when S=S3 (the constraint is weakest when the corresponding change is largest); w d The weight coefficient of the distance scale factor ranges from 0.6 to 0.8 (based on the deformation characteristics of human faces, the influence of distance changes on the constraint relationship is more significant); The weight coefficient of the change in the angle between the lines is in the range of 0.2 to 0.4 (similar to w d complementary, reflecting the auxiliary effects of angle changes); The normalized value of the distance scale factor is in the range of [0, 1], which is obtained by linearly transforming the preprocessed distance scale factor (eliminating the dimension effect). The normalized value of the angle change is in the range of [0, 1] and is obtained by linearly transforming the preprocessed angle change (eliminating the dimension effect).
[0131] According to the neighborhood relationship coefficient set, the relationship coefficients in the set are arranged in order according to the spatial orientation order of their neighborhood nodes relative to the central node to obtain the local topological vector corresponding to each key deformation node; all local topological vectors are sequentially connected end to end to generate a topological relationship feature vector, specifically including: for the neighborhood relationship coefficient set of the central node, the spatial orientation order of the neighborhood nodes relative to the central node is determined, and the order is a pre-set arrangement rule based on spatial orientation (such as clockwise, from left to right and then from top to bottom, etc.); according to the above spatial orientation order, all neighborhood relationship coefficients in the neighborhood relationship coefficient set are arranged in order to form a local topological vector corresponding to the key deformation node; according to the preset order of the key deformation nodes in the key deformation node set (such as node number order, spatial distribution order, etc.), the local topological vectors corresponding to all key deformation nodes are sequentially connected end to end, that is, the end of the previous local topological vector is connected to the beginning of the next local topological vector, and finally a continuous vector sequence is formed, which is the topological relationship feature vector.
[0132] In an embodiment of the present invention, the non-uniform deformation relationship between nodes is accurately characterized through distance scaling factors, angle changes and nonlinear mapping, which is more consistent with the elastic deformation characteristics of facial soft tissue than linear methods; complex spatial relationships are converted into an ordered coefficient sequence to reduce redundant information, facilitate subsequent feature comparison and analysis, and improve the efficiency of tasks such as face recognition and expression classification.
[0133] In a preferred embodiment of the present invention, the topological relationship feature vector is fused with the biometric feature contour, the curvature manifold of the facial features concave area is calculated, and the local curvature feature vector is generated through differential geometry transformation, including:
[0134] The topological relationship feature vector is fused with the biometric contour; based on the fused feature information, a set of closed contour lines defining the concave area is located on the biometric contour to obtain a set of target concave areas;
[0135] For each concave area in the target concave area 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 of the area inside the boundary to generate a continuous surface approximation; the operation is performed on all target concave areas to obtain a local parametric surface;
[0136] Calculate the principal curvature of the sampling points on the local parameterized surface and integrate the spatial distribution relationship to generate a curvature manifold; locate key feature points on the curvature manifold and calculate the differential geometric properties to generate a geometric feature set;
[0137] The geometric feature set is arranged in a preset spatial order of the concave area to generate a local curvature feature vector.
[0138] In this embodiment of the present invention, the topological relationship feature vector (an ordered coefficient sequence reflecting the nonlinear spatial constraints between key nodes) is fused with the biometric contour (such as the continuous contour lines of the eye sockets, nose wings, lips, etc.):
[0139] Based on the geometric coordinates of the biometric contour, the relationship coefficients in the topological relationship feature vector are assigned as weights to the corresponding nodes on the contour (for example, points with significant curvature changes on the contour are matched with high coefficient values in the topological vector), thereby strengthening the association between key deformation areas and contour morphology. By adjusting the spatial weights of contour points (the weight range is 0 to 1, and the stronger the topological relationship, the closer the weight is to 1), the fused features retain the overall morphology of the contour while also including the structural constraint relationship between nodes.
[0140] Based on the fused feature information, the target concave area is located on the biometric contour:
[0141] Based on the enhanced concave markers in the fusion features (such as the loosely constrained areas corresponding to low coefficient values in the topological vector, combined with the concave segments with negative curvature on the contour), the previously defined closed contour line set (such as the closed curve of the eye socket, the annular contour around the nostril, etc.) is identified and extracted; the area enclosed by each closed contour line is the target concave area, and finally a target concave area set containing 3 to 5 core areas is formed (usually corresponding to typical facial features such as the eye socket, alar groove, and sublabial depression).
[0142] Perform parametric surface reconstruction on each target concave region:
[0143] The boundary points of the closed contour line of the area (with coordinates within the corresponding biometric contour) are used as hard constraints to ensure that the surface boundary and contour are completely aligned; the biometric contour points inside the boundary (such as the curve points on the inner edge of the eye socket) and the mesh deformation feature points (key deformation nodes) are collected as reference points for surface reconstruction; a continuous surface approximation covering the entire concave area is generated through surface fitting (such as connecting each point with a smooth surface based on the spatial distribution of the reference points to ensure that the curvature changes of adjacent points are continuous), which can reflect the natural curvature of the concave area (such as the arc-shaped concave of the eye socket and the sloped concave of the nose wing); the above operation is repeated for all target concave areas to obtain the local parameterized surface corresponding to each area (the spatial range of the surface is strictly limited to each concave area).
[0144] Extract curvature-related features on a local parameterized surface:
[0145] On each local surface, 50 to 200 sampling points are uniformly selected (the density is adjusted according to the size of the area; 50 points are selected for small areas such as the sublip depression, and 200 points are selected for large areas 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, with 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 changing trend of the curvature direction) are integrated to form a curvature manifold that includes the curvature magnitude, direction, and spatial association (which can be understood as a holistic description of the curvature characteristics of the surface). Key feature points are located on the curvature manifold (such as the point with the largest absolute value of the principal curvature and the point where the curvature direction suddenly changes), and the differential geometric properties of these points are calculated (such as the curvature gradient and the curvature change rate, ranging from 0 to 2, with larger values indicating more severe changes), and summarized to form a geometric feature set.
[0146] According to the preset spatial order of the concave areas (e.g., from left to right, from top to bottom: left eye socket, right eye socket, left alar groove, right alar groove, sublabial depression), the geometric feature sets of each area are arranged in order:
[0147] The feature set of each region is sorted by the spatial position of the sampling points (e.g., from the edge to the center of the region);
[0148] The ordered features of all regions are concatenated end to end to form a continuous sequence of eigenvalues, namely the local curvature eigenvector (the length is the number of regions × the number of features in each region, usually 300 to 1000 dimensions).
[0149] The fusion of topological relationships (structural constraints) and biological feature contours (morphological basis) not only preserves the global structural relationship, but also accurately captures the local morphology, solving the problem of incomplete information of a single feature; through the curvature manifold and differential geometry characteristics, it can capture subtle curvature differences in concave areas of the facial features (such as the depth of the eye sockets and the curvature of the nasal groove).
[0150] In a preferred embodiment of the present invention, the topological relationship feature vector, the local curvature feature vector and the micro-feature coding sequence are input into the evolvable biometric feature library, and the spatiotemporal weight is integrated to update the comparison template, including:
[0151] Input the topological relationship feature vector, local curvature feature vector and micro-feature coding sequence into the evolvable biometric feature library, and search the library for the historical biometric feature template that is most similar to the input feature;
[0152] Calculate a time decay factor based on the storage duration of the historical biometric template; calculate a spatial distribution factor based on the neighborhood density of the historical biometric template in the feature space; multiply the time decay factor and the spatial distribution factor to obtain a spatiotemporal weight;
[0153] Use spatiotemporal weights to perform weighted attenuation on historical biometric templates, and fuse topological relationship feature vectors, local curvature feature vectors, and micro-feature coding sequences to generate the current biometric template;
[0154] The weighted attenuated historical biometric template is weightedly fused with the current biometric template to generate an updated biometric template; the updated biometric template is used to replace the original historical biometric template to generate an updated comparison template.
[0155] In this embodiment of the present invention, three features are input into the evolvable biometric feature library:
[0156] Topological relationship feature vector (length 100-500, element value 0-1), local curvature feature vector (length 300-1000, element value -5-5, reflecting the magnitude of curvature), micro-feature coding sequence (length 40-200, element value 0-255, reflecting local texture); search the library for the historical biometric template most similar to the input feature: by comparing the overall differences between features (such as the sum of the differences between 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 subsequent updates are performed).
[0157] The storage duration is in days, ranging from 1 to 365 days (data exceeding 365 days is considered expired, and the time decay factor is set to 0.1). The shorter the duration, the larger the time decay factor. For example, for a storage duration of 1 to 30 days, the time decay factor is 0.8 to 1.0; for a storage duration of 31 to 180 days, the time decay factor is 0.5 to 0.8; and for a storage duration of 181 to 365 days, the time decay factor is 0.1 to 0.5 (for example, for a storage duration of 10 days, the time decay factor is 0.9; for a storage duration of 200 days, the time decay factor is 0.3).
[0158] Neighborhood density refers to the number of other templates with a feature difference of ≤30% from the template, and the neighborhood density ranges from 1 to 20 (the higher the neighborhood density, the more similar features around the template and the lower its uniqueness). The lower the neighborhood density, the larger the spatial distribution factor, that is: 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 (for example, 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).
[0159] The spatiotemporal weight is the product of the time decay factor and the spatial distribution factor. The spatiotemporal weight ranges from 0.03 to 1.0:
[0160] 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.
[0161] Weighted attenuation historical template: Use spatiotemporal weights (0.03 to 1.0) to scale each feature element of the historical template (for example, if the value of an element in the historical template is 0.5 and the weight is 0.81, then after attenuation it is 0.5×0.81=0.405). After attenuation, the value range of the feature element remains consistent with the original template (for example, the topological relationship element remains 0 to 1); generate the current template: fuse the three input features in the proportion of topological vector (30%), local curvature vector (40%), and micro-feature sequence (30%) (the proportion can be fine-tuned to ensure a total proportion of 100%), and generate the current biometric template (the element value range is consistent with the input feature) by aligning the feature dimensions (such as zero padding or truncation to a uniform length).
[0162] Perform weighted fusion of the weighted attenuated historical template and the current template:
[0163] The attenuated historical template accounts for 30% to 50%, and the current template accounts for 50% to 70% (for example, the historical template accounts for 40% and the current template accounts for 60%). The corresponding elements are added proportionally (for example, historical element 0.405 × 40% + current element 0.6 × 60% = 0.522) to generate the updated biometric template (the element value range is consistent with the input feature).
[0164] Replace the original historical template in the library with the updated biometric template as the new comparison template: if the original template is updated for the first time, replace it directly; if it is 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 subtle features that change over time (such as texture details).
[0165] The time decay factor weakens the influence of the old template, and the spatial distribution factor highlights the unique features, so that the template can be dynamically updated with time and feature changes, adapting to the natural variation of biometric features (such as changes in facial texture due to aging); improving the information integrity and comparison accuracy of the template.
[0166] In a preferred embodiment of the present invention, a micro-feature coding sequence, a topological relationship feature vector, and a local curvature feature vector are fused to obtain a biometric feature set, and a 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:
[0167] Perform a feature concatenation operation on the micro-feature coding sequence, the topological relationship feature vector, and the local curvature feature vector in a preset order to generate a fused biometric feature set;
[0168] Based on the biometric feature 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 from the two, generating corresponding scale feature subset pairs;
[0169] Based on the feature subset pairs at each scale, the similarity scores at each scale are calculated and weighted fused according to the preset weights to generate a comprehensive multi-scale similarity value; if the comprehensive multi-scale similarity value is not lower than the adaptive threshold, the face recognition result is generated.
[0170] In an embodiment of the present invention, the three features are connected in series in a preset order (e.g., first the micro-feature coding sequence, then the topological relationship feature vector, and finally the local curvature feature vector):
[0171] The micro-feature coding sequence (length 40-200, element value 0-255), the topological relationship feature vector (length 100-500, element value 0-1), and the local curvature feature vector (length 300-1000, element value -5-5) are connected in sequence to form a biometric feature set. 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 and then concatenating).
[0172] Based on the biometric feature set and the updated comparison template (same set structure and same length), feature segments at three scales are extracted:
[0173] Macroscale (overall facial contour): The first 30% feature segments of the corresponding topological relationship feature vector in the set (such as the first 150 elements of the topological vector) are selected to characterize the overall structure of the facial contour and generate macroscale feature subset pairs (each subset length is 30-150, and the element value is 0-1); mesoscale (organ deformation): The middle 40% feature segments of the local curvature feature vector (such as the middle 400 elements of the curvature vector) are selected to characterize the morphological changes of organs such as the eyes, nose, and mouth, and generate mesoscale feature subset pairs (each subset length is 120-400, and the element value is -5 to 5); microscale (texture curvature): The entire microfeature coding sequence + the edge 30% feature segments of the local curvature feature vector are selected to characterize the subtle curvature of skin texture and concave areas, and generate microscale feature subset pairs (each subset length is 120-600, and the element value is 0-255).
[0174] 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 perfect match, 0 is a complete mismatch, and a score of ≥0.7 is generally considered structural similarity); Meso-scale similarity: By comparing the consistency of organ deformation characteristics (such as the trend of curvature change), the score ranges from 0 to 1 (≥0.6 is considered organ morphological similarity); Micro-scale similarity: By comparing the degree of fit between texture details and subtle curvature, the score ranges from 0 to 1 (≥0.5 is considered texture detail similarity);
[0175] Weighted fusion: Calculates 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 (for example, macro 0.8 × 30% + meso 0.7 × 40% + micro 0.6 × 30% = 0.7).
[0176] Dynamically adjusted according to the scenario, the threshold is usually 0.6-0.7 in access control scenarios, and 0.8-0.9 in high-security scenarios such as payment (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 rejected by mistake). If the comprehensive multi-scale similarity value is ≥ the adaptive threshold (such as 0.85 in the payment scenario), it is determined to be a successful match and a face recognition result containing identity information is generated; if it is lower than the threshold, it is determined to be a match failure and a non-recognition prompt is returned.
[0177] Multi-scale feature comparison from macro-contours to micro-textures takes into account both overall structure and local details, avoiding misjudgment caused by the lack of single-scale features (for example, relying solely on contours may confuse similar facial shapes, while supplementing texture details can accurately distinguish them), thereby improving the balance between convenience and safety.
[0178] like Figure 2 As shown, an embodiment of the present invention further provides a system for facial image recognition, comprising:
[0179] An acquisition module, used to obtain an initial image containing a human face;
[0180] An analysis module is used to determine the threshold and reference value by analyzing the brightness distribution, perform differential brightness adjustment on the image, and then reconstruct the color space to generate a lighting-balanced image;
[0181] A processing module is configured to extract the facial region from the illumination-balanced image using a segmentation algorithm; construct a dynamically deformable mesh based on the facial region, generate mesh deformation features, and generate a biometric profile based on the mesh deformation features; and generate a micro-feature coding sequence using a directional gradient texture fusion algorithm within the concave region defined by the biometric profile.
[0182] An extraction module is used to extract the nonlinear spatial constraint relationship between mesh nodes from the mesh deformation features and generate a topological relationship feature vector;
[0183] The fusion module is used to fuse the topological relationship feature vector with the biometric feature contour, calculate the curvature manifold of the facial concave area, and generate the local curvature feature vector through differential geometry transformation;
[0184] An updating module is used to input the topological relationship feature vector, the local curvature feature vector and the micro-feature coding sequence into the evolvable biological feature library, and to integrate the spatiotemporal weight to update the comparison template;
[0185] The output module is used to fuse the micro-feature coding sequence, topological relationship 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, a face recognition result is generated.
[0186] It should be noted that this system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effects.
[0187] An embodiment of the present invention further provides a computing device comprising: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the above-described method. All implementations in the above-described method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0188] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, causes the computer to execute the above-described method. All implementations in the above-described method embodiment are applicable to this embodiment and can achieve the same technical effects.
[0189] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for facial image recognition, characterized in that: The method comprises: Step 1: Obtain an initial image containing a face; Step 2: Determine the threshold and reference value by analyzing the brightness distribution, perform differential brightness adjustment on the image, and reconstruct the color space to generate a lighting balanced image; Step 3: Use a segmentation algorithm to extract the facial region from the illumination-balanced image; construct a dynamically deformable mesh based on the facial region to generate mesh deformation features; and generate a biometric contour based on the mesh deformation features. Within the concave region defined by the biometric contour, use a directional gradient texture fusion algorithm to generate a micro-feature coding sequence. 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 relationship feature vector with the biometric feature contour, calculate the curvature manifold of the facial features concave area, and generate the local curvature feature vector through differential geometry transformation; Step 6: Input the topological relationship feature vector, local curvature feature vector, and micro-feature coding sequence into the evolvable biological feature library, and integrate the spatiotemporal weight to update the alignment template; Step 7: The micro-feature coding sequence, topological relationship feature vector and local curvature feature vector are integrated to obtain a biometric feature set, and the multi-scale similarity between the biometric feature set and the updated comparison template is calculated; if the multi-scale similarity exceeds the adaptive threshold, a face recognition result is generated.
2. The method for facial image recognition according to claim 1, wherein: By analyzing the brightness distribution to determine the threshold and reference value, the image is partitioned and differentially adjusted for brightness, and the color space is reconstructed to generate a lighting-balanced image, including: The acquired initial image is subjected to color space conversion and separation to generate a brightness information set; the brightness information set is subjected to filtering to generate a new brightness information set; Perform a global statistical analysis on the new set of brightness information of the light distribution, calculate the specific quantiles of all pixel values in the set, determine the demarcation thresholds used to distinguish between extremely dark and extremely bright areas in the image, and calculate the average of all pixel values in the set to generate a baseline value representing the overall light intensity of the image; Based on the demarcation threshold and the reference 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; According to the regional category label of each pixel, each pixel in the original separated brightness information set is subjected to differential brightness adjustment to generate a new brightness information set after partition adjustment; The new brightness information set after partition adjustment is recombined with the original color information set separated and not processed during color space conversion, and the combined information is converted back to the original RGB color space to generate a lighting balanced image.
3. The method for facial image recognition according to claim 2, wherein: Step 3 includes: The illumination-balanced image is processed through pixel-level semantic segmentation to generate a probability map of each pixel belonging to the face area; an adaptive threshold segmentation operation is performed on the probability map to generate a binary mask image; the binary mask image is processed to finally obtain a set of boundary points of the face area; The face region boundary point set is used as the initial constraint condition, and a discrete surface representation is generated in the region inside the boundary; a mesh deformation feature set is calculated; Based on the grid deformation feature set, a set of significantly displaced points with displacement exceeding a preset threshold is extracted; a curve fitting operation is performed on the point set to generate a biometric profile; and a set of closed polygons defining the concave area is generated by calculating the zero-crossing points of the profile curvature derivative. In the closed polygon of the concave area, multi-scale and multi-directional gradient calculation is performed, and a weighted fusion strategy is adopted to fuse the gradient amplitudes in each direction to obtain a single directional invariant eigenvalue. The single directional invariant eigenvalue is spatially divided and counted in the concave area to generate statistical features representing the spatial distribution of local textures. The statistical features of each block are sequentially connected according to the preset spatial scanning rules to finally generate a micro-feature coding sequence.
4. The method for facial image recognition according to claim 3, wherein: Extract the nonlinear spatial constraint relationship between mesh nodes from the mesh deformation features and generate a topological relationship feature vector, including: From the mesh deformation feature set, all mesh nodes whose displacement exceeds the preset deformation threshold are extracted and marked as the key deformation node set; Taking each node in the key deformation node set as the central node, for each central node, calculate the relative space vector between it and all the key deformation node set member nodes within the preset neighborhood radius with itself as the center, and obtain the neighborhood space vector set corresponding to each central node; According to each space vector pair in the neighborhood space vector set, the distance scale factor and the change in the connecting angle before and after the deformation of the space vector pair are calculated, and the neighborhood relationship coefficient set corresponding to each central node is obtained through a preset nonlinear function mapping; According to the neighborhood relationship coefficient set, the relationship coefficients in the set are arranged in order according to the spatial orientation order of their neighborhood nodes relative to the central node 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 facial image recognition according to claim 4, characterized in that: The topological relationship feature vector is integrated with the biometric feature contour to calculate the curvature manifold of the facial features concave area, and the local curvature feature vector is generated through differential geometry transformation, including: The topological relationship feature vector is fused with the biometric contour; based on the fused feature information, a set of closed contour lines defining the concave area is located on the biometric contour to obtain a set of target concave areas; For each concave area in the target concave area 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 of the area inside the boundary to generate a continuous surface approximation; the operation is performed on all target concave areas to obtain a local parametric surface; Calculate the principal curvature of the sampling points on the local parameterized surface and integrate the spatial distribution relationship to generate a curvature manifold; locate key feature points on the curvature manifold and calculate the differential geometric properties to generate a geometric feature set; The geometric feature set is arranged in a preset spatial order of the concave area to generate a local curvature feature vector.
6. The method for facial image recognition according to claim 5, characterized in that: The topological relationship feature vector, local curvature feature vector and micro-feature coding sequence are input into the evolvable biological feature library, and the spatiotemporal weight is integrated to update the comparison template, including: Input the topological relationship feature vector, local curvature feature vector and micro-feature coding sequence into the evolvable biometric feature library, and search the library for the historical biometric feature template that is most similar to the input feature; Calculate a time decay factor based on the storage duration of the historical biometric template; calculate a spatial distribution factor based on the neighborhood density of the historical biometric template in the feature space; multiply the time decay factor and the spatial distribution factor to obtain a spatiotemporal weight; Use spatiotemporal weights to perform weighted attenuation on historical biometric templates, and fuse topological relationship feature vectors, local curvature feature vectors, and micro-feature coding sequences to generate the current biometric template; The weighted attenuated historical biometric template is weightedly fused with the current biometric template to generate an updated biometric template; the updated biometric template is used to replace the original historical biometric template to generate an updated comparison template.
7. The method for facial image recognition according to claim 6, characterized in that: The micro-feature coding sequence, topological relationship feature vector, and local curvature feature vector are fused to obtain a biometric feature set. The multi-scale similarity between the biometric feature set and the updated comparison template is calculated. If the multi-scale similarity exceeds the adaptive threshold, a face recognition result is generated, including: Perform a feature concatenation operation on the micro-feature coding sequence, the topological relationship feature vector, and the local curvature feature vector in a preset order to generate a fused biometric feature set; Based on the biometric feature 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 from the two, generating corresponding scale feature subset pairs; Based on the feature subset pairs at each scale, the similarity scores at each scale are calculated and weighted fused according to the preset weights to generate a comprehensive multi-scale similarity value; if the comprehensive multi-scale similarity value is not lower than the adaptive threshold, the face recognition result is generated.
8. A system for facial image recognition, the system implementing the method according to any one of claims 1 to 7, characterized in that: include: An acquisition module, used to obtain an initial image containing a human face; An analysis module is used to determine the threshold and reference value by analyzing the brightness distribution, perform differential brightness adjustment on the image, and then reconstruct the color space to generate a lighting-balanced image; A processing module, for extracting a face area from the illumination-balanced image using a segmentation algorithm; A dynamic deformation mesh is constructed based on the face area, mesh deformation features are generated, and biometric feature contours are generated based on the mesh deformation features; In the concave area defined by the biometric contour, a directional gradient texture fusion algorithm is used to generate a micro-feature coding sequence; An extraction module is used to extract the nonlinear spatial constraint relationship between mesh nodes from the mesh deformation features and generate a topological relationship feature vector; The fusion module is used to fuse the topological relationship feature vector with the biometric feature contour, calculate the curvature manifold of the facial concave area, and generate the local curvature feature vector through differential geometry transformation; An updating module is used to input the topological relationship feature vector, the local curvature feature vector and the micro-feature coding sequence into the evolvable biological feature library, and to integrate the spatiotemporal weight to update the comparison template; The output module is used to fuse the micro-feature coding sequence, topological relationship 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, a face recognition result is generated.
9. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
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
One-way door control method, system and equipment based on image recognition
CN120375503A
Method and apparatus for dynamic facial image alignment, and device and readable storage medium
WO2025010814A1
Cited By
Face auditing method and system based on feature vector comparison
CN120976996A
Gynecological endoscopic image intelligent analysis and cervical lesion precise diagnosis system
CN121306445A
Newborn feeding behavior image recognition and oral movement evaluation system
CN121482844A
Pain assessment system for newborn facial expression image analysis
CN121545201A
Pain assessment system using neonatal facial expression image analysis
CN121545201B