A method for unlabeled instance recognition in small sample target detection based on grid-level indicator

By using a grid-level indicator method, class activation responses and overlapping verification maps are analyzed to identify and eliminate erroneous negative samples, thus solving the model interference problem in small sample target detection and improving the accuracy and robustness of new category detection.

CN122244501APending Publication Date: 2026-06-19UNIV OF ELECTRONICS SCI & TECH OF CHINA +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2026-02-10
Publication Date
2026-06-19

Smart Images

  • Figure CN122244501A_ABST
    Figure CN122244501A_ABST
Patent Text Reader

Abstract

This invention discloses a method for identifying unlabeled instances in few-shot object detection based on grid-level indicators, belonging to the fields of few-shot learning and object detection. This method accurately distinguishes between erroneous negative sample candidate boxes and difficult negative sample candidate boxes by analyzing the spatial distribution of class activation responses and class prediction differences, and excludes erroneous negative samples during training to reduce interference from incomplete labeling. Experiments show that this method significantly improves detection accuracy in the 1-shot setting of the PSACAL VOC Split1 1 dataset, with no inference overhead, making it suitable for practical few-shot detection scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of few-shot learning and object detection. Background Technology

[0002] Few-shot object detection aims to train a model to detect new object categories using a very small number of labeled samples. However, real-world training images often suffer from incomplete labeling, meaning some foreground instances are not labeled. These unlabeled instances are then treated as background during training, resulting in erroneous negative candidate boxes. These erroneous negative samples interfere with model optimization, significantly degrading performance, especially for detecting new categories where samples are scarce.

[0003] Existing methods, such as loss reweighting or heuristic strategies, often indiscriminately suppress high-scoring negative samples, failing to effectively distinguish between erroneous and hard negative samples. For example, the DCFS method handles missing labels through gradient blocking but does not consider the spatial distribution of class activation responses; other methods, such as label smoothing or simple IoU heuristics, also lack detailed analysis of response sources. Therefore, a technique that can accurately identify erroneous negative sample candidate boxes is urgently needed to improve the robustness of small sample target detection.

[0004] like Figure 1 As shown, the "giraffe" type responses in red candidate box 1 mainly originate from outside the labeled box, indicating that they may cover unlabeled instances and are therefore erroneous negative samples; while the responses in purple candidate box 1 are concentrated inside the labeled box, and are therefore hard negative samples. Existing methods struggle to distinguish between these cases. Summary of the Invention

[0005] The purpose of this invention is to solve the above-mentioned problems by proposing a grid-level indicator method, which accurately identifies erroneous negative samples by analyzing the distribution of class activation responses and class prediction, thereby avoiding their interference with model training.

[0006] The technical solution of this invention is a method for identifying unlabeled instances in small sample target detection based on grid-level indicators. The method includes the following steps: Step 1: Generate Class Activation Map: Based on the Faster R-CNN detector, calculate the grad-CAM map for each candidate box. Capture the activation response of the foreground class; the formula is: ; in, For the k-th feature map, These are gradient weights; Step 2: Generate an overlap verification graph; Divide the candidate bounding box region into a grid, calculate whether each grid cell is covered by the labeled bounding box, and generate a binary verification image. : ; Step 3: Calculate the internal and external response scores; Calculate the response score within the labeled box based on the CAM diagram and the validation diagram. Out-of-frame response score : ; ; Step 4: Identify erroneous negative samples: Identify negative samples of external response errors: if the candidate box has the highest foreground class score ≥ ,and ≥ If it is, then it is judged as a false negative sample. The set score threshold; Identify negative samples with internal response errors: For candidate boxes that overlap with the labeled boxes, if their corresponding class probability... It is lower than the probability of other foreground classes and satisfies > If it is a false negative sample, it is determined to be an incorrect negative sample; the specific conditions are as follows: ; in Indicates foreground category Except for the current category Other classes, For category number, This indicates the predicted probability for that category. The set probability threshold; Step 5: Training Optimization: During the training phase of the small sample object detector using new class samples, the identified erroneous negative sample candidate boxes are excluded from the classification loss calculation to avoid erroneous gradient updates, while retaining difficult negative samples to maintain the model's discriminative power.

[0007] Furthermore, in step 4 The calculation method is as follows: , Indicates all foreground categories, For category number, This indicates the predicted probability for that category.

[0008] Furthermore, in step 4 The category corresponding to the bounding box with the largest IoU with the candidate bounding box. The predicted probability.

[0009] Furthermore, the threshold in step 4 Set it to 0.2.

[0010] Furthermore, in step 4 .

[0011] like Figure 2 As shown, this method is integrated into the detection framework, using class activation spectrum and geometric analysis to filter candidate boxes and identify erroneous negative samples. It effectively identifies erroneous negative samples by utilizing response distribution and class prediction to reduce false suppression and improve model convergence efficiency; it has no inference overhead, only increasing CAM computation during training, with no additional cost during the inference phase. Attached Figure Description

[0012] Figure 1 Examples of candidate boxes for erroneous negative samples and difficult negative samples are provided to visually demonstrate the differentiation principle of this method.

[0013] Figure 2 The overall framework of this invention includes CAM generation, mesh analysis, and candidate box filtering modules. Detailed Implementation

[0014] 1. Preprocessing: DeFRCN is used as the baseline detector. After pre-training on the base class, k-shot (e.g., k=1) fine-tuning is performed.

[0015] 2. CAM calculation: Using the ResNet-101 backbone network, features are extracted from the Res4 layer to calculate the grad-CAM map of each candidate box, and the validation spectrum grid size is set to 7×7; grad-CAM diagram The calculation formula is: ; in, For the k-th feature map, These are gradient weights; Binary verification diagram The calculation involves dividing the candidate bounding box region into a grid and determining whether each grid cell is covered by the labeled bounding box. .

[0016] 3. Candidate box filtering: For each negative candidate box, calculate... and The thresholds τ=0.2 and ϵ=10−3 are applied to identify erroneous negative samples; and The calculation formula is: ; ; The method for selecting incorrect negative samples is: if the candidate box has the largest foreground class score... ≥ ,and ≥ If the value is less than or equal to a specified value, it is considered a false negative sample, and the set score threshold is applied. For candidate boxes that overlap with the labeled boxes, if their corresponding class probability is less than or equal to a specified value, the candidate box is considered a false negative sample. It is lower than the probability of other foreground classes and satisfies > If it is a false negative sample, it is determined to be an incorrect negative sample; the specific conditions are as follows: ; in Indicates foreground category Except for the current category Other classes, For category number, This indicates the predicted probability for that category. The set probability threshold.

[0017] 4. Loss Adjustment: In the classification loss, exclude erroneous negative candidate boxes that are inside or outside the box, and only calculate the loss for the remaining candidate boxes; Results: On PSACAL VOC Split1, the average precision of the new class (IoU threshold 0.5) improved from 43.8% to 47.4% in the 1-shot setting and from 57.5% to 60.3% in the 2-shot setting.

Claims

1. A method for identifying unlabeled instances in small sample target detection based on grid-level indicators, the method comprising the following steps: Step 1: Generate class activation mapping: Based on Faster R-CNN detector, calculate grad-CAM map for each candidate box , capture the activation response of the foreground class; the formula is: ; wherein, is the k-th feature map, is the gradient weight; Step 2: Generate an overlap verification graph; Divide the candidate box region into a grid, calculate whether each grid cell is covered by the labeled box, and generate a binary verification map : ; Step 3: Calculate the internal and external response scores; Based on the CAM map and the validation map, an in- bounding response score is calculated and an out-of-bounding response score : ; ; Step 4: Identify erroneous negative samples: Identify external response false negative samples: If the maximum foreground class score of the candidate box ≥ , and ≥ , then determine as a false negative sample, is a set score threshold; Identify internal response false negative samples: for the candidate box overlapping with the annotation box, if its corresponding class probability is lower than other foreground class probability, and meets > false negative sample; the specific conditions are: ; in Indicates foreground category Except for the current category Other classes, For category number, This indicates the predicted probability for that category. The set probability threshold; Step 5: Training Optimization: During the training phase of the small sample object detector using new class samples, the identified erroneous negative sample candidate boxes are excluded from the classification loss calculation to avoid erroneous gradient updates, while retaining difficult negative samples to maintain the model's discriminative power.

2. The method for identifying unlabeled instances in small sample target detection based on grid-level indicators as described in claim 1, characterized in that, In step 4 The calculation method is as follows: , Indicates all foreground categories, For category number, This indicates the predicted probability for that category.

3. The method for identifying unlabeled instances in small sample target detection based on grid-level indicators as described in claim 1, characterized in that, In step 4 The category corresponding to the bounding box with the largest IoU with the candidate bounding box. The predicted probability.

4. The method for identifying unlabeled instances in small sample target detection based on grid-level indicators as described in claim 1, characterized in that, Threshold in step 4 Set it to 0.

2.

5. The method for identifying unlabeled instances in small sample target detection based on grid-level indicators as described in claim 1, characterized in that, In step 4 .