A coarse-to-fine dual-flexible competition hybrid collaborative non-negative representation classification method
By employing a coarse-to-fine dual-flexible competitive hybrid collaborative non-negative representation classification method, the problems of inter-category competition and insufficient utilization of label information in existing technologies are solved, thereby improving the accuracy and robustness of image classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUXI UNIV
- Filing Date
- 2026-02-03
- Publication Date
- 2026-06-12
AI Technical Summary
Existing image classification methods struggle to balance the competitive relationships between categories with the effective use of category label information, resulting in limited classification performance in complex scenarios.
A coarse-to-fine dual-flexible competitive hybrid collaborative non-negative representation classification method is adopted. By combining dual-competitive collaborative representation and dual-flexible competitive non-negative representation models with inter-class competition terms and flexibility factors, a dual-flexible competitive strategy is constructed to dynamically adjust the representation weights and improve classification accuracy.
It improves the model's discriminative ability and interpretability, enhances the classification accuracy and robustness of test samples, and demonstrates superior classification performance, especially on large-scale datasets.
Smart Images

Figure CN122200057A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image classification technology, and in particular to a hybrid cooperative nonnegative representation classification method with coarse-to-fine dual flexible competition. Background Technology
[0002] Representation-based classification methods have received widespread attention in the fields of pattern recognition and machine learning due to their significant advantages in capturing the intrinsic structure of data and improving classification performance, and have achieved remarkable application results in fields such as face recognition and hyperspectral image processing.
[0003] Sparse Representation Classification (SRC), a classic representation-based classification method, treats the identification problem as a classification task among multiple linear regression models. This method solves for... The problem of norm minimization achieves sparse discriminative properties in models. Since the introduction of SRC, numerous SRC-based variants have been widely applied in image classification. However, some have questioned... The crucial role of norm sparsity in improving classification accuracy has been questioned. To address this, they propose a simple yet efficient face classification method: Collaborative Representation Classification (CRC) based on Regularized Least Squares. This method does not rely on explicit sparsity constraints, but rather... Norm regularization enables stable collaborative representations, achieving classification performance comparable to or even better than SRC while maintaining low computational complexity.
[0004] In recent years, inspired by the CRC model, numerous improved models have emerged, significantly enhancing classification performance and adaptability to complex real-world scenarios. Existing techniques propose a probability-based cooperative representation classifier (ProCRC), assuming the reconstruction error between test samples and each class-specific representation should follow a Gaussian distribution. To enhance competition among samples, some researchers have introduced the NSC model on top of CRC, integrating representation and classification into a single step, proposing a novel cooperative-competitive representation classifier (CCRC). Considering the label information of training samples, some researchers have proposed the Generalized Cooperative Representation Classifier (GCRC) as a unified representation classification framework, and built a Discriminative Representation Classifier (DRC) on this basis to enhance the model's discriminative ability. Addressing the instability of most classification models when handling spatial homogeneity and heterogeneity, some researchers have introduced mean-weighted regularization on top of CRC, proposing the Mean-Weighted Cooperative Representation Classification (MWCRC) method, effectively suppressing noise interference and enhancing inter-class discriminative ability.
[0005] Despite the significant achievements of SRC and CRC methods in pattern recognition tasks, they still face a key challenge: the complex optimization process often generates poorly interpretable negative representation coefficients, weakening the model's interpretability and discriminative power. To address this, some researchers have proposed that samples should exhibit non-negative correlations, drawing inspiration from non-negative matrix factorization (NMF) to develop the Non-negative Representation Classifier (NRC). This approach improves the physical interpretability of the model while maintaining representation sparsity and discriminative power. Consequently, the modeling approach based on non-negative representations has gradually gained attention, leading to the development of the NRC series of methods.
[0006] To enhance the discriminative power and locality constraints of samples, a position-constrained discriminative nonnegative representation (LDNR) method has been proposed. This method effectively enhances the representational power of samples of the same class by assigning differentiated local weights to different training samples. To address the data imbalance problem, a density-based discriminative nonnegative representation (DDNR) method has been proposed. This method constructs a weight matrix by introducing mixed density information from the decision boundary, thereby increasing the weight of minority class samples and mitigating bias towards the majority class. To more effectively utilize inter-class competition to improve the discriminative power of representations, a flexible competitive weighted nonnegative representation (FCWNR) method has been proposed. This method introduces a flexible factor into the competitive representation term and the class coefficient constraint term to suppress the weaker representational power of classes and enhance the representational contribution of the target class. Although the above classification methods perform well in various application scenarios, they often struggle to balance the competitive relationship between classes and the effective utilization of class label information, limiting the classification performance of representation learning. Summary of the Invention
[0007] To address the above technical problems, this invention provides a hybrid cooperative nonnegative representation classification method based on coarse-to-fine dual flexible competition, comprising the following steps:
[0008] S1. Obtain the test samples and the original training sample set of n samples in C categories;
[0009] S2. Process the samples in the original training sample set. Norm normalization;
[0010] S3. In the coarse representation stage, the optimal representation coefficients of the test samples on the original training sample set are solved by using dual competitive collaborative representation.
[0011] S4. Calculate the contribution weight of each category based on the optimal representation coefficient, and select the top K categories with the largest contributions to form a refined training subset;
[0012] S5. In the fine representation stage, a dual-flexible competitive non-negative representation model is adopted for the refined training subset, and the optimal representation coefficients of the test samples on the refined training subset are solved by the alternating direction multiplier method.
[0013] S6. Calculate the representation residuals of the test samples in each category of the original training sample set;
[0014] S7. Classify according to residuals, and the test sample is identified as the category corresponding to the smallest residual.
[0015] The technical solution further defined in this invention is:
[0016] Furthermore, in step S1, the original training sample set is represented as:
[0017] (1)
[0018] in, Indicates training set The i-th subset of n i This represents the number of training samples in class i, and the total number of samples is... C represents the total number of sample categories, n represents the total number of training samples, x represents the feature vector of each sample, and d represents the number of pixels in each sample.
[0019] As described above, in a coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method, the objective function of the dual-competitive cooperative representation in step S3 is:
[0020] (2)
[0021] in, Indicates test sample In the training sample matrix coefficient vector on, express Zhongyu The corresponding coefficient vector, , and This represents the regularization parameter, used to balance the values of the terms in the above formula.
[0022] As described above, in a coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method, step S3 involves constructing a diagonal matrix. The elements of class i are 1, and the rest are 0, resulting in The objective function of the dual-competitive cooperative representation is expressed as:
[0023] (3)
[0024] The objective function in the above formula is... Taking the derivative and setting it to zero, we get:
[0025] (4)
[0026] Therefore, the analytical solution for the dual-competitive cooperative representation in the coarse representation stage is:
[0027] (5)
[0028] in, The expression is:
[0029] (6)
[0030] Where I represents the identity matrix.
[0031] As described above, in a coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method, in step S4, the optimal representation coefficients are obtained in the coarse representation stage. Then, the reconstructed representations for each category are calculated. With test samples The distance between them is used to measure the contribution of each category in the reconstruction process; the contribution of the i-th class sample in representation learning is defined as follows:
[0032] (7)
[0033] like The smaller the value, the greater the contribution of the reconstruction of class i to the test sample. By comparing the contribution of all C classes, the top K classes with the largest contributions are selected to form a refined training subset. , Let K represent the set of training samples of class i, i = 1, 2, ..., K, where the number of classes K satisfies K ≤ C.
[0034] As described above, in the coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method, the objective function of the dual-flexible competitive nonnegative representation in the fine representation stage in step S5 is as follows:
[0035] (8)
[0036] in, and This represents the regularization parameter, used to balance the effects of two flexible competing constraint terms; and Let represent the flexibility factor in the two flexible competition constraint terms, used to adjust the contribution of different categories in the representation; since each competition constraint term contains K different categories, define . , .
[0037] As described above, in a hybrid collaborative nonnegative representation classification method with coarse-to-fine dual-flexible competition, step S5 employs a variable splitting method to solve for the optimal coefficient vector. By introducing auxiliary variables Equation (8) can be rewritten in the following form:
[0038] (9)
[0039] Equation (9) is transformed into a Lagrange function, and then derived and optimized using the alternating direction multiplier method. The Lagrange function is constructed as shown in the following equation:
[0040] (10)
[0041] In equation (10), Denotes the Lagrange multiplier vector. Indicates the penalty parameter. Represent the dot product of two vectors; initialize variables. ,use , , , and Let represent the optimization variables and Lagrange multipliers at iteration number t, where t = 0, 1, 2, ..., T, and T represents the preset threshold.
[0042] As described above, a hybrid collaborative nonnegative representation classification method with coarse-to-fine dual flexible competition is used. In step S5, an alternating optimization strategy is adopted to gradually update each variable, decomposing equation (10) into solving the following four sub-problems:
[0043] fixed , , and renew The objective function simplified from equation (10) is expressed by equation (11):
[0044] (11)
[0045] Introducing matrices The elements of class i are 1, and the rest are 0; therefore, we can obtain Then the objective function of equation (11) can be expressed as:
[0046] (12)
[0047] Apply equation (12) to Taking the derivative and setting it to zero, we get:
[0048] (13)
[0049] Therefore, we get The analytical solution is:
[0050] (14)
[0051] in, The expression is:
[0052] (15);
[0053] fixed , and renew and The objective function of equation (10) is simplified as follows:
[0054] (16)
[0055] Apply equation (16) to Taking the derivative and setting it to zero, we get:
[0056] (17)
[0057] Therefore, we get The analytical solution is:
[0058] (18)
[0059] Then it can be deduced that for:
[0060] (19)
[0061] renew The objective function that simplifies equation (10) is shown below:
[0062] (20)
[0063] Apply equation (20) to Taking the derivative and setting it to zero, we get:
[0064] (twenty one)
[0065] Therefore, we get The analytical solution is:
[0066] (twenty two)
[0067] Then it can be deduced that The expression is:
[0068] (twenty three);
[0069] fixed , , and renew The objective function simplified from equation (10) is expressed by equation (24):
[0070] (twenty four)
[0071] The analytical solution is:
[0072] (25);
[0073] fixed , , and renew Update the augmented Lagrange multipliers using equation (26). :
[0074] (26)
[0075] Repeat the above iterative steps until the convergence condition is met or the number of iterations exceeds a preset threshold T; the convergence condition in the fine representation stage is expressed as: , and All three ranges must be satisfied simultaneously. This indicates a preset threshold.
[0076] As described above, in a hybrid collaborative nonnegative representation classification method with coarse-to-fine dual-flexible competition, step S6 calculates the residual of the test sample on each class of the training sample set as follows:
[0077] (27)
[0078] in, Let j represent the training sample of class j. This represents the coefficient vector corresponding to the training sample of class j.
[0079] As described above, in a hybrid cooperative nonnegative representation classification method with coarse-to-fine dual flexible competition, in step S7, classification is performed based on the residuals, and the test sample is identified as the category corresponding to the smallest residual:
[0080] (28).
[0081] The beneficial effects of this invention are:
[0082] (1) In this invention, a hybrid collaborative nonnegative representation classification framework from coarse to fine is proposed. In the coarse representation stage, a new inter-class competition term is introduced to alleviate the feature collinearity problem caused by residual competition and to construct a more discriminative dual-competition collaborative representation mechanism. In the fine representation stage, the dual-competition mechanism is further improved and integrated into the nonnegative representation to further enhance the discriminative ability and interpretability of the model.
[0083] (2) In this invention, a novel dual-flexible competition strategy is designed. In order to flexibly weaken the representation weight of the wrong category while significantly enhancing the representation weight of the correct category, the concept of a flexible factor is innovatively introduced and combined with the dual competition mechanism in the coarse representation stage to construct a dual-flexible competition strategy in the fine representation stage. This method realizes the dynamic adjustment of the weight coefficient and improves the accuracy of classification.
[0084] (3) In this invention, a diagonal matrix is innovatively introduced in the model solving process to enhance the convenience of solving and to verify its effectiveness on multiple datasets. Experimental results show that this invention has better classification performance than existing mainstream representation classification methods on small datasets. On large datasets, it also achieves satisfactory results compared with the lightweight neural network models proposed in recent years. Attached Figure Description
[0085] Figure 1 This is a schematic diagram of the overall process of the present invention;
[0086] Figure 2 This is a schematic diagram of a hybrid cooperative nonnegative representation model of coarse-to-fine dual flexible competition in an embodiment of the present invention. Detailed Implementation
[0087] This embodiment provides a coarse-to-fine dual flexible-competition hybrid collaborative-nonnegative representation method for image classification (CFDFCR), such as... Figure 1 As shown, it includes the following steps:
[0088] S1. Obtain the test samples and the original training sample set of C categories and n samples; the original training sample set is represented as:
[0089] (29)
[0090] in, Indicates training set The i-th subset of ni This represents the number of training samples in class i, and the total number of samples is... C represents the total number of sample categories, n represents the total number of training samples, x represents the feature vector of each sample, and d represents the number of pixels in each sample.
[0091] S2. Process the samples in the original training sample set. Norm normalization processing.
[0092] S3. In the coarse representation stage, the optimal representation coefficients of the test samples on the original training sample set are solved using Dual Competitive Collaborative Representation (DCCR); the objective function of DCCR is:
[0093] (30)
[0094] in, Indicates test sample In the training sample matrix coefficient vector on, express Zhongyu The corresponding coefficient vector, , and This represents the regularization parameter, used to balance the values of the terms in the above formula.
[0095] To facilitate solving for the optimal coefficients of the objective function in the coarse representation stage. Construct a diagonal matrix The elements of class i are 1, and the rest are 0, resulting in The objective function of the dual-competitive cooperative representation is expressed as:
[0096] (31).
[0097] The objective function of this problem Taking the derivative and setting it to zero, we get:
[0098] (32).
[0099] Therefore, the analytical solution for the dual-competitive cooperative representation of CFDFCR in the coarse representation stage is:
[0100] (33)
[0101] in, The expression is:
[0102] (34)
[0103] Where I represents the identity matrix.
[0104] S4. Calculate the contribution weights of each category based on the optimal representation coefficients, and select a refined training subset that is highly correlated with the test samples.
[0105] The optimal representation coefficients in the coarse representation stage Then, the reconstructed representations for each category are calculated. With test samples The distance between them is used to measure the contribution of each category in the reconstruction process; the contribution of the i-th class sample in representation learning is defined as follows:
[0106] (35)
[0107] like The smaller the value, the greater the contribution of the reconstruction representation of class i to the test sample, and vice versa. By comparing the contribution of all C classes, the top K classes with the largest contributions are selected to form a refined training subset. , Let K represent the set of training samples of class i, i = 1, 2, ..., K, where the number of classes K satisfies K ≤ C.
[0108] S5. In the fine representation stage, the dual flexible competitive nonnegative representation (DFCNR) model is adopted for the fine training subset, and the optimal representation coefficients of the test samples on the fine training subset are solved by the alternating direction multiplier method.
[0109] While the dual-competition mechanism in the coarse representation stage helps correct classes get closer to the test samples, it may also cause some incorrect classes to get closer to the test samples, thus increasing the risk of misclassification. Therefore, this embodiment innovatively introduces the concept of a flexibility factor and combines it with the dual-competition mechanism in the coarse representation stage to construct a dual-flexibility competition strategy in the fine representation stage. This strategy imposes weak flexibility constraints on correct classes to enhance their representation ability of the test samples; and imposes strong flexibility constraints on incorrect classes to effectively suppress their interference. Furthermore, to improve the sparsity of the representation coefficients, this embodiment also introduces non-negativity constraints in the fine representation stage, thereby further strengthening the contribution of correct classes.
[0110] Based on the above design, the DFCNR objective function of CFDFCR in the fine representation stage is as follows:
[0111] (36)
[0112] in, and This represents the regularization parameter, used to balance the effects of two flexible competing constraint terms; and Let represent the flexibility factor in the two flexible competition constraint terms, used to adjust the contribution of different categories in the representation; since each competition constraint term contains K different categories, define . Similarly, one can obtain expression .
[0113] Since the objective function of DFCNR in the fine representation stage is a nonnegative least squares (NNLS) problem, the variable splitting method is required to solve for the optimal coefficient vector. By introducing auxiliary variables Equation (36) can be rewritten as follows:
[0114] (37)
[0115] Equation (37) is transformed into the Augmented Lagrange Function (ALF), and then derived and optimized using the Alternating Direction Multiplier Method (ADMM). The Lagrange Function is constructed as shown in the following equation:
[0116] (38)
[0117] In equation (38), Denotes the Lagrange multiplier vector. Indicates the penalty parameter. Represent the dot product of two vectors; initialize variables. ,use , , , and Let represent the optimization variables and Lagrange multipliers at iteration number t, where t = 0, 1, 2, ..., T, and T represents the preset threshold.
[0118] By adopting an alternating optimization strategy to gradually update each variable, equation (38) is decomposed into solving the following four sub-problems:
[0119] (1) Fixed , , and renew The objective function simplified from equation (38) is expressed by equation (39):
[0120] (39)
[0121] To facilitate optimization, a matrix is introduced. The elements of class i are 1, and the rest are 0; therefore, we can obtain Then the objective function of equation (39) can be expressed as:
[0122] (40)
[0123] Apply equation (40) to Taking the derivative and setting it to zero, we get:
[0124] (41).
[0125] Therefore, we get The analytical solution is:
[0126] (42)
[0127] in, The expression is:
[0128] (43)
[0129] (2) Fixed , and renew and The objective function of equation (38) is simplified as follows:
[0130] (44)
[0131] Apply equation (44) to Taking the derivative and setting it to zero, we get:
[0132] (45)
[0133] Therefore, we get The analytical solution is:
[0134] (46)
[0135] Then it can be deduced that for:
[0136] (47)
[0137] Similarly, we obtain The expression is:
[0138] (48)
[0139] (3) Fixed , , and renew The objective function simplified from equation (38) is expressed by equation (49):
[0140] (49)
[0141] The analytical solution is:
[0142] (50)
[0143] (4) Fixed , , and renew Update the augmented Lagrange multipliers using equation (51). :
[0144] (51)
[0145] Repeat the above iterative steps until the convergence condition is met or the number of iterations exceeds a preset threshold T; the convergence condition of CFDFCR in the fine representation stage is expressed as: , and All three ranges must be satisfied simultaneously. This indicates a preset threshold.
[0146] S6. Calculate the representation residuals of the test samples in each category of the original training sample set:
[0147] (52)
[0148] in, Let j represent the training sample of class j. This represents the coefficient vector corresponding to the training sample of class j.
[0149] S7. Classify according to residuals, and the test sample is identified as the category corresponding to the smallest residual:
[0150] (53)
[0151] like Figure 2 The diagram illustrates a coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation model provided in an embodiment of the present invention. Representation learning methods have received widespread attention in image classification due to their efficiency and stable classification performance. Classical methods such as cooperative representation (CR) and nonnegative representation (NR) have achieved good results in various scenarios. However, these methods often struggle to balance the competitive relationship between categories and the effective utilization of category label information. Therefore, this embodiment proposes the CFDFCR method.
[0152] The CFDFCR method consists of two stages: coarse representation and fine representation, used for selecting the training set and refining the classification representation, respectively. To facilitate analysis of the model's classification process, see the attached... Figure 2 The document provides a detailed introduction to CFDFCR. During the data preprocessing stage, [the document describes the process of]... and Each column is normalized to the unit L2 norm. In the feature representation stage, the representation process is further divided into a coarse representation stage and a fine representation stage.
[0153] In the coarse representation stage, two competition constraints are introduced: residual competition and inter-class competition. Residual competition term By minimizing With each category estimate The distance between them makes the estimate of the correct category. as close as possible This improves the competitiveness of representations. However, this competitive approach can lead to feature collinearity caused by similar samples between classes. Therefore, this embodiment proposes a novel inter-class competition term. Under the influence of this competing factor, the correct category is represented. Transformed into The representation of the other error categories It is then converted into The angle between the two is determined by become This weakens the correlation between categories. Under the dual-competitive collaborative representation mechanism, from The K classes of samples that contribute most to the representation are selected to construct a refined training subset. It is worth noting that the selected K categories should satisfy K≤C.
[0154] In the detailed representation stage, this embodiment introduces the concept of a flexibility factor based on the dual competition mechanism to construct a dual flexible competition strategy. This involves flexible residual competition. In the context of flexibility factor Representation of the correct category in the coarse representation stage for flexible adjustment This forms a new category representation. This further narrowed the gap with The distance between them. At the same time, It is also used to flexibly adjust the representation of error categories in the coarse representation stage. This forms a new category representation. Keep it away Similarly, in flexible inter-class competition In the middle, the flexibility factor and The category-specific representations in the coarse representation stage were adjusted to form new representations. and The similarity between the correct and incorrect categories is further reduced.
[0155] Finally, to enhance the sparsity of the model, the collaborative representation in the coarse representation stage is replaced with a non-negative representation, making the representation coefficients sparser. In the classification stage, based on the optimal representation coefficients obtained in the feature representation stage, the specific residuals for each category are calculated, thereby achieving accurate classification of the test samples.
[0156] To better balance inter-class competition with the effective utilization of class label information, this embodiment proposes a novel image classification algorithm called the Coarse-to-Fine Dual Flexible Competitive Hybrid Cooperative Non-negative Representation Classifier. First, within the dual competitive cooperative representation (DCCR) framework, each test sample is initially modeled, selecting its K nearest neighbor classes and constructing a refined training subset accordingly. This reduces interference from incorrect classes while ensuring operational efficiency. Second, in the refined training subset, non-negativity constraints are imposed on the representation of test samples, proposing a dual flexible competitive non-negative representation (DFCNR) strategy. This strategy enhances the representation capability of correct classes and flexibly suppresses interference from incorrect classes, further improving the discriminativeness and robustness of the classification. Finally, in the model solution process, a class diagonal matrix is innovatively introduced to enhance the convenience and efficiency of the solution. Compared with NRC, the CFDFCR classifier has a significant advantage in classification accuracy, demonstrating stronger adaptability and robustness.
[0157] The following comparison of the method in this embodiment with other existing techniques is based on different datasets. The AR face dataset contains over 4,000 face images, collected from more than 100 participants under various shooting conditions. These images cover a variety of facial expressions, lighting conditions, and occlusions (such as glasses, scarves, etc.). In this experiment, a subset focusing on lighting and expression changes was selected, including 50 male and 50 female subjects. For each subject, 7 images were randomly selected as the training set, and the remaining 7 images were used as the test set.
[0158] Table 1
[0159]
[0160] As shown in Table 1, the CFDFCR method outperforms all the comparison methods in classification accuracy across the three feature dimensions (54, 120, and 300) of the AR dataset. Specifically, with 54 features, CFDFCR achieves an accuracy of 87.1%, significantly exceeding the best result of 85.8% (LDNR) among classic methods (such as SVM and SRC), CRC series methods (CRC, CROC, ProCRC, DRC, and MWCRC), and NRC series methods. With 120 features, CFDFCR achieves an accuracy of 92.7%, 1.1% higher than the best method in the NRC series, DDNR (91.6%). With 300 features, CFDFCR continues to maintain its best performance with an accuracy of 94.7%, slightly higher than LDNR (94.3%) and DDNR (94.0%).
[0161] The Extended Yale B dataset is a commonly used benchmark dataset in face recognition research. It contains 2414 images of 38 subjects, each photographed under approximately 64 different lighting conditions. The original image resolution is 192×168 pixels. To standardize data processing, all images were resized to 54×48 pixels and normalized to meet the unit 2 norm requirement.
[0162] Table 2
[0163]
[0164] As shown in Table 2, the CFDFCR method outperforms all the comparison methods in classification accuracy across the three feature dimensions (84, 150, and 300) of the Extended Yale B dataset. Specifically, with 84 features, CFDFCR achieves an accuracy of 97.2%, higher than the best result of 96.9% (LDNR) in the NRC series, and significantly better than the classic methods and the CRC series methods. With 150 features, CFDFCR achieves an accuracy of 97.8%, 0.3 percentage points higher than the best method in the NRC series, DDNR (97.5%). With 300 features, CFDFCR continues to maintain its best performance with an accuracy of 98.8%, slightly higher than LDNR (98.4%) and DDNR (98.3%).
[0165] The USPS dataset is a classic handwritten digit recognition dataset containing 10 digit categories from 0 to 9, with each image having a resolution of 16×16 pixels. The dataset is divided into a training set and a test set, with the training set containing 7291 images and the test set containing 2007 images.
[0166] Table 3
[0167]
[0168] As shown in Table 3, the results demonstrate that CFDFCR outperforms other representation methods in all experimental settings. When the number of training samples per class is 50, CFDFCR achieves a classification accuracy of 92.9%, slightly higher than LDNR's 92.1% and DCANR's 91.9%. When the number of training samples increases to 100, CFDFCR's classification accuracy improves to 94.2%, exceeding DCANR and DDNR by 1% and 1.1%, respectively.
[0169] The MNIST dataset contains a series of 28×28 pixel grayscale images of handwritten digits, covering ten digit categories from 0 to 9. The dataset is divided into a training set and a test set, with the training set containing 60,000 images and the test set containing 10,000 images.
[0170] Table 4
[0171]
[0172] As shown in Table 4, CFDFCR significantly outperformed all training scales. With 50 samples per class, CFDFCR achieved an accuracy of 91.6%, outperforming DDNR (90.7%) by 0.9 points, and exceeding SVM (86.6%) and SRC (82.4%) by 5.0 and 9.2 points, respectively. The highest MWCRC accuracy in the CRC series was only 90.6%, while the NRC series was below 90.7%. When the sample size increased to 100 images, CFDFCR rose to 94.4%, leading LDNR (92.1%) by 2.3 points, while the CRC series remained around 90%.
[0173] The FGCV-Aircraft dataset is a fine-grained classification benchmark dataset containing images of 100 different aircraft model variants, with 100 images for each variant, totaling 10,000 images. These aircraft images, presented at diverse scales, with complex design structures and varied appearances, make this dataset extremely challenging for visual classification tasks.
[0174] Table 5
[0175]
[0176] As shown in Table 5, the comparative experimental results on publicly available benchmark datasets demonstrate that CFDFCR achieves the best performance with a recognition accuracy of 87.6%, improving accuracy by 2.1% and 0.3% compared to lightweight deep learning methods ConvNeXt (85.5%) and RepViT (87.3%), respectively. Compared to classic models VGG16 (85.6%) and Symbiote (72.5%), its performance advantage further expands to 2.0%–15.1%. Furthermore, CFDFCR also outperforms FV-FGC (80.7%) and B-CNN (84.1%), which are designed for fine-grained recognition tasks, fully demonstrating its competitiveness and effectiveness in fine-grained classification scenarios.
[0177] The Stanford Cars dataset, proposed by the Stanford University Computer Vision Lab, aims to support research on car image classification and model recognition. This dataset contains 16,185 high-resolution car images, covering 196 different car models, with each model's images including multiple shooting angles and backgrounds.
[0178] Table 6
[0179]
[0180] As shown in Table 6, on the unified benchmark, CFDFCR ranked first with a recognition accuracy of 91.0%, comprehensively surpassing existing lightweight deep models. ConvNeXt (90.8%), EfficientFormerV2 (89.6%), and ReRViT (90.8%) all scored lower than CFDFCR, while MobileViT's accuracy was only 88.9%, further widening the gap. Compared to FV-FGC (82.7%) and B-CNN (90.6%), CFDFCR achieved performance improvements of 8.3% and 0.4%, respectively. For classic models, VGG16's recognition accuracy was only 88.7%, and Symbiotice's was even lower at 78.0%, further validating CFDFCR's excellent representation capabilities and outstanding generalization performance in computationally limited scenarios.
[0181] The Stanford 40 Actions dataset contains 9,352 images representing 40 different human actions, with each action containing approximately 180 to 300 images, covering various daily and professional activities such as "taking a picture," "making a phone call," and "washing a car." The dataset was divided into training and testing sets, with 4,000 images used to train the model and the remaining 5,532 images used for testing to ensure the fairness and reproducibility of the experiment.
[0182] Table 7
[0183]
[0184] As shown in Table 7, CFDFCR outperforms other mainstream methods in classification on the Stanford 40 Actions dataset, achieving a top accuracy of 80.7%. In comparison, VGG19 achieves an accuracy of 77.2%, which is relatively better but still lower than CFDFCR. MobileViT and ConvNeXt achieve accuracies of 78.8% and 79.9%, respectively, approaching the performance of CFDFCR.
[0185] To verify the role of the coarse representation stage, fine representation stage, dual flexibility factor, and competing constraint term in improving model effectiveness, this embodiment designed and constructed a complete ablation experiment on the AR dataset. The entire experiment was divided into 5 sub-experiments, corresponding to the following cases: removal of the coarse representation stage (CFDFCR-CR), removal of the fine representation stage (CFDFCR-FR), removal of the dual flexibility factor (CFDFCR-DF), removal of residual competing terms (CFDFCR-RC), and removal of inter-class competing terms (CFDFCR-IC).
[0186] Table 8
[0187]
[0188] As can be seen from the data in Table 8, the CFDFCR method proposed in this embodiment exhibits superior performance across different dimensions (54, 120, and 300). At a dimension of 54, CFDFCR achieves an accuracy of 87.1%, surpassing other ablation methods. When the dimension increases to 120, the accuracy of CFDFCR further improves to 92.7%, still leading the pack. And at a dimension of 300, the accuracy of CFDFCR reaches 94.7%, further demonstrating its superiority in handling higher-dimensional data.
[0189] In this embodiment, the running time of the CFDFCR method and various representation methods on the AR dataset (feature dimension 54) was also compared. The experimental results are shown in Table 9.
[0190] Table 9
[0191]
[0192] As shown in Table 9, classic methods such as SVM and SRC have runtimes of 0.09ms and 4.55ms respectively. Although they are highly efficient, their classification performance is relatively limited. Among the CRC series methods, ProCRC has the shortest runtime at only 0.07ms, while CROC has a relatively longer runtime of 3.13ms. For the NRC series methods, since they are essentially NNLS problems and cannot obtain closed-form solutions, they usually require the ADMM algorithm for solving, thus their overall runtime is longer than that of classic methods and the CRC series. Among them, the basic model NRC, which does not contain additional constraints, has the shortest runtime of 4.35ms among the methods in the same series.
[0193] In contrast, the CFDFCR method proposed in this embodiment integrates two stages: coarse representation and fine representation. The coarse representation stage uses a dual competition mechanism to select a refined training subset, while the fine representation stage re-represents the test samples based on this subset. This improves classification accuracy while maintaining high operating efficiency. In particular, compared with LDNR (349.32ms), CFDFCR significantly reduces computational costs, demonstrating a good balance between efficiency and performance.
[0194] In summary, the hybrid collaborative nonnegative representation classifier based on coarse-to-fine dual flexible competition proposed in this embodiment utilizes the competitive relationships between categories and category label information to enable the true category to contribute more to the representation process, effectively improving the model's classification ability and robustness. This method demonstrates higher accuracy and stronger generalization ability in face recognition tasks.
[0195] In addition to the embodiments described above, the present invention may have other implementations. All technical solutions formed by equivalent substitution or equivalent transformation fall within the protection scope claimed by the present invention.
Claims
1. A hybrid cooperative nonnegative representation classification method with coarse-to-fine dual flexible competition, characterized in that: Includes the following steps: S1. Obtain the test samples and the original training sample set of n samples in C categories; S2. Process the samples in the original training sample set. Norm normalization; S3. In the coarse representation stage, the optimal representation coefficients of the test samples on the original training sample set are solved by using dual competitive collaborative representation. S4. Calculate the contribution weight of each category based on the optimal representation coefficient, and select the top K categories with the largest contributions to form a refined training subset; S5. In the fine representation stage, a dual-flexible competitive non-negative representation model is adopted for the refined training subset, and the optimal representation coefficients of the test samples on the refined training subset are solved by the alternating direction multiplier method. S6. Calculate the representation residuals of the test samples in each category of the original training sample set; S7. Classify according to residuals, and the test sample is identified as the category corresponding to the smallest residual.
2. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 1, characterized in that: In step S1, the original training sample set is represented as follows: (1) in, Indicates training set The i-th subset of n i This represents the number of training samples in class i, and the total number of samples is... C represents the total number of sample categories, n represents the total number of training samples, x represents the feature vector of each sample, and d represents the number of pixels in each sample.
3. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 2, characterized in that: In step S3, the objective function of the dual-competitive cooperative representation is: (2) in, Indicates test sample In the training sample matrix coefficient vector on, express Zhongyu The corresponding coefficient vector, , and This represents the regularization parameter, used to balance the values of the terms in the above formula.
4. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 3, characterized in that: In step S3, a diagonal matrix is constructed. The elements of class i are 1, and the rest are 0, resulting in The objective function of the dual-competitive cooperative representation is expressed as: (3) The objective function in the above formula is... Taking the derivative and setting it to zero, we get: (4) Therefore, the analytical solution for the dual-competitive cooperative representation in the coarse representation stage is: (5) in, The expression is: (6) Where I represents the identity matrix.
5. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 4, characterized in that: In step S4, the optimal representation coefficients are obtained in the coarse representation stage. Then, the reconstructed representations for each category are calculated. With test samples The distance between them is used to measure the contribution of each category in the reconstruction process; the contribution of the i-th class sample in representation learning is defined as follows: (7) like The smaller the value, the greater the contribution of the reconstruction of class i to the test sample. By comparing the contribution of all C classes, the top K classes with the largest contributions are selected to form a refined training subset. , Let K represent the set of training samples of class i, i = 1, 2, ..., K, where the number of classes K satisfies K ≤ C.
6. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 5, characterized in that: In step S5, the objective function for the dual flexible competitive nonnegative representation in the fine representation stage is as follows: (8) in, and This represents the regularization parameter, used to balance the effects of two flexible competing constraint terms; and Let represent the flexibility factor in the two flexible competition constraint terms, used to adjust the contribution of different categories in the representation; since each competition constraint term contains K different categories, define . , .
7. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 6, characterized in that: In step S5, the variable decomposition method is used to solve for the optimal coefficient vector. By introducing auxiliary variables Equation (8) can be rewritten in the following form: (9) Equation (9) is transformed into a Lagrange function, and then derived and optimized using the alternating direction multiplier method. The Lagrange function is constructed as shown in the following equation: (10) In equation (10), Denotes the Lagrange multiplier vector. Indicates the penalty parameter. Represent the dot product of two vectors; initialize variables. ,use , , , and Let represent the optimization variables and Lagrange multipliers at iteration number t, where t = 0, 1, 2, ..., T, and T represents the preset threshold.
8. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 7, characterized in that: In step S5, an alternating optimization strategy is used to gradually update each variable, decomposing equation (10) into solving the following four sub-problems: fixed , , and renew The objective function simplified from equation (10) is expressed by equation (11): (11) Introducing matrices The elements of class i are 1, and the rest are 0; therefore, we can obtain Then the objective function of equation (11) can be expressed as: (12) Apply equation (12) to Taking the derivative and setting it to zero, we get: (13) Therefore, we get The analytical solution is: (14) in, The expression is: (15); fixed , and renew and The objective function of equation (10) is simplified as follows: (16) Apply equation (16) to Taking the derivative and setting it to zero, we get: (17) Therefore, we get The analytical solution is: (18) Then it can be deduced that for: (19) renew The objective function that simplifies equation (10) is shown below: (20) Apply equation (20) to Taking the derivative and setting it to zero, we get: (21) Therefore, we get The analytical solution is: (22) Then it can be deduced that The expression is: (23); fixed , , and renew The objective function simplified from equation (10) is expressed by equation (24): (24) The analytical solution is: (25); fixed , , and renew Update the augmented Lagrange multipliers using equation (26). : (26) Repeat the above iterative steps until the convergence condition is met or the number of iterations exceeds a preset threshold T; the convergence condition in the fine representation stage is expressed as: , and All three ranges must be satisfied simultaneously. This indicates a preset threshold.
9. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 8, characterized in that: In step S6, the residual of the test sample on each category of the training sample set is calculated as follows: (27) in, Let j represent the training sample of class j. This represents the coefficient vector corresponding to the training sample of class j.
10. The coarse-to-fine dual-flexible competitive hybrid cooperative nonnegative representation classification method according to claim 9, characterized in that: In step S7, the test sample is classified according to the residual, and is identified as the category corresponding to the smallest residual. (28)。