Image classification method based on adaptive local ordinal preserving analytical dictionary learning
By adopting an adaptive local ordinal-preserving parsing dictionary learning method, which combines dictionary structure information with classifier joint learning, the problem of dictionary structure information not being considered in existing technologies is solved, thereby improving the accuracy and training efficiency of image classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-13
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies fail to adequately consider the structural information of the dictionary in image classification, which affects classification performance.
An adaptive local ordinal preservation parsing dictionary learning method is adopted. By adding an adaptive local ordinal preservation term during the dictionary learning process and combining it with a classifier for joint learning, the structural information of the dictionary is taken into account to improve discriminativeness.
It significantly improves the accuracy and training efficiency of image classification and is applicable to various image classification scenarios such as face recognition, action recognition, and scene recognition.
Smart Images

Figure CN115601591B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of computer vision, and particularly relates to an image classification method based on adaptive local ordinal preserving analytic dictionary learning. BACKGROUND
[0002] With the rapid development of computer technology, the field of computer vision has also developed rapidly. Image classification, as one of the important problems of computer vision, has attracted extensive research by scholars. Sparse representation and dictionary learning, as an important method for extracting high-dimensional data features, have been widely used in various fields such as image processing and machine learning, such as image denoising, image super-resolution reconstruction and image classification.
[0003] In the process of applying dictionary learning to image classification, discriminative analytic dictionary learning and discriminative composite dictionary learning have been used as classic dictionary learning-based classification models since they were proposed and proved to have good effects. After that, how to improve the classification effect of the model has always been a concern in the academic field. Many researchers have proposed many models on this basis and achieved good classification effects. For example, Ramirez et al. improved the discriminative ability of the dictionary by adding a non-coherent dictionary promotion term to the discriminative composite dictionary learning model; a discriminative dictionary pair model (DPL) combines the discriminative composite dictionary learning model and the discriminative analytic dictionary learning model, which takes into account the advantages of both types of classic models, thereby improving the classification effect of the model; Tang et al. proposed a discriminative convolutional analytic dictionary learning model (DCADL), which draws on the idea of convolutional neural networks and jointly learns the classifier and the dictionary, effectively improving the algorithm efficiency while ensuring the classification performance. However, this model does not consider the influence of the structural information of the dictionary on the classification effect, which affects the classification performance to some extent.
[0004] To solve the above problems, the present application proposes an image classification method based on adaptive local ordinal preserving analytic dictionary learning, which adds an adaptive local ordinal preserving term to the DCADL model, considers the structural information of the dictionary while learning the dictionary, and jointly learns the classifier and the dictionary, thereby improving the classification performance while ensuring the learning efficiency of the model. SUMMARY
[0005] The technical problem to be solved by the present application is to overcome the shortcomings of the prior art and propose an image classification method based on adaptive local ordinal preserving analytic dictionary learning, which considers the structural information of the dictionary to improve the discriminative ability of the dictionary and obtain better image classification performance.
[0006] The technical solution adopted by the present application is an image classification method based on adaptive local ordinal preserving analytic dictionary learning, comprising:
[0007] Step 1: Extract features from the images in the dataset and divide it into a training set X and a test set X. test ;
[0008] Step 2: Establish an analytical dictionary learning model that supports adaptive local ordinal preservation;
[0009] Step 3: Input the training set X into the model established in Step 2, and solve the corresponding optimization problem to obtain the parsing dictionary Ω and classifier W suitable for the corresponding dataset;
[0010] Step 4: Use the parsing dictionary Ω obtained in Step 3 to analyze the test set X. test Encode the data to obtain the coding coefficients for the test set.
[0011] Step 5: Convert the coding coefficients obtained in Step 4 into... The model is reshaped and input into the classifier W obtained in step 3 to obtain the classification results of the test set.
[0012] The above step 1 describes extracting features from the dataset images and dividing them into a training set X and a test set X. test ,include:
[0013] ① Principal component analysis is used to reduce the dimensionality of the original image data in the dataset while minimizing information loss. This linearly maps the high-dimensional image data to a low-dimensional space, and the resulting low-dimensional data is then normalized.
[0014] ② Divide each class of data in the dataset into a training set X and a test set X. test .
[0015] Step 2 above describes establishing an analytical dictionary learning model that supports adaptive local ordinal preservation, including:
[0016]
[0017]
[0018]
[0019] Where λ1, λ2, λ3, λ4, and μ are the coefficients of the regularization term. The training set is defined as n, the number of samples, and p, the number of blocks for each sample. Ω = [ω1; ω2; ...; ω...]. m [] represents parsing the dictionary, the row of Ω. Represents dictionary atoms, where m is the number of dictionary atoms. This is the encoding coefficient matrix of the training set, where each column vector represents the encoding coefficients for each block in each sample. To be used by matrix reshaping operators The transformed matrix has each column vector as a vertical stack of the coding coefficients corresponding to all blocks of each sample. W represents the classifier, L is the Laplacian matrix, and Y is the training set label matrix. Indicates the signal reconstruction term; This represents the sparsity constraint of the coding coefficients; This indicates that the classifier is constrained by the training set labels; An adaptive local ordinal preservation term is used to maintain neighborhood correlations between dictionary atoms and to make the relationship between the dictionary and the coding coefficients closer, so that the classifier contains structural information of the dictionary; and Constraining the optimization variables helps stabilize the optimization process of the model.
[0020] Step 3 above describes inputting the training set X into the model established in step 2 and solving the corresponding optimization problem to obtain the parsing dictionary Ω and classifier W suitable for the corresponding dataset, including:
[0021] After randomly initializing Ω, for variable L, W and Ω are updated sequentially through steps 1) to 5). Note that each time the variables are updated, other variables need to be fixed. and Perform joint updates until the objective function converges or the number of iterations reaches a set value, then stop iterating and output the trained parsed dictionary Ω and classifier W.
[0022] 1) Fixed W and Ω, update L:
[0023] After obtaining the initial dictionary, the formula for updating the Laplace matrix L is as follows:
[0024]
[0025] The element in the i-th row and v-th column of matrix B is calculated by the following formula:
[0026]
[0027] in dist(.) represents Euclidean distance calculation. Indicates the distance ω from the atom i The set of the k nearest atoms.
[0028] In the formula for updating the Laplacian matrix L, matrix M is a diagonal matrix, and the formula for calculating the value of the element in the i-th row and i-th column of the diagonal is:
[0029]
[0030] 2) Fix L, W, and Ω, then update and
[0031] After fixing variables L, W, and Ω, for variables The objective function can be simplified to solving the following optimization problem:
[0032]
[0033] By analyzing variables If we find the derivative and make it equal to 0, then the analytical solution is:
[0034]
[0035] Through the shaping factor RS plastic surgery Right now in Each column vector represents the coding coefficients for each block in each sample. Each column vector is a vertical stack of the coding coefficients corresponding to all blocks of each sample. By transforming the dimensions of the matrix, the block image reconstruction terms and classification terms can be integrated into a single objective function.
[0036] 3) Fix L, W, and Ω, then update and
[0037] After fixing variables L, W, and Ω, for variables The objective function can be simplified to solving the following optimization problem:
[0038]
[0039] make The analytical solution obtained by the iterative shrinking thresholding algorithm is as follows:
[0040]
[0041] Where ρ is the step size. Defined as:
[0042]
[0043] Similar to 2), the inverse integer operator RS-1 is used to... plastic surgery Right now
[0044] 4) Fix L, And Ω, update W:
[0045] With variable L fixed, After adding Ω, the objective function for variable W can be simplified to solving the following optimization problem:
[0046]
[0047] By taking the derivative of variable W and setting the derivative to 0, the analytical solution is:
[0048]
[0049] 5) Fix L, And W, update Ω:
[0050] With variable L fixed, After adding W, the objective function for variable Ω can be simplified to solving the following optimization problem:
[0051]
[0052]
[0053] By taking the partial derivative with respect to the variable Ω and setting the derivative to 0, the analytical solution is:
[0054]
[0055] To satisfy constraints After obtaining the analytical solution, the atoms of the dictionary are normalized as follows:
[0056]
[0057] The parsed dictionary Ω obtained in step 3, described in step 4 above, is used to train the test set X. test Encode the code to obtain the corresponding coding coefficients. This includes: obtaining the optimal solution of the parsed dictionary on the training set and then applying it to the test set X. test Encode, that is
[0058] The coding coefficients obtained in step 4, as described in step 5 above, are... The data is shaped and input into the classifier W obtained in step 3 to obtain the classification results for the test set, including: obtaining the encoding coefficients. Then, the coefficients are shaped to obtain the encoding coefficients. Then The data is input into a classifier to obtain the classification result, i.e., the test set label matrix. Matrix Y test y ij The value is the response of the i-th sample to the j-th class, and the class corresponding to the maximum response is the sample classification result.
[0059] The beneficial effects of this invention are:
[0060] A novel analytical dictionary learning model based on adaptive local ordinal preservation is proposed, which can be applied to various image classification scenarios such as face classification and scene classification. This method solves the problem of existing methods ignoring dictionary structure information and jointly learns the dictionary and classifier, which fully optimizes the dictionary learning process and can achieve high classification accuracy while ensuring training efficiency. Attached image description:
[0061] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0062] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of protection of the present invention.
[0063] Example 1:
[0064] This example demonstrates a face recognition experiment conducted on the Extended YaleB database. The Extended YaleB database consists of 2414 frontal face images, representing 38 individuals under different lighting conditions, with each image cropped to a size of 48×42.
[0065] like Figure 1 As shown, please follow these steps:
[0066] Example Step 1: Extract features from the dataset images and split the dataset into training set X and test set X. test :
[0067] First, the Extended YaleB image is linearly projected to a low-dimensional space using principal component analysis to extract a 504-dimensional vector, which is then normalized. 32 images are randomly selected from each class as training data, and the rest are used for testing.
[0068] Example Step 2: Build a dictionary learning model and optimize the solution:
[0069] The extracted features are used as input to the dictionary learning model. The regularization coefficients are set to λ1 = 1e-4, λ2 = 1e-1, λ3 = 1e-1, λ4 = 1e-2, and μ = 1e-4. The number of dictionary atoms is 75. Then, the objective function is optimized to obtain the parsing dictionary Ω and classifier W suitable for the corresponding dataset.
[0070] Example step 3, obtaining the classification result:
[0071] Use the trained parsed dictionary Ω on the test set X test The code is encoded and input into the classifier to obtain the classification result.
[0072] To demonstrate the effectiveness of this method, it is compared with existing dictionary-based classification methods: Projected Dictionary Pair Learning (DPL), Structural Parsing Dictionary Learning (SADL), Relaxed Block Diagonal Dictionary Pair Learning (RBD-DPL), Low-Rank Parsing-Synthetic Dictionary Learning (LR-ASDL), and Discriminative Convolutional Dictionary Learning (DCADL) under the same experimental settings.
[0073] Table 1. Classification results of different methods on the Extended YaleB database.
[0074] Method Classification accuracy (%) Training time (seconds) The method of the invention 99.92 10.85 DPL 97.50 7.6 SADL 94.91 47.58 RBD-DPL 97.28 2.67 LR-ASDL 97.90 218.46 DCADL 99.57 4.00
[0075] In terms of classification accuracy, this invention is significantly better than other algorithms, and its training efficiency is also highly competitive.
[0076] Example 2:
[0077] This example demonstrates action recognition experiments on the UCF-50 database. The UCF-50 database is a challenging action recognition database containing 50 action categories and 6680 human actions extracted from YouTube videos. Principal Component Analysis (PCA) was used to extract the action features and reduce the dimensionality to 5000. In the experiment, each feature category was randomly divided into five parts. Four parts were used for training, and the remaining part was used for testing.
[0078] The operation steps are similar to those in Example 1. In step 1, principal component analysis (PCA) is used to extract features from the original data and reduce its dimensionality to 5000 dimensions. The data is then divided into training and test sets in a 1:4 ratio. The regularization coefficients are set to λ1 = 1e-4, λ2 = 1e-3, λ3 = 1e-5, λ4 = 1e-2, and μ = 1. The number of dictionary atoms is 50.
[0079] Table 2. Classification results of different methods on the UCF-50 database.
[0080]
[0081]
[0082] In terms of classification accuracy, this invention has a significant advantage over other methods. Because this invention takes into account dictionary structure information, its classification accuracy is better than that of DCADL. In terms of time efficiency, this invention is still highly competitive.
[0083] Example 3:
[0084] This example demonstrates scene recognition experiments on the Caltech101 database. The Caltech101 database contains 9144 images from 102 classes. Each class contains between 31 and 800 images, with class 101 including objects such as animals, vehicles, flowers, and plants. Images in each class exhibit significant variations in object size, pose, and position. The remaining class represents the background.
[0085] The operation steps are similar to those in Example 1. In step 1, principal component analysis (PCA) is used to extract features from the original data and reduce its dimensionality to 3000 dimensions. 30 images are selected for each data category as the training set, and the remainder as the test set. The regularization coefficients are set to λ1 = 1e-4, λ2 = 1e-2, λ3 = 1e-2, λ4 = 1e-3, and μ = 1e-1, and the dictionary atom count is 300.
[0086] Table 3. Classification results of different methods on the Caltech101 database.
[0087] Method Classification accuracy (%) Training time (seconds) The method of the invention 75.13 33.60 DPL 73.90 104.33 SADL 72.36 936.71 RBD-DPL 72.76 67.13 LR-ASDL 65.20 871.64 DCADL 74.17 32.25
[0088] In terms of classification accuracy, this invention is significantly higher than other algorithms. Because this invention takes into account dictionary structure information, the classification accuracy is significantly improved, and the training efficiency is also advantageous.
[0089] Example 4:
[0090] This example demonstrates scene classification experiments on the Scene15 dataset. The Scene15 database contains 4,485 images across 15 scene categories, including scenes such as kitchens, bedrooms, forests, buildings, and highways, with each category containing at least 200 images.
[0091] The operation steps are similar to those in Example 1. In step 1, principal component analysis (PCA) is used to extract features from the original data and reduce its dimensionality to 3000 dimensions. 100 images are selected for each data class as the training set, and the rest are used as the test set. The regularization coefficients are set to λ1 = 1e-2, λ2 = 1e-1, λ3 = 1e-4, λ4 = 1e-1, and μ = 1, and the number of dictionary atoms is 50.
[0092] Table 4. Classification results of different methods on the Scene15 database.
[0093] Method Classification accuracy (%) Training time (seconds) The method of the invention 98.49 6.92 DPL 98.10 35.22 SADL 98.16 202.46 RBD-DPL 98.14 17.62 LR-ASDL 98.60 381.40 DCADL 98.41 5.51
[0094] In terms of classification accuracy, this invention is significantly higher than other algorithms. Because this invention takes into account dictionary structure information, the dictionary learning process is optimized, and the performance classification accuracy is also significantly improved.
Claims
1. An image classification method based on adaptive local ordinal-preserving analytic dictionary learning, characterized in that, Includes the following steps: Step 1: Extract features from the images in the dataset and divide it into a training set X and a test set X. test ; Step 2: Establish an analytical dictionary learning model that supports adaptive local ordinal preservation; Step 3: Input the training set X into the model established in Step 2, and solve the corresponding optimization problem to obtain the parsing dictionary Ω and classifier W suitable for the corresponding dataset; Step 4: Use the parsing dictionary Ω obtained in Step 3 to analyze the test set X. test Encode the data to obtain the coding coefficients for the test set. Step 5: Convert the coding coefficients obtained in Step 4 into... The data is reshaped and input into the classifier W obtained in step 3 to obtain the classification results for the test set. Step 2, which establishes an analytical dictionary learning model that supports adaptive local ordinal preservation, includes: Where λ1, λ2, λ3, λ4, and μ are the coefficients of the regularization term. The training set is defined as n, the number of samples, and p, the number of blocks for each sample. Ω = [ω1; ω2; ...; ω m [] represents parsing the dictionary, the row of Ω. Represents dictionary atoms, where m is the number of dictionary atoms. This is the encoding coefficient matrix of the training set, where each column vector represents the encoding coefficients for each block in each sample. To be used by matrix reshaping operators The transformed matrix has each column vector as a vertical stack of the coding coefficients corresponding to all blocks of each sample. W represents the classifier, L is the Laplacian matrix, and Y is the training set label matrix. Indicates the signal reconstruction term; This represents the sparsity constraint of the coding coefficients; This indicates that the classifier is constrained by the training set labels; An adaptive local ordinal preservation term is used to maintain neighborhood correlations between dictionary atoms and to make the relationship between the dictionary and the coding coefficients closer, so that the classifier contains structural information of the dictionary; and Constraining the optimization variables helps stabilize the optimization process of the model.
2. The image classification method based on adaptive local ordinal-preserving parse dictionary learning according to claim 1, characterized in that, The optimization solution process in step 3 includes the following steps: Ω is randomly initialized, and the optimization variable L is updated sequentially. When W and Ω are updated, other variables remain unchanged. and Perform a joint update, that is, execute steps ① to ⑤ sequentially in each iteration: ①Fixed W and Ω, update L; ② Fix L, W, and Ω, and update and ③ Fix L, W, and Ω, and update and ④ Fix L, And Ω, update W; ⑤ Fix L, And W, update Ω; The iteration stops when the algorithm converges or the number of iterations reaches the maximum set value, and the parsed dictionary Ω and classifier W are output.
3. The image classification method based on adaptive local ordinal-preserving parse dictionary learning according to claim 1, characterized in that, In step 4, the coding coefficients of the test set are obtained.
4. The image classification method based on adaptive local ordinal-preserving parse dictionary learning according to claim 1, characterized in that, In step 5, the coding coefficients are obtained. Then, the coefficients are shaped to obtain the encoding coefficients. Then input it into classifier W to obtain the classification result, that is Matrix Y test y ij The value is the response of the i-th sample to the j-th class, and the class corresponding to the maximum response is the sample classification result.
Citation Information
Patent Citations
Electroencephalogram signal classifying and recognizing method based on regularized CSP and regularized SRC and electroencephalogram signal remote control system
CN103425249A
Study pattern classification method based on support vector regularization dictionary pair
CN114330535A