A method and device for sample classification for face recognition
By splitting subspace learning into joint learning of transition space and label space, and introducing label release model and graph embedding technology, the problem of difficulty in learning the optimal transformation matrix in the existing technology is solved, and the accuracy of small sample face recognition is improved. characteristics and the recognition ability of the classifier.
Patent Information
- Application Number
- CN202210484664.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-06
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for existing subspace learning methods to directly learn an optimal transformation matrix, which affects the classification performance of small sample face recognition. Especially under changes in factors such as illumination, posture, expression, and occlusion, the differences between samples are large, affecting classification. recognition effect of the device.
By splitting the learning of the optimal space into joint learning of the transition space and the label space, the label release model and graph embedding technology are introduced, which is transformed into learning two relaxed transformation matrices, and the label information is used to build a graph model to increase the difference between classes. , reduce intra-class differences.
It improves the accuracy of small sample face recognition, enhances the recognition ability of the classifier, and can better handle image classification under complex situations such as lighting, posture changes, and occlusion.
Smart Images

Figure CN114943860B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of pattern recognition, and in particular to a method and device for sample classification for face recognition. Background Art
[0002] In recent years, face recognition technology has been widely used in various scenarios due to its advantages of non-invasiveness, naturalness and low cost, such as criminal investigation, access control, clock-in, and video surveillance. The number of samples of the same category obtained in actual application scenarios is limited or small, that is, the face recognition problems encountered in actual application scenarios are usually small sample face recognition problems. Changes in illumination, posture, expression, occlusion, etc. bring great challenges to small sample face recognition, which will make the differences between samples of the same category larger and the differences between samples of different categories smaller. For example, the images of the same person taken under darker lighting conditions are quite different from those taken under brighter lighting conditions. On the contrary, if two people of different categories are photographed in two different light intensities, the differences between images of different categories may be smaller.
[0003] Methods based on subspace learning are often used to solve small sample face recognition problems involving interference from lighting, posture, expression, occlusion, etc. The general idea of this method is as follows: first, construct an objective function for subspace learning, then use the objective function to learn a new subspace, then map the samples to the new subspace so that the differences between samples of the same category are reduced and the differences between samples of different categories are increased, and finally, use a classifier to classify the mapped samples.
[0004] Common subspace learning methods mainly learn transformation matrices by constructing subspace objective functions, and then use the transformation matrix to map samples to a new optimal space for recognition. In order to obtain a new optimal space, a strict optimal transformation matrix needs to be learned. When the learned transformation matrix is slightly different from the optimal transformation matrix, the space to which the sample is mapped will not be the optimal classification space, which in turn affects the classification performance of the sample, that is, it is difficult to directly learn a strict optimal transformation matrix. In addition, in the learning process of the transformation matrix, the label information of the training sample is rarely used. Even if there are a few methods that use label information to learn the transformation matrix, the learned transformation matrix cannot reduce the intra-class differences of the mapped samples and increase the inter-class differences of the mapped samples, which brings challenges to the subsequent classifier to correctly recognize the image, especially for the problem of small sample face recognition, which refers to face recognition with a relatively small number of samples available for training (for example, only a few samples or dozens of samples per class). For the above problems, existing subspace learning methods attempt to directly learn an optimal transformation matrix, but this is almost very difficult. Summary of the invention
[0005] In view of this, the present invention provides a method and device for sample classification for face recognition, which can solve the technical problem that the existing subspace learning method is difficult to directly learn an optimal transformation matrix.
[0006] In order to solve the above technical problems, the present invention is implemented as follows.
[0007] A method for sample classification for face recognition, comprising:
[0008] Step S1: obtaining a face image set, and determining a training sample set and a test sample set from the face image set;
[0009] Step S2: obtaining a label of each training sample in the training sample set, and generating a label release model of the training sample set;
[0010] Step S3: constructing a target model of the optimal space; constructing a transition space transformation matrix, splitting the target model of the optimal space into a transition space model and a label space model, and iteratively solving the transition space model and the label space model based on the labels of the training samples and the label release model;
[0011] Step S4: classify the face image to be recognized based on the transition space model and label space model obtained by iterative solution.
[0012] Preferably, the training samples in the training sample set have known labels, the labels reflect classification information of the training samples, and the labels are binary vector labels.
[0013] Preferably, the label release model is:
[0014]
[0015]
[0016] Where H = [h 1 ,...,h n ], H is the binary label matrix, which is composed of the binary labels of each training sample, T wo is a matrix whose elements are all 2, O ne is a matrix with all elements set to 1, M is the non-negative label relaxation matrix, L is the Laplace matrix, ⊙ is the Hadamard product, Tr is the trace of the matrix, and T is the transpose.
[0017] Preferably, in step S3, the conventional optimal space target model is:
[0018]
[0019] Wherein, P is the transition space transformation matrix, and the matrix P includes multiple elements, including a translation factor, a rotation factor, a scaling factor, and a transformation factor; the translation factor is used to translate the pixel points of each image in Y, the rotation factor is used to rotate the pixel points of each image in Y, the scaling factor is used to scale the pixel points of each image in Y, and the transformation factor is used to transform the pixel points of each image in Y; Y is the original space training sample set, λ is a coefficient, is the square of the F-norm of the matrix.
[0020] However, it is very difficult for the conventional subspace model to learn a strict transformation matrix to obtain the optimal subspace. Therefore, the present invention improves the conventional subspace model and transforms the task of learning a strict transformation matrix into a simple task of learning two transformation matrices.
[0021] Preferably, the target model of the optimal space of the present invention is:
[0022]
[0023] Wherein, Υ is a transition space sample set, and the transition space samples in the transition space sample set are obtained by mapping the original space training samples in the original space training sample set through the matrix P; Φ is a binary label space transformation matrix, and the binary label space transformation matrix maps the transition space samples to the label space. The binary label space transformation matrix includes a second scaling factor, a shearing factor, a second rotation factor, a reflection factor, and a second transformation factor. The second scaling factor is used to scale the pixels in the transition space sample, the shearing factor is used to shear the pixels in the transition space sample, the second rotation factor is used to rotate the pixels in the transition space sample, the reflection factor is used to reflect the pixels in the transition space sample, and the second transformation factor is used to transform the pixels in the transition space sample; β, η, δ, α, λ are parameter coefficients, Ψ is an introduced equivalent variable, Tr is the trace of the matrix, ||Υ|| * is the nuclear norm of the matrix Υ, ||P|| 1 is the l of the matrix P 1 norm, ||Φ|| 1 is the l of the matrix Φ 1 Norm.
[0024] Preferably, the transition space model is The label space model is
[0025] Preferably, the iteratively solving the transition space model and the label space model based on the labels of each training sample and the label release model includes:
[0026] Step S31: Calculate the derivative of the transition space transformation matrix P, that is, calculate Assign P to P * , where the function shrink is defined as shrink(x,a)=sign max(|x|-a,0), Y T is the transpose of Y, λ and δ are parameter coefficients;
[0027] Step S32: Taking partial derivatives of Y, we get:
[0028] Realize the update of the transition space sample set Υ; where δ, μ, β are parameter coefficients, I is the unit matrix, T is the transpose, and C is the Lagrange multiplier;
[0029] Step S33: Calculate the partial derivative of Φ to obtain:
[0030] The function shrink is defined as shrink(x,b)=signmax(|x|-b,0), which realizes the update of Φ; where λ and β are parameter coefficients;
[0031] Step S34: Calculate the partial derivative of the non-negative label relaxation matrix M to obtain:
[0032] Realize the update of M; where L is the Laplace matrix, β and η are parameter coefficients;
[0033] Step S35: Take the partial derivative of Ψ and get To achieve the update of Ψ; wherein, is the threshold operator corresponding to the singular value a, S a (∑ ij )=sign(∑ ij )max(0,|∑ ij -a|) is a soft threshold operator, X = U∑V T is the singular value decomposition of X, α and μ are parameter coefficients, and U is XX T The matrix composed of the eigenvectors of , ∑ is a diagonal matrix, V is X T The matrix of eigenvectors of X;
[0034] Step S36: Calculation Realize the update of C; where μ and α are parameter coefficients;
[0035] Step S37: Calculate μ=min(ρμ,μ max ), to update μ; where ρ and μ max is the parameter set, ρ is the proportional parameter set, μ max is the maximum value of μ;
[0036] Step S38: When ||Υ-Ψ|| ∞ <ε, terminate the update; otherwise, proceed to step S31; where ε is a termination parameter, which is a preset positive number, ||·|| ∞ is the infinity norm of the matrix.
[0037] The present invention provides a device for sample classification for face recognition, the device comprising:
[0038] A face image acquisition module: configured to acquire a face image set, and determine a training sample set and a test sample set from the face image set;
[0039] Model training module: configured to obtain the label of each training sample in the training sample set and generate a label release model for the training sample set;
[0040] Feature extraction module: configured to construct a target model of the optimal space; construct a transition space transformation matrix, split the target model of the optimal space into a transition space model and a label space model, and iteratively solve the transition space model and the label space model based on the labels of each training sample and the label release model;
[0041] Recognition module: configured to classify the face image to be recognized based on the transition space model and label space model obtained by iterative solution.
[0042] The present invention provides a computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the method as described above.
[0043] An electronic device provided by the present invention is characterized in that the electronic device comprises:
[0044] A processor, which is used to execute multiple instructions;
[0045] A memory for storing a plurality of instructions;
[0046] The plurality of instructions are used to be stored by the memory and loaded and executed by the processor to implement the method as described above.
[0047] Beneficial effects:
[0048] In order to solve the problems existing in the existing subspace learning methods and improve the recognition rate of the algorithm, the present invention splits the space learning based on label release and graph embedding, and splits the learning of the optimal subspace into the joint learning of two subspaces by introducing a transition space, that is, converting the learning of a strict optimal transformation matrix into the learning of two relaxed transformation matrices. It is easier to implement the learning of the optimal space into the learning of two subspaces. In addition, the graph model is constructed using label information and embedded in the subspace learning, which allows the sample to better retain its inherent structural information after being mapped to the new space. Furthermore, a label release model is introduced in the subspace learning process to release the label matrix, thereby increasing the inter-class differences of the mapped samples. The present invention converts the complex and strict task of learning a single matrix into a simple task of learning two matrices.
[0049] It has the following technical effects:
[0050] (1) Split the learning of the optimal subspace into the learning of two subspaces, use label information to build a graphical model, and embed the graphical model into the subspace learning.
[0051] (2) The label release model is introduced into subspace learning to achieve the purpose of expanding the differences between mapping sample classes.
[0052] (3) It enlarges the differences between classes, making it easier for subsequent classifiers to correctly identify samples.
[0053] (4) Improved the accuracy of face recognition and classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of a method flow for sample classification for face recognition provided by the present invention;
[0055] Figure 2 A schematic diagram of the framework of a method for sample classification for face recognition provided by the present invention;
[0056] Figure 3 A flow chart of a method for sample classification for face recognition provided by the present invention;
[0057] Figure 4 A schematic diagram of the structure of a device for sample classification for face recognition provided by the present invention. DETAILED DESCRIPTION
[0058] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments.
[0059] like Figure 1-Figure 3 As shown, the present invention proposes a sample classification method for face recognition, comprising the following steps:
[0060] Step S1: obtaining a face image set, and determining a training sample set and a test sample set from the face image set;
[0061] Step S2: obtaining a label of each training sample in the training sample set, and generating a label release model of the training sample set;
[0062] Step S3: constructing a target model of the optimal space; constructing a transition space transformation matrix, splitting the target model of the optimal space into a transition space model and a label space model, and iteratively solving the transition space model and the label space model based on the labels of the training samples and the label release model;
[0063] Step S4: classify the face image to be recognized based on the transition space model and label space model obtained by iterative solution.
[0064] The transition space model and the label space model correspond to two subspaces. The present invention learns the transition space model and the label space model in the same objective function. The training samples in the original space are mapped to transition space samples through the transition space transformation matrix, and then the transition space samples are mapped to the label space through the binary label space transformation matrix. After the training samples are mapped to the label space, the mapped training samples are learned to learn a transition space transformation matrix, a binary label space transformation matrix, a transition space model and a label space model with suitable and stable parameters. Subsequently, the learned transition space transformation matrix, binary label space transformation matrix, transition space model and label space model are used to transform and classify the test samples and the images to be tested.
[0065] The present invention is based on a small sample face recognition method for label release and graph embedding split space learning, and proposes an optimization method suitable for the objective function, that is, a method for splitting optimal subspace learning is proposed. By introducing a transition space, a complex and strict single matrix learning task is converted into two simple matrix learning tasks. In the subspace learning process, a graph model based on label information is embedded, that is, the graph model based on label release is embedded in the subspace learning, so that the sample is mapped to the new space and its internal structure information can be better retained. The introduction of the label release model expands the inter-class differences of the mapped samples, which helps the classifier to correctly identify the samples. The small sample face recognition method based on label release and graph embedding split space learning proposed by the present invention can effectively handle small sample face recognition problems involving noise and complex changes (such as large posture changes and large occlusions) at the same time.
[0066] The step S1, wherein:
[0067] The face image set is divided into a training sample set and a test sample set, and the training samples in the training sample set have labels, and the labels reflect the classification information of the training samples. The face images in the training sample set have binary vector labels marked by two numbers, 0 and 1. The binary vector label generation process of each image is as follows: First, the dimension of the binary vector is set to num, and num is the same as the number of classification categories. That is, assuming that there are 5 categories in total, and the number of categories corresponding to the classification corresponding to a certain sample is 3, then the binary vector label of the sample is set to 5 dimensions, and the dimension of the binary vector label is 5, and the value at the third position is set to 1, and the values at the remaining four positions are set to 0. The test sample set is used to test the two subspace models of the transition space model and the label space model that have been trained later.
[0068] Where Y = [y 1 ,...,y n ] is a training sample set, which includes n samples.
[0069] The step S2, wherein:
[0070] A label release model of the training sample set is generated based on label release, and the label release model is:
[0071]
[0072]
[0073] The label release refers to the introduction of a non-negative label relaxation matrix M and its application to the binary label matrix H to obtain a new binary label matrix. In the new binary label matrix, the label differences of images of different categories are enlarged, and the label differences of images of the same category are reduced. The purpose of introducing label release is to reduce the intra-class differences and expand the inter-class differences. Where H is a binary label matrix composed of the binary labels of each training sample, T wo is a matrix whose elements are all 2, O ne is a matrix whose elements are all 1, M is a non-negative label relaxation matrix, L is a Laplace matrix, ⊙ is a Hadamard product, Tr is the trace of the matrix, T is the transpose, and the label release model is a graph model, which prepares for subsequent graph embedding.
[0074] The step S3: constructing a target model of the optimal space; constructing a transition space transformation matrix, splitting the target model of the optimal space into a transition space model and a label space model, and iteratively solving the transition space model and the label space model based on the labels of the training samples and the graph model, wherein:
[0075] First, the target model of the conventional optimal space is constructed by the least squares method, as follows:
[0076]
[0077] Wherein, P is the transition space transformation matrix, and the matrix P includes multiple elements, including translation factor, rotation factor, scaling factor, and transformation factor; the translation factor is used to translate the pixel points of each image in Y, the rotation factor is used to rotate the pixel points of each image in Y, the scaling factor is used to scale the pixel points of each image in Y, and the transformation factor is used to transform the pixel points of each image in Y; the values of all elements in the matrix P need to be learned. H = [h 1 ,...,h n ] is the binary label matrix, Y is the original space training sample set, λ is the coefficient, is the square of the F norm of the matrix; the target model attempts to directly learn a subspace transformation matrix to reduce the intra-class differences of the mapped samples and increase the inter-class differences of the mapped samples. However, in some cases, it is difficult to directly learn the optimal subspace or transformation matrix. In this embodiment, there are dozens of elements in the matrix P, the key elements of which are translation factors, rotation factors, and scaling factors, and the other elements are conventional transformation factors.
[0078] Therefore, the present invention decomposes the entire strict complex subspace learning process into two simple subspace learning processes. Equation (2) can be rewritten as:
[0079]
[0080] in, Υ is a transition space sample set, and the transition space samples in the transition space sample set are obtained by mapping the original training samples, that is, the training samples in the original space are mapped by the matrix P. Φ is a binary label space transformation matrix, and the binary label space transformation matrix can map the transition space samples to the label space. The binary label space transformation matrix includes a second scaling factor, a shearing factor, a second rotation factor, a reflection factor, and a second transformation factor. The second scaling factor is used to scale the pixels in the transition space samples, the shearing factor is used to shear the pixels in the transition space samples, the second rotation factor is used to rotate the pixels in the transition space samples, the reflection factor is used to reflect the pixels in the transition space samples, and the second transformation factor is used to transform the pixels in the transition space samples; the values of all elements in the matrix Φ need to be learned; is the transition space term, is the label space item, (||P|| 1 +||Φ|| 1) is a sparse term. δ, β, λ are parameters.
[0081] In order to make the features in the transition space maintain the global characteristics of the samples in the original space, the nuclear norm is introduced in the transition space. Therefore, equation (3) can be rewritten as:
[0082]
[0083] For any two samples y i and j , if they are similar, then their binary label information is also close, that is,
[0084]
[0085] in, is a Laplacian matrix that satisfies L = DW, where W is an adjacency matrix describing the relationship between vertices and edges. The diagonal elements of the matrix D satisfy W ij is an element of W.
[0086] In order to better learn a better transformation matrix, we embed the graphical model in formula (5) into the subspace learning process, and then we have
[0087]
[0088] However, the traditional binary label matrix cannot reduce the intra-class differences and increase the inter-class differences. Therefore, we introduce a label release model, which can increase the differences between categories and distinguish the differences between different categories. Then, formula (6) can be rewritten as:
[0089]
[0090] in, is a matrix whose elements are all 1, is a matrix whose elements are all 2, is the non-negative label relaxation matrix.
[0091] Formula (7) can be rewritten as follows:
[0092]
[0093] Formula (8) is the target model of the optimal space, where β is the term The parameter coefficient of , Ψ is the equivalent variable introduced, is the square of the F norm of the matrix, and η is the term The parameter coefficients, Tr is the trace of the matrix, and δ is the term The parameter coefficient of α is the term ||Ψ|| *The parameter coefficient, ||Υ|| * is the nuclear norm of the matrix Υ, and λ is the term (||P|| 1 +||Φ|| 1 ) parameter coefficient, ||P|| 1 is the l of the matrix P 1 norm, ||Φ|| 1 is the l of the matrix Φ 1 Norm.
[0094] The step of constructing a transition space transformation matrix to split the target model of the optimal space into a transition space model and a label space model includes:
[0095] The transition space transformation matrix is assigned an initial value by randomly assigning an initial value. The transition space transformation matrix decomposes the target model of the optimal space into two subspace models, a transition space model and a label space model. The form of the transition space model is The label space model is in the form of
[0096] The iteratively solving the transition space model and the label space model based on the labels of each training sample and the label release model includes:
[0097] Step S31: Based on The derivative of the transition space transformation matrix P is calculated, that is, Assign P to P * , where the function shrink is defined as shrink(x,a)=sign max(|x|-a,0), Υ is the transition space sample set, Y is the original space training sample set, and Y T is the transpose of Y, λ and δ are parameter coefficients; is the term (||P|| 1 +||Φ|| 1 ) parameter coefficient, δ is the term Parameter coefficients of ;
[0098] Step S32: Based on Taking the partial derivative with respect to Υ, we get To achieve the update of the transition space sample set Υ; where δ, μ, β are parameter coefficients, I is the unit matrix, T is the transpose, C is the Lagrange multiplier; δ is the term The parameter coefficient of The parameter coefficient of Parameter coefficients of ;
[0099] Step S33: Calculate the partial derivative of Φ to obtain:
[0100] The function shrink is defined as shrink(x,b)=signmax(|x|-b,0), which realizes the update of Φ; where λ and β are parameter coefficients; λ is the term (||P|| 1 +||Φ|| 1 ) parameter coefficient, β is the term Parameter coefficients of ;
[0101] Step S34: Based on the formula Taking partial derivatives of the non-negative label relaxation matrix M, we get To achieve the update of M; where L is the Laplace matrix, β and η are parameter coefficients; β is the term The parameter coefficient of Parameter coefficients of ;
[0102] Step S35: Based on Taking the partial derivative with respect to Ψ, we get To achieve the update of Ψ; wherein, is the threshold operator corresponding to the singular value a, S a (∑ ij )=sign(∑ ij )max(0,|∑ ij -a|) is a soft threshold operator, X = U∑V T is the singular value decomposition of X, α and μ are parameter coefficients, and U is XX T The matrix composed of the eigenvectors of , ∑ is a diagonal matrix, V is X T The matrix of the eigenvectors of X; α is the term ||Ψ|| * The parameter coefficient of Parameter coefficients of ;
[0103] Step S36: Calculation To achieve the update of C; where μ and α are parameter coefficients; μ is the term The parameter coefficient of α is the term ||Ψ|| * Parameter coefficients of ;
[0104] Step S37: Calculate μ=min(ρμ,μ max ), to update μ; where ρ and μ max is the parameter set, ρ is the proportional parameter set, μ max is the maximum value of μ;
[0105] Step S38: When ||Υ-Ψ|| ∞ <ε, terminate the update; otherwise, proceed to step S31, ε is the termination parameter, which is a preset positive number, ||·|| ∞ is the infinity norm of the matrix.
[0106] In this embodiment, the transition space sample set Y, the transition space transformation matrix P, and the binary label space transformation matrix Φ can be obtained through multiple iterative updates.
[0107] The step S4: classifying the face image to be recognized based on the transition space model and label space model obtained by iterative solution, comprises:
[0108] Based on the iteratively solved transition space model and label space model, for each test sample θ in the test set, the test sample is mapped, that is, based on the formula F=ΦPθ, a regression vector of the test sample θ is determined;
[0109] Input each mapped test sample into the SVM classifier. If the test result meets the set requirements, it is determined that the matrices Φ and P used for mapping are valid and the trained matrices Φ and P are obtained. Otherwise, adjust the parameter values and retrain the model.
[0110] Further, based on the trained matrices Φ and P, a face image to be identified is obtained, and the face image to be identified I mage Mapping is performed based on the matrix to obtain the mapped image ΦPI mage , input the mapped image into the SVM classifier to obtain the classification result.
[0111] The present invention also provides a device for sample classification for face recognition, such as Figure 4 As shown, the device comprises:
[0112] A face image acquisition module: configured to acquire a face image set, and determine a training sample set and a test sample set from the face image set;
[0113] Model training module: configured to obtain the label of each training sample in the training sample set and generate a label release model for the training sample set;
[0114] Feature extraction module: configured to construct a target model of the optimal space; construct a transition space transformation matrix, split the target model of the optimal space into a transition space model and a label space model, and iteratively solve the transition space model and the label space model based on the labels of each training sample and the label release model;
[0115] Recognition module: configured to classify the face image to be recognized based on the transition space model and label space model obtained by iterative solution.
[0116] The above specific embodiments only describe the design principle of the present invention. The shapes and names of the components in the description may be different and are not limited. Therefore, those skilled in the art in the field of the present invention may modify or replace the technical solutions recorded in the above embodiments; and these modifications and replacements do not deviate from the creative purpose and technical solutions of the present invention and should all fall within the protection scope of the present invention.
Claims
1. A method for sample classification for face recognition, It is characterized in that include: Step S1: obtaining a face image set, and determining a training sample set and a test sample set from the face image set; Step S2: obtaining a label of each training sample in the training sample set, and generating a label release model of the training sample set; Step S3: constructing a target model of the optimal space; constructing a transition space transformation matrix, splitting the target model of the optimal space into a transition space model and a label space model, and iteratively solving the transition space model and the label space model based on the labels of the training samples and the label release model; Step S4: classifying the face image to be recognized based on the transition space model and label space model obtained by iterative solution; The label release model is: Where H = [h 1 ,...,h n ], H is the binary label matrix, which is composed of the binary labels of each training sample, T wo is a matrix whose elements are all 2, O ne is a matrix with all elements set to 1, M is the non-negative label relaxation matrix, L is the Laplace matrix, ⊙ is the Hadamard product, Tr is the trace of the matrix, and T is the transpose.
2. The method according to claim 1, It is characterized in that The training samples in the training sample set have labels, the labels reflect the classification information of the training samples, and the labels are binary vector labels.
3. The method according to claim 2, It is characterized in that In step S3, the target model of the optimal space is: Wherein, P is the transition space transformation matrix, and the matrix P includes multiple elements, including translation factor, rotation factor, scaling factor, and transformation factor; the translation factor is used to translate the pixel points of each image in Y, the rotation factor is used to rotate the pixel points of each image in Y, the scaling factor is used to scale the pixel points of each image in Y, and the transformation factor is used to transform the pixel points of each image in Y; Y is the original space training sample set, λ is the coefficient, is the square of the F-norm of the matrix.
4. The method according to claim 3, It is characterized in that The target model of the optimal space is transformed into: Wherein, γ is a transition space sample set, and the transition space samples in the transition space sample set are obtained by mapping the original space training samples in the original space training sample set through the matrix P; Φ is a binary label space transformation matrix, and the binary label space transformation matrix maps the transition space samples to the label space. The binary label space transformation matrix includes a second scaling factor, a shearing factor, a second rotation factor, a reflection factor, and a second transformation factor. The second scaling factor is used to scale the pixels in the transition space sample, the shearing factor is used to shear the pixels in the transition space sample, the second rotation factor is used to rotate the pixels in the transition space sample, the reflection factor is used to reflect the pixels in the transition space sample, and the second transformation factor is used to transform the pixels in the transition space sample; β, η, δ, α, λ are parameter coefficients, Ψ is an introduced equivalent variable, Tr is the trace of the matrix, ||γ|| * is the nuclear norm of the matrix γ, ||P|| 1 is the l of the matrix P 1 norm, ||Φ|| 1 is the l of the matrix Φ 1 Norm.
5. The method according to claim 4, It is characterized in that The transition space model is The label space model is 6. The method according to claim 5, It is characterized in that The iteratively solving the transition space model and the label space model based on the labels of each training sample and the label release model includes: Step S31: Calculate the derivative of the transition space transformation matrix P, that is, calculate Assign P to P * , where the function shrink is defined as shrink(x,a)=sign max(|x|-a,0), Y T is the transpose of Y, λ and δ are parameter coefficients; Step S32: Calculate the partial derivative of γ to obtain: Realize the update of the transition space sample set γ; where δ, μ, β are parameter coefficients, I is the unit matrix, T is the transpose, and C is the Lagrange multiplier; Step S33: Calculate the partial derivative of Φ to obtain: The function shrink is defined as shrink(x,b)=signmax(|x|-b,0), which realizes the update of Φ; where λ and β are parameter coefficients; Step S34: Calculate the partial derivative of the non-negative label relaxation matrix M to obtain: Realize the update of M; where L is the Laplace matrix, β and η are parameter coefficients; Step S35: Take the partial derivative of Ψ and get To achieve the update of Ψ, where θ a (X)=US a (Σ)V T is the threshold operator corresponding to the singular value a, S a (∑ ij )=sign(∑ ij )max(0,|Σ ij -a|) is a soft threshold operator, X = UΣV T is the singular value decomposition of X, α and μ are parameter coefficients, and U is XX T The matrix composed of the eigenvectors of X, Σ is a diagonal matrix, V is T The matrix of eigenvectors of X; Step S36: Calculation Realize the update of C; where μ and α are parameter coefficients; Step S37: Calculate μ=min(ρμ,μ max ), to update μ; where ρ and μ max is the parameter set, ρ is the proportional parameter set, μ max is the maximum value of μ; Step S38: When ||γ-Ψ|| ∞ <ε, terminate the update; otherwise, proceed to step S31; where ε is a termination parameter, which is a preset positive number, ||·|| ∞ is the infinity norm of the matrix.
7. A device for sample classification for face recognition, It is characterized in that The device comprises: A face image acquisition module: configured to acquire a face image set, and determine a training sample set and a test sample set from the face image set; Model training module: configured to obtain the label of each training sample in the training sample set and generate a label release model for the training sample set; Feature extraction module: configured to construct a target model of the optimal space; construct a transition space transformation matrix, split the target model of the optimal space into a transition space model and a label space model, and iteratively solve the transition space model and the label space model based on the labels of each training sample and the label release model; Recognition module: It is configured to classify the face image to be recognized based on the transition space model and label space model obtained by iterative solution; The label release model is: Where H = [h 1 ,...,h n ], H is the binary label matrix, which is composed of the binary labels of each training sample, T wo is a matrix whose elements are all 2, O ne is a matrix with all elements set to 1, M is the non-negative label relaxation matrix, L is the Laplace matrix, ⊙ is the Hadamard product, Tr is the trace of the matrix, and T is the transpose.
8. A computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the method as claimed in any one of claims 1 to 6.
9. An electronic device, It is characterized in that The electronic device comprises: A processor, which is used to execute multiple instructions; A memory for storing a plurality of instructions; The plurality of instructions are used to be stored in the memory and loaded and executed by the processor according to any one of claims 1 to 6.
