Target detection lifelong learning method based on extensible parameter quantity

By using the method of freezing some parameters and soft label playback in the parameter expansion and compression stages of the target detection model, the problem of catastrophic forgetting and offset in incremental target detection is solved, efficient lifelong learning is achieved, and storage and computing are reduced. cost.

CN118658044APending Publication Date: 2024-09-17NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410863998.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-30
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In class incremental target detection, the model will suffer from catastrophic forgetting after learning a new category, resulting in a decrease in performance for previous categories, and it is difficult for the existing technology to effectively solve the problems of background offset and foreground offset in incremental learning, resulting in The plasticity of the model is limited.

Method used

A lifelong learning method for target detection based on scalable parameter quantities is adopted. By freezing the Backbone and Neck parts of the model in the parameter expansion stage, the parameters of the detection head are only updated in the parameter expansion stage, and soft labels are used for data playback in the parameter compression stage. Only 5% or less data replay is required to compress the model to the same level as non-continuous learning or fixed-parameter continuous learning models, and does not require any annotation.

Benefits of technology

There is no need to save training samples in the class growth stage, and the data playback requirements in the parameter compression stage are extremely low, which reduces computing and storage costs, significantly improves the stability and efficiency of the model, reduces the dependence on annotated data, and realizes an efficient lifelong learning process. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658044A
    Figure CN118658044A
Patent Text Reader

Abstract

The invention discloses a target detection lifelong learning method based on extensible parameter quantity. The method does not need to store any training sample in a parameter expansion stage; in the parameter compression stage, only 5% or less data playback is needed to compress the expanded model to the same level as non-continuous learning or other constant parameter continuous learning models, and compared with other common playback, the data playback is simpler and more convenient, and the data playback efficiency is greatly improved due to the fact that a soft label method is used for data playback. The playback data used in the method does not need any annotation, and meanwhile, a large amount of workload and storage space are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of deep learning technology, and specifically relates to a lifelong learning method for target detection based on expandable parameter quantities. Background Art

[0002] Recently, the field of deep learning has made remarkable progress and developed state-of-the-art object detection models that perform particularly well on benchmark datasets. However, these models are usually designed to learn from static data. In incremental learning, replaying distillation, which combines stored samples from previous tasks with samples from the current task, is one of the most effective ways to address catastrophic forgetting. However, unlike incremental classification, image replay has not been successfully applied to class-incremental object detection (IOD). After multiple class-incremental training, object detectors, especially the detector's location regression module, suffer from a phenomenon known as catastrophic forgetting, where the performance of the detector on previous categories degrades after learning new categories. This problem is common in incremental learning and can be alleviated by balancing model stability (retaining previous information) and plasticity (learning new information without forgetting previous knowledge) through replay and distillation. Most of the research on incremental learning is based on image classification, object detection, and semantic segmentation. An important aspect of incremental object detection is background shift, also known as missing annotations. In incremental object detection, objects belonging to previous or future tasks are usually not annotated and assigned to the background category because the annotations are only available for categories in the current task. One of the most effective methods in incremental classification is the rehearsal strategy based on stored images. However, directly applying the replayed image to the IOD will cause the unlabeled objects of the current category in the replayed image to be considered as background by the model. Therefore, the new object is the background in the replayed image, but is considered as the foreground in the new image, which will lead to a contradiction between the foreground annotation in the example and the current image. This problem is called foreground shift, which affects the plasticity of the current model. Summary of the invention

[0003] In order to overcome the shortcomings of the prior art, the present invention provides a lifelong learning method for target detection based on expandable parameters. No training samples need to be saved in the parameter expansion stage. In the parameter compression stage, only 5% or less of the data needs to be replayed to compress the expanded model to the same level of non-continuous learning or other fixed parameter continuous learning models. What is more convenient than other ordinary playbacks is that since the data is replayed using a soft label method, the playback data used in the present invention does not require any annotation, which saves a lot of workload and storage space.

[0004] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0005] Step 1: Pre-training phase;

[0006] Adopt YOLOv9 as the framework of the target detection model, use the scalable parameters pre-trained on the OpenImagev7 dataset to continuously learn the model, and freeze the Backbone and Neck parts, and keep the frozen parts frozen in all subsequent training;

[0007] Step 2: Class incremental learning training and loss calculation;

[0008] Starting from the training of the second task, each training uses the model weights generated by the previous task, and the first task uses the pre-trained weights; starting from the training of the first task, each model automatically expands the parameters according to the number of class increments of this task, then loads the model weights generated by the previous task, and then freezes all the parameters of the current model; at the beginning of training, the model initializes the expanded parameters of the current task and unfreezes these parameters as learnable parameters in this task; during model training, back propagation will only update this part of the unfrozen parameters. Other training settings and loss calculations in the parameter expansion incremental learning phase are consistent with YOLOv9;

[0009] Step 3: Parameter compression and playback of positive and negative samples;

[0010] After expansion, the expandable parameters are compressed using distillation and playback. The training samples are simultaneously passed into the model to be compressed and a new compression parameter model. Soft labels are predicted and generated in the model to be compressed, and used as labels of the training samples to train the new compression parameter model. The new compression parameter model is trained normally using the training samples and soft labels. After the compression parameter model is trained, it is equivalent to the first task incremental learning model, and subsequent increments can be performed directly on the model weights.

[0011] Preferably, when compressing the parameters, it is ensured that the total number of model parameters does not exceed 150% of the number of initialization parameters; in the compression stage, 2% to 5% of the data are replayed, and these data do not need to be labeled.

[0012] Preferably, in step 3, when selecting the retained samples, the maximum number of samples is first set. 5% of the current number of training samples for each class i, the minimum number of samples It is 1% of the current number of training samples of each category i. On this basis, the average number of samples is calculated:

[0013]

[0014] So choose The sample is maintained while ensuring ;in, Represents the sum of the number of samples for each image. Represents the total number of training images, Indicates the number of samples in the current image. Indicates the total number of images selected for playback so far.

[0015] The beneficial effects of the present invention are as follows:

[0016] 1. The target detection lifelong learning method based on scalable parameters provided by the present invention does not need to save any training samples during the class growth stage, which is significantly better than the existing technology from an engineering perspective and solves the need for storage and playback of training in order to ensure the effect during the continuous learning process.

[0017] 2. The target detection lifelong learning method based on scalable parameters provided by the present invention has extremely low data playback requirements in the parameter compression stage. In the parameter compression stage, only 5% or less of the data playback is needed to compress the model to the same level as non-continuous learning or other fixed parameter continuous learning models, and after any training is completed, the parameter compression can be performed or not. This feature greatly reduces the computing and storage costs during the model training and optimization process.

[0018] 3. The object detection lifelong learning method based on expandable parameters provided by the present invention does not require labeled data playback during the parameter compression stage. Compared with the conventional data playback method, the present invention uses a soft label playback data method, and data playback can be performed without any labeling. By reducing the dependence on labeled data and reducing the number of data playback requirements, the present invention greatly reduces the workload and storage space requirements while maintaining the model performance, making the lifelong learning process of object detection more efficient and economical.

[0019] In summary, the present invention effectively overcomes the shortcomings of the prior art in the field of lifelong learning for target detection through a series of innovative methods, and provides a solution that is both resource-saving and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 Schematic diagram of parameter expansion training of the continuously evolving parameter expandable model of the present invention

[0021] Figure 2 Schematic diagram of compression training of expandable model parameters using continuous evolution parameters of the present invention. DETAILED DESCRIPTION

[0022] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0023] In order to overcome the shortcomings of the prior art, enhance the stability of the model, and overcome the problem of catastrophic model forgetting in multi-tasks, the present invention proposes a new method called CLSP (Continuous learning with ScalableParameters) for continuous learning with scalable parameters. Compared with the existing method of lifelong learning replay distillation for target detection, the present invention does not need to save any training samples in the parameter expansion stage. At the same time, since the number of parameters continues to increase in the expansion stage, the training effect is better than that of the non-continuous learning method (one training to continuously learn the data of all tasks so far). In the parameter compression stage, only 5% or less of the data needs to be replayed to compress the expanded model to the same level of non-continuous learning or other fixed parameter continuous learning models, and it is easier than other ordinary replays. Since the data is replayed using the soft label method, the replay data used in the present invention does not require any annotation, which saves a lot of workload and storage space at the same time. It also means that the replay stage can also use the data for learning to achieve the purpose of domain transfer learning. The technical solution adopted by the present invention to solve its technical problems is as follows:

[0024] 1. Pre-training stage;

[0025] This module uses YOLOv9 as the framework of the target detection model. YOLOv9 is a target detection model whose principles can be divided into three main parts: Backbone, Neck and Head. Backbone is the backbone network of YOLOv9, which usually uses a convolutional neural network (CNN), such as Darknet-53. It is responsible for extracting features from the input image. Through multiple convolutional layers and pooling layers, Backbone can gradually reduce the size of the feature map while extracting more abstract and advanced features. Neck is the feature fusion part of YOLOv9, which is used to fuse features from different levels. YOLOv9 uses a feature fusion method called GELAN. GELAN fuses features from different levels through top-down and bottom-up paths, allowing the model to simultaneously utilize low-level and high-level feature information, thereby improving detection performance and enabling the model to perform more efficient back propagation. Head is the detection head part of YOLOv9, which maps features to target detection results through a series of convolutional and fully connected layers. In YOLOv9, the Head part uses multiple convolutional layers and fully connected layers to generate the bounding box and category probability of the target. At the same time, YOLOv9 uses a feature decoder in the detection head to convert the prediction results into actual bounding box coordinates and category labels.

[0026] The present invention firstly continuously learns the model with the expandable parameter amount pre-trained in the OpenImagev7 data set, and freezes the Backbone and Neck parts therein, and keeps these parts frozen in all subsequent trainings. Since the pre-trained model data volume and categories are large (millions of pictures), the Backbone and Neck parts both have strong feature extraction (Neck performs feature fusion) capabilities and strong generalization. The programmable gradient of the Neck design of v9 can further enhance the feature extraction capability of the Backbone, so even if it is frozen, it will not affect the subsequent training results. At the same time, the model detection head Head performs target detection frame regression and classification according to the features, so parameter expansion and compression are mainly performed at the detection head Head.

[0027] 2. Class incremental learning training and loss calculation;

[0028] Starting from the training of the second task, each training uses the model weights generated by the previous task, and the first task uses the pre-trained weights. Figure 1 As shown in the figure, starting from the training of the first task, each time the model automatically expands the parameters according to the number of class increments of this task, then loads the model weights generated by the previous task, and freezes all the parameters of the current model. At the beginning of training, the model will initialize the parameters expanded for the current task and unfreeze these parameters as learnable parameters for this task. When the model is trained, back propagation will only update these parameters. Other training settings and loss calculations in the parameter expansion incremental learning phase are consistent with YOLOv9.

[0029] 3. Parameter compression and playback of positive and negative samples;

[0030] The expandable parameters proposed in the present invention can be compressed by using distillation and playback after being expanded to a certain extent. The specific compression stage settings can be adjusted according to engineering requirements, usually ensuring that the total number of model parameters does not exceed 150% of the initialization parameter amount. In the compression stage, 2% to 5% of the data is usually played back, and these data do not need to be labeled. The specific compression process is as follows Figure 2 , the training samples are simultaneously passed into the model to be compressed ( Figure 2 middle and upper part) and a new compression parameter model ( Figure 2 In the middle and lower part, a soft label is generated by predicting in the model to be compressed, and used as the label of the training sample to train the new compression parameter model. The specific construction method and training settings of the new compression parameter model are the same as the parameter expansion model of the first task of class incremental learning. The new compression parameter model uses the training samples and soft labels for normal training. After the compression parameter model training is completed, it is equivalent to the incremental learning model of the first task. The subsequent increment can be directly performed on the weight of the model.

[0031] When selecting the samples to keep, first set the maximum number of samples 5% of the current number of training samples for each class i, the minimum number of samples It is 1% of the current number of training samples of each category i. On this basis, the average number of samples is calculated:

[0032]

[0033] So choose The sample is maintained while ensuring .

[0034] In general, the detection box replay enhanced distillation method fits the data of the current stage by training the original samples of the current stage, and prevents catastrophic forgetting by replaying the retained samples.

[0035] Table 1

[0036] Task 10-20 Mission 220-40 Mission 340-60 Mission 460-80 Parameter Compression Direct training of 0-80 categories all 0.773 0.747 0.69 0.684 0.654 0.648 person 0.839 0.837 0.837 0.837 0.809 0.821 bicycle 0.655 0.654 0.654 0.653 0.614 0.618 car 0.737 0.731 0.731 0.731 0.698 0.693 motorcycle 0.797 0.791 0.791 0.79 0.778 0.775 airplane 0.936 0.936 0.937 0.937 0.917 0.918 bus 0.88 0.871 0.871 0.871 0.864 0.857 train 0.946 0.939 0.938 0.939 0.938 0.927 truck 0.641 0.62 0.622 0.621 0.608 0.609 boat 0.587 0.58 0.58 0.58 0.56 0.543 trafficlight 0.584 0.565 0.565 0.566 0.527 0.555 fire hydrant 0.912 0.909 0.909 0.909 0.902 0.901 stopsign 0.801 0.79 0.789 0.79 0.758 0.801 parking meter 0.698 0.694 0.695 0.693 0.691 0.71 bench 0.462 0.464 0.465 0.465 0.443 0.427 bird 0.614 0.599 0.599 0.599 0.566 0.559 cat 0.933 0.924 0.925 0.925 0.922 0.919 dog 0.859 0.857 0.858 0.858 0.851 0.827 horse 0.919 0.91 0.904 0.904 0.902 0.872 sheep 0.816 0.805 0.806 0.806 0.787 0.786 cow 0.847 0.847 0.846 0.847 0.832 0.834 elephant - 0.897 0.893 0.894 0.875 0.883 bear - 0.925 0.926 0.927 0.92 0.9 zebra - 0.929 0.929 0.929 0.91 0.917 giraffe - 0.941 0.947 0.947 0.933 0.925 backpack - 0.373 0.359 0.359 0.32 0.322 umbrella - 0.73 0.709 0.709 0.692 0.673 handbag - 0.411 0.403 0.403 0.357 0.324 tie - 0.621 0.6 0.602 0.57 0.57 suitcase - 0.726 0.723 0.724 0.67 0.669 frisbee - 0.905 0.901 0.9 0.881 0.865 skis - 0.596 0.595 0.595 0.578 0.533 snowboard - 0.613 0.602 0.602 0.557 0.562 sportsball - 0.669 0.658 0.658 0.631 0.619 kite - 0.688 0.675 0.675 0.641 0.659 baseballbat - 0.709 0.699 0.698 0.677 0.631 baseballglove - 0.707 0.707 0.706 0.669 0.681 skateboard - 0.838 0.826 0.825 0.815 0.801 surfboard - 0.726 0.72 0.716 0.711 0.673 tennisracket - 0.889 0.893 0.894 0.877 0.836 bottle - 0.648 0.642 0.641 0.592 0.6 wineglass - - 0.651 0.652 0.618 0.626 cup - - 0.671 0.665 0.638 0.631 fork - - 0.666 0.613 0.61 0.628 knife - - 0.444 0.464 0.434 0.397 spoon - - 0.458 0.451 0.402 0.388 bowl - - 0.64 0.629 0.595 0.624 banana - - 0.437 0.415 0.375 0.42 apple - - 0.374 0.375 0.332 0.289 sandwich - - 0.612 0.601 0.571 0.571 orange - - 0.472 0.445 0.428 0.399 broccoli - - 0.463 0.427 0.416 0.42 carrot - - 0.407 0.402 0.363 0.343 hotdog - - 0.597 0.554 0.546 0.537 pizza - - 0.799 0.786 0.763 0.774 donut - - 0.685 0.679 0.641 0.643 cake - - 0.685 0.69 0.639 0.62 chair - - 0.604 0.602 0.566 0.549 couch - - 0.693 0.69 0.66 0.666 pottedplant - - 0.551 0.543 0.503 0.531 bed - - 0.748 0.74 0.728 0.682 dining table - - - 0.523 0.463 0.498 toilet - - - 0.874 0.857 0.842 tv - - - 0.844 0.82 0.811 laptop - - - 0.856 0.838 0.815 mouse - - - 0.839 0.81 0.815 remote - - - 0.63 0.581 0.578 keyboard - - - 0.781 0.709 0.749 cellphone - - - 0.64 0.593 0.589 microwave - - - 0.845 0.806 0.803 oven - - - 0.628 0.59 0.585 toaster - - - 0.72 0.642 0.586 sink - - - 0.702 0.634 0.631 refrigerator - - - 0.822 0.795 0.776 book - - - 0.314 0.25 0.264 clock - - - 0.772 0.721 0.73 vase - - - 0.612 0.572 0.599 scissors - - - 0.537 0.497 0.474 teddybear - - - 0.747 0.718 0.719 Hairdresser - - - 0.289 0.218 0.182 toothbrush - - - 0.558 0.498 0.468

[0037] Table 1 shows the training and testing results on the coco2017 dataset. The number of categories is 80, which are evenly divided into 4 tasks, with 20 class increments each time. All images and labels of all categories learned so far are filtered out on the coco2017 validation set for testing. Finally, they are directly compressed into a model with 80 classes in one task and compared with direct training (80 classes are trained at a time). All values ​​in the table are mAP50 results. The second column is the total result. The results of each class starting from the second column are the results of each class, and the learned categories are represented by “-”.

Claims

1. A lifelong learning method for target detection based on scalable parameters, It is characterized in that The steps include: Step 1: Pre-training phase; Adopt YOLOv9 as the framework of the target detection model, use the scalable parameters pre-trained on the OpenImagev7 dataset to continuously learn the model, and freeze the Backbone and Neck parts, and keep the frozen parts frozen in all subsequent training; Step 2: Class incremental learning training and loss calculation; Starting from the training of the second task, each training uses the model weights generated by the previous task, and the first task uses the pre-trained weights; Starting from the training of the first task, each time the model automatically expands the parameters according to the number of class increments of this task, then loads the model weights generated by the previous task, and then freezes all the parameters of the current model; at the beginning of training, the model initializes the expanded parameters of the current task and unfreezes these parameters as the learnable parameters in this task; during model training, back propagation will only update this part of the unfrozen parameters; other training settings and loss calculations in the parameter expansion incremental learning stage are consistent with YOLOv9; Step 3: Parameter compression and playback of positive and negative samples; After expansion, the expandable parameters are compressed using distillation and playback. The training samples are simultaneously passed into the model to be compressed and a new compression parameter model. Soft labels are predicted and generated in the model to be compressed and used as labels of the training samples to train the new compression parameter model. The new compression parameter model is trained normally using the training samples and soft labels. After the compression parameter model training is completed, it is equivalent to the first task incremental learning model, and subsequent increments can be performed directly on the model weights.

2. According to claim 1, a lifelong learning method for target detection based on scalable parameters, It is characterized in that When compressing the parameters, it is ensured that the total number of model parameters does not exceed 150% of the number of initialization parameters; in the compression stage, 2% to 5% of the data are replayed, and these data do not need to be labeled.

3. The method for lifelong learning of target detection based on scalable parameters according to claim 2, It is characterized in that In step 3, when selecting the retained samples, first set the maximum number of samples. 5% of the current number of training samples for each class i, the minimum number of samples It is 1% of the current number of training samples of each category i. On this basis, the average number of samples is calculated: ; So choose The sample is maintained while ensuring ;in, Represents the sum of the number of samples for each image. Represents the total number of training images, Indicates the number of samples in the current image. Indicates the total number of images selected for playback so far.