Classification method and classifier based on competition and non-negative representation

By introducing class competition constraint regular terms and ADMM solution methods in non-negative representation classifiers, the problem of low classification accuracy in the prior art is solved, and higher classification accuracy and lower misclassification probability are achieved.

CN119810563APending Publication Date: 2025-04-11WUXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510043757.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Existing classifiers based on non-negative representations are insufficient when limiting heterogeneous samples, resulting in low classification accuracy and high probability of misclassification.

Method used

The class competition constraint regular terms are introduced, and the representation coefficients are solved through the Co-NRC objective function and the alternating direction multiplier method (ADMM), which enhances the classification accuracy of the classifier.

Benefits of technology

It effectively improves the classification accuracy and reduces the probability of misclassification. It is suitable for tasks such as face recognition, object classification and visual tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810563A_ABST
    Figure CN119810563A_ABST
Patent Text Reader

Abstract

The invention provides a classification method and classifier based on competition and non-negative representation. The method comprises the following steps: acquiring a training sample set and a test sample; performing normalization processing on the training samples in the training sample set; solving a representation coefficient of the test sample on the normalized training sample set by using a preset Co-NRC objective function; calculating the residual error of the test sample on each category in the normalized training sample set; classifying according to the residual error, and identifying the test sample as a category corresponding to the minimum residual error; according to the method, a class competition constraint regular term is introduced on the basis of NRC, competition constraint can create a fierce competition environment, all classes compete to represent test samples, heterogeneous samples are further punished on the basis of non-negative constraint, the representation contribution of homogeneous samples is larger, and the classification accuracy is effectively improved; the method can be widely applied to tasks such as face recognition, object classification and visual tracking, and has a good application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of face recognition (FI), and more specifically, to a classification method and a classifier based on competition and non-negative representation. Background Art

[0002] Classification tasks have always been one of the hot research directions in the field of computer vision and pattern recognition. In recent years, the Representation Based Classification Method (RBCM) has attracted widespread attention from many experts and scholars due to its good accuracy and interpretability. It uses the intrinsic structure and regularity of the data to represent the test sample as a linear combination of an overcomplete dictionary, and then uses the representation coefficient for classification. Compared with classic classifiers such as Support Vector Machine (SVM), Random Forest (RF), Nearest Neighbor (NN), RBCM has a lower computational complexity and good robustness to noise and outliers: Compared with deep learning image classification methods such as Convolutional Neural Network (CNN) and Graph Neural Network (GNN), RBCM does not need to spend a lot of time to train samples to learn parameters. Therefore, RBCM is widely used in tasks such as face recognition, target tracking, and scene classification.

[0003] In the field of face recognition, the sparse representation based classifier (SRC) is considered to be a pioneering work. It treats all training samples as an overcomplete dictionary, and then uses the linear combination of the elements in the dictionary to represent the test samples, and applies a linear combination of the representation coefficients to the representation coefficients. norm constraint to make it sparse, and finally calculate the class reconstruction residual to classify the test sample. On this basis, some scholars have further carried out corresponding research work. They believe that SRC overemphasizes The role of norm constraint in face classification is neglected, so a classifier based on collaborative representation (CRC) is proposed. The norm constraint achieves a classification effect comparable to SRC while significantly reducing the computational burden.

[0004] However, the representation coefficients obtained by SRC, CRC and their improved methods usually contain negative numbers, which generally correspond to heterogeneous samples, which is of little benefit to the classification of test samples. Nonnegative Representation Based Classification (NRC) adds non-negative constraints to the representation coefficients. Non-negative representation can enhance the representation ability of homogeneous samples while limiting the representation ability of heterogeneous samples. NRC shows excellent performance in multiple visual classification tasks. However, NRC still has shortcomings, because it is not enough to use non-negative constraints to limit heterogeneous samples. Some heterogeneous samples similar to test samples will still show positive coefficients, which will affect the reconstruction of test samples and increase the probability of NRC misclassification. Summary of the invention

[0005] In order to overcome the defect of low classification accuracy caused by the NRC in the above-mentioned prior art that only non-negative constraints are used to restrict heterogeneous samples, the present invention provides a classification method and classifier (Co-NRC) based on competition and non-negative representation. On the basis of the non-negative representation classifier, a class competition constraint regularization term is added, which effectively improves the classification accuracy. The method can be widely used in tasks such as face recognition, object classification, and visual tracking, and has good application prospects.

[0006] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0007] A classification method based on competition and non-negative representation, comprising the following steps:

[0008] S1: Obtain a training sample set and a test sample; the training sample set includes a number of training samples of different categories;

[0009] S2: performing normalization processing on the training samples in the training sample set;

[0010] S3: using a preset Co-NRC objective function to solve the representation coefficient of the test sample on the normalized training sample set;

[0011] S4: Calculate the residual of the test sample in each category of the normalized training sample set;

[0012] S5: Classify according to the residual, and identify the test sample as the category corresponding to the minimum residual.

[0013] Preferably, in step S1, the training sample set is represented as:

[0014]

[0015]

[0016] Among them, X i is the set of training samples of the i-th category; n i is the number of samples of the i-th category training sample; K is the total number of sample categories; n is the total number of training samples; x is the feature vector of each training sample; d is the feature dimension of each training sample; Represents the field of real numbers.

[0017] Preferably, in step S2, the feature vector of each training sample in the training sample set is divided by its corresponding norm, so that the numerical ranges of the feature vectors of all training samples in each dimension remain consistent, thus completing the normalization process.

[0018] Preferably, in step S3, the Co-NRC objective function is:

[0019]

[0020] X -i =[X1, ..., X i-1 , X i+1 , ..., X K ]

[0021] in, represents the error term; represents the competitive constraint; y is the test sample; c is the representation coefficient of the test sample y on the training sample X; λ>0 is the regularization parameter used to control the importance of the competitive constraint; X -i is the matrix of training samples of all classes except the i-th training sample; c -i For X -i The corresponding coefficient vector; It means that if you want to use the i-th class training sample to represent y, you need to minimize the representation results of other classes; express The square of the norm.

[0022] Preferably, in step S3, the variable splitting method is used to solve the representation coefficient c, and the specific steps are as follows:

[0023] By introducing the auxiliary variable z, the Co-NRC objective function is rewritten as:

[0024]

[0025] The augmented Lagrangian function corresponding to the rewritten Co-NRC objective function is:

[0026]

[0027] Where δ is the Lagrange multiplier vector, μ>0 is the penalty parameter, and <δ,zc> is the inner product of vector δ and vector zc;

[0028] The rewritten Co-NRC objective function is solved by the alternating direction multiplier method to obtain the representation coefficient c.

[0029] Preferably, solving the rewritten Co-NRC objective function by the alternating direction multiplier method comprises:

[0030] Initializing the Lagrange multiplier vector δ, the auxiliary variable z and the representation coefficient c, expressed as c0=z0=δ0=0;

[0031] Adopt (c t , z t ) and δ t represent the optimization variables and Lagrange multipliers when the iteration is t (t=0, 1, 2, ..., T), respectively, where T is the preset threshold;

[0032] An alternating optimization strategy is adopted to update the representation coefficient c, auxiliary variable z and Lagrange multiplier vector δ one by one. When optimizing one variable, other variables are fixed. Three sub-problems are constructed and solved. The three sub-problems are used to update the representation coefficient c, auxiliary variable z and Lagrange multiplier vector δ respectively.

[0033] Preferably, the alternating optimization strategy is specifically:

[0034] Fix the auxiliary variable z and the Lagrange multiplier vector δ, update the representation coefficient c, and construct the first subproblem. The expression of the first subproblem is:

[0035]

[0036] Constructing the Matrix Matrix P -i The elements in the column corresponding to the i-th category are 0, and the rest are 1; using Rewrite the first subproblem as:

[0037]

[0038] For the rewritten first subproblem, find the partial derivative with respect to the coefficient c and set it to zero, and get the analytical solution of c:

[0039]

[0040] in, I is the identity matrix;

[0041] Fix the representation coefficient c and the Lagrange multiplier vector δ, update the auxiliary variable z, and construct the second subproblem. The expression of the second subproblem is:

[0042]

[0043] The solution for the auxiliary variable z is:

[0044]

[0045] Fix the representation coefficient c and auxiliary variable z, update the Lagrange multiplier vector δ, and construct the third subproblem. The expression of the third subproblem is:

[0046] δ t+1 =δ t +μ(z t+1 -c t+1 )

[0047] The rewritten Co-NRC objective function is solved by alternately updating the representation coefficient c and the auxiliary variable z, and updating the Lagrange multiplier vector δ until the convergence condition is met or the number of iterations exceeds the preset threshold T.

[0048] Preferably, the convergence condition is: satisfying ||c t -z t ||2≤η, ||c t+1 -c t ||2≤η and ||z t+1 -z t ||2≤η, where η is a preset convergence threshold.

[0049] Preferably, in step S4, the residual of the test sample y in each category of the normalized training sample set is calculated, which is expressed as:

[0050] r i =||yX i c i ||2

[0051] Among them, r i is the residual of the test sample y in the i-th category; X i is the set of training samples of the i-th category, c i is the coefficient vector corresponding to the i-th type of training samples;

[0052] In step S5, classification is performed according to the residual, and the test sample y is identified as the category corresponding to the minimum residual, which is expressed as:

[0053]

[0054] Among them, Lable(y) represents the final category of the test sample y.

[0055] The present invention also provides a classifier based on competition and non-negative representation, wherein the classifier stores a computer program, and when the classifier executes the computer program, the steps of the above-mentioned classification method based on competition and non-negative representation are implemented.

[0056] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0057] The present invention provides a classification method and a classifier based on competition and non-negative representation. First, a training sample set and a test sample are obtained; then, the training samples in the training sample set are normalized; then, a preset Co-NRC objective function is used to solve the representation coefficient of the test sample on the normalized training sample set; then, the residual of the test sample on each category in the normalized training sample set is calculated; finally, classification is performed according to the residual, and the test sample is identified as the category corresponding to the minimum residual;

[0058] The classification method of the present invention (denoted as Co-NRC) introduces a class competition constraint regularization term on the basis of NRC. The competition constraint can create a fierce competition environment, allowing all classes to compete for the representation test samples, and further punish heterogeneous samples on the basis of non-negative constraints, so that the representation contribution of homogeneous samples is greater, effectively improving the classification accuracy; at the same time, the competition and non-negative representation classification method of the present invention uses the alternating direction multiplier method (ADMM) for iterative solution, which not only maintains the decomposition but also ensures good convergence; the present invention can be widely used in tasks such as face recognition, object classification, and visual tracking, and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is a flow chart of a classification method based on competition and non-negative representation provided in Example 1.

[0060] Figure 2 This is a schematic diagram of a classification method based on competition and non-negative representation provided in Example 2. DETAILED DESCRIPTION

[0061] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;

[0062] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;

[0063] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0064] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0065] Example 1

[0066] like Figure 1 As shown, this embodiment provides a classification method based on competition and non-negative representation, comprising the following steps:

[0067] S1: Obtain a training sample set and a test sample; the training sample set includes a number of training samples of different categories;

[0068] S2: performing normalization processing on the training samples in the training sample set;

[0069] S3: using a preset Co-NRC objective function to solve the representation coefficient of the test sample on the normalized training sample set;

[0070] S4: Calculate the residual of the test sample in each category of the normalized training sample set;

[0071] S5: Classify according to the residual, and identify the test sample as the category corresponding to the minimum residual.

[0072] In the specific implementation process, firstly, the training sample set and the test sample are obtained; then the training samples in the training sample set are normalized; then the representation coefficient of the test sample on the normalized training sample set is solved by using the preset Co-NRC objective function; then the residual of the test sample on each category in the normalized training sample set is calculated; finally, the residual is classified according to the residual, and the test sample is identified as the category corresponding to the minimum residual;

[0073] For representation-based pattern classification tasks, the key issue is how to obtain the discriminant representation coefficient on the training samples, which can be used to approximate the test samples from the isomorphic training samples; then by calculating the residual, the test sample is identified as the category corresponding to the minimum residual; the Co-NRC proposed in this embodiment introduces a competition constraint on the basis of non-negative representation, allowing all classes to compete to represent the test sample, which can impose a greater penalty on heterogeneous samples, enhance the representation of the correct class, and effectively improve the classification accuracy.

[0074] Example 2

[0075] This embodiment provides a classification method based on competition and non-negative representation, including the following steps:

[0076] S1: Obtain a training sample set and a test sample; the training sample set includes a number of training samples of different categories;

[0077] S2: performing normalization processing on the training samples in the training sample set;

[0078] S3: using a preset Co-NRC objective function to solve the representation coefficient of the test sample on the normalized training sample set;

[0079] S4: Calculate the residual of the test sample in each category of the normalized training sample set;

[0080] S5: Classify according to the residual, and identify the test sample as a category corresponding to the minimum residual;

[0081] In step S1, the training sample set is represented as:

[0082]

[0083]

[0084] Among them, X i is the set of training samples of the i-th category; n i is the number of samples of the i-th category training sample; K is the total number of sample categories; n is the total number of training samples; x is the feature vector of each training sample; d is the feature dimension of each training sample; represents the field of real numbers;

[0085] In step S2, the feature vector of each training sample in the training sample set is divided by its corresponding norm, so that the numerical range of the feature vectors of all training samples in each dimension remains consistent, completing the normalization process;

[0086] In step S3, the Co-NRC objective function is:

[0087]

[0088] X -i =[X1,…,X i-1 ,X i+1 ,…,X K ]

[0089] in, represents the error term; represents the competitive constraint; y is the test sample; c is the representation coefficient of the test sample y on the training sample X; λ>0 is the regularization parameter used to control the importance of the competitive constraint; X -i is the matrix of training samples of all classes except the i-th training sample; c -i For X -i The corresponding coefficient vector; It means that if you want to use the i-th class training sample to represent y, you need to minimize the representation results of other classes; express The square of the norm;

[0090] In step S3, the variable splitting method is used to solve the expression coefficient c, and the specific steps are as follows:

[0091] By introducing the auxiliary variable z, the Co-NRC objective function is rewritten as:

[0092]

[0093] The augmented Lagrangian function corresponding to the rewritten Co-NRC objective function is:

[0094]

[0095] Where δ is the Lagrange multiplier vector, μ>0 is the penalty parameter, and <δ,zc> is the inner product of vector δ and vector zc;

[0096] The rewritten Co-NRC objective function is solved by the alternating direction multiplier method to obtain the expression coefficient c, which includes:

[0097] Initializing the Lagrange multiplier vector δ, the auxiliary variable z and the representation coefficient c, expressed as c0=z0=δ0=0;

[0098] Adopt (c t , z t ) and δ t represent the optimization variables and Lagrange multipliers when the iteration is t (t=0, 1, 2, ..., T), respectively, where T is the preset threshold;

[0099] An alternating optimization strategy is adopted to update the representation coefficient c, auxiliary variable z and Lagrange multiplier vector δ one by one. When optimizing one variable, other variables are fixed, and three sub-problems are constructed and solved. The three sub-problems are used to update the representation coefficient c, auxiliary variable z and Lagrange multiplier vector δ respectively;

[0100] The alternating optimization strategy is specifically as follows:

[0101] Fix the auxiliary variable z and the Lagrange multiplier vector δ, update the representation coefficient c, and construct the first subproblem. The expression of the first subproblem is:

[0102]

[0103] Constructing the Matrix Matrix P -i The elements in the column corresponding to the i-th category are 0, and the rest are 1; using Rewrite the first subproblem as:

[0104]

[0105] For the rewritten first subproblem, find the partial derivative with respect to the coefficient c and set it to zero, and get the analytical solution of c:

[0106]

[0107] in, I is the identity matrix;

[0108] Fix the representation coefficient c and the Lagrange multiplier vector δ, update the auxiliary variable z, and construct the second subproblem. The expression of the second subproblem is:

[0109]

[0110] The solution for the auxiliary variable z is:

[0111]

[0112] Fix the representation coefficient c and auxiliary variable z, update the Lagrange multiplier vector δ, and construct the third subproblem. The expression of the third subproblem is:

[0113] δ t+1 =δ t +μ(z t+1 -c t+1 )

[0114] By alternately updating the representation coefficient c and the auxiliary variable z, and updating the Lagrange multiplier vector δ, the rewritten Co-NRC objective function is solved until the convergence condition is met or the number of iterations exceeds the preset threshold T;

[0115] The convergence condition is: satisfying ‖c t -z t ‖2≤η, ‖c t+1 -c t ‖2≤η and ‖z t+1 -z t ‖2≤η, where η is the preset convergence threshold;

[0116] In step S4, the residual of the test sample y in each category of the normalized training sample set is calculated, which is expressed as:

[0117] r i =||yX i c i ||2 Among them, r i is the residual of the test sample y in the i-th category; X i is the set of training samples of the i-th category, ci is the coefficient vector corresponding to the i-th type of training samples;

[0118] In step S5, classification is performed according to the residual, and the test sample y is identified as the category corresponding to the minimum residual, which is expressed as:

[0119]

[0120] Among them, Lable(y) represents the final category of the test sample y.

[0121] In the specific implementation process, Figure 2 As shown, this embodiment takes face recognition as an example ( Figure 2 The faces in the figure have been censored and are only used as examples). First, we obtain the training sample set and the test sample y. The training sample set is represented as:

[0122]

[0123]

[0124] Among them, X i is the set of training samples of the i-th category; n i is the number of samples of the i-th category training sample; K is the total number of sample categories; n is the total number of training samples; x is the feature vector of each training sample; d is the feature dimension of each training sample; represents the field of real numbers;

[0125] Then, the training samples in the training sample set are Norm normalization is to divide the feature vector of each training sample in the training sample set by its corresponding Norm, so that the numerical range of the feature vectors of all training samples in each dimension is consistent, completing normalization;

[0126] Then, the preset Co-NRC objective function is used to solve the representation coefficient of the test sample on the normalized training sample set;

[0127] In this embodiment, the Co-NRC objective function is:

[0128]

[0129] X -i =[X1, ..., X i-1 , X i+1 , ..., X K ]

[0130] in, represents the error term; represents the competitive constraint; y is the test sample; c is the representation coefficient of the test sample y on the training sample X; λ>0 is the regularization parameter used to control the importance of the competitive constraint; X -i is the matrix of training samples of all classes except the i-th training sample; c -i For X -i The corresponding coefficient vector; It means that if you want to use the i-th class training sample to represent y, you need to minimize the representation results of other classes; express The square of the norm;

[0131] Co-NRC is a non-negative least squares problem, which requires the variable splitting method to solve the expression coefficient c. The specific steps are as follows:

[0132] By introducing the auxiliary variable z, the Co-NRC objective function is rewritten as:

[0133]

[0134] The augmented Lagrange function (ALF) corresponding to the rewritten Co-NRC objective function is:

[0135]

[0136] Where δ is the Lagrange multiplier vector, μ>0 is the penalty parameter, and <δ,zc> is the inner product of vector δ and vector zc;

[0137] The rewritten Co-NRC objective function is solved by the alternating direction multiplier method (ADMM) to obtain the representation coefficient c;

[0138] Specifically, the Lagrange multiplier vector δ, the auxiliary variable z and the representation coefficient c are first initialized, expressed as c0 = z0 = δ0 = 0;

[0139] Adopt (c t , z t ) and δ t They represent the optimization variables and Lagrange multipliers when the iteration is t (t = 0, 1, 2, ..., T), respectively, where T is the preset threshold;

[0140] An alternating optimization strategy is adopted to update the representation coefficient c, auxiliary variable z and Lagrange multiplier vector δ one by one. When optimizing one variable, other variables are fixed, and three sub-problems are constructed and solved. The three sub-problems are used to update the representation coefficient c, auxiliary variable z and Lagrange multiplier vector δ respectively;

[0141] In this embodiment, the detailed steps of the alternating optimization strategy are as follows:

[0142] 1) Fix the auxiliary variable z and the Lagrange multiplier vector δ, update the representation coefficient c, and construct the first subproblem. The expression of the first subproblem is:

[0143]

[0144] Constructing the Matrix Matrix P -i The elements in the column corresponding to the i-th category are 0, and the rest are 1; using Rewrite the first subproblem as:

[0145]

[0146] For the rewritten first subproblem, find the partial derivative with respect to the coefficient c and set it to zero, and get the analytical solution of c:

[0147]

[0148] in, I is the identity matrix;

[0149] 2) Fix the representation coefficient c and the Lagrange multiplier vector δ, update the auxiliary variable z, and construct the second subproblem. The expression of the second subproblem is:

[0150]

[0151] The solution for the auxiliary variable z is:

[0152]

[0153] 3) Fix the representation coefficient c and auxiliary variable z, update the Lagrange multiplier vector δ, and construct the third subproblem. The expression of the third subproblem is:

[0154] δ t+1 =δ t +μ(z t+1 -c t+1 )

[0155] By alternately updating the representation coefficient c and the auxiliary variable z, and updating the Lagrange multiplier vector δ, the rewritten Co-NRC objective function is solved until the convergence condition is met or the number of iterations exceeds the preset threshold T;

[0156] In this embodiment, the convergence condition of ADMM is: satisfying ||c t -z t ||2≤η, ||c t+1 -c t ||2≤η and ||z t+1 -z t||2≤η, where η is the preset convergence threshold;

[0157] Then calculate the residual of the test sample y in each category of the normalized training sample set, expressed as:

[0158] r i =||yX i c i ||2

[0159] Among them, r i is the residual of the test sample y in the i-th category; X i is the set of training samples of the i-th category, c i is the coefficient vector corresponding to the i-th type of training samples;

[0160] Finally, the residual is classified and the test sample y is identified as the category corresponding to the minimum residual, which is expressed as:

[0161]

[0162] Among them, Lable(y) represents the final category of the test sample y;

[0163] In order to better illustrate the performance of the Co-NRC classification method, this embodiment further performs classification on the AR dataset and the Extended Yale B dataset, and compares Co-NRC with the sparse representation classifier SRC, the collaborative representation classifier CRC, and the non-negative representation classifier NRC;

[0164] The AR dataset contains more than 4,000 facial color images of 126 people, including 70 males and 56 females. These images have different facial expressions, lighting conditions, and occlusions. In this example, a subset of 1,400 images from 50 males and 50 females was selected, with half of the 14 images of each subject used as a training set and the other half as a test set. In the image preprocessing step, all images were cropped to a size of 60×43 and normalized to unit norm, and finally PCA (Principal Component Analysis) is used to project the image into subspaces with dimensions of 54, 120, and 300. Table 1 lists the classification accuracy of several methods on the AR dataset.

[0165] Table 1 Classification accuracy of different methods on AR dataset

[0166] Dimensions SRC CRC NRC Co-NRC 54 82.1 80.3 85.2 85.6 120 88.3 90.0 91.3 91.7 300 90.3 93.7 93.3 94.1

[0167] It can be seen that Co-NRC achieved the best classification results in all three dimensions, which were 85.6%, 91.7%, and 94.1%, respectively, which were 0.4%, 0.4%, and 0.8% higher than NRC's 85.2%, 91.3%, and 93.3%, respectively, and the improvement was more obvious than SRC and CRC;

[0168] The Extended Yale B dataset contains 2432 face images of 38 subjects, each of which has about 64 near-frontal images taken under different lighting conditions. In this embodiment, the dataset is randomly divided into two halves, one half is used as training samples, and the other half is used as test samples. All images are cropped to a size of 54×48 and normalized to The norm standard is then projected into subspaces with dimensions of 84, 150, and 300. The classification accuracy of several methods on the Extended Yale B dataset is listed in Table 2.

[0169] Table 2 Classification accuracy of different methods on the Extended Yale B dataset

[0170] Dimensions SRC CRC NRC Co-NRC 84 95.5 95.0 95.2 96.9 150 96.9 96.3 96.9 97.4 300 97.7 97.9 98.4 98.4

[0171] It can be seen that in the 84 and 150 dimensions, Co-NRC achieved the best classification results, 96.9% and 97.4% respectively, which were 1.7% and 0.5% higher than NRC's 95.2% and 96.9% respectively. In the 300 dimension, the classification results of Co-NRC and NRC were the same, both 98.4%. In addition, in these three dimensions, the classification accuracy of Co-NRC was higher than that of SRC and CRC.

[0172] It can be seen that the classification method based on competition and non-negative representation (Co-NRC) proposed in this embodiment introduces a class competition constraint regularization term on the basis of NRC. The competition constraint can create a fierce competition environment, allowing all classes to compete for the representation test samples, and further punish heterogeneous samples on the basis of non-negative constraints, so that the representation contribution of homogeneous samples is greater; in addition, the classification results of this method on the AR dataset and the Extended Yale B dataset also demonstrate the accuracy and robustness of this method in the field of face recognition.

[0173] The same or similar reference numerals correspond to the same or similar components;

[0174] The terms used in the drawings to describe positional relationships are only used for illustrative purposes and should not be construed as limiting this patent;

[0175] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A classification method based on competition and non-negative representation, characterized in that: The following steps are involved: S1: Obtain a training sample set and a test sample; the training sample set includes a number of training samples of different categories; S2: performing normalization processing on the training samples in the training sample set; S3: using a preset Co-NRC objective function to solve the representation coefficient of the test sample on the normalized training sample set; S4: Calculate the residual of the test sample in each category of the normalized training sample set; S5: Classify according to the residual, and identify the test sample as the category corresponding to the minimum residual.

2. A classification method based on competition and non-negative representation according to claim 1, characterized in that: In step S1, the training sample set is represented as: Among them, X i is the set of training samples of the i-th category; n i is the number of samples of the i-th category training sample; K is the total number of sample categories; n is the total number of training samples; x is the feature vector of each training sample; d is the feature dimension of each training sample; Represents the field of real numbers.

3. A classification method based on competition and non-negative representation according to claim 1, characterized in that: In step S2, the feature vector of each training sample in the training sample set is divided by its corresponding norm, so that the numerical ranges of the feature vectors of all training samples in each dimension remain consistent, thus completing the normalization process.

4. A classification method based on competition and non-negative representation according to claim 1, characterized in that: In step S3, the Co-NRC objective function is: X -i =[X1,...,X i-1 ,X i+1 ,...,X K ] in, represents the error term; represents the competitive constraint; y is the test sample; c is the representation coefficient of the test sample y on the training sample X; λ>0 is the regularization parameter used to control the importance of the competitive constraint; X -i is the matrix of training samples of all classes except the i-th class training sample; c -i For X -i The corresponding coefficient vector; It means that if you want to use the i-th class training sample to represent y, you need to minimize the representation results of other classes; express The square of the norm.

5. A classification method based on competition and non-negative representation according to claim 4, characterized in that: In step S3, the variable splitting method is used to solve the expression coefficient c, and the specific steps are as follows: By introducing the auxiliary variable z, the Co-NRC objective function is rewritten as: The augmented Lagrangian function corresponding to the rewritten Co-NRC objective function is: Where δ is the Lagrange multiplier vector, μ>0 is the penalty parameter, and <δ,zc> is the inner product of vector δ and vector zc; The rewritten Co-NRC objective function is solved by the alternating direction multiplier method to obtain the representation coefficient c.

6. A classification method based on competition and non-negative representation according to claim 5, characterized in that: The method of solving the rewritten Co-NRC objective function by the alternating direction multiplier method includes: Initializing the Lagrange multiplier vector δ, the auxiliary variable z and the representation coefficient c, expressed as c0=z0=δ0=0; Adopt (c t , z t ) and δ t represent the optimization variables and Lagrange multipliers when the iteration is t (t=0, 1, 2, ..., T), respectively, where T is the preset threshold; An alternating optimization strategy is adopted to update the representation coefficient c, auxiliary variable z and Lagrange multiplier vector δ one by one. When optimizing one variable, other variables are fixed. Three sub-problems are constructed and solved. The three sub-problems are used to update the representation coefficient c, auxiliary variable z and Lagrange multiplier vector δ respectively.

7. A classification method based on competition and non-negative representation according to claim 6, characterized in that: The alternating optimization strategy is specifically as follows: Fix the auxiliary variable z and the Lagrange multiplier vector δ, update the representation coefficient c, and construct the first subproblem. The expression of the first subproblem is: Constructing the Matrix Matrix P -i The elements in the column corresponding to the i-th category are 0, and the rest are 1; using Rewrite the first subproblem as: For the rewritten first subproblem, find the partial derivative with respect to the coefficient c and set it to zero, and get the analytical solution of c: in, I is the identity matrix; Fix the representation coefficient c and the Lagrange multiplier vector δ, update the auxiliary variable z, and construct the second subproblem. The expression of the second subproblem is: The solution for the auxiliary variable z is: Fix the representation coefficient c and auxiliary variable z, update the Lagrange multiplier vector δ, and construct the third subproblem. The expression of the third subproblem is: d t+1 =d t +μ(z t+1 -c t+1 ) The rewritten Co-NRC objective function is solved by alternately updating the representation coefficient c and the auxiliary variable z, and updating the Lagrange multiplier vector δ until the convergence condition is met or the number of iterations exceeds the preset threshold T.

8. A classification method based on competition and non-negative representation according to claim 7, characterized in that: The convergence condition is: satisfying ||c t -z t ||2≤η, ||c t+1 -c t ||2≤η and ||z t+1 -z t ||2≤η, where η is a preset convergence threshold.

9. A classification method based on competition and non-negative representation according to claim 1, characterized in that: In step S4, the residual of the test sample y in each category of the normalized training sample set is calculated, which is expressed as: r i =||y-X i c i ||2 Among them, r i is the residual of the test sample y in the i-th category; X i is the set of training samples of the i-th category, c i is the coefficient vector corresponding to the i-th type of training samples; In step S5, classification is performed according to the residual, and the test sample y is identified as the category corresponding to the minimum residual, which is expressed as: Among them, Lable(y) represents the final category of the test sample y.

10. A classifier based on competition and non-negative representation, characterized in that: The classifier stores a computer program, and when the classifier executes the computer program, the steps of the classification method based on competition and non-negative representation as claimed in any one of claims 1 to 9 are implemented.