Fisher discriminant dictionary learning method based on 10 norm sparser constraint

By combining the l0 norm sparse constraint and Fisher discriminant constraint, the problem of insufficient sparse constraints in the existing technology is solved, and higher feature selection capabilities and classification performance are achieved. It is suitable for image classification such as face recognition, scene recognition and object recognition. Task.

CN119169380APending Publication Date: 2024-12-20YANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411323258.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing discriminant dictionary learning method uses l1 or l2 norms as sparse constraints in image classification tasks, and fails to fully mine the discriminant information in the encoding coefficients, which limits the feature selection ability and interpretability of the model, especially in small-scale training. Poor performance in data and practical applications.

Method used

Using a method that combines sparse constraints based on the l0 norm and Fisher discriminant constraints, we obtain sparse coding coefficients through optimization problems, highlight key features and maximize the differences between classes, and build a dictionary with more feature selection and generalization capabilities. Learn the model.

Benefits of technology

The classification performance and generalization ability of the model were improved, and the experimental results showed that it performed better than other leading dictionary learning methods on multiple recognized image databases, especially in small datasets and practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169380A_ABST
    Figure CN119169380A_ABST
Patent Text Reader

Abstract

The invention discloses a Fisher discriminant dictionary learning method based on 10 norm sparser constraint in the technical field of computer vision, which comprises the following steps: firstly, dividing pre-extracted data set features into a training set and a test set, and completing initialization of a dictionary and a coding coefficient by using the training set; then, based on the training set, adopting a Fisher discriminant dictionary learning model based on 10 norm sparser constraint to learn coding coefficients of the dictionary and the training set at the same time, and calculating a coding coefficient of a test set according to the dictionary obtained by learning; and finally, completing the classification of the test samples by using the classification model and the coding coefficient of the test set. According to the method, 10 norm sparse constraint and Fisher discriminant constraint are innovatively combined to construct a unified learning framework; through the combination, the algorithm can highlight coding key features and maximize inter-class differences while keeping the sparsity of coding coefficients, thereby improving the classification performance and generalization ability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision, and in particular to a Fisher discriminant dictionary learning method based on l0-norm sparser constraints. Background Art

[0002] In recent years, deep learning networks driven by GPUs and large datasets have demonstrated state-of-the-art performance in image classification such as face recognition, object recognition, and scene recognition. Despite their excellent performance, deep learning networks still have the following two disadvantages: (1) The interpretability of deep learning networks is low. In some application scenarios that require model interpretability, deep learning models are limited, which seriously hinders the development of the latest deep learning methods. (2) Deep learning networks may encounter the problem of small-scale training data in practical applications. In many practical tasks, due to the high cost of data collection and labeling, it is impractical to train deep learning networks when the amount of labeled training data is insufficient. In this context, some recent variants of the discriminative dictionary learning method (DDL) have achieved competitive results in image classification tasks with small datasets, and thus still attract a lot of research.

[0003] There are two types of dictionaries in existing discriminative dictionary learning methods (DDL): one type of DDL method regards each category in the data set as an independent sub-problem, and constructs a sub-dictionary specific to each sub-problem, which can more effectively capture the characteristics within the category and improve the accuracy of classification and recognition. For example, Yang et al. proposed a dictionary learning method based on the Fisher discriminant criterion, that is, the Fisher discriminant term is added when learning the dictionary of a specific category to achieve better classification results. Another type of DDL method is committed to learning all class samples to obtain a globally shared dictionary. This dictionary is usually super-complete and can flexibly represent various data and capture the complexity and diversity of data, so it has good versatility. For example, Cai et al. proposed a support vector guided dictionary learning (SVGDL) model, which uses a parameterized method and performance adaptive weight allocation to overcome the limitations of the Fisher discriminant method and obtain excellent results.

[0004] Although many scholars have incorporated the Fisher discriminant criterion into dictionary learning algorithms, such as the FDDL and SMLFDL models. However, most of these models use l1 or l2 norms as sparse constraints, failing to fully exploit the discriminant information in the coding coefficients, limiting their performance in classification tasks. For example, in the FDDL model, it uses the l1 norm as a sparse regularization term, but the l1 norm regularization cannot guarantee the sparsity of the coding, thereby reducing the model's feature selection ability and interpretability. In the SMLFDL model, it uses the l2 norm as a regularization term, but the l2 norm regularization will not reduce the unimportant feature coefficients in the coding to 0, but tends to make all the feature coefficients in the coding small, resulting in a large number of unimportant features in the coding, which limits the model's feature selection ability and reduces the model's interpretability. Therefore, to address the above problems, this paper proposes a Fisher discriminant dictionary learning algorithm based on l0-norm sparser constraint (L0FDDL). This algorithm innovatively combines l0-norm sparse constraint with Fisher discriminant constraint, which can highlight the key feature coefficients of coding and maximize the inter-class difference while ensuring the sparsity of coding coefficients, give full play to the discriminant role of coding coefficients, and thus enhance the feature selection ability of the model, and improve the classification performance and generalization ability of the model. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a Fisher discriminant dictionary learning method involving a more sparse constraint based on the l0 norm. By combining the l0 norm sparse constraint with the Fisher discriminant constraint, the key features of the encoding can be highlighted while maintaining the sparsity of the encoding, the inter-class differences can be maximized, and the discriminant role of the encoding coefficient can be fully utilized, thereby improving the classification performance and generalization ability of the model.

[0006] The object of the present invention is achieved by: a Fisher discriminant dictionary learning method based on l0 norm sparser constraint, comprising the following steps:

[0007] Step 1: Extract features from the images in the dataset and divide them into training set X and test set X test ;

[0008] Step 2: Establish a Fisher discriminant dictionary learning model based on the l0 norm sparser constraint;

[0009] Step 3: Input the training set X into the model established in step 2, and solve the corresponding optimization problem to obtain the dictionary D and encoding coefficient Z suitable for the corresponding data set;

[0010] Step 4: Use the dictionary D obtained in step 3 to test set X test Encode and obtain the encoding coefficient Z of the test set test ;

[0011] Step 5: Establish a classification model corresponding to the above model and encode the test set coefficient Z obtained in step 4 test Input into the classification model to obtain the classification results of the test set.

[0012] Furthermore, in step 2, a Fisher discriminant dictionary learning model based on a more sparse constraint of the l0 norm is established, including:

[0013]

[0014] in, is the training set, C is the total number of sample categories, N is the number of samples, x i represents the i-th training sample; For the dictionary you learn, Represents the i-th training sample x i The category sub-dictionary of the category to which it belongs, c i Represents the training sample x i The category of , M is the number of dictionary atoms; represents the coding coefficient of X with respect to D, z i Represents x i Regarding the coding coefficient of D, Then it means x i About sub-dictionaries The coding coefficient of ; λ is a positive number and a scalar, used as a trade-off parameter; where, is the reconstruction error term, which is used to ensure that the learned dictionary D and sub-dictionary Can represent x well i ; is the Fisher discriminant constraint, where tr(·) represents the trace of the matrix, represents the intra-class dispersion of the coding coefficients, represents the inter-class dispersion of the coding coefficients, m (i) and m are Z i and the mean column vector of Z, is an elastic term used to ensure that the constraint term is smooth and a convex function; the dictionary atom d m Use l2 norm normalization; for the encoding coefficient z i Add the l0 norm sparse constraint, T is the sparsity constraint factor, indicating that z i The non-zero elements in will be forced to have fewer than T items.

[0015] Furthermore, the optimization solution process in step 3 includes the following steps:

[0016] Use the input training set X to initialize the dictionary D and the encoding coefficient Z, and update and optimize D and Z in turn. Each time a variable is updated, other variables remain unchanged; that is, the following steps are performed in sequence in each iteration:

[0017] a. Fix the dictionary D and update the coding coefficient Z;

[0018] b. Fix the coding coefficient Z and update the dictionary D;

[0019] The iteration stops when the algorithm converges or the number of iterations reaches the maximum set value, and the dictionary D and the encoding coefficient Z of the training set are output.

[0020] Furthermore, step a is specifically as follows: when D is fixed and irrelevant terms are omitted, the model objective function is simplified to:

[0021]

[0022] Transform the Fisher discriminant constraint in the above formula to obtain:

[0023]

[0024] in, and m are the coding coefficients and the mean column vector of Z; optimize the coding coefficients one by one, when calculating z i When all z j , j≠i are all fixed; for the coding coefficient z i , the above formula can be converted to:

[0025]

[0026] make Represents a sub-dictionary of the same size as dictionary D And make and Respectively and Z except z i The mean vector of , that is:

[0027]

[0028] Then the objective function is converted to:

[0029]

[0030] Expand the above formula to get:

[0031]

[0032] make The diagonal elements are all a i The diagonal matrix of The above formula can be converted to:

[0033]

[0034] After omitting irrelevant terms, solve for z i The objective function is written as:

[0035]

[0036] According to the structure of the above formula, the orthogonal matching pursuit algorithm is used to solve the above formula, so as to quickly iterate to obtain the coding coefficient z i The optimal solution of .

[0037] Furthermore, step b is as follows: when Z is fixed and the ratio-related terms are omitted, the model objective function is simplified to:

[0038]

[0039] Update dictionary D by category, when updating sub-dictionary D i When all D j ,j≠i, the above formula can be converted to:

[0040]

[0041] st||d m ||2=1,m=1,2,…,M

[0042] in, Z i Denotes X with respect to D i According to the structure of the above formula, the Lagrange dual algorithm is used to solve the above formula to obtain the sub-dictionary D i The optimal solution of .

[0043] Furthermore, step 4 specifically includes: after obtaining the optimal solution dictionary D in the training set, test To encode:

[0044]

[0045] st||α||0≤T

[0046] Where α is the coding coefficient of the test sample y with respect to the dictionary D. All test samples are encoded and integrated to obtain the test set coding coefficient Z test .

[0047] Furthermore, the step 5 is specifically as follows: by minimizing the difference between the test sample y and each sub-dictionary D i The average vector m representing the residual and the encoding coefficients of each class of training sets iThe reconstruction error with the encoding coefficient α is used to establish a classification model:

[0048]

[0049] Among them, γ is a positive number and a scalar;

[0050] After getting the coding coefficient Z test After that, it is input into the classification model to obtain the classification result of the test set.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] The present invention can be applied to various image classification scenarios such as face recognition, scene recognition and object recognition; the algorithm innovatively combines the l0-norm sparse constraint with the Fisher discriminant constraint to construct a unified learning framework; through this combination, the algorithm can highlight the key feature coefficients of the code and maximize the inter-class difference while maintaining the sparsity of the code, give full play to the discriminant role of the code coefficient, thereby improving the classification performance and generalization ability of the model; experimental results on multiple recognized image databases show that the algorithm is superior to other leading dictionary learning methods in performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] 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 or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0054] Figure 1 It is a flow chart of the present invention.

[0055] Figure 2 It is a weight distribution diagram of the training set encoding coefficients in the Scene15 instance of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] like Figure 1 A Fisher discriminant dictionary learning method based on l0 sparser constraints is shown, including:

[0058] Step 1: Extract features from the images in the dataset and divide them into training set X and test set X according to appropriate proportions. test ;

[0059] Step 2: Establish a Fisher discriminant dictionary learning model based on the l0 norm sparser constraint;

[0060] Step 3: Input the training set X into the model established in step 2, and solve the corresponding optimization problem to obtain the dictionary D and encoding coefficient Z suitable for the corresponding data set;

[0061] Step 4: Use the dictionary D obtained in step 3 to test set X test Encode and obtain the encoding coefficient Z of the test set test ;

[0062] Step 5: Establish a classification model corresponding to the above model and encode the test set coefficient Z obtained in step 4 test Input into the classification model to obtain the classification results of the test set.

[0063] Furthermore, the image in the data set described in step 1 above is feature extracted and divided into a training set X and a test set X according to an appropriate ratio. test ,include:

[0064] ① Select an appropriate ratio of training set to test set, and divide each type of data in the data set into training set X and test set X test .

[0065] ② Use principal component analysis to reduce the dimensionality of the original image data of the dataset, thereby linearly mapping the high-dimensional image data to a low-dimensional space, and normalizing the obtained low-dimensional data in order to obtain the highest classification performance of the model.

[0066] Furthermore, the establishment of the Fisher discriminant dictionary learning model based on the l0 sparser constraint described in step 2 above includes:

[0067]

[0068] in, is the training set, C is the total number of sample categories, N is the number of samples, x i represents the i-th training sample. For the dictionary you learn, represents the category sub-dictionary corresponding to the i-th training sample, and M is the number of dictionary atoms. represents the coding coefficient of X with respect to D, z i Represents x i Regarding the coding coefficient of D, Then it means x i About sub-dictionaries The coding coefficient of . λ is a positive number and a scalar, which is used as a trade-off parameter. To reconstruct the error term, the learned dictionary D and sub-dictionary Can represent x well i . It is the Fisher discriminant constraint, which can combat the intra-class variability of training data to a certain extent and enhance the intra-class compactness and inter-class separability of the encoding coefficients. m The l2 norm is used for normalization to avoid trivial solutions of the encoding coefficient Z. In order to highlight the key features of the encoding and enhance its discriminative ability, the encoding coefficient x i Add l0 norm sparse constraint, T is the sparsity constraint factor, indicating x i The non-zero elements in will be forced to have fewer than T items.

[0069] Furthermore, the training set X is input into the model established in step 2 as described in step 3 above, and the corresponding optimization problem is solved to obtain the dictionary D and encoding coefficient Z applicable to the corresponding data set, including:

[0070] Use the input training set to initialize the dictionary D and the encoding coefficient Z, and repeat steps ① and ② in sequence to update and optimize D and Z. Note that each time a variable is updated, other variables are kept unchanged until the algorithm converges or the number of iterations reaches the maximum set value, and the iteration is stopped, and the dictionary D and the encoding coefficient Z of the training set are output.

[0071] ①Fix the dictionary D and update the encoding coefficient Z:

[0072] When D is fixed and irrelevant terms are omitted, the model objective function can be simplified to:

[0073]

[0074] In order to facilitate calculation, the Fisher discriminant constraint term in the above formula is transformed to obtain:

[0075]

[0076] in, and m are the coding coefficients and the mean column vector of Z. According to the characteristics of the above formula, the coding coefficients are optimized one by one. It should be noted that when calculating z i When all z j , j≠i are fixed. Therefore, for the coding coefficient z i , the above formula can be converted to:

[0077]

[0078] make Represents a sub-dictionary of the same size as dictionary D And make and Respectively and Z except z i The mean vector of , that is:

[0079]

[0080] Then the objective function can be converted to:

[0081]

[0082] Expand the above formula to get:

[0083]

[0084] make The diagonal elements are all a i The diagonal matrix of The above formula can be converted to:

[0085]

[0086] After omitting irrelevant terms, solve for z i The objective function can be written as:

[0087]

[0088] According to the structure of the above formula, the orthogonal matching pursuit algorithm (OMP) is used to solve the above formula, so as to quickly iterate to obtain the coding coefficient z i The optimal solution of .

[0089] ②Fix the coding coefficient Z and update the dictionary D:

[0090] When Z is fixed and the ratio-related terms are omitted, the model objective function can be simplified to:

[0091]

[0092] Update dictionary D by category, when updating sub-dictionary D i When all D j ,j≠i, the above formula can be converted to:

[0093]

[0094] st||d m ||2=1,m=1,2,…,M

[0095] in, Z i Denotes X with respect to Di According to the structure of the above formula, the Lagrange dual algorithm is used to solve the above formula to obtain the sub-dictionary D i The optimal solution of .

[0096] Further, the dictionary D obtained in step 3 described in step 4 above is used for the test set X test Encode and obtain the encoding coefficient Z of the test set test ,include:

[0097] After obtaining the dictionary D that obtains the optimal solution in the training set, test Encode (taking the test sample y as an example):

[0098]

[0099] st||α||0≤T

[0100] Where α is the coding coefficient of the test sample y with respect to the dictionary D. All test samples are encoded and integrated to obtain the test set coding coefficient Z test .

[0101] Furthermore, the classification model corresponding to the model is established in step 5 above, and the test set encoding coefficient Z obtained in step 4 is test Input into the classification model to obtain the classification results of the test set, including:

[0102] By minimizing the difference between the test sample y and each class sub-dictionary D i The average vector m representing the residual and the encoding coefficients of each class of training sets i The reconstruction error with the encoding coefficient α is used to establish a classification model (taking the test sample y as an example):

[0103]

[0104] Where γ is a preset positive parameter. The test set encoding coefficient Z test Input the above model to get the classification result of the test set.

[0105] Embodiment 1:

[0106] This example conducts face recognition experiments on the ExtendedYale B dataset. The ExtendedYale B dataset is a dataset widely used for face recognition tasks. It is an extended version of the original Yale B dataset, providing a rich sample size and face images under diverse lighting conditions. It includes 2414 face images from 38 different individuals, with each individual having approximately 64 face images under different lighting conditions. This example normalizes the face images in the Extended Yale B dataset to a size of 54×48.

[0107] like Figure 1 As shown, the specific implementation steps are as follows:

[0108] Example step 1: extract features from the images in the dataset and divide them into training set X and test set X according to appropriate proportions. test :

[0109] First, the Extended Yale B dataset images are linearly projected into a low-dimensional space using principal component analysis to extract a 700-dimensional vector, which is then normalized. 20 images are randomly selected from each category as training data, and the rest are used for testing.

[0110] Example step 2, establish a dictionary learning model and optimize and update it:

[0111] The extracted features are input into the established dictionary learning model. The model parameters are set as: λ=0.2, η=1.5, T=200, and the number of dictionary atoms is set to 12. Then the objective function is optimized and solved to obtain the dictionary D and encoding coefficient Z suitable for the corresponding ExtendedYale B dataset.

[0112] Example step 3, obtain the test set X test Classification results:

[0113] Use the trained dictionary D to test the set X test Encode and obtain the test set encoding coefficient Z test Input into the classification model to obtain the classification result of the test set.

[0114] In order to demonstrate the superiority of this algorithm, the present invention is compared with the existing classification methods based on dictionary learning: Fisher discriminant dictionary learning (FDDL), low-rank shared dictionary learning (LRSDL), robust adaptive dictionary learning (RA-DPL), label consistency K-SVD algorithm (LC-KSVD) and support vector guided dictionary learning (SVGDL), etc., under the same experimental setting.

[0115] Table 1 Accuracy of various models in the ExtendedYale B dataset

[0116]

[0117] As can be seen from the table, L0FDDL is significantly better than FDDL, RA-DPL, ADDL, LC-KSVD and other discriminant dictionary learning models (DDL), with an accuracy rate of 98.1%, proving that L0FDDL has higher classification performance than other DDL models in face recognition tasks. This shows that the combined use of l0-norm sparse constraints and Fisher discriminant constraints gives full play to the discriminant role of the coding coefficients, further improving the classification performance of the model.

[0118] Embodiment 2:

[0119] This example conducts scene recognition experiments on the Scene15 dataset. The Scene-15 dataset consists of 4485 scene images, covering suburbs, bedrooms, industries, living, rooms, forests, city interiors, coasts, offices, highways, high-rise buildings, mountains, streets, open countryside, and stores. The number of images (250×300 pixels) contained in each category ranges from 210 to 410.

[0120] The operation steps are similar to those in Example 1. In step 1, the method of Jiang et al. is used to extract features and reduce their dimensionality to 3000 dimensions. 100 samples are randomly extracted from each category as training sets, and the rest are used as test sets. The model parameters are set to: λ=0.01, η=1, T=210, and the number of dictionary atoms is set to 30. Table 2 below shows the experimental results:

[0121] Table 2 Accuracy of various models in Scene15 dataset

[0122]

[0123]

[0124] As can be seen from the table, L0FDDL still achieved the highest classification accuracy in the Scene-15 dataset, reaching 98.6%. The accuracy of L0FDDL exceeded that of FDDL and LC-KSVD by 1.5% and 5.7%, respectively, which once again proved the effectiveness of the L0FDDL joint learning framework. Figure 2 The weight distribution of the encoding coefficients of the training set after training is shown. It can be seen that the weight of each category of encoding coefficients accounts for the largest proportion, which once again proves that L0FDDL can give priority to the most representative features in the encoding, thereby improving the classification performance of the model.

[0125] Embodiment 3:

[0126] This example conducts flower recognition experiments on the Oxford Flower-17 data. Oxford Flowers-17 is an image database containing 17 categories of flowers, each category contains 80 images, and a total of 1,360 images. These images have great variations in scale, posture, and lighting, and some categories of images have significant internal variations and some similarities with other categories of images, which puts higher requirements on the robustness of the model.

[0127] The operation steps are similar to those in Example 1. In step 1, the method of Fernando et al. is used to extract features and reduce their dimensionality to 1408 dimensions. 20 samples are randomly extracted from each category as a training set, and the rest are used as a test set. The model parameters are set to: λ = 0.0001, η = 1.5, T = 40, and the number of dictionary atoms is set to 10. The following table shows the experimental results:

[0128] Table 3 Accuracy of various models in the Oxford Flower-17 dataset

[0129]

[0130]

[0131] It can be seen from the table that L0FDDL still has obvious advantages over FDDL, ADDL, LC-KSVD and other methods.

[0132] Embodiment 4:

[0133] This example conducts object recognition experiments on the Caltech101 dataset. The Caltech101 dataset contains 9114 images of 102 different categories of objects. Each category represents a separate object category, with the number of images ranging from 30 to 800. The images have high resolution and vary greatly in size, position, posture, etc., which increases the difficulty of the classification task.

[0134] The operation steps are similar to those in Example 1. In step 1, the method of Akhtar et al. is used to extract features and reduce their dimensionality to 3000. 30 samples are randomly extracted from each class as training sets, and the rest are used as test sets. The model parameters are set to: λ = 0.3, η = 1, T = 255, and the number of dictionary atoms is set to 6. The following table shows the experimental results:

[0135] Table 4 Accuracy of various models in Caltech101 dataset

[0136]

[0137] As can be seen from the table, the classification performance of L0FDDL is still better than that of DDL models such as FDDL and LC-KSVD. This proves that L0FDDL can still ensure the sparsity of coding coefficients and highlight the key features of coding when encountering large-scale data sets such as Caltech101, so as to further play the discriminative role of coding coefficients and improve classification performance.

[0138] The above embodiments are only used to help understand the method and core idea of ​​the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A Fisher discriminant dictionary learning method based on l0-norm sparser constraints, characterized in that: The steps include: Step 1: Extract features from the images in the dataset and divide them into training set X and test set X test ; Step 2: Establish a Fisher discriminant dictionary learning model based on the l0 norm sparser constraint; Step 3: Input the training set X into the model established in step 2, and solve the corresponding optimization problem to obtain the dictionary D and encoding coefficient Z suitable for the corresponding data set; Step 4: Use the dictionary D obtained in step 3 to test set X test Encode and obtain the encoding coefficient Z of the test set test ; Step 5: Establish a classification model corresponding to the above model and encode the test set coefficient Z obtained in step 4 test Input into the classification model to obtain the classification results of the test set.

2. The method for learning a Fisher discriminant dictionary based on a l0-norm sparser constraint according to claim 1, characterized in that: In step 2, a Fisher discriminant dictionary learning model based on a sparser constraint of the l0 norm is established, including: in, is the training set, C is the total number of sample categories, N is the number of samples, x i represents the i-th training sample; For the dictionary you learn, Represents the i-th training sample x i The category sub-dictionary of the category to which it belongs, c i Represents the training sample x i The category of , M is the number of dictionary atoms; represents the coding coefficient of X with respect to D, z i Represents x i Regarding the coding coefficient of D, Then it means x i About sub-dictionaries The coding coefficient of ; λ is a positive number and a scalar, used as a trade-off parameter; where, is the reconstruction error term; is the Fisher discriminant constraint, where tr(·) represents the trace of the matrix, S W (Z) is the intra-class dispersion, S B (Z) is the inter-class dispersion, is an elastic term used to ensure that the constraint term is smooth and a convex function; the dictionary atom d m Use l2 norm normalization; for the encoding coefficient z i Add the l0 norm sparse constraint, T is the sparsity constraint factor, indicating that z i The non-zero elements in will be forced to have fewer than T items.

3. The method for learning Fisher discriminant dictionary based on l0-norm sparser constraint according to claim 1, characterized in that: The optimization solution process in step 3 includes the following steps: Use the input training set X to initialize the dictionary D and the encoding coefficient Z, and update and optimize D and Z in turn. Each time a variable is updated, other variables remain unchanged; that is, the following steps are performed in sequence in each iteration: a. Fix the dictionary D and update the coding coefficient Z; b. Fix the coding coefficient Z and update the dictionary D; The iteration stops when the algorithm converges or the number of iterations reaches the maximum set value, and the dictionary D and the encoding coefficient Z of the training set are output.

4. The method for learning a Fisher discriminant dictionary based on a l0-norm sparser constraint according to claim 3, characterized in that: Step a is as follows: When D is fixed and irrelevant terms are omitted, the model objective function is simplified to: Transform the Fisher discriminant constraint in the above formula to obtain: in, and m are the coding coefficients and the mean column vector of Z; optimize the coding coefficients one by one, when calculating z i When all z j , j≠i are all fixed; for the coding coefficient z i , the above formula can be converted to: make Represents a sub-dictionary of the same size as dictionary D And make and Respectively and Z except z i The mean vector of , that is: Then the objective function is converted to: Expand the above formula to get: make The diagonal elements are all a i The diagonal matrix of The above formula can be converted to: After omitting irrelevant terms, solve for z i The objective function is written as: According to the structure of the above formula, the orthogonal matching pursuit algorithm is used to solve the above formula, so as to quickly iterate to obtain the coding coefficient z i The optimal solution of .

5. The method for learning Fisher discriminant dictionary based on l0-norm sparser constraint according to claim 3, characterized in that: Step b is as follows: When Z is fixed and irrelevant terms are omitted, the model objective function is simplified to: Update dictionary D by category, when updating sub-dictionary D i When all D j ,j≠i, the above formula can be converted to: s.t.||d m ||2=1,m=1,2,…,M in, Z i Denotes X with respect to D i According to the structure of the above formula, the Lagrange dual algorithm is used to solve the above formula to obtain the sub-dictionary D i The optimal solution of .

6. The method for learning a Fisher discriminant dictionary based on a l0-norm sparser constraint according to claim 1, characterized in that: The step 4 specifically includes: after obtaining the optimal solution dictionary D in the training set, test To encode: st||α||0≤T Among them, α is the coding coefficient of the test sample y with respect to the dictionary D. All test samples are encoded and integrated to obtain the test set coding coefficient Z test .

7. The method for learning a Fisher discriminant dictionary based on a l0-norm sparser constraint according to claim 1, characterized in that: The step 5 is specifically as follows: by minimizing the difference between the test sample y and each class of sub-dictionary D i The average vector m representing the residual and the encoding coefficients of each class of training sets i The reconstruction error with the encoding coefficient α is used to establish a classification model: Among them, γ is a positive number and a scalar; After getting the coding coefficient Z test After that, it is input into the classification model to obtain the classification result of the test set.