Face recognition method, device and storage medium based on hyperellipsoid

Through the face recognition method based on the hyperellipsoid, the problem of complex face recognition models and inability to add new categories in the prior art is solved, and the recognition effect with small samples and stable performance is achieved, which is suitable for a variety of application scenarios.

CN114677736BActive Publication Date: 2024-12-27ZHEJIANG GONGSHANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210305283.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2024-12-27
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

The deep learning model of existing face recognition methods is complex, with a large number of samples and cannot add new categories after training, which limits its application scenarios.

Method used

Using a face recognition method based on hyperellipsoid, a superellipsoid classifier is generated through K-means clustering algorithm and nonlinear iterative partial least squares method, which supports adding new categories to existing models and normalized processing and Projection calculations identify the categories of face images.

Benefits of technology

It realizes face recognition with small samples and stable performance, supports incremental learning intrinsically, is suitable for different application scenarios, and reduces the sample size requirement for model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114677736B_ABST
    Figure CN114677736B_ABST
Patent Text Reader

Abstract

The present invention discloses a face recognition method, device and storage medium based on a hyperellipsoid. First, modeling is performed based on face image samples of known categories to generate a hyperellipsoid classifier for category judgment of the face image samples to be recognized; then, the face image samples to be recognized are input into the trained hyperellipsoid classifier to judge the category to which the face image samples to be recognized belong. Specifically, the present invention models the area occupied by face images of the same category on a rectangular coordinate system into a hyperellipsoid. In order to improve the accuracy of modeling, the present invention first subdivides the face image data of the same category into several groups through a K-means clustering algorithm, and then generates a hyperellipsoid independently from each group, and uses several hyperellipsoids to characterize the data area of ​​the category. Compared with existing face recognition algorithms, the present invention inherently supports incremental learning, requires a small amount of samples, has stable performance, and can be suitable for a wider range of application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of pattern recognition, and more specifically, relates to a face recognition method, device and storage medium based on a hyperellipsoid. Background Art

[0002] Face recognition is a hot research topic in computer pattern recognition and biometric identification technology. It is widely used in consumer entertainment, trajectory tracking, forensic identification, financial security, venue monitoring, etc. Generally speaking, face recognition mainly refers to computer technology that uses facial visual information to identify human identity in digital images or video images.

[0003] There are many methods for face recognition. Among all algorithms, face recognition algorithms based on deep learning can achieve better recognition results. However, the deep learning model in this type of algorithm is complex, requires a large number of samples, and is not suitable for all occasions. In addition, once the model training of the current face recognition method is completed, new categories cannot be added, which to a certain extent hinders the use of face recognition technology. Therefore, it is urgent to design a face recognition method that can solve the above problems. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device and storage medium for face recognition based on a hyperellipsoid in view of the deficiencies of the prior art. The method of the present invention requires a small number of samples for model training, and inherently supports adding new categories of face data to the trained model to generate a new hyperellipsoid, while the original trained hyperellipsoid is not affected, thereby being able to recognize more face categories.

[0005] The objective of the present invention is achieved through the following technical solutions:

[0006] According to a first aspect of the present specification, there is provided a method for face recognition based on a hyperellipsoid, the method comprising a training phase and a recognition phase;

[0007] In the training phase, modeling is performed based on face image samples of known categories to generate a hyperellipsoid classifier for classifying the face image samples to be identified, specifically:

[0008] Normalize the face images of known categories;

[0009] Each category is trained independently to generate preset m super ellipsoids. The training process for each category is:

[0010] Divide each category of face images into m groups of data using the K-means clustering algorithm;

[0011] Each data group is trained independently to generate a super ellipsoid: the data mean point of the data group is taken as the center of the super ellipsoid, and a group of orthogonal unit vectors are calculated based on the data group as the directions of the main axes of the super ellipsoid. The center of the super ellipsoid and the directions of the main axes determine the straight line where the main axis is located. All data points of the data group are projected onto the straight line where each main axis is located to obtain the axis radius of each main axis, thereby obtaining the super ellipsoid corresponding to the data group;

[0012] In the recognition stage, the face image sample to be recognized is normalized and then input into a trained hyperellipsoid classifier to determine the category to which the face image sample to be recognized belongs.

[0013] Furthermore, each data group is trained independently to generate a super ellipsoid, specifically:

[0014] (1) Using the nonlinear iterative partial least squares method, an orthogonal unit vector set {v1, v2, ..., v n}, where n is less than or equal to the image data dimension;

[0015] (2) The data mean point p of the data group is taken as the center of the super ellipsoid, and the orthogonal unit vector group {v1, v2, ..., v n} as the direction, generating an orthogonal line group {l1,l2,…,l n}, as the straight line group where the principal axes of the hyperellipsoid are located, the equation of this orthogonal straight line group is:

[0016] l g :x=tv g +p, 1≤g≤n

[0017] Among them, t is a variable, a scalar, and x is a parameter variable;

[0018] (3) Project all data points of the data set onto the straight line l where each principal axis is located g On the left, the maximum distance between the projection point and the mean point p is taken as the semi-major axis length of the super ellipsoid on the major axis, thereby obtaining a set of semi-major axis lengths {a1, a2, …, a n}, the projection formula used is:

[0019]

[0020] Where y is the data point corresponding to the image in the data set, and y′ is the value of y on the straight line l. g The projection point on , T is the transpose;

[0021] (4) Generate a hyperellipsoid that satisfies the equation:

[0022]

[0023] Among them, v xp = xp, ||·|| is the symbol of the norm, cos(v xp ,v g ) is the vector v xp With vector v g The cosine of the angle .

[0024] Furthermore, in the recognition stage, the category of the face image sample to be recognized is determined as follows:

[0025] (1) Calculate the distance from the face image to be recognized to each hyperellipsoid using the following formula:

[0026]

[0027]

[0028] Among them, q is the data point corresponding to the face image to be recognized, p is the center of the hyperellipsoid, and v qp =qp,{v1,v2,…,v n} is the axis direction of the hyperellipsoid, {a1,a2,…,a n} is the axial radius of the hyperellipsoid, cos(v qp ,v g ) is the vector v qp With vector v g The cosine of the angle, k is the identification factor, when k = 1, it means q is on the surface of the hyperellipsoid, when k < 1, it means q is inside the hyperellipsoid, when k > 1, it means q is outside the hyperellipsoid, dis is the calculated distance value;

[0029] (2) The category of the hyperellipsoid with the smallest distance value is the category of the face image to be recognized.

[0030] Furthermore, the normalization process includes size normalization and grayscale normalization of the face image, specifically: firstly, a standard face image is cropped according to the center position of both eyes, and then histogram equalization is used to eliminate the influence of illumination.

[0031] According to the second aspect of this specification, a hyperellipsoid-based face recognition device is provided, comprising a memory and one or more processors, wherein the memory stores executable code, and wherein when the processor executes the executable code, it is used to implement the hyperellipsoid-based face recognition method as described in the first aspect.

[0032] According to a third aspect of the present specification, there is provided a computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the hyperellipsoid-based face recognition method as described in the first aspect is implemented.

[0033] Beneficial effects of the present invention: The present invention uses a hyperellipsoid as a geometric body to wrap the area where the face image data of the same type is located. The modeling process of each hyperellipsoid is completely independent, which makes the present invention inherently support incremental learning, and an existing model can continuously learn new face categories. In addition, the model training requires a small amount of samples, the performance is stable, and it can be suitable for different application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0035] Figure 1 A schematic diagram of the process of a face recognition method based on a hyperellipsoid provided in an embodiment of the present invention.

[0036] Figure 2 It is a comparison chart between the original face image and the face image corresponding to the randomly selected data points in the hyperellipsoid.

[0037] Figure 3 The figure is a schematic diagram showing the comparison of recognition rates of the present invention and two other pattern recognition algorithms (K-nearest neighbor KNN and support vector machine SVM) on a 1024-dimensional ORL face dataset.

[0038] Figure 4 It is a structural block diagram of a face recognition device based on a hyperellipsoid provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0040] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0041] Figure 1The figure is a flow chart of the hyperellipsoid-based face recognition method proposed in the present invention. The whole process includes a training phase and a recognition phase. The training phase is to model the face image samples of known categories and generate a hyperellipsoid classifier for classifying the face image samples to be recognized. The recognition phase is to input the face image samples to be recognized into the trained hyperellipsoid classifier to judge the category of the face image samples to be recognized. The specific steps of the training phase and the recognition phase are as follows.

[0042] 1. The training phase performs the following steps:

[0043] Step 1: Normalize the face images of known categories;

[0044] Step 2: Each category is trained independently, which can be time-sharing training or simultaneous training, to generate preset m super ellipsoids, m ≥ 1, and the steps include:

[0045] Step 21, dividing the face images of each category into m groups of data by using K-means clustering algorithm;

[0046] Step 22, each data group is trained independently to generate a super ellipsoid, specifically: the data mean point of the data group is used as the center of the super ellipsoid, and based on the data group, a group of orthogonal unit vector groups are calculated as the directions of the main axes of the super ellipsoid, the center of the super ellipsoid and the directions of the main axes determine the straight line where the main axes are located, all data points of the data group are projected onto the straight line where each main axis is located, and the axis radius of each main axis is obtained, thereby obtaining the super ellipsoid corresponding to the data group.

[0047] In one embodiment, each data set is trained independently to generate a super ellipsoid in the following manner:

[0048] Step 221: Determine an orthogonal unit vector set {v1, v2, ..., v n}, where n is less than or equal to the image data dimension;

[0049] Step 222: Take the data mean point p of the data group as the center of the super ellipsoid, and pass through the center of the super ellipsoid with an orthogonal unit vector group {v1, v2, ..., v n} as the direction, generating an orthogonal line group {l1,l2,…,l n}, as the straight line group where the principal axes of the hyperellipsoid are located, the equation of this orthogonal straight line group is:

[0050] l g :x=tv g +p, 1≤g≤n

[0051] Among them, t is a variable, a scalar, and x is a parameter variable;

[0052] Step 223: Project all data points of the data set onto the straight line l where each principal axis is located. g (1≤g≤n), and the maximum value of the distance between the projection point and the mean point p is taken as the semi-major axis length of the super ellipsoid on the major axis, thereby obtaining a set of semi-major axis lengths {a1, a2, …, a n}, the projection formula used is:

[0053]

[0054] Where y is the data point corresponding to the image in the data set, and y′ is the value of y on the straight line l. g The projection point on , T is the transpose;

[0055] Step 224, generate a hyperellipsoid that satisfies the equation:

[0056]

[0057] Among them, v xp = xp, ||·|| is the symbol of the norm, cos(v xp ,v g ) is the vector v xp With vector v g The cosine of the angle .

[0058] 2. The identification phase performs the following steps:

[0059] Step 1: normalize the face image samples to be identified;

[0060] Step 2: Calculate the distance from the face image to be recognized to each hyperellipsoid;

[0061] Step 3: The category of the hyperellipsoid with the smallest distance value is the category of the face image to be recognized.

[0062] In one embodiment, the distance between the face image to be recognized and each super ellipsoid is calculated as follows:

[0063]

[0064]

[0065] Among them, q is the data point corresponding to the face image to be recognized, p is the center of the hyperellipsoid, and v qp =qp,{v1,v2,…,v n} is the axis direction of the hyperellipsoid, {a1,a2,…,a n} is the axial radius of the hyperellipsoid, cos(v qp ,v g ) is the vector vqp With vector v g The cosine of the angle, k is the identification factor, when k = 1, it means q is on the surface of the hyperellipsoid, when k < 1, it means q is inside the hyperellipsoid, when k > 1, it means q is outside the hyperellipsoid, dis is the calculated distance value.

[0066] In one embodiment of the present invention, the normalization processing described in step 1 of the training phase and step 1 of the recognition phase includes size normalization and grayscale normalization of the face image, specifically: first, a standard face image is cropped according to the center position of both eyes, and then histogram equalization is used to eliminate the influence of lighting.

[0067] In one embodiment of the present invention, the m super ellipsoids preset in step 2 of the training phase and the m groups of data in step 21, wherein the value of m may be determined according to the number of samples. Generally, m=total number of data samples of a certain category / number of data samples in a group, and the number of data samples in a group is usually a preset value greater than or equal to 2. When the number of data samples in a group is less than the dimension of the image data, the number of principal axes of the super ellipsoid will be less than the dimension of the image data, but this does not affect the performance of the method of the present invention.

[0068] In one embodiment of the present invention, step 221 can manually pre-specify the number of vectors in the orthogonal unit vector group generated by NIPALS. When the specified number of vectors is less than or equal to the number of vectors that NIPALS can actually generate, the specified number of vectors is returned; otherwise, the number of vectors that NIPALS can actually generate is returned.

[0069] Figure 2 This is a comparison chart of the original face image and the face image corresponding to the randomly selected data points in the hyperellipsoid modeled by the present invention. The first row shows eight face images of a person randomly selected from the 1024-dimensional ORL face data set; the second row shows the face images corresponding to eight data points randomly selected from the hyperellipsoid modeled from the face image of this person. It can be seen from the figure that the hyperellipsoid modeled by the present invention does indeed wrap the area occupied by the face images of the same category in the rectangular coordinate system with an appropriate size.

[0070] Figure 3 The recognition rates of the present invention, K-nearest neighbor KNN, and support vector machine SVM on the 1024-dimensional ORL face dataset are compared. The dataset is divided into 10 parts, 9 parts are used for training each time, and the remaining 1 part is used for testing, which is performed ten times in total. The maximum recognition rate, the minimum recognition rate, and the average recognition rate are calculated. The training and classification procedures of SVM are directly from the Statistics and Machine Learning Toolbox of Matlab 2015a. We choose quadratic programming as the method for finding the classification hyperplane of the function svmtrain. The other parameters of svmtrain use the default values. The parameter of KNN is K=8. From Figure 3 It can be seen that the performance advantages of the present invention are obvious.

[0071] The face recognition method based on the hyperellipsoid of this embodiment inherently supports incremental learning. The modeling processes of different hyperellipsoids in model training are independent of each other and can be performed simultaneously or completed at different times. When adding new categories of face samples later, the original model does not need to be retrained, and the development cost is low. In addition, as long as there is a sample point in a local area, the area will be included in the hyperellipsoid, so the number of samples required is small, which can be widely applied to different application scenarios.

[0072] Corresponding to the aforementioned embodiment of the face recognition method based on the hyperellipsoid, the present invention also provides an embodiment of the face recognition device based on the hyperellipsoid.

[0073] See also Figure 4 A hyperellipsoid-based face recognition device provided in an embodiment of the present invention includes a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, it is used to implement the hyperellipsoid-based face recognition method in the above embodiment.

[0074] The embodiment of the face recognition device based on the hyperellipsoid of the present invention can be applied to any device with data processing capability, and the device with data processing capability can be a device or apparatus such as a computer. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capability in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 4 As shown, it is a hardware structure diagram of any device with data processing capability where the face recognition device based on the hyperellipsoid of the present invention is located. Figure 4 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0075] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0076] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0077] An embodiment of the present invention further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the hyperellipsoid-based face recognition method in the above embodiment is implemented.

[0078] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

[0079] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0080] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0081] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0082] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0083] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A face recognition method based on a hyperellipsoid, characterized in that: The method includes a training phase and a recognition phase; In the training phase, modeling is performed based on face image samples of known categories to generate a hyperellipsoid classifier for classifying the face image samples to be identified, specifically: Normalize the face images of known categories; Each category is trained independently to generate preset m super ellipsoids. The training process for each category is: Divide each category of face images into m groups of data using the K-means clustering algorithm; Each data group is trained independently to generate a super ellipsoid: the data mean point of the data group is taken as the center of the super ellipsoid, and a group of orthogonal unit vectors are calculated based on the data group as the directions of the main axes of the super ellipsoid. The center of the super ellipsoid and the directions of the main axes determine the straight line where the main axis is located. All data points of the data group are projected onto the straight line where each main axis is located to obtain the axis radius of each main axis, thereby obtaining the super ellipsoid corresponding to the data group; In the recognition stage, the face image sample to be recognized is normalized and then input into the trained hyperellipsoid classifier to determine the category to which the face image sample to be recognized belongs; Each data group is trained independently to generate a super ellipsoid, specifically: (1) Using the nonlinear iterative partial least squares method, an orthogonal unit vector set {v1, v2, ..., v n }, where n is less than or equal to the image data dimension; (2) The data mean point p of the data group is taken as the center of the super ellipsoid, and the orthogonal unit vector group {v1, v2, ..., v n } as the direction, generating an orthogonal line group {l1,l2,…,l n }, as the straight line group where the principal axes of the hyperellipsoid are located, the equation of this orthogonal straight line group is: it g :x=tv g +p,1≤g≤n Among them, t is a variable, a scalar, and x is a parameter variable; (3) Project all data points of the data set onto the straight line l where each principal axis is located g On the projection point, the maximum distance between the projection point and the mean point p is taken as the semi-major axis length of the super ellipsoid on the major axis, thereby obtaining a set of semi-major axis lengths {a1, a2, …, a n }, the projection formula used is: Where y is the data point corresponding to the image in the data set, and y′ is the value of y on the straight line l. g The projection point on , T is the transpose; (4) Generate a hyperellipsoid that satisfies the equation: Among them, v xp = xp, ∥·∥ is the symbol of the norm, cos(v xp ,v g ) is the vector v xp With vector v g The cosine of the angle .

2. A face recognition method based on a hyperellipsoid according to claim 1, characterized in that: In the recognition stage, the category of the face image sample to be recognized is determined as follows: (1) Calculate the distance from the face image to be recognized to each hyperellipsoid using the following formula: Among them, q is the data point corresponding to the face image to be recognized, p is the center of the hyperellipsoid, and v qp =qp,{v1,v2,…,v n } is the axis direction of the hyperellipsoid, {a1,a2,…,a n } is the axial radius of the hyperellipsoid, cos(v qp ,v g ) is the vector v qp With vector v g The cosine of the angle, k is the identification factor, when k = 1, it means q is on the surface of the hyperellipsoid, when k < 1, it means q is inside the hyperellipsoid, when k > 1, it means q is outside the hyperellipsoid, dis is the calculated distance value; (2) The category of the hyperellipsoid with the smallest distance value is the category of the face image to be recognized.

3. The face recognition method based on a hyperellipsoid according to claim 1, characterized in that: The normalization process includes size normalization and grayscale normalization of the face image, specifically: firstly, a standard face image is cut out according to the center position of both eyes, and then histogram equalization is used to eliminate the influence of illumination.

4. A face recognition device based on a hyperellipsoid, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, it is used to implement the hyperellipsoid-based face recognition method as described in any one of claims 1 to 3.

5. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the hyperellipsoid-based face recognition method as described in any one of claims 1 to 3 is implemented.