Incremental learning method, system and device for image classification and medium
By freezing the pre-trained backbone network and designing independent class branches, combined with a covering noise suppression strategy, the single-class incremental limitation and catastrophic forgetting problem in incremental learning are solved, realizing instantaneous expansion and stable memory of the model, and supporting efficient and flexible learning in dynamic environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-10
AI Technical Summary
Existing incremental learning methods suffer from single-class incremental limitations, serial dependencies, and catastrophic forgetting problems in dynamic open environments, making it difficult to achieve instantaneous model expansion, parallel training, and stable memory.
The pre-trained backbone network is frozen, independent class branches are created, and class branches are trained through a covering noise suppression strategy. A background noise field is constructed using a negative sample set, and each class branch is trained independently, supporting single-class incremental learning and asynchronous parallel training.
It achieves instantaneous expansion of a single category and asynchronous parallel training, alleviates catastrophic forgetting, ensures long-term stable memory of old category knowledge, and provides an efficient and flexible solution for infinitely incremental category learning in dynamic environments.
Smart Images

Figure CN121837741A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to image classification technology in deep learning, specifically an incremental learning method, system, device and medium for image classification. Background Technology
[0002] Image classification is a core foundational task in computer vision. Traditional models rely on training on a static dataset containing all object categories in a single run. However, in real-world applications, data often arrives incrementally in batches. In this dynamic environment, once a new category is added, traditional methods must save all the old data and retrain the entire model, resulting in high computational resource consumption, high storage costs, and low model update efficiency.
[0003] Class Incremental Learning (CIL) was proposed to address the aforementioned problems. Its core objective is to enable the model to stably maintain its ability to recognize previously learned classes while progressively learning new class samples. Currently, incremental learning based on pre-trained models is the mainstream technical approach, mainly including prompt-based methods, feature representation-based methods, and model fusion-based methods.
[0004] Despite significant progress in existing research, it still faces three key limitations that severely restrict the practical application of incremental learning in dynamic open environments: 1. Single-class incremental limitation: Existing methods generally rely on multiple new classes in the same incremental task, constructing relative decision boundaries through joint contrastive training. This makes them unable to effectively handle incremental tasks containing only one class, severely limiting the flexibility and immediacy of model expansion.
[0005] 2. Sequential Dependency: Existing methods require the model to be trained in a state that is strictly dependent on the completion of the previous task, making parallel or asynchronous training impossible. This sequential dependency not only reduces learning efficiency but also makes the overall model performance susceptible to the order in which tasks are arrived.
[0006] 3. Catastrophic forgetting: When a new category is introduced, the parameter updates made by the model to adapt to the new category will inevitably perturb or overwrite the feature representations learned by the old category, resulting in a significant decrease in the performance of recognizing the old category.
[0007] In-depth analysis reveals that the common root of the aforementioned limitations lies in the "multi-class joint training" paradigm commonly adopted by existing methods. This paradigm leads to a high degree of coupling between the relevant parameters of the new and old classes, causing the model to inevitably interfere with the parameter space serving the old classes when learning new classes. This results in serial dependency and catastrophic forgetting problems, and naturally excludes single-class incremental learning.
[0008] It is worth noting that in dynamic open environments (such as real-time detection systems), incremental tasks often exhibit single-class characteristics (each task adds only one class) and high concurrency characteristics (new tasks may arrive before preceding tasks are completed). Due to these inherent limitations, existing methods struggle to meet the core requirements of dynamic environments for real-time model expansion, parallel training, and stable memory, significantly restricting their practical deployment efficiency. Therefore, there is an urgent need in this field for a novel incremental learning paradigm that can fundamentally decouple parameter dependencies between classes. Summary of the Invention
[0009] The technical problem to be solved by the present invention is to overcome the defects of existing incremental learning methods, such as single-class incremental limitation, serial dependence and catastrophic forgetting. To this end, the present invention provides an incremental learning method, system, device and medium for image classification that can support single-class instantaneous expansion, allow asynchronous parallel training and can stably memorize old class knowledge for a long time.
[0010] The embodiments of this application provide the following technical solutions: An incremental learning method for image classification includes: Freeze the parameters of a pre-trained backbone network, which is used to extract feature vectors from input samples; For each new category in the current incremental task, a separate category branch is created. The category branch is used to receive the feature vector extracted by the backbone network and output a matching score. The class branches are trained using a coverage-based noise suppression strategy, including: introducing a negative sample set whose features cover the feature space of the backbone network; using the negative sample set as an additional negative class, which together with the samples of the newly added class constitutes the training set; and using a classification loss function to train each class branch with the goal of enabling the class branch to learn to distinguish the samples of its own class from the training set. Freeze and store the parameters of each category branch after training is completed; For an image to be classified, its feature vector is extracted through the backbone network and input into each of the stored category branches. The matching score is output through the category branches, and the category corresponding to the category branch with the highest matching score is taken as the classification result.
[0011] The core of this invention lies in the aforementioned overlay noise suppression strategy, which represents a fundamental reconstruction of existing image classification training paradigms. Its core idea is as follows: Traditional methods rely on joint training of multi-class samples to achieve classification by finding the relative difference boundaries between classes. In stark contrast, this strategy introduces a negative sample set that covers the feature space of the backbone network, constructing a unified "background noise field" in the feature space. Based on this, the training objective of each class branch is redefined as: enabling it to effectively identify positive samples of its corresponding class from the aforementioned background noise. In this process, each class branch no longer learns relative relationships with other classes, but focuses on capturing the "absolute position" of its corresponding class in the feature space, thus forming a "feature template" for that class. This method avoids dependence on relative relationships between different classes from a mechanistic perspective, fundamentally decoupling the parameters of each class branch and completely eliminating serial dependencies and catastrophic forgetting caused by parameter coupling. The matching score characterizes the degree of fit between the features of the test sample and the "feature template" of a specific class; therefore, classification decision-making is transformed into the process of finding the best-matching feature template.
[0012] The performance of the aforementioned covering noise suppression strategy hinges on the selection of the negative sample set. Theoretically, the richer the categories and the larger the sample size of the negative sample set, the more representative and diverse the constructed "background noise field" will be. This will help the category branches learn more discriminative feature templates, thereby improving the overall classification accuracy. Therefore, the pre-training dataset of the backbone network is preferred because it can better cover the known feature space.
[0013] According to one embodiment of this application, the overlay noise suppression strategy is implemented in a binary classification manner. This implementation method naturally supports single-class incremental learning. For any target class k in the current incremental task, the training steps for its corresponding class branch k include: The samples of category k are labeled as positive samples, and the samples of the negative sample set are labeled as negative samples, thus forming a binary classification training set; The backbone network and the category branch k are combined into a binary classification network; The category branch k is trained using a binary classification loss function.
[0014] According to one embodiment of this application, the coverage-based noise suppression strategy is implemented in a multi-class classification manner, used to simultaneously train N newly added class branches in the current incremental task, and its training steps include: Create a negative class branch for the negative sample set; The samples of the N newly added categories and the samples of the negative sample set are combined to form an N+1 class multi-class training set; The backbone network, the N newly added category branches, and the negative class branch are combined into an N+1 class multi-class network; The N+1 category branches are trained using a multi-class loss function; After training is complete, discard the negative class branches and retain the N newly added class branches.
[0015] Furthermore, the negative sample set is preferably a pre-trained dataset of the autonomous backplane network, or a class-rich external dataset, or a collection of multiple external datasets.
[0016] Furthermore, to avoid low training efficiency due to an excessively large number of negative samples, a portion of the samples in the training set can be selected for training.
[0017] Furthermore, to avoid reducing the utilization rate of the negative sample set due to the participation of only some samples in training, samples can be selected for training in each training cycle. The specific steps include: Preset a sampling quantity; At the beginning of each training cycle, the number of samples selected from the negative sample set are used as the negative samples for the current training cycle. Preferably, different samples can be selected for each training cycle. In the current training period, training is performed using the negative samples of the current training period.
[0018] The number of samples is a preset fixed value, or a preset proportion based on the size of the negative sample set, or a multiple of the number of newly added category samples in the current training.
[0019] According to one embodiment of this application, to bridge the domain differences between the pre-training dataset and incremental data of the backbone network, an adapter can be attached to the backbone network. This adapter undergoes multi-class supervised training using samples from the first incremental task, and after training, its parameters are frozen and it is then bound to the backbone network for use.
[0020] According to one embodiment of this application, the category branch includes a fully connected module, preferably a single fully connected layer, used to output a logit value based on the feature vector and output a matching score based on the logit value.
[0021] According to one embodiment of this application, the category branch further includes an optional prototype module for calculating the similarity between the input feature vector and a pre-stored prototype vector, wherein the pre-stored prototype vector is calculated based on samples of the corresponding category; the category branch obtains a fused logit value by fusing the logit value output by the fully connected layer with the similarity, and outputs a matching score based on the fused logit value.
[0022] This application also provides an incremental learning system for image classification, including: A frozen pre-trained backbone network is used to extract feature vectors from input samples; The overlay noise suppression training module is used to perform the various methods described above and train independent category branches for new categories. The plugin repository is used to store the branches of each category after training is complete and the parameters are frozen; The classification module is used to call the category branches stored in the plugin repository and make classification decisions based on the matching score output by them.
[0023] Furthermore, the incremental learning system for image classification also includes an adapter training module for training an adapter before the start of the first incremental task; the plugin repository is also used to store the adapter after training and with its parameters frozen, and the adapter is bound to the category branches trained based on the adapter.
[0024] The core design concept of the incremental learning system for image classification is a pluggable architecture: a frozen pre-trained backbone network serves as the unified feature extraction foundation, and each category branch is designed as an independent, pluggable knowledge module. Adding new categories only requires expanding the knowledge module. This design fundamentally avoids catastrophic forgetting and supports instantaneous, seamless expansion of categories and parallel training, enabling the system to adapt to various complex application needs in dynamic, open environments.
[0025] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described incremental learning method for image classification.
[0026] This application also provides a computer-readable storage medium storing a computer program that performs the above-described incremental learning method for image classification.
[0027] Compared with existing incremental learning methods, the technical solution provided by this invention brings the following beneficial effects: It breaks through the single-class incremental limitation: the independent training mechanism of class branches does not require multi-class comparison, and naturally supports single-class incremental tasks.
[0028] It eliminates serial dependencies: the independent category branching structure makes the addition of new categories independent of other categories, thus supporting asynchronous parallel training, and the model performance is not affected by the order in which tasks arrive.
[0029] It fundamentally alleviates catastrophic forgetting: by freezing the stable feature space of the backbone network, the frozen category branches ensure that category knowledge does not drift away, thus achieving long-term stable memory of old knowledge.
[0030] Excellent overall performance and flexibility: It provides an efficient and flexible solution for infinitely incremental learning of categories in dynamic and open environments. Attached Figure Description
[0031] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram of the basic structure of Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the network structure of Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the adapter training network structure in Embodiment 4 of the present invention; Figure 4 This is a schematic diagram of the structure combining the adapter and the prototype module in Embodiment 5 of the present invention; Figure 5 This is a schematic diagram of the structure of the computer device of the present invention. Detailed Implementation
[0033] Example 1: Incremental learning system for image classification and its basic workflow Please see Figure 1 This diagram illustrates the basic structure of the incremental learning system provided in this embodiment of the invention. The system mainly includes: a frozen pre-trained backbone network, a category branch training module, a plugin repository, and a classification module.
[0034] When the system receives a new incremental task (containing one or more new categories), it applies the frozen pre-trained backbone, category branch training modules, and plugin repository. The incremental training process is as follows: S101. Selecting the backbone network: Select a suitable pre-trained model as the backbone network and freeze its parameters to ensure the stability of the output features.
[0035] S102. Create a category branch: For each new category in the current incremental task, create a separate, trainable category branch.
[0036] S103. Training Category Branches: In the category branch training module, based on the covering noise suppression strategy, each newly created category branch is trained using samples of the newly added category and negative samples.
[0037] S104. Store Category Branches: Freeze the trained category branch parameters and store them in the plugin repository. Each category branch is stored in association with its corresponding category identifier.
[0038] After model deployment, the classification process utilizes the frozen pre-trained backbone, plugin repository, and classification module. For the image sample to be classified, the following steps are performed to make a classification decision: S201. Branch Selection: The classification module dynamically selects a relevant subset of category branches from the plugin repository based on the specific application scenario and prior knowledge. This step aims to optimize computational efficiency and classification accuracy. If no filtering is required, all category branches in the repository are used by default.
[0039] S202. Feature extraction: Input the sample to be classified into the frozen pre-trained backbone network and extract its feature vector.
[0040] S203. Calculate the matching score: The classification module inputs the extracted feature vectors in parallel to all selected category branches. Each category branch independently calculates and outputs a matching score representing the degree of matching between the input sample and its corresponding category.
[0041] S204. Classification Decision: The classification module compares the matching scores of all category branches and outputs the final classification result according to the predetermined decision rules (such as selecting the category corresponding to the maximum value).
[0042] It is important to note that the incremental training process (S102-S104) described in this invention can be triggered at any time after model deployment. Whenever a new category needs to be learned, the system can independently create and train the corresponding category branch, and then store it in the plugin repository. This means that model expansion does not require global shutdown or full update, achieving true online, asynchronous, and on-demand incremental learning, greatly enhancing the system's flexibility and practicality in dynamic and open environments. Once the new branch is stored, it can be immediately used in the subsequent classification decision process (S201).
[0043] Example 2: Single-class incremental learning based on a binary classification coverage noise suppression strategy Please refer to Figure 2 The diagram shows the network structure of this embodiment. The specific steps of incremental learning are as follows: Step 1, Network Preparation: The ViT-B / 16 model pre-trained on the ImageNet-1K dataset is used. Its final classification layer is removed and the parameters are frozen to serve as the backbone network.
[0044] Step 2, Sample set preparation: Obtain the ImageNet-1K training dataset of the pre-trained backbone network as the negative sample set.
[0045] Step 3, Create category branch: For any category k in the incremental task, initialize a single-output, single-layer fully connected network as category branch k; Step 4, Binary Classification Coverage Noise Suppression Strategy: a) Combine the backbone network and the category branch k into a binary classification network; b) At the beginning of each training cycle, a predetermined number of negative samples are drawn from the negative sample set without repetition. After traversing the entire negative sample set, it is reset, the order is shuffled, and sampling begins again. The predetermined number is calculated using the following formula: .in, For the category The number of samples; This represents the negative / positive sample ratio coefficient (preferably 100 in this embodiment). The preset quantity.
[0046] c) The samples of category k and the extracted negative samples constitute the binary classification training set for this training cycle, and are assigned binary classification labels (positive class is 1, negative class is 0). d) The binary classification network is trained using the binary cross-entropy loss function. In this embodiment, the training period is set to 30 periods.
[0047] Step 5, Branch Storage: After training is complete, freeze the parameters of the class branch k and store it in the plugin repository; Step 6, iterative processing: Repeat steps 3-5 until all categories have been trained; Step 7, Classification Decision: The test sample is fed into the backbone network, the extracted feature vector is fed into all trained category branches, the output of the category branches is fed into the preferred sigmoid function to obtain the matching score between the test sample and each category branch, and the highest score is selected as the classification result.
[0048] To verify the effectiveness of this invention, tests were conducted on four datasets with different characteristics: CIFAR-100, ImageNet-R, ImageNet-A, and CUB-200. The evaluation was conducted from multiple dimensions, including comprehensive data analysis, cross-style performance, natural adversarial capabilities, and fine-grained classification. For comparison, results are also provided for a method that adds multi-classifier heads to the same frozen backbone network and trains them jointly (training all classes).
[0049] The main configuration used in this test was: CPU: Intel Core i7-9700K; GPU: NVIDIA GeForce 2080Ti; Memory: 64GB. The training framework used was PyTorch, version 1.13.
[0050] The specific performance comparison is shown in Table 1 below (the indicator is classification accuracy %): Table 1 Performance Comparison
[0051] Results Analysis: As shown in Table 1 above, although the traditional joint training method has a slight advantage in accuracy, this invention achieves similar performance by learning only a single class and without requiring training data from previous classes. Moreover, after enhancement using adapters and prototype modules, this invention significantly improves accuracy, surpassing joint training. This fully demonstrates the effectiveness of the coverage-based noise suppression strategy proposed in this invention.
[0052] This embodiment specifically demonstrates how to use a binary classification-based coverage noise suppression strategy (corresponding to claim 2) to achieve single-class incremental learning, and verifies its sampling method (corresponding to claims 5 and 6).
[0053] In summary, this embodiment demonstrates that the method of the present invention can endow the model with powerful continuous learning capabilities with only a very small number of parameters (one lightweight branch per category), and has high flexibility and practicality.
[0054] Example 3: Incremental Learning Based on Multi-Classification Coverage Noise Suppression Strategy This embodiment provides another implementation of the coverage-based noise suppression strategy, namely a multi-classification approach, which corresponds to the technical solution protected by claim 3. The overall process framework of this embodiment is similar to that of embodiment 2, with the main difference being steps 3-5, as follows: Step 3, create category branches: a) Create a dedicated negative class branch.
[0055] b) Create N independent category branches for each of the N new categories in the current incremental task. In this embodiment, each category branch is also implemented using a single-output, single-layer fully connected network.
[0056] Step 4, Multi-class Coverage Noise Suppression Strategy: a) Combine the frozen pre-trained backbone network, the above N newly added class branches, and the negative class branch into a (N+1) class multi-class network; b) At the beginning of each training cycle, a predetermined number of negative samples are drawn from the negative sample set without repetition. After traversing the entire negative sample set, it is reset, the order is shuffled, and sampling begins again. The predetermined number is calculated using the following formula: .in, For any category The number of samples; This represents the negative / positive sample ratio coefficient (preferably 100 in this embodiment). The preset quantity.
[0057] c) Take the samples of the N newly added categories and the extracted negative samples to form a multi-class training set, and assign corresponding category labels to the samples of the N newly added categories, and assign negative class labels to the samples of the negative sample set; d) Train the (N+1) class multi-class network using the multi-class cross-entropy loss function. In this embodiment, the training period is set to 30 periods.
[0058] Step 5, Branch Storage: After training is complete, discard the negative class branch, freeze the parameters of the remaining N class branches, and store them in the plugin repository; Verified in the same experimental environment as in Example 2, the multi-class training method described in this example can also effectively overcome the catastrophic forgetting problem. Its overall classification accuracy is comparable to that of the binary classification method, providing an efficient solution for incremental tasks involving multiple categories.
[0059] Example 4: Incremental Learning Enhancement Scheme Combined with Adapter To bridge the domain differences between the pre-trained dataset and the incremental data of the backbone network, this embodiment introduces an adapter module on top of the single-class incremental learning basic process described in Embodiment 2. This adapter module bridges the domain differences between the pre-trained backbone network and the incremental task data, thereby further improving model performance.
[0060] Before performing incremental learning, the adapter must first be trained. The specific steps are as follows: Step 1: Use the ViT-B / 16 model pre-trained on the ImageNet-1K dataset, remove its final classification layer and freeze the parameters to use as the backbone network; Step 2: In this embodiment, a bottleneck-structured LoRA (Low-Rank Adaptation) adapter structure is adopted and added to the backbone network in parallel (see details for connection method). Figure 3 ); Step 3: Randomly select samples from ten categories from the dataset of the first incremental task as training data for the adapter; Step 4: Initialize a temporary classification head for ten categories, which together with the backbone network that integrates the adapter forms a ten-category network; Step 5: Train the above ten-class network using the multi-class cross-entropy loss function. In this embodiment, the training period is set to 20 periods; Step 6: After training is complete, discard the temporary classification head, freeze all parameters of the adapter, and save them. Thereafter, the adapter is bound to the backbone network to form an enhanced, domain-adaptive feature extractor.
[0061] Once the adapter is ready, the subsequent incremental learning process is the same as in Example 2, but it should be clarified that: (1) “Frozen backbone network” should be understood as “frozen backbone network with the adapters integrated” in subsequent incremental processes.
[0062] (2) The trained category branch must be used in conjunction with the adapter. That is, when using this adapter, the category branch trained by its corresponding incremental task must be invoked, and both must be loaded from the plugin repository simultaneously, such as... Figure 4 The plugin repository is shown below.
[0063] The verification was conducted under the same experimental conditions as in Example 2, and the results are shown in Table 2 below (the index is classification accuracy %): Table 2 Comparison of Results
[0064] As shown in Table 2, after introducing the adapter, the performance of the method of this invention is significantly improved on the CIFAR-100, ImageNet-R, and ImageNet-A datasets, even surpassing the accuracy of traditional joint training methods. This fully demonstrates that the adapter can effectively bridge domain differences, further enhance the feature representation capability of this invention, and is perfectly compatible with the core architecture of this invention (frozen trunk, independent branches), together forming a high-performance, scalable incremental learning solution.
[0065] The introduction of the adapter divides the incremental learning process into two stages: "adaptation-increment". This division is highly consistent with actual engineering needs: the initial stage uses a small amount of historical data to initialize the adapter, and the subsequent incremental stage has no limit on the number of new categories, thus achieving both high accuracy and flexibility.
[0066] Example 5: Enhancement scheme combining category branching with prototype modules This embodiment, based on embodiment 2, enhances the structure of the category branches by introducing a prototype calculation module to improve the robustness of classification. For example... Figure 4 As shown in the category branch, this module is connected in parallel with the original fully connected layer to form an enhanced category branch.
[0067] The changes to step 3 in Example 2 are as follows: Step 3, create category branches: a) Initialize a single-output, single-layer fully connected network as the fully connected module for the class branch k, used to output the logit value. ; b) Input all training samples of category k into the frozen backbone network, extract their feature vectors, and calculate the average of these feature vectors as the prototype vector of that category. c) Store the calculated prototype vector in the category branch. This prototype vector remains frozen throughout all subsequent training and usage.
[0068] With the addition of an extra prototype module, the final output of the enhanced category branch is a fusion score. The calculation formula is as follows:
[0069] in, This represents the logit value output by the fully connected module; It represents the cosine similarity between the feature vector and the stored prototype vector; This is a balancing coefficient used to dynamically adjust the weights of the two modules; its initial value is 0.5. This is a scale factor used for coordination. (range )and (range The scale difference between them is initially set to 1.
[0070] When training the category branch, the weights and balance coefficients of the fully connected module and scale factor The parameters need to be updated synchronously, while the prototype vector remains frozen.
[0071] Except for the changes in the internal structure of the category branches and the calculation method of the matching score, the rest of the incremental learning process in this embodiment is exactly the same as that in Embodiment 2.
[0072] The verification was conducted under the same experimental conditions as in Example 2, and the results are compared in Table 3 below (the index is classification accuracy %): Table 3 Comparison of Results
[0073] Tests showed that introducing the prototype computation module alone (comparative example 2) resulted in stable performance improvements on datasets such as ImageNet-A and CUB-200, indicating that it has better robustness to noise and fine-grained classification.
[0074] When the prototype computing module is used in conjunction with the adapter (e.g.) Figure 4 As shown in the table, it achieved the best performance on all datasets (last row of the table), surpassing all other schemes. This demonstrates a strong synergistic enhancement effect between the two.
[0075] It should be noted that the calculation of the prototype vector depends only on samples of the current class and is frozen during training. Therefore, this enhancement scheme fully maintains the core mechanisms of this invention that support single-class incremental training, asynchronous parallel training, and avoidance of catastrophic forgetting.
[0076] The prototype module described in this embodiment, as an optional enhancement component, effectively improves the ability to distinguish category branches through adaptive fusion with the fully connected path, and is fully compatible with the basic architecture and adapter modules of this invention, together forming a hierarchical, high-performance incremental learning solution.
[0077] Example 6: Applications for Cross-Domain Category Increment This embodiment demonstrates the classification capability of the present invention in cross-domain scenarios.
[0078] For three representative datasets—CIFAR-100, ImageNet-R, and CUB-200 (considered as three independent domains)—the domain adapters and corresponding category branches for each dataset were trained using the method combining adapters and prototype modules described in Example 5. The three datasets contain a total of 500 categories (ImageNet-A was not included due to category overlap with ImageNet-R).
[0079] After the domain adapters and corresponding category branches for each dataset have been trained, the inference process is as follows: Step 1: For the image to be classified, use the combination of "frozen backbone network + domain adapter" in each domain in parallel to extract features and obtain the feature vector of the image to be classified in each domain.
[0080] Step 2: Input the feature vectors of each domain into the corresponding category branch of each domain, and calculate the matching score of all categories in each domain (a total of 500 matching scores).
[0081] Step 3: Compare the matching scores of all categories across all domains and select the category with the highest global score as the final classification result.
[0082] The validation was conducted under the same experimental conditions as in Example 2, where joint training refers to simultaneously training the classification head of a multi-class model using all 500 class samples from three datasets, while the backbone network remained frozen. The results are compared in Table 4 below (the metric is classification accuracy %): Table 4 Comparison of Results
[0083] As shown in Table 4 above, the accuracy of this invention in cross-domain classification tasks is significantly better than joint training. This verifies that this invention constructs a multi-domain classification plugin library by training independent adapters and corresponding category branches for different domains, a design that can efficiently handle cross-domain classification tasks.
[0084] In addition to its high precision, this invention demonstrates extremely high engineering application value: 1) Plug and play: Existing class branches can be used to build new classification systems without retraining.
[0085] 2) Flexible expansion: When adding a new domain or category, only the corresponding adapter and branch need to be trained. Once trained, it can participate in classification without affecting the existing system.
[0086] 3) Parallel acceleration: The computations of each domain are independent of each other and can be allocated to different computing units for parallel execution.
[0087] Example 7: Application of Adaptive Classification System in Dynamic Environments This scenario depicts an agricultural robot switching between a structured greenhouse environment (domain A) and an unstructured outdoor environment (domain B). These two environments differ significantly in terms of lighting conditions, background complexity, and target appearance, making it difficult for traditional single models to simultaneously accommodate both.
[0088] Step 1, Initial Incremental Task: Utilize existing historical data or collect representative sample data in greenhouse and field environments, and then train a dedicated adapter for each environment according to the method in Example 4. Then train a category branch for each category in the initial incremental task to build the initial greenhouse plug-in set and field plug-in set.
[0089] Step 2, Post-deployment: Based on GPS positioning or environmental recognition results, the robot automatically loads the corresponding environment's adapter and category branch. This dynamic plug-in switching mechanism enables a single robot system to adapt to various working environments.
[0090] Step 3, Online Incremental Learning: When the robot detects an object whose matching score is below a predetermined threshold across all categories, it considers the object unknown. Then, the robot is automatically or manually controlled to collect image samples of the object from multiple angles, triggering an incremental learning process. The new branch is stored in the corresponding domain's plugin set. Once trained, the new branch can immediately participate in classification, achieving online learning and real-time expansion.
[0091] This embodiment demonstrates the practical application value of the present invention in dynamic real-world scenarios, particularly in robot vision systems that require rapid adaptation to different environmental domains, providing a complete solution for the long-term deployment of intelligent systems in dynamic open environments.
[0092] Example 8: Privacy-Preserving Federated Learning Application This embodiment demonstrates the unique application value of the present invention within the federated learning framework, providing an incremental learning solution that meets privacy protection requirements for sensitive data fields such as healthcare and finance.
[0093] Step 1: The server distributes the frozen backbone network to each terminal.
[0094] Step 2: Each terminal device uses local private data to independently train the domain adapter (adapting to the distribution of local terminal data) and the corresponding category branch (learning local-specific categories) according to the method described in Example 4.
[0095] Step 3: The terminal only uploads the trained adapter and class branch parameters to the cloud server. The original training data remains on the terminal to ensure data privacy.
[0096] Step 4: The cloud server receives domain adapters and category branches from various terminals and builds a unified plugin repository.
[0097] The significance of this embodiment lies in the fact that the present invention can: Strict privacy protection: Raw data remains within the domain, only model parameters are shared, meeting privacy regulations.
[0098] Heterogeneous data adaptation: Each terminal adapts to the local data distribution through the domain adapter mechanism to solve the problem of data heterogeneity.
[0099] Continuous learning capability: When a new terminal is added or a new category appears, it can independently train and update the plugin repository to achieve continuous evolution.
[0100] High communication efficiency: Only lightweight adapter and branch parameters are transmitted, significantly reducing communication overhead.
[0101] Example 9: A computer device This embodiment provides a computer device, such as... Figure 5 As shown, it includes a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302. When the processor 302 executes the computer program, it implements the above-described incremental learning method for image classification.
[0102] Specifically, the computer device can be a computer terminal, a server, or a similar computing device.
[0103] In this embodiment, a computer-readable storage medium is provided, which stores a computer program that performs the above-described incremental learning method for image classification.
[0104] Specifically, computer-readable storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media does not include transient media, such as modulated data signals and carrier waves.
[0105] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.
[0106] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An incremental learning method for image classification, characterized in that, include: Freeze the parameters of a pre-trained backbone network, which is used to extract feature vectors from input samples; For each new category in the current incremental task, a separate category branch is created. The category branch is used to receive the feature vector extracted by the backbone network and output a matching score. The class branches are trained using a coverage-based noise suppression strategy, including: introducing a negative sample set whose sample features cover the feature space of the backbone network; using the negative sample set as an additional negative class, which together with the samples of the newly added class constitutes the training set; and using a classification loss function to train each class branch with the goal of distinguishing samples of its own class from the training set. Freeze and store the parameters of each category branch after training is completed; For an image to be classified, the feature vector of the image to be classified is extracted through the backbone network and input into each of the stored category branches. The corresponding matching score is output through the category branches, and the category corresponding to the category branch with the highest matching score is taken as the classification result.
2. The incremental learning method for image classification according to claim 1, characterized in that, The coverage-based noise suppression strategy is implemented using a binary classification method. The training steps for any target class branch k in the current incremental task include: The samples in the category branch k are labeled as positive samples, and the samples in the negative sample set are labeled as negative samples, thus forming a binary classification training set; The backbone network and the category branch k are combined into a binary classification network; Based on the binary classification training set and the binary classification network, the category branch k is trained using the binary classification loss function.
3. The incremental learning method for image classification according to claim 1, characterized in that, The overlay noise suppression strategy is implemented in a multi-class manner, used to simultaneously train N class branches in the current incremental task. Its training steps include: Create a negative class branch for the negative sample set; The samples from the N category branches and the samples from the negative sample set together form an N+1 class multi-class training set; The backbone network, the N category branches, and the negative class branch are combined into an N+1 class multi-class network; Based on the N+1 class multi-class training set and the N+1 class multi-class network, the N+1 class branches are trained using the multi-class loss function; After training is complete, discard the negative class branch and retain the N class branches.
4. The method according to any one of claims 1 to 3, characterized in that, The negative sample set is the pre-training dataset of the backbone network, or a multi-class external dataset, or a collection of multiple external datasets.
5. The method according to claim 2 or 3, characterized in that, Also includes: A predetermined subset of samples is sampled from the negative sample set to participate in training.
6. The method according to claim 5, characterized in that, Also includes: Samples are selected for training in each training cycle, including: Preset a sampling quantity; At the beginning of each training cycle, the specified number of samples are selected from the negative sample set as negative samples for the current training cycle. In the current training cycle, training is performed using the negative samples of the current training cycle; The number of samples is a preset fixed value, or a preset proportion based on the size of the negative sample set, or determined according to a multiple of the number of newly added category samples in the current training.
7. The incremental learning method for image classification according to claim 1, characterized in that, The backbone network also includes an additional adapter, which is trained using samples from the first incremental task in a multi-class supervised learning manner before the first incremental task begins. After training is complete, the parameters of the adapter are frozen, so that the adapter can be bound to the backbone network in subsequent incremental tasks.
8. The incremental learning method for image classification according to claim 1, characterized in that, The category branch includes a fully connected module, which is a single-layer fully connected layer used to output a logit value based on the feature vector and a matching score based on the logit value.
9. The method according to claim 8, characterized in that, The category branch also includes a prototype module for calculating the similarity between the input feature vector and a pre-stored prototype vector; the category branch obtains a fused logit value by fusing the logit value output by the fully connected module with the similarity, and outputs a matching score based on the fused logit value.
10. An incremental learning system for image classification, characterized in that, include: A frozen pre-trained backbone network is used to extract feature vectors from input samples; A covered noise suppression training module is used to perform the method as described in any one of claims 1 to 9, training independent category branches for a new category; The plugin repository is used to store the branches of each category after training is complete and the parameters are frozen; The classification module is used to call the category branches stored in the plugin repository and make classification decisions based on the matching score output by the category branch.
11. The incremental learning system for image classification according to claim 10, characterized in that, It also includes an adapter training module for training an adapter before the first incremental task begins; the plugin repository is also used to store the adapter after training and with its parameters frozen, and the adapter is bound to the category branches trained based on the adapter.
12. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the incremental learning method for image classification as described in any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that performs the incremental learning method for image classification as described in any one of claims 1 to 9.