Feature distribution correction-based few-sample target detection method
By using feature distribution correction and intra-class feature correction modules in few-sample target detection, the problem of the model being overly sensitive to the image quality of training samples is solved, the model's generalization ability and detection accuracy are improved, and it is realized in practical applications. Efficient and economical target detection.
Patent Information
- Application Number
- CN202410686657.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-08-27
AI Technical Summary
Existing few-shot target detection methods are overly sensitive to the image quality of training samples during learning, causing the model to be biased towards the provided information fragments and unable to effectively generalize.
Using a method based on feature distribution correction, we build an FDC-Net model, add a gradient decoupling layer and a prototype calibration block, calculate the mean and variance of the feature distribution, perform migration weight allocation and correction, and combine with the intra-class feature correction module to enhance the model's Diversity and generalization ability.
It effectively reduces the dependence on a large amount of annotated data, improves the generalization ability and recognition ability of the model, reduces the cost and time of data annotation, and improves the detection accuracy and efficiency in practical applications.
Smart Images

Figure CN118552718A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a few-sample target detection method based on feature distribution correction. Background Art
[0002] As a core task in the field of computer vision, object detection aims to accurately identify and locate the category and location information of the target from an image or video. After years of cultivation and development of deep learning technology, general object detection based on a large amount of labeled data has achieved remarkable results and is widely used in many fields such as industrial quality inspection, satellite image analysis and autonomous driving.
[0003] However, an in-depth analysis from the perspectives of data acquisition, research methods and application prospects shows that general target detection methods still have many drawbacks in practical applications. These problems are mainly reflected in the following aspects.
[0004] 1. Data labeling is expensive: This is mainly due to the complexity and time-consuming nature of the labeling work itself. The labeling of each instance requires a lot of manpower and time. According to statistics, it often takes 5 to 10 seconds to label an instance. Based on this calculation, the labeling of 10,000 instances will take at least 13.9 hours to complete. For a commonly used dataset like PASCAL VOC, its training set contains 13,000 instances, which shows how arduous the labeling work is. In addition, the quality of the labeled data is also crucial, which requires the annotator to have rich professional knowledge and to undergo long-term training and practice to be competent.
[0005] 2. Scarcity of specific data: In applications such as rare disease and rare animal detection, it is particularly difficult to obtain a large amount of relevant image data due to the rarity of the target itself. For example, in the field of industrial defect quality inspection, even a mature production line that produces tens of thousands of products may occasionally only have one or two defective samples. This scarcity of data makes it extremely difficult to obtain defective samples.
[0006] 3. Inability to directly transfer traditional methods: Directly using traditional target detection methods to learn on limited data cannot solve the serious overfitting problem. This means that the trained model may not be able to effectively generalize to targets of various forms, resulting in a significant reduction in detection results.
[0007] In view of the above and other problems not mentioned, the few-shot target detection algorithm can effectively solve them, showing great research significance. General target detection methods encounter considerable challenges when detecting targets that do not appear in public detection datasets in the real world. Therefore, researchers in the field of target detection have begun to turn their attention to a new method - the few-shot target detection algorithm. This algorithm cleverly combines a small amount of target category data (new class) with a large amount of additional category data (base class), attracting the attention of more and more scholars and researchers. The core idea of the few-shot detection algorithm is to first use a large amount of non-target category data to learn general knowledge so that the model has preliminary learning ability. Subsequently, refined learning is performed on a small amount of target category data to master the knowledge of specific categories. This strategy not only helps the model to learn efficiently under limited resources, but also enables it to quickly adapt to new environments and realize effective knowledge transfer. The application of this algorithm has significant advantages, such as resource conservation, rapid adaptation, and knowledge transfer. At present, it has begun to demonstrate its application value in many fields, including industrial defect detection, endangered animal protection, rare disease detection, and agricultural disease prevention. With the continuous advancement and improvement of technology, few-sample object detection algorithms are expected to play an important role in more fields and provide strong support for solving complex problems in the real world.
[0008] A core challenge faced by few-shot object detection algorithms is that the available prior information on target categories is extremely limited, which makes this scarce information particularly valuable. Due to the limited number of samples, the distribution of categories described is often biased, causing the model to be biased towards the provided information fragments when learning. Summary of the invention
[0009] In view of the above problems existing in the prior art, the technical problem to be solved by the present invention is: the problem that the existing methods are overly sensitive to the quality of training sample images in a few-sample scenario.
[0010] To solve the above problems, the present invention adopts the following technical solution: a few-sample target detection method based on feature distribution correction, comprising the following steps:
[0011] A classification model FDC-Net is constructed. The FDC-Net is based on DeFRCN, and gradient decoupling layers GDL are added between backbone and RPN, and between backbone and RCNN to decouple the RPN network and RCNN structure. DeFRCN adds a prototype calibration block PCB to the classification head in the inference stage.
[0012] S1: Obtain several existing annotated images as training sets, use the training samples in the training set to perform base class training on FDC-Net, and obtain the pre-trained FDC-Net after the training.
[0013] S2: Obtain several annotated new class images as fine-tuning training sets, and input several annotated new class images into the pre-trained FDC-Net to obtain the original feature set Then calculate the mean and variance of these feature maps by category [the mean and variance are calculated using existing methods], and get the new class distribution mean μ corresponding to each new class category n and variance σ n .
[0014] From the training set, N images are randomly selected for each category to describe the feature distribution of each base category. The N images are input into the pre-trained FDC-Net to obtain the corresponding feature maps. Then, the mean μ and variance σ of these feature maps are calculated by category [the mean μ and variance σ are calculated using the existing method] to obtain the feature distribution of each base category. The corresponding base class distribution mean μ b and variance σ b , measure the distance between each new class distribution and all base class distributions, and assign different migration weights to different base classes based on the distance Then the mean and variance are corrected, and the corrected distribution is obtained using the corrected mean and variance And resample the new new class features s m , re-adopt all the obtained s for all new classes m Constructing the sampling feature set
[0015] S3: In the intra-class feature correction module, and Calculate the cosine similarity matrix And get the overall corrected feature set Then select The corrected original feature set is used as the final classifier The pre-trained FDC-Net is fine-tuned for new categories using the input, and finally the trained FDC-Net is obtained.
[0016] S4: For unlabeled images, the trained FDC-Net outputs the predicted category.
[0017] Further, the S2 is obtained and m The steps are:
[0018] Use the Euclidean distance to measure the distance between each new class distribution and all base class distributions:
[0019]
[0020] in represents the distribution mean of the kth new class, Represents the distribution mean of the i-th base class.
[0021] The closer the base class and the new class are, the more similar they are, so a larger migration weight approaching 1 is assigned to them, and vice versa, a migration weight approaching 0 is assigned to them:
[0022]
[0023] Variance correction uses a simple weighted summation approach:
[0024]
[0025] in, represents the corrected variance of the kth new class; the corrected mean of the kth new class Continue to use the original new class distribution mean of the kth new class
[0026] Use the corrected variance and the corrected variance after correction to get the corrected distribution And sample new new class features s from it m :
[0027]
[0028] Among them, M represents the number of samples, and random sampling is used to obtain s m .
[0029] Furthermore, the overall corrected feature set obtained in S3 is The steps are:
[0030] The adjacency matrix is composed of the sampled feature set and the original feature set The calculated cosine similarity matrix constitute;
[0031]
[0032] Among them, e ij express The element in row i and column j, f i and f j Respectively The characteristics and Features in;
[0033]
[0034] in, Indicates merging by splicing and
[0035] Furthermore, in S3, the overall loss function in the new class fine-tuning stage is for:
[0036]
[0037] in, represents the sampling loss, represents the cross entropy loss, c represents the label assigned to the sampled feature, represents the final classifier;
[0038] Overall loss function for the new class fine-tuning phase By the standard Faster R-CNN loss and sampling loss constitute:
[0039]
[0040] Among them, λ is a hyperparameter used to balance the two losses.
[0041] Compared with the prior art, the present invention has at least the following beneficial effects:
[0042] 1. The present invention aims at the problem that existing small sample models tend to be biased towards the provided information fragments during learning, and proposes a method to expand intra-class diversity by correcting feature distribution and distribution resampling. This innovative strategy aims to enable limited samples to more accurately reflect the category distribution, thereby improving the generalization ability of the model. On this basis, the present invention further designs an intra-class feature correction module. This module fully considers intra-class diversity and uses similarity to convey rich intra-class feature representations, thereby enhancing the model's recognition ability for small sample categories.
[0043] 2. The invented method reduces the reliance on a large amount of annotated data, reduces the cost and time of data annotation, and makes few-sample target detection more economical and efficient in practical applications. It is widely used in practical scenarios. For example, in medical imaging, it is very difficult to obtain and annotate a large amount of data. Through few-sample target detection, high-precision lesion detection and classification can be achieved with limited annotated data. In surveillance videos, for the processing of some rare events (such as abnormal behavior, specific person recognition), in industrial inspection, for defect detection on new production lines, few-sample target detection can be quickly deployed and detect new defects, improving production efficiency and product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 The figure is a simplified flow chart of the method of the present invention.
[0045] Figure 2 To show the effect of setting different sampling numbers on model performance.
[0046] Figure 3 This is a few-shot object detection based on fine-tuning, where (a) is the base class training stage and (b) is the few-shot fine-tuning stage. DETAILED DESCRIPTION
[0047] Most of the fine-tuning based few-shot object detection methods use the Faster R-CNN structure, such as Figure 3 First, a large number of base class images with rich annotations are used for base class training, such as Figure 3 (a) The input image passes through the backbone network, then through the RPN to obtain the proposal object, and then through ROI pooling to obtain the ROI feature map, and finally the feature map is sent to the detection head for bounding box classification and regression. The parameters of the backbone network, RPN, and detection head will be continuously updated during the entire training process. After the base class training is completed, few-sample fine-tuning is performed. In this stage, only a small number of new class images and very little annotation information are given, and then a small number of base class images are added to fine-tune the network. During the fine-tuning process, the parameters of the backbone network and RPN will be frozen, and only the parameters of the detection head will be fine-tuned, such as Figure 3 (b) as shown.
[0048] The method proposed in this paper takes the excellent DeFRCN as the baseline method, retains its core structure, and makes in-depth optimization for the FSOD task. DeFRCN also adopts the Faster R-CNN structure and makes corresponding improvements on this basis. Specifically, DeFRCN uses Faster R-CNN as the main detector, and adds a gradient decoupling layer (GDL) between the backbone and RPN and RCNN to decouple the RPN network and RCNN structure; to decouple the classification and positioning tasks, DeFRCN adds a prototype calibration block (PCB) to the classification head in the inference stage.
[0049] Based on the above structure, the present invention proposes a feature distribution correction method based on intra-class diversity, such as Figure 1As shown. After using RoI Align to obtain the Region of Interest, the feature distribution of each new class is reconstructed by transferring the feature distribution knowledge in the base class. Some new new class sample features are resampled from the reconstructed distribution to improve the intra-class diversity. Finally, the new sample features are fused with the original new class features using cosine similarity to enhance the robustness of the model. It is worth noting that this process is only used in the training phase. The regression head focuses on the spatial information of the target, and the classification head focuses on the feature information of the target. Since the method considers the feature information of the target from the perspective of category relationship modeling, the overall improvement only works before the classification head.
[0050] 1. Feature distribution correction and feature resampling are as follows:
[0051] On the pre-trained FDC-Net obtained by base class pre-training, 1500 images are randomly selected for each category to describe the feature distribution of each base class category. These images are passed through the model to obtain the corresponding feature maps, and then the mean μ and variance σ of these feature maps are calculated by category, so it is easy to get each base class category The corresponding base class distribution mean μ b and variance σ b . New Class Category The corresponding new class distribution mean μ n and variance σ n It is obtained according to RoI in the new class fine-tuning stage, and the base class distribution remains unchanged. Similar categories have similar category distributions. The present invention uses the Euclidean distance to measure the distance between each new class distribution and all base class distributions:
[0052]
[0053] in represents the distribution mean of the kth new class, Represents the distribution mean of the i-th base class.
[0054] Each new class has a corresponding distance set. The distance also intuitively reflects the degree of similarity between two different classes. Therefore, feature distribution correction uses the similarity to assign different migration weights to different base classes. Specifically, the closer the Euclidean distance is between the base class and the new class, the more similar they are, so a larger migration weight approaching 1 is assigned to them, and vice versa, a migration weight approaching 0 is assigned to them:
[0055]
[0056] Based on the migration weight, the new class distribution is corrected by weighted summation. In this way, the distribution of each new class can be corrected according to the different contributions of the base class. In order to prevent the new class correction distribution from overlapping with the base class distribution and causing category confusion, the mean is not corrected here, that is, the corrected mean Continue to use the original mean Variance correction uses a simple weighted summation approach:
[0057]
[0058] in Represents the corrected variance of the kth new class. The corrected mean and variance can be used to obtain the corrected distribution And sample new new class features s from it m :
[0059]
[0060] Where M represents the number of samples, which is generally set to 100 in the new class fine-tuning stage. The sampling is mainly done by random sampling, specifically, first randomly sampling on the standard normal distribution, and then comparing the sampled value with the variance Multiply and then add to the mean After the above correction and sampling process, the feature diversity of the new category is expanded at the feature level.
[0061] 2. The specifics of the intra-class feature correction module are as follows:
[0062] The new new class features (or sampled features) obtained by sampling belong to the same category as the original features, and there must be similar common features between the two. In order to further enhance the accuracy of the new class feature distribution information, the method of the present invention designs an intra-class feature correction module. The intra-class graph structure composed of the similarity relationship between the sampled features and the original features is used to promote the communication between the sampled features and the original features through the intra-class graph structure message passing method, thereby correcting and enhancing the original features of the new class. First, the corresponding adjacency matrix required in the intra-class graph structure is obtained by using the sampling feature set and the original feature set The calculated cosine similarity matrix constitute:
[0063]
[0064] where e ij Represents the cosine similarity matrix The element in row i and column j, f i and f j Respectively The characteristics and In order to keep the feature space consistent during the training and inference phases, unlike graph convolutional networks, no weight matrix is used in the intra-class feature correction process:
[0065]
[0066] in Indicates merging the original feature set by splicing and the sampling feature set Get the overall corrected feature set After that, the corrected original feature set is further selected as the final classifier The classification result is obtained.
[0067] In order to effectively avoid instability in the model at the beginning of training, the intra-class feature correction module is used after 10% of the entire new class fine-tuning process to accelerate the convergence of the model.
[0068] 3. Loss function:
[0069] The method of the present invention is based on the few-shot detection method DeFRCN, and its training method is the same. The overall training strategy is divided into two stages: base class pre-training and new class fine-tuning. In the base class pre-training stage, the overall loss function Loss function compared to the standard FasterR-CNN same.
[0070]
[0071] in and They represent the classification loss of distinguishing the foreground and background and the regression loss of the candidate box generated by the region proposal network (RPN), and They are the cross entropy loss function used in the classification head and the smooth L1 loss used in the regression head. In order to fully train the model, the base class pre-training stage generally has many images to be trained and many model iterations.
[0072] In the new class fine-tuning stage, a small number of new class images are used for training, and the number of model iterations is much less than that in the base class pre-training stage. In order to ensure the credibility and authenticity of the sampled features in the fine-tuning stage, the sampled features are assigned corresponding labels c and the cross entropy loss is used. To train the final classifier The sampling loss is thus:
[0073]
[0074] So the overall loss function of the new class fine-tuning stage is By the standard Faster R-CNN loss and sampling loss constitute:
[0075]
[0076] Here, λ is a hyperparameter used to balance the two losses. Experiments have verified that the value of λ here is 0.1.
[0077] 4. Experimental Results and Analysis
[0078] 1. Dataset
[0079] In order to verify the effectiveness of the proposed method on the few-shot object detection task, the widely recognized public object detection datasets PASCAL VOC 2007 and PASCAL VOC 2012 are used in the experiments. Following the standard practice, PASCAL VOC, which contains 20 categories, is randomly divided into 15 base classes and 5 new classes to simulate the few-shot situation in real scenarios. To ensure the reliability and fairness of the experimental results, three different partitions are performed and these partitions are kept consistent with existing methods for direct comparison. In order to comprehensively evaluate the performance of the model in the few-shot scenario, a detailed experimental setting is used. K = {1, 2, 3, 5, 10} training object instances are provided for each category to simulate different degrees of sample scarcity. Subsequently, rigorous testing is performed on the PASCAL VOC 2007 test set to ensure the accuracy and objectivity of the results. In terms of experimental result evaluation, the average accuracy (IoU = 0.5) of the new classes is calculated as the main evaluation indicator. The higher the average accuracy, the better the detection performance of the model in the few-shot scenario. Through this indicator, the performance differences of different methods can be intuitively compared.
[0080] 2. Implementation details and parameter settings
[0081] The method of the present invention is set the same as DeFRCN. The ResNet-101 network pre-trained on ImageNet is selected on the feature extraction network to ensure that the model has a strong feature extraction capability. The entire network uses the stochastic gradient descent (SGD) algorithm to achieve end-to-end optimization effects. In other experimental settings, the batch size is set to 16, the momentum is set to 0.9, and the weight decay is set to 5e-5. In the training phase, different learning rates are set for the two training phases. The learning rate of the base class pre-training phase is set to 0.02 to fully learn the base class features; the learning rate of the new class fine-tuning phase is reduced to 0.01 to adapt to the new class data more finely. Different model iterations are also set accordingly under different experimental settings. The iteration of the base class pre-training phase is set to 18000. In the new class fine-tuning phase, 1-shot is set to 1000, 2-shot is set to 1200, 3-shot is set to 1500, 5-shot is set to 2000, and 10-shot is set to 4000 to ensure sufficient learning. It is also worth mentioning that warmup learning is only used in the base class pre-training stage, and its purpose is to accelerate the convergence of the model; in the new class fine-tuning stage, due to the small number of overall training iterations, the warmup learning strategy is not used.
[0082] In addition, the original gradient decoupling block (GDL) structure of DeFRCN maintains the original settings, that is, the λ in the GDL of the RPN part is set to 0 to prevent the gradient generated by the RPN from being passed back to the backbone network; and the λ in the GDL of the RCNN part is set to 0.01 to reduce the impact of the gradient backhaul on the backbone network. The prototype calibration block (PCB) is also used in the DeFRCN inference phase, in which the balance hyperparameter is set to 0.5 to further improve the model performance.
[0083] 3. Experimental results and analysis
[0084] In order to verify the effectiveness of the method of the present invention, a verification experiment was conducted on the data set. Compared with the baseline method (Table 1), the feature distribution correction method of the present invention increased the AP by up to 3.9mAP value on the new class partition 1, the AP by up to 3.6mAP value on the new class partition 2, and the AP by up to 3.0mAP value on the new class partition 3. This significant performance improvement fully demonstrates the effectiveness of the method. Under all partitions and all settings, the feature distribution correction method achieved different degrees of performance improvement. This result not only verifies the effectiveness of the method in expanding the intra-class diversity of new classes, but also shows that it can alleviate the sensitivity of the model to new class training samples to a certain extent.
[0085] Table 1 Comparison results with baseline methods on the dataset
[0086]
[0087] 4. Ablation Experiment and Analysis
[0088] With respect to the sampling quantity and distribution correction method in the method, the present invention further analyzes the method through ablation experiments. The ablation experiments in the present invention are all carried out on the VOC 2007 test set, and the experimental setting uses the new class division 1.
[0089] In order to further study the specific impact of the number of samples on model performance, 8 different values were selected from [50, 1000] for sampling. The results are shown in Figure 2 As shown. Figure 2 It can be seen intuitively that when the number of samples gradually increases to 500, the performance of the model reaches a significant peak, which shows that the right number of samples plays a key role in improving the performance of the model. However, as the number of samples further increases to 800, the performance of the model begins to stabilize, which means that continuing to increase the number of samples will not bring significant performance improvements. In addition, an interesting phenomenon was found in the experiment: when the number of samples is small, the performance of the model in each training shows a large difference. This difference is reflected in the average accuracy variance on the test set, indicating that the performance of the model is less stable when the data is insufficient. However, when the number of samples exceeds 500, the average performance of the model is similar to that when the number of samples is 100, which further confirms that too many samples do not necessarily lead to better performance. Therefore, considering the balance between the performance of the entire model, the amount of calculation, and the training speed, the number of samples is finally selected as 100. This choice can not only guarantee the performance of the model to a certain extent, but also effectively control the calculation cost and improve the training efficiency, thus providing strong support for the realization of more efficient and practical model applications.
[0090] In the process of constructing the new class feature distribution, the present invention not only considers the main method, but also explores two other possible implementation methods and makes a detailed comparison, as shown in Table 2.
[0091] Method 1 is to incorporate the variance of the new class into the consideration of distribution correction. The specific approach is to take the average of the variance of the new class and the variance obtained after weighting, that is, to make the variance of the new class itself the dominant factor in the correction variance, and the base class correction plays an auxiliary role.
[0092] Method 2 is to directly select the base class that is closest to the new class among all base classes and use the variance of the base class as the correction variance. This method is relatively more effective when there are similar categories in the division of base classes and new classes. However, for new classes that do not have similar base classes for correction, the effect is not satisfactory.
[0093] Method 3 is a correction method in a weighted summation manner introduced in the present invention, which shows the best effect. It can be seen from the experimental results that the method using the new class variance is generally not bad, but because the new class samples are relatively small, the calculated variance is inaccurate, so the best performance is not obtained. On the other hand, it is relatively better to directly use the variance of the closest base class, because there are indeed similar categories in the division of the base class and the new class. However, for the new class without any similar base class for correction, the effect is relatively poor. The method proposed in the present invention can not only achieve good performance when the base class is similar to the new class, but also when faced with a situation where there is no similar base class, it can also correct the new class distribution into a more universal category distribution by weighted summation, thereby ensuring the stability and accuracy of the model. Therefore, this solution can achieve the best effect.
[0094] Table 2 Effects of different distribution correction methods on model performance
[0095]
[0096] In order to solve the problem that existing methods are overly sensitive to the quality of training sample images in few-sample scenarios, the present invention proposes a feature distribution correction method based on intra-class diversity. The core idea of this method is that the feature distributions corresponding to categories with similar features usually have similar means and variances. Therefore, the relatively inaccurate new class distribution can be corrected using the accurate base class distribution, thereby improving the performance of the model in few-sample scenarios. In terms of specific implementation, first, by deeply analyzing the similarity of the categories, the variance of the new class distribution is refined, while the mean is kept unchanged. After obtaining the corrected distribution, feature resampling is performed from it. In order to further enhance the representation ability of the features, an intra-class feature correction model is finally designed to establish an effective information transfer mechanism between the sampled features and the original features, thereby realizing the correction and enhancement of the original features. Through experiments and comparisons with existing methods, it is found that the feature distribution correction method can effectively improve the detection performance of existing methods in few-sample scenarios.
Claims
1. A few-sample target detection method based on feature distribution correction, characterized in that: The steps include: Construct a classification model FDC-Net. The FDC-Net is based on DeFRCN. Gradient decoupling layers GDL are added between backbone and RPN, and between backbone and RCNN to decouple the RPN network and RCNN structure. DeFRCN adds a prototype calibration block PCB to the classification head during the inference phase. S1: Get several existing annotated images as training sets, use the training samples in the training set to perform base class training on FDC-Net, and obtain the pre-trained FDC-Net after the training. S2: Obtain several annotated new class images as fine-tuning training sets, and input several annotated new class images into the pre-trained FDC-Net to obtain the original feature set Then calculate the mean and variance of these feature maps by category, and get the new class distribution mean μ corresponding to each new class category n and variance σ n ; From the training set, N images are randomly selected for each category to describe the feature distribution of each base category. The N images are input into the pre-trained FDC-Net to obtain the corresponding feature map, and then the mean μ and variance σ of these feature maps are calculated by category to obtain the feature distribution of each base category. The corresponding base class distribution mean μ b and variance σ b , measure the distance between each new class distribution and all base class distributions, and assign different migration weights to different base classes based on the distance Then the mean and variance are corrected, and the corrected distribution is obtained using the corrected mean and variance And resample the new new class features s m , re-adopt all the obtained s for all new classes m Constructing the sampling feature set S3: In the intra-class feature correction module, and Calculate the cosine similarity matrix And get the overall corrected feature set Then select The corrected original feature set is used as the final classifier The pre-trained FDC-Net is fine-tuned for new categories using the input, and finally the trained FDC-Net is obtained; S4: For unlabeled images, the trained FDC-Net outputs the predicted category.
2. The method for detecting a target with a small number of samples based on feature distribution correction according to claim 1, wherein: The S2 is obtained and m The steps are: Use the Euclidean distance to measure the distance between each new class distribution and all base class distributions: in represents the distribution mean of the kth new class, represents the distribution mean of the i-th base class; The closer the base class and the new class are, the more similar they are, so a larger migration weight approaching l is assigned to them, and vice versa, a migration weight approaching 0 is assigned to them: Variance correction uses a simple weighted summation approach: in, represents the corrected variance of the kth new class; the corrected mean of the kth new class Continue to use the original new class distribution mean of the kth new class Use the corrected variance and the corrected variance after correction to get the corrected distribution And sample new new class features s from it m : Among them, M represents the number of samples, and random sampling is used to obtain s m .
3. The method for detecting a target with a small number of samples based on feature distribution correction according to claim 2, characterized in that: The overall corrected feature set is obtained in S3 The steps are: The adjacency matrix is composed of the sampled feature set and the original feature set The calculated cosine similarity matrix constitute; Among them, e ij express The element in row i and column j, f i and f j Respectively The characteristics and Features in; in, Indicates merging by splicing and 4. The method for detecting a small number of targets based on feature distribution correction according to claim 1, wherein: In S3, the overall loss function in the new class fine-tuning stage for: in, represents the sampling loss, represents the cross entropy loss, c represents the label assigned to the sampled feature, represents the final classifier; Overall loss function for the new class fine-tuning phase By the standard Faster R-CNN loss and sampling loss constitute: Among them, λ is a hyperparameter used to balance the two losses.
Citation Information
Cited By
ALS patient depression risk assessment system based on transfer learning
CN119361130A
