A class-incremental image classification method based on dynamic mixture model
By combining a dynamic hybrid model with amplification and distillation methods, the problem of catastrophic forgetting in incremental learning of deep learning models is solved, efficient classification of new and old data is achieved, the plasticity and stability of the model are maintained, and the classification accuracy is improved.
Patent Information
- Application Number
- CN202310043261.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-29
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-01-29
AI Technical Summary
Existing deep learning models suffer from catastrophic forgetting during incremental learning, making it difficult to balance plasticity and stability under limited resources. This causes the model to forget knowledge of old data when learning new data.
A dynamic hybrid model is adopted, combined with the amplification method and the distillation method. The plasticity and stability of the new classification model are adjusted by dynamically selecting the training method. The local feature distillation loss value is used for calculation to reasonably adjust the plasticity and stability of the model.
It effectively alleviates catastrophic forgetting, improves the model's classification accuracy for new and old data, maintains a balance between the model's plasticity and stability, and reduces model redundancy.
Smart Images

Figure CN116229154B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer image classification, and in particular to a class-incremental image classification method based on a dynamic hybrid model. Background Art
[0002] With the continuous advancement of computer technology in recent years, deep learning techniques, represented by convolutional neural networks, have surpassed the human brain in tasks such as image classification and segmentation. However, these deep learning techniques are currently often trained end-to-end, requiring data to conform to an independent and isotropic distribution. This requires all necessary training data to be prepared at the outset of training. However, in real-world applications, data often arrives in stages over time. For example, face recognition systems need to support the continuous addition of new face data. Traditional neural networks, when used in incremental applications, retain both new and old data and train the model from scratch. This approach consumes a large amount of storage space and computing resources, resulting in a prolonged training cycle. Furthermore, data in fields such as military and medical care pose user privacy and security concerns, making it impossible to retain the data. Furthermore, training the model on new data can lead to catastrophic forgetting, which can dramatically degrade the model's performance on previously learned data.
[0003] Incremental learning addresses this problem, aiming to enable models to learn throughout their lives, much like humans do. This allows models to train incrementally, rather than acquiring all training data all at once. Models trained using incremental learning methods must possess strong learning capabilities for new categories while also preventing learning from new data from interfering with knowledge of older data. Therefore, effectively mitigating catastrophic forgetting in models within limited resources is a pressing issue. Current incremental learning methods still suffer from catastrophic forgetting, leading to a need for an incremental learning method that strikes a balance between flexibility and stability during the learning process to mitigate catastrophic forgetting. Summary of the Invention
[0004] The purpose of the present invention is to solve the above-mentioned defects in the prior art and provide a class-incremental image classification method based on a dynamic hybrid model.
[0005] The purpose of the present invention can be achieved by taking the following technical solutions:
[0006] A class-incremental image classification method based on a dynamic hybrid model, wherein the class-incremental images arrive in time stages, and the categories of the data in each time stage are disjoint, that is, D = {D1, D2, ..., D t-1 ,D t ,…,D T}, where D trepresents the task data set of t time stages, t = 1, 2, ..., T, T represents the total number of time stages, and In each time stage, only the new data of the current time stage and the previously selected old category training data can be used to train the classification model, and the trained classification model is required to be able to classify all known category data; the class incremental image classification method includes the following steps:
[0007] S1. Obtain initial task data, construct an initial training dataset, build an initial classification model and input the initial training dataset for training;
[0008] S2. In the incremental iteration process, select some samples of the training dataset of the previous time stage as the old category training data, combine them with the training data divided by the new task data of the current time stage, and construct an incremental learning dataset as the training dataset of the current time stage;
[0009] S3. Dynamically select a training method to build a new classification model based on the performance results of the old classification model obtained in the previous time period on the training data, input the incremental learning dataset for training, and finally obtain a trained new classification model; wherein, the process of step S3 is as follows:
[0010] S31. When the classification accuracy of the old classification model on the new class is less than or equal to the set threshold, an amplification method is used to improve the plasticity of the new classification model;
[0011] S32. When the classification accuracy of the old classification model on the new class is greater than the set threshold, the distillation method is used to consolidate the stability of the new classification model;
[0012] S4. When there is new time stage task data, repeat steps S2 and S3 iteratively to obtain a new classification model capable of classifying all known categories, and then perform class incremental image classification through the new classification model.
[0013] Furthermore, the classification model is composed of a feature extractor φ t and classifier C t The feature extractor φ is composed of t The parallel deep residual network ResNet is used. The deep residual network ResNet is referred to as the ResNet module below. The classifier C t A fully connected layer is used; at the initial time stage, the feature extractor φ t It only contains one ResNet module, and in subsequent iterations, it adds ResNet modules according to preset conditions. t and classifier C t The classification model composed in series has the ability of both feature extraction and prediction classification, and can effectively predict task data.
[0014] Furthermore, the process of step S1 is as follows:
[0015] S11. Obtain the initial task data and divide it into an initial training data set and an initial test data set, and perform preprocessing operations on the data including cropping, normalization, and flipping. Preprocessing operations including cropping, normalization, and flipping can achieve data augmentation, increase the amount of training data, and improve the generalization ability of the classification model.
[0016] S12. Build an initial classification model and input the initial training data set for training. During the training process, use the cross-entropy function as the loss function. The cross-entropy function can help the initial classification model converge quickly, allowing the classification model to acquire the ability to classify the initial task data.
[0017] Furthermore, the process of step S2 is as follows:
[0018] S21. During the incremental iteration process, obtain the task data of the current time stage and divide it into training data and test data, and perform preprocessing operations on the training data and test data, including cropping, normalization, and flipping;
[0019] S22, calculating the average feature vector of each class of samples in the incremental learning data set of the previous time period, and selecting the first n samples of each class of samples in the incremental learning data set of the previous time period that are closest to the average feature vector as old class training data;
[0020] S23. Randomly mix the old category training data with the current time stage training data after the preprocessing operation to obtain an incremental learning data set as the training data set of the current time stage.
[0021] The acquired incremental learning dataset contains old category training data. Using it to train a new classification model can further consolidate the new classification model's learning of old knowledge and increase the accuracy of classification model recognition.
[0022] Furthermore, the process of step S3 is as follows:
[0023] At time t, the classification accuracy θ of the old classification model at time t-1 on the new category data is used as the evaluation indicator for the selection of the training method, and the threshold value is The specific method selection is as follows:
[0024] Where θ is the classification accuracy of the old classification model on the new category data at time stage t-1, α is the first parameter of the adjustment threshold, β is the second parameter of the adjustment threshold, |C incr| represents the number of categories added in each time stage, and |C| represents the sum of the number of categories in all time stages;
[0025] When the classification accuracy of the old classification model on the new class is less than or equal to the set threshold, it reflects that the old classification model cannot fully learn the knowledge of the new class task. Therefore, it is necessary to use the augmentation method to add ResNet modules to better adapt to the new class task;
[0026] When the classification accuracy of the old classification model on the new class is greater than the set threshold, it means that the old classification model can adapt well to the new data and has high plasticity. Therefore, only the distillation method needs to be used to further consolidate the stability of the new classification model.
[0027] By dynamically selecting the training method, the plasticity and stability of the new classification model can be reasonably adjusted during the training process, so that the new classification model can maintain good classification capabilities on both new and old task data.
[0028] Furthermore, the process of step S31 is as follows:
[0029] S311. When the classification accuracy of the old classification model on the new class is less than or equal to the set threshold, an amplification method is used to increase the parallel ResNet module to improve the plasticity of the new classification model;
[0030] S312, freeze the parameters of the classification model at the t-1 time stage, and set the feature extractor φ of the classification model at the t-1 time stage after freezing t-1 The feature extractor φ of the new classification model at time stage t is connected in parallel with the newly introduced learnable ResNet module. t , while the classifier C t-1 Adjustments are made to form a new classification model; during the training process, the cross entropy function is used as the loss function.
[0031] In the feature extractor φ t Adding a learnable ResNet module can help the new classification model better adapt to new task data and increase the new classification model's ability to learn new task data.
[0032] Furthermore, the step S32 is as follows:
[0033] S321. When the classification accuracy of the old classification model on the new class is greater than the set threshold, the distillation method is used to consolidate the stability of the new classification model.
[0034] S322, freeze the parameters of the classification model at the t-1 time stage, and use the frozen classification model at the t-1 time stage as the old classification model; use the old classification model structure as the basic network structure, and adjust the classifier C t-1Construct a new classification model; the feature extractor φ of the new classification model t Only the last ResNet module can be changed, and the rest of the ResNet modules are frozen;
[0035] S323, sequentially input the samples in the incremental learning dataset into the feature extractors of the new classification model and the old classification model, and output and flatten them into multiple pairs of feature vectors f i t and f i t-1 , where f i t and f i t-1 Represent the feature vectors output by the i-th layer of the ResNet module at time stage t and time stage t-1 respectively; in the process of calculating the distillation loss value, only the feature vectors output by each layer of the last ResNet module in the feature extractor of the new classification model and the old classification model are used for calculation;
[0036] S324, obtain the characteristic vector f i t and f i t-1 , randomly select m-dimensional features in the feature vector according to the features of each dimension in the feature vector f i t and f i t-1 The relative order in the splicing forms a new one-dimensional feature vector pair and Where m is the size of the feature dimension to be selected, and Represent the feature vectors composed of the selected local features after the output of the i-th layer of the ResNet module at time stage t and time stage t-1 respectively; use the generated feature vectors to and Calculate the distillation loss value. The specific calculation formula is as follows:
[0037]
[0038] Among them, Loss distill represents the distillation loss value, γ is the parameter for adjusting the loss size, L represents the number of layers of the ResNet module, and d(…,…) is the cosine distance function;
[0039] S325. Repeat steps S323-S324 Q times, retaining only the calculation with the largest distillation loss value and including it in the total loss value, where the total loss value is the sum of the loss value of the cross entropy function and the distillation loss value; only use the local features with the largest discrimination instead of the global features to train the new classification model, so that the new classification model can avoid redundant information between features, and thus more effectively maintain the balance between plasticity and stability.
[0040] The local feature distillation method helps the new classification model consolidate its memory of old task data, improving the classification accuracy of the new classification model on old categories. At the same time, compared with the global feature distillation method, the local feature distillation method can more reasonably retain the information of old knowledge.
[0041] Furthermore, the classifier adjustment is specifically as follows:
[0042] In the construction of the classifier C at time t t When the classifier C at time stage t-1 is t-1 As a basis, add x output nodes; therefore, the classifier C of the new classification model t It has s+x output nodes, where s is the number of categories that the old classification model needs to recognize, and x is the number of new categories added in the current time stage.
[0043] Classifier C of the new classification model t It has s+x output nodes, which can output the predicted value of each category in the new and old task data, so that the new classification model has the ability to predict all new and old categories.
[0044] The present invention has the following advantages and effects compared to the prior art:
[0045] 1. The present invention combines the two training methods of amplification and distillation, while absorbing the advantages of amplification to improve the plasticity of the classification model and distillation to consolidate the stability of the classification model, so that the classification model can retain the memory of old knowledge while learning new knowledge.
[0046] 2. This invention balances the plasticity and stability of the classification model by setting thresholds and selecting a reasonable training algorithm, significantly mitigating catastrophic forgetting and thus improving accuracy. Furthermore, the use of distillation avoids model redundancy caused by blindly expanding the classification model.
[0047] 3. This method relaxes the constraints on learning new classification models by selecting local features instead of global features for distillation loss calculation. This method can remove redundant information to the greatest extent possible, retaining only the most discriminative local features to train the classification model, helping the classification model better learn new knowledge. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0049] Figure 1 This is a flowchart of the steps of a class incremental image classification method based on a dynamic hybrid model disclosed in an embodiment of the present invention;
[0050] Figure 2 1 is a schematic diagram of a model for training a new classification model using the amplification method according to an embodiment of the present invention;
[0051] Figure 3 2 is a schematic diagram of a model for training a new classification model using the distillation method in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings 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 making creative efforts shall fall within the scope of protection of the present invention.
[0053] Example
[0054] This embodiment discloses a class-incremental image classification method based on a dynamic hybrid model, which specifically includes the following steps:
[0055] Step S1: Obtain initial task data and construct an initial training dataset; build an initial classification model and input the initial training dataset for training. The specific process is as follows:
[0056] S11. Obtain the initial task data and divide the collected images into an initial training set and an initial test set in a ratio of 5:1. Unify the format of the initial task data into PNG format and fix the image size to 64*64 pixels. Then, perform preprocessing operations such as normalization and random flipping on the data to obtain the final initial training set and initial test set.
[0057] S12. Use the ResNet module to build the initial classification model and input the initial training data set for training. During the training process, the cross entropy function is used as the loss function. At the same time, the initial learning rate is set to 0.1, the number of batch samples is 128, and the number of iterations is 130.
[0058] Step S2: During the incremental iteration process, obtain the task data for the current time period and perform the same partitioning and preprocessing as in step S11. Then, calculate the average eigenvector of each class of samples in the incremental learning dataset of the previous time period, and select the first 20 samples closest to the average eigenvector from each class of samples in the incremental learning dataset of the previous time period as the old class training data. Randomly mix the old class training data with the training data for the current time period to obtain the incremental learning dataset as the training dataset for the current time period.
[0059] Step S3: At time stage t, the classification accuracy θ of the old classification model at time stage t-1 on the new category data is used as the evaluation indicator for the selection of the training method, and the threshold value is The specific method selection is as follows:
[0060]
[0061] Where θ is the classification accuracy of the old classification model on the new category data at time t-1, α is the first parameter for adjusting the threshold, and β is the second parameter for adjusting the threshold. In this invention, the value of α is 75% and the value of β is 0.25%. incr | represents the number of categories added at each time stage, and |C| represents the sum of the number of categories across all time stages. During training, the initial learning rate was set to 0.1, the batch size was set to 128, and the number of iterations was set to 130.
[0062] Step S31: When the classification accuracy of the old classification model on the new class is less than or equal to the set threshold, the amplification method is used to improve the plasticity of the new classification model. The specific steps of S31 are as follows:
[0063] S311, when the classification accuracy of the old classification model on the new class is less than or equal to the set threshold, use the amplification method to add parallel ResNet modules;
[0064] S312, freeze the parameters of the classification model at the t-1 time stage, and set the feature extractor φ of the classification model at the t-1 time stage after freezing t-1 The feature extractor φ of the new classification model at time stage t is connected in parallel with the newly introduced learnable ResNet module. t , while the classifier C t-1 Adjustments are made to form a new classification model; during the training process, the cross entropy function is used as the loss function.
[0065] Step S32: When the classification accuracy of the old classification model on the new class is greater than the set threshold, the distillation method is used to consolidate the stability of the new classification model. The specific steps of S32 are as follows:
[0066] S321. When the classification accuracy of the old classification model on the new class is greater than the set threshold, the distillation method is used to consolidate the stability of the new classification model.
[0067] S322, freeze the parameters of the classification model at the t-1 time stage, and use the frozen classification model at the t-1 time stage as the old classification model; use the old classification model structure as the basic network structure, and adjust the classifier C t-1 Construct a new classification model; the feature extractor φ of the new classification model t Only the last ResNet module can be changed, and the remaining ResNet modules are frozen.
[0068] S323, sequentially input the samples in the incremental learning dataset into the feature extractors of the new classification model and the old classification model, and output and flatten them into multiple pairs of feature vectors f i t and f i t-1 , where f i t and f i t-1 Represent the feature vectors output by the i-th layer of the ResNet module at time stage t and time stage t-1 respectively; in the process of calculating the distillation loss value, only the feature vectors output by each layer of the last ResNet module in the feature extractor of the new classification model and the old classification model are used for calculation;
[0069] S324, obtain the characteristic vector f i t and f i t-1 , randomly select m-dimensional features in the feature vector according to the features of each dimension in the feature vector f i t and f i t-1 The relative order in the splicing forms a new one-dimensional feature vector pair and Where m is the size of the feature dimension to be selected, and Represents the feature vectors composed of the selected local features after the output of the i-th layer of the ResNet module at time stage t and time stage t-1 respectively; in the present invention, the value of m is one-third of the number of feature dimensions. Use the generated feature vectors to and Calculate the distillation loss. The specific calculation formula is as follows:
[0070]
[0071] Among them, Loss distillRepresents the distillation loss value, γ is a parameter for adjusting the loss size, L represents the number of layers of the ResNet module, and d(…,…) is the cosine distance function; in the present invention, the value of γ is set to 3.
[0072] S325. Repeat steps S323 and S324 Q times, retaining only the calculation with the highest distillation loss value and including it in the total loss value. In the present invention, the value of Q is the square root of the number of feature dimensions. The total loss value is the sum of the cross entropy loss value and the distillation loss value. Only the local features with the highest discriminability are used instead of the global features to train the new classification model. This allows the new classification model to avoid redundant information between features, thereby more effectively maintaining a balance between plasticity and stability.
[0073] Step S4: When there is new time stage task data, steps S2 and S3 are iterated repeatedly to obtain a new classification model capable of classifying all known categories.
[0074] To prove the effectiveness of the method proposed in this application, the following verification experiments are conducted:
[0075] In the verification experiment, the class-incremental image classification method based on the dynamic hybrid model proposed in the present invention was applied to the CIFAR-100 dataset classification application.
[0076] The CIFAR-100 dataset consists of 100 classes, each containing 600 images. Each class has 500 training images and 100 test images.
[0077] In the experimental setting, the initial task data of the verification experiment is composed of 50 classes. In the incremental iteration stage, the remaining 50 classes are evenly divided into three incremental modes of 25, 10, and 5 classes for experimentation. In order to compare and illustrate the advantages of the method of the present invention over the existing technology, this experiment uses the ICARL classification model, UCIR classification model, and PODNET classification model to perform classification on the CIFAR-100 dataset. The experimental results are measured by the average incremental accuracy, and the experimental results are expressed as the mean and variance of three different category orders. The final experimental results are shown in Table 1:
[0078] Table 1. Experimental comparison results
[0079] 25 10 5 ICARL 60.12±1.86 57.38±5.28 54.71±5.16 UCIR 65.33±0.61 63.34±1.87 60.93±0.80 PODNET 66.82±1.05 65.33±0.78 64.64±0.75 DHM 74.71±0.30 72.73±0.18 71.98±0.13
[0080] Table 1 shows that the proposed class-incremental image classification method based on a dynamic hybrid structure achieves a more effective balance between learning new and old data compared to existing methods across different incremental categories, achieving higher average incremental accuracy. Furthermore, the mean values for the three different orderings are lower than those of other existing methods, demonstrating that the proposed classification model is more robust.
[0081] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.
Claims
1. A class-incremental image classification method based on a dynamic mixture model, wherein The incremental images arrive in different time stages, and the categories of the data in each time stage are disjoint, that is, D = {D1, D2, ..., D t-1 ,D t ,…,D T }, where D t represents the task data set of t time stages, t = 1, 2, ..., T, T represents the total number of time stages, and In each time stage, only new data in the current time stage and pre-selected old category training data can be used to train the classification model, and the trained classification model is required to be able to classify all known category data; the class incremental image classification method is characterized in that it includes the following steps: S1. Obtain initial task data, construct an initial training dataset, build an initial classification model and input the initial training dataset for training; S2. In the incremental iteration process, select some samples of the training dataset of the previous time stage as the old category training data, combine them with the training data divided by the new task data of the current time stage, and construct an incremental learning dataset as the training dataset of the current time stage; S3. Dynamically select a training method to build a new classification model based on the performance of the old classification model on the training data obtained in the previous time period, input the incremental learning dataset for training, and finally obtain a trained new classification model; the process is as follows: At time stage t, the classification accuracy of the old classification model at time stage t-1 on the new category data As an evaluation indicator for the selection of training methods, the threshold value is The specific method selection is as follows: in is the classification accuracy of the old classification model on the new category data at time stage t-1, α is the first parameter for adjusting the threshold, β is the second parameter for adjusting the threshold, |C incr | represents the number of categories added in each time stage, and |C| represents the sum of the number of categories in all time stages; S31. When the classification accuracy of the old classification model on the new class is less than or equal to the set threshold, it means that the old classification model cannot learn the knowledge of the new class task. The augmentation method is used to add ResNet modules to adapt to the new class task. S32: When the classification accuracy of the old classification model on the new class is greater than the set threshold, it means that the old classification model can adapt to the new data, and the distillation method is used to consolidate the stability of the new classification model; S4. When there is new time stage task data, repeat steps S2 and S3 iteratively to obtain a new classification model capable of classifying all known categories, and then perform class incremental image classification through the new classification model.
2. The class-incremental image classification method based on a dynamic hybrid model according to claim 1, characterized in that: The classification model consists of a feature extractor φ t and classifier C t The feature extractor φ is composed of t The parallel deep residual network ResNet is used. The deep residual network ResNet is referred to as the ResNet module below. The classifier C t A fully connected layer is used; at the initial time stage, the feature extractor φ t It only contains one ResNet module, and ResNet modules will be added according to preset conditions during subsequent iterations.
3. The class-incremental image classification method based on a dynamic hybrid model according to claim 1, characterized in that: The process of step S1 is as follows: S11, obtaining the initial task data and dividing it into an initial training data set and an initial test data set, and performing preprocessing operations on the data including cropping, normalization, and flipping; S12. Build an initial classification model and input the initial training data set for training; during the training process, use the cross entropy function as the loss function.
4. The class-incremental image classification method based on a dynamic hybrid model according to claim 1, characterized in that: The process of step S2 is as follows: S21. During the incremental iteration process, obtain the task data of the current time stage and divide it into training data and test data, and perform preprocessing operations on the training data and test data, including cropping, normalization, and flipping; S22, calculating the average feature vector of each class of samples in the incremental learning data set of the previous time period, and selecting the first n samples of each class of samples in the incremental learning data set of the previous time period that are closest to the average feature vector as old class training data; S23. Randomly mix the old category training data with the current time stage training data after the preprocessing operation to obtain an incremental learning data set as the training data set of the current time stage.
5. The class-incremental image classification method based on a dynamic hybrid model according to claim 1, characterized in that: The process of step S31 is as follows: S311, when the classification accuracy of the old classification model on the new class is less than or equal to the set threshold, use the amplification method to add parallel ResNet modules; S312, freeze the parameters of the classification model at the t-1 time stage, and set the feature extractor φ of the classification model at the t-1 time stage after freezing t-1 The feature extractor φ of the new classification model of the t time stage is formed in parallel with the newly introduced learnable ResNet module t , while the classifier C t-1 Adjustments are made to form a new classification model; during the training process, the cross entropy function is used as the loss function.
6. The class-incremental image classification method based on a dynamic hybrid model according to claim 1, characterized in that: The step S32 is as follows: S321. When the classification accuracy of the old classification model on the new class is greater than the set threshold, the distillation method is used to consolidate the stability of the new classification model. S322, freeze the parameters of the classification model at the t-1 time stage, and use the frozen classification model at the t-1 time stage as the old classification model; use the old classification model structure as the basic network structure, and adjust the classifier C t-1 Construct a new classification model; the feature extractor φ of the new classification model t The last ResNet module can be changed, and the remaining ResNet modules are frozen; S323, sequentially input the samples in the incremental learning dataset into the feature extractors of the new classification model and the old classification model, and output and flatten them into multiple pairs of feature vectors f i t and f i t-1 , where f i t and f i t-1 Represent the feature vectors output by the i-th layer of the ResNet module at time stage t and time stage t-1 respectively; in the process of calculating the distillation loss value, only the feature vectors output by each layer of the last ResNet module in the feature extractor of the new classification model and the old classification model are used for calculation; S324, obtain the characteristic vector f i t and f i t-1 , randomly select m-dimensional features in the feature vector according to the features of each dimension in the feature vector f i t and f i t-1 The relative order in the splicing forms a new one-dimensional feature vector pair and Where m is the size of the feature dimension to be selected, and Represent the feature vectors composed of the selected local features after the output of the i-th layer of the ResNet module at time stage t and time stage t-1 respectively; use the generated feature vectors to and Calculate the distillation loss value. The specific calculation formula is as follows: Among them, Loss distill represents the distillation loss value, γ is the parameter for adjusting the loss size, L represents the number of layers of the ResNet module, and d(…,…) is the cosine distance function; S325. Repeat steps S323-S324 Q times, retaining only the calculation with the largest distillation loss value and including it in the total loss value, where the total loss value is the sum of the loss value of the cross entropy function and the distillation loss value; only use the local features with the largest discrimination instead of the global features to train the new classification model, so that the new classification model can avoid redundant information between features, and thus more effectively maintain the balance between plasticity and stability.
7. The class-incremental image classification method based on a dynamic hybrid model according to claim 2, characterized in that: The classifier adjustment is specifically as follows: In the construction of the classifier C at time t t When the classifier C at time stage t-1 is t-1 As a basis, add x output nodes; therefore, the classifier C of the new classification model t It has s+x output nodes, where s is the number of categories that the old classification model needs to recognize, and x is the number of new categories added in the current time stage.
Citation Information
Patent Citations
Image category incremental learning method based on single classification technology
CN111368874A
Image big data-oriented class increment classification method, system and device and medium
CN112990280A