Ocean disaster-bearing body detection method based on candidate region re-screening mechanism under small sample
By introducing mislabeling adaptive mitigation, two-stage sampling, and weighted nonlinear aggregation modules into the MetaR-CNN network, the problems of incomplete labeling and data scarcity in the detection of small-sample marine disaster-bearing bodies are solved, improving detection accuracy and robustness, and achieving efficient identification of multi-scale marine disaster-bearing bodies in complex coastal remote sensing images.
Patent Information
- Application Number
- CN202511058845.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-11
AI Technical Summary
Existing technologies for detecting marine disaster-bearing bodies under small sample conditions suffer from problems such as incomplete labeling, scarce data, model overfitting, high false detection rate, and category confusion, resulting in insufficient detection accuracy and generalization ability. In particular, it is difficult to effectively extract multi-scale marine disaster-bearing body targets in complex coastal remote sensing images.
We employ a PRRS-Net network based on MetaR-CNN, adding a mislabeling adaptive mitigation module, a two-stage sampling module, and a weighted nonlinear aggregation module. By filtering mislabeled samples through feature similarity and dynamically adjusting weights, we combine class-independent and specific aggregation strategies to improve the accuracy of feature aggregation and optimize target detection box recognition.
It significantly improves the accuracy and robustness of marine disaster-bearing body detection, enhances detection performance under small sample conditions, strengthens the model's adaptability to different types of targets, and solves the challenges of data quality and feature learning.
Smart Images

Figure CN120932098A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of remote sensing technology, and more specifically, to a method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions. Background Technology
[0002] Currently, marine disaster early warning and forecasting in various regions mainly serve a broad, general warning purpose, but there are bottlenecks in providing detailed, localized early warning information services. This is particularly true during major marine disasters, where differentiated early warning services for different regions are difficult to achieve, resulting in a predominance of qualitative rather than quantitative data in disaster prevention and mitigation deployments. Furthermore, the medium- and long-term disaster-bearing capacity indicators of coastal cities in my country are relatively low, making them highly susceptible to severe losses and secondary disasters once affected by a disaster. The consequences of a disaster are jointly formed by the harmfulness of the causative factors and the vulnerability of the disaster-bearing bodies. Therefore, the rapid, dynamic, and large-scale identification of marine disaster-bearing targets and the acquisition of basic data on marine disaster-bearing bodies are fundamental to building a marine disaster prevention and mitigation system.
[0003] However, intelligent extraction of various multi-scale marine disaster-bearing targets from complex coastal remote sensing images faces numerous challenges. On the one hand, the images contain complex backgrounds and ambiguities, spatial occlusion and overlap, adhesion between multiple targets, targets with varying sizes and scales, color abrupt changes at stitching points, and irregular target shapes. On the other hand, there is a lack of publicly available marine disaster-bearing target datasets. Constructing the massive disaster-bearing target datasets required for conventional deep learning training is extremely resource-intensive, and insufficient samples can easily lead to model overfitting and high false detection rates. Furthermore, self-constructed marine disaster-bearing target datasets are prone to problems such as uneven data distribution, insufficient inter-class discrimination, and background class confusion, which severely restrict the model's generalization ability and detection accuracy. Therefore, researching how to adaptively extract marine disaster-bearing target information at different scales and levels from limited remote sensing images, and fully exploring the natural semantic characteristics and spatial relationships between pixels of marine disaster-bearing targets, plays a vital role in the monitoring, evaluation, and damage assessment of marine disaster-bearing targets.
[0004] Furthermore, the performance of existing object detection models heavily relies on high-quality labeled data. However, in practical applications, due to factors such as high labeling costs, human error, or ambiguous category classification, incomplete labeling is a common problem in datasets: some foreground objects are not correctly labeled, causing the model to mistakenly treat unlabeled objects as background during training, thus weakening its category discrimination ability. This problem is even more prominent in small-sample object detection tasks—because the training samples are already limited, unlabeled foreground instances further reduce the model's ability to learn representations of new categories. In addition, to reduce labeling costs and improve data utilization, some datasets tend to label easily identifiable objects while ignoring smaller-scale or ambiguous-boundary instances, resulting in a lack of supervision signals. Such incomplete labeling not only hinders the model's effective learning of foreground objects but may also accumulate errors during training, exacerbating category confusion and severely affecting detection accuracy.
[0005] To address the aforementioned issues, existing technologies have proposed two main approaches: one is based on bias suppression, which reduces the negative impact on model learning by minimizing misclassification, background confusion, and category bias caused by unlabeled targets; the other is based on label completion and correction, which uses techniques such as pseudo-label generation, background correction, or category correction to fill in missing target information. However, these methods still have significant shortcomings: pseudo-label generation relies on high-confidence predictions, making it difficult to guarantee label quality in data-scarce scenarios, and may even introduce noise; moreover, most methods can only mitigate the negative impact of incomplete labeling, or simply rely on pseudo-labels for completion, or only address this issue during model fine-tuning, failing to cover the basic training stage. As a result, the problem of missing labeling has not been fundamentally solved, severely restricting the performance improvement of marine disaster-bearing body detection models. Summary of the Invention
[0006] In view of this, this application provides a method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions, so as to improve the accuracy of negative sample proposal and the effectiveness of feature aggregation in small sample target detection tasks.
[0007] A method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions is proposed. The method is implemented based on a pre-constructed small sample target detection network PRRS-Net. The PRRS-Net adopts the MetaR-CNN framework and adds a mislabeling adaptive mitigation module, a two-stage sampling module, and a weighted nonlinear aggregation module between the MetaR-CNN region proposal network and the detection head.
[0008] A basic class dataset and a new class dataset are constructed. The PRRS-Net model is trained in two stages. The training process includes extracting feature maps using a backbone network and generating candidate boxes based on a region proposal network. After processing the Region of Interest (ROI), the similarity distance between the ROI query features and all supporting class prototype features is calculated based on the mislabeling adaptive mitigation module. This distance is used to filter mislabeled samples and assign weights to these samples, resulting in positive samples for model training. The two-stage sampling module adjusts the aggregation strategy based on the training progress, including category-independent aggregation and category-specific aggregation. Combined with the weighted nonlinear aggregation module, an attention weighting matrix is calculated between the ROI query features and supporting class prototype features. The supporting class prototype features are then weighted using this attention weighting matrix to obtain aggregated features. These aggregated features are input into the detection head for target detection box recognition. The training process is repeated until a preset number of iterations is reached or a preset termination condition is met, resulting in a target detection model for target detection under small sample conditions.
[0009] In one possible implementation, the two-stage model training includes a basic training stage and a fine-tuning stage;
[0010] Construct a base class dataset and a new class dataset, and perform a two-stage model training on the PRRS-Net, including:
[0011] In the basic training phase, iterative training of the PRRS-Net is completed based on the basic class dataset; and in the fine-tuning phase, the obtained object detection model is fine-tuned based on the new class dataset; the loss function used in the training process includes classification loss L. cls and regression loss L reg .
[0012] In one possible implementation, candidate boxes are generated based on the region proposal network, and the generated proposals are divided into positive and negative samples after IoU calculation; the mislabeling adaptive mitigation module is used to calculate the feature similarity between the negative samples and the supporting class prototype, and the method includes:
[0013] Based on the mislabeling adaptive mitigation module, the similarity distance between the ROI query features of all negative samples generated by the Region Proposal Network and the prototype features of all supporting classes is calculated and expressed as:
[0014]
[0015] In the formula, N represents the number of negative samples, and M represents the number of supporting categories.
[0016] In one possible implementation, the mislabeling adaptive mitigation module filters mislabeled samples and assigns weights to the mislabeled samples to obtain positive samples for model training, including:
[0017] For each negative sample, the maximum similarity distance corresponding to the negative sample is selected, denoted as:
[0018]
[0019] If the maximum similarity distance corresponding to the negative sample is greater than a preset threshold, then the negative sample is designated as a positive sample for model training, and D is taken as the threshold. i The corresponding category label assignment is supported.
[0020] In one possible implementation, the two-stage sampling module adjusts the aggregation strategy based on the training progress, wherein the training progress is determined based on the current iteration number t and the total number of iterations T, and is expressed as R = t / T;
[0021] When R < 0.5, sampling is performed based on the class-independent aggregation strategy (CAA), as follows:
[0022] C CAA ={c s ∈C s |c s ~C S} (4)
[0023] In the formula, C CAA For the supported categories of CAA sampling, C s This represents the set of categories that support the sample, and ~ indicates random selection;
[0024] When R > 0.5, the category-specific aggregation strategy (CSA) enhances the feature representation of the target category, as shown below:
[0025] C CSA ={c s ∈C s |c q ~C q ,c s =c q} (5)
[0026] In the formula, C CSA For the supported categories of CAS sampling, C q Represents the set of categories for the queried samples;
[0027] Support category C for sampling CAA Or C CSA The corresponding category prototype features are aggregated with the query features after ROI.
[0028] In one possible implementation, the weighted nonlinear aggregation module is used to calculate the attention weighting matrix between the ROI query features and the supporting class prototype features, which is expressed as follows:
[0029]
[0030] In the formula, R represents the ROI query feature f roi The total number, M represents the number of supporting class prototype features f p The total number.
[0031] In one possible implementation, the attention weighting matrix A is used to apply the support class prototype features f p We perform weighted aggregation to obtain the aggregated features, which are represented as follows:
[0032] F = N1[N2(f) roi ⊙(A·f p )),N3(f roi -(A·f p )),f roi (7)
[0033] In this network, N1 is a fully connected layer used for the final aggregation of features; networks N2 and N3 consist of fully connected layers and ReLU activation layers, respectively used for nonlinear mapping of the features after element-wise multiplication and subtraction operations, f roi Features for ROI queries.
[0034] In one possible implementation, the aggregated features are input into the detection head for target detection bounding box recognition, including:
[0035] Map candidate regions to feature maps and perform pooling operations;
[0036] Each candidate region is classified using a fully connected layer and softmax, and the bounding boxes are refined to obtain the target detection boxes.
[0037] One possible implementation involves constructing a base class dataset and a new category dataset, including:
[0038] Acquire coastal zone remote sensing images, crop marine disaster-bearing body images based on the remote sensing images, use annotation tools to annotate targets in the images, and construct a marine disaster-bearing body dataset;
[0039] Using the Pascal VOC2012 dataset as the base class dataset C base A new category dataset C is constructed using the marine disaster-bearing body dataset. novel ;
[0040] From the new category dataset C novelK = {1, 2, 3, 5, 10} samples were selected from each category for small-sample fine-tuning, and the remaining data were used for validation and testing.
[0041] In one possible implementation, the target detection model is used for marine disaster-bearing body target detection under small sample conditions in real-world scenarios, and the method includes:
[0042] Remote sensing imagery of the coastal zone is acquired and input into the target detection model to obtain the category, confidence score, and corresponding bounding box coordinates of each detected target; wherein, the detected targets include airports, schools, bridges, docks, and hazardous chemicals.
[0043] Compared with the prior art, the technical solution provided in this application has the following beneficial effects:
[0044] This application adds an adaptive mitigation module for mislabeling to MetaR-CNN, which effectively filters and processes mislabeled samples, improving the quality of training samples and providing a more reliable foundation for model learning. The two-stage sampling module can flexibly adjust the aggregation strategy according to the training progress, taking into account both commonalities and specificities of categories, enhancing the model's adaptability to different target categories. The weighted nonlinear aggregation module strengthens the role of key features through an attention mechanism, improving the accuracy of feature aggregation and helping the detection head to more accurately identify target detection boxes. The overall solution is optimized for small-sample scenarios, significantly improving the accuracy and robustness of marine disaster-bearing body detection, and providing an efficient solution for the application of remote sensing technology in the field of small-sample target detection. Attached Figure Description
[0045] Figure 1 A schematic diagram of the original Meta R-CNN network structure provided for this application.
[0046] Figure 2 The architecture diagram of PRRS-Net, a small-sample object detection network based on a candidate region re-screening mechanism, is provided in this application.
[0047] Figure 3 This is a flowchart of a method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions, provided in Embodiment 1 of this application.
[0048] Figure 4 This is a flowchart of a method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions, provided in Embodiment 2 of this application.
[0049] Figure 5 This is a schematic diagram of the generated region candidate suggestion box provided in Embodiment 2 of this application.
[0050] Figure 6This is a schematic diagram of the candidate box after re-screening provided in Embodiment 2 of this application.
[0051] Figure 7 This is a schematic diagram of the test results on the marine disaster-bearing body dataset provided in Embodiment 2 of this application. Detailed Implementation
[0052] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0053] In few-shot object detection tasks, due to the scarcity of labeled data, models often struggle to learn robust class discrimination capabilities and are easily affected by mislabeled samples, leading to a decline in detection performance. To address this issue, this application proposes a few-shot object detection network, PRRS-Net, based on a candidate region re-selection mechanism, aiming to improve the accuracy of negative sample proposals and the effectiveness of feature aggregation in few-shot object detection tasks.
[0054] Specifically, see Figure 1 This is an architecture diagram of PRRS-Net, a few-shot object detection network based on a candidate region re-selection mechanism provided in this application. In this application, PRRS-Net uses the Meta R-CNN architecture as its basic architecture, including query and support branches. Figure 1 As shown, the backbone network is first used to extract features from the query image and supporting images, and then the Region Proposal Network (RPN) is used to generate candidate target regions.
[0055] In object detection training, the Region of Interest (ROI), i.e., the bounding boxes of the real targets, needs to be delineated in the image using annotation tools. When calculating the Intersection over Union (IoU), the predicted bounding boxes are compared with these bounding boxes, and the detection accuracy is evaluated by the ratio of their intersection to their union. The generated proposals are then divided into positive and negative samples after IoU calculation, and redundant detection boxes are removed using Non-Maximum Suppression (NMS), retaining only the boxes most likely to contain the target object, thus preserving the optimal detection result.
[0056] As an improvement, this application adds a Mislabeling Adaptive Mitigation Module (MAM) to the aforementioned Meta R-CNN architecture to identify and mitigate the negative impact of mislabeled samples on model training. Specifically, as... Figure 2 As shown, the mislabeling adaptive mitigation module MAM includes a mislabeling sample screening module and an adaptive weight allocation module.
[0057] The aforementioned mislabeled sample filtering module is used to filter out mislabeled samples from negative samples based on the feature similarity between negative samples and supporting class prototypes. Specifically, in two-stage object detection networks, such as Faster R-CNN and Meta R-CNN, it is usually necessary to further determine the object category based on candidate boxes generated by the region proposal network. The network distinguishes between positive and negative samples by the IoU value between the candidate box and the ground truth box. For candidate boxes classified as positive samples, object classification is performed through fully connected layers. However, with a limited sample size, especially for distant, blurry, or occluded targets, insufficient key feature information often leads to low IoU values for many positive samples, which are ultimately misclassified as negative samples and discarded, thus interfering with the learning process.
[0058] To address this, this application proposes a feature similarity-based method, which calculates the ROI query features f of all negative samples generated by the region proposal network. r With all supporting class prototype features f s The similarity distance D between them i,j This is to re-screen potentially mislabeled samples, thereby reducing the false negative rate of distant, small, blurred, and occluded targets. The specific calculation is expressed as follows:
[0059]
[0060] Where N represents the number of negative samples and M represents the number of supporting classes.
[0061] In this embodiment of the application, in order to improve computational efficiency and reliability, for each negative sample, only the one with the largest similarity distance to all supporting categories is selected as the basis for further judgment, as shown below:
[0062]
[0063] Furthermore, a threshold ε is set; if D is judged as a negative sample... i If the value is greater than ε, then the sample is reclassified as a positive sample for training, and D is taken. i The corresponding category label assignment is supported.
[0064] For mislabeled samples, this application fully explores their potential positive class information and includes them in the positive sample set for training. However, since the class information of these samples may deviate from that of true positive samples, directly equating them with positive samples may affect the stability of model learning. Therefore, this application dynamically adjusts the weights based on the maximum similarity value to optimize their contribution to model training. Specifically, based on the aforementioned adaptive weight allocation module, high-similarity samples are given higher weights, while low-similarity samples have relatively lower weights to reduce their negative impact on model training, such as... Figure 6 As shown in the figure. The weight w can be defined as follows:
[0065] w={D i |D i >ε} (3)
[0066] In this embodiment of the application, to ensure the stability of model training, the weights of positive samples and true negative samples are uniformly set to 1.
[0067] Based on the aforementioned mislabeling adaptive mitigation module MAM, more refined feature interactions can be achieved at the feature difference level, further capturing fine-grained relationships between features to improve feature expressiveness.
[0068] After completing the above feature extraction, feature aggregation is required. As another improvement in this application, such as... Figure 2 As shown, this application also provides a dual-phase sampling (DPS) strategy, which dynamically combines class-specific aggregation (CSA) and class-agnostic aggregation (CAA) to propose different aggregation schemes for different training stages in order to balance feature diversity and class specificity.
[0069] Specifically, DPS dynamically adjusts the aggregation strategy using the training progress ratio R = t / T, where t is the current iteration number and T is the total number of iterations. When R < 0.5, the model is still in the early stages of training and its class discrimination ability is weak. At this time, CAA is selected to increase the diversity of class features, promote the model's generalization ability to unseen classes, and avoid overfitting caused by the single class feature in the early training stage. Its sampling formula is expressed as:
[0070] C CAA ={c s ∈C s |c s ~C s} (4)
[0071] Among them, C CAA For the supported categories of CAA sampling, C s represents the set of supporting sample categories, and ~ indicates random selection. When R > 0.5, the model enters the later stage of training, and the class discrimination ability gradually improves, but the target class specificity learning is insufficient. At this time, CSA is selected to accurately focus on the key positive features of the target class, effectively strengthening the model's feature representation of the target class. Its sampling formula is expressed as:
[0072] C CSA ={cs ∈C s |c q ~C q ,c s =c q} (5)
[0073] Among them, C CSA For the supported categories of CAS sampling, C q This represents the set of categories for the query sample. Finally, the supported categories C of the sample will be selected. CAA Or C CSA The corresponding category prototype features are aggregated with the query features after ROI.
[0074] Compared to traditional approaches, where CSA only aggregates with similar prototypes in the early stages of training, neglecting category diversity and preventing interaction between features of different categories, potentially reducing the model's generalization ability, and CAA fails to focus on key positive prototypes of the target category in the later stages of training, thus failing to effectively highlight category specificity and easily leading to insufficient feature learning for the target category, the dual-stage sampling strategy DPS in this application ensures that category diversity learning is strengthened in the early stages of training and category specificity learning is focused in the later stages of training through different feature sampling schemes.
[0075] Furthermore, in order to achieve effective modeling of fine-grained feature relationships between categories, such as Figure 2 As shown, this application, based on the above-mentioned two-stage sampling strategy, also incorporates a weighted nonlinear aggregation network (WNLA).
[0076] The WNLA network first calculates the ROI query features f. roi and support class prototype feature f p The attention weighting matrix A is used to capture the semantic relationships between features, and its calculation formula can be expressed as:
[0077]
[0078] Where R represents f roi Total number, M represents f p Total number. Next, the support class prototype features f are weighted by the attention weighting matrix A. p Weighting is applied to ensure full utilization of category information, and the final aggregated feature can be represented as:
[0079] F = N1[N2(f) roi ⊙(A·f p )),N3(f roi -(A·f p )),froi (7)
[0080] Network N1 is designed as a fully connected layer for the final aggregation of features. Networks N2 and N3 consist of fully connected layers and ReLU activation layers, respectively performing non-linear mappings on the features after element-wise multiplication and subtraction operations to model the correlations and differences between features. Furthermore, f roi The ROI query features directly participate in the aggregation process, improving the richness and discriminative power of feature representation by balancing the integrity and diversity of features. Then, the aggregated features F are input into the classification and regression modules to complete the final object detection task.
[0081] In this application, a target detection model is trained using the improved PRRS-Net architecture based on the candidate region re-screening mechanism to achieve small-sample target detection of marine disaster-bearing bodies.
[0082] The following detailed description of the marine disaster-bearing body detection method based on a candidate region re-screening mechanism in a small sample setting, provided in this application, is illustrated with specific embodiments.
[0083] Example 1
[0084] See Figure 3 This is a flowchart of a method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions, provided in Embodiment 1 of this application. The above method is implemented based on the PRRS-Net small sample target detection network, which incorporates the mislabeling adaptive mitigation module MAM, the two-stage sampling DPS module, and the weighted nonlinear aggregation module. Figure 2 As shown, the specific implementation steps of the above method include:
[0085] Step 101: Construct the basic class dataset and the new class dataset, and perform two-stage model training on the above PRRS-Net.
[0086] The model training in the two phases described above includes a basic training phase and a fine-tuning phase. In the basic training phase, the PRRS-Net model is iteratively trained based on the basic class dataset. In the fine-tuning phase, the obtained object detection model is fine-tuned based on the new class dataset. The loss function used during training includes the optimized classification loss L. cls and regression loss L reg .
[0087] Step 102: Extract feature maps using a backbone network and generate candidate boxes based on a region proposal network.
[0088] Step 103: After processing the Region of Interest (ROI), the similarity distance between the ROI query features and all supporting class prototype features is calculated based on the above mislabeling adaptive mitigation module. This distance is used to filter mislabeled samples and assign weights to the mislabeled samples to obtain positive samples for model training.
[0089] Step 104: The above-mentioned two-stage sampling module is used to adjust the aggregation strategy based on the training progress, including category-independent aggregation and category-specific aggregation.
[0090] Step 105: Combining the above weighted nonlinear aggregation module, calculate the attention weighting matrix between the ROI query features and the supporting class prototype features, and then weight the supporting class prototype features using the attention weighting matrix to obtain the aggregated features.
[0091] Step 106: Input the above aggregated features into the above detection head to identify the target detection box.
[0092] Step 107: Repeat the above training process until the preset number of iterations is reached or the preset termination condition is met to obtain the target detection model, which is used for target detection under small sample conditions.
[0093] Compared with the prior art, the technical solution provided in Embodiment 1 of this application has the following beneficial effects:
[0094] The mislabeling adaptive mitigation strategy accurately filters potential mislabeled samples from the background class based on feature similarity. This reduces the model's learning of erroneous knowledge and reassigns these mislabeled samples as positive samples with dynamically adjusted weights, effectively controlling their positive contribution to training and improving the utilization rate and training quality of small sample data. The two-stage sampling strategy and the weighted nonlinear aggregation method work synergistically. The former strengthens class diversity learning in the early stages of training and focuses on class specificity learning in the later stages, while the latter captures fine-grained relationships between class features through nonlinear mapping, optimizing feature aggregation methods and significantly enhancing feature interaction and fusion capabilities as well as class discrimination capabilities. The overall solution specifically addresses the challenges of data quality and feature learning in small sample scenarios, significantly improving the accuracy and reliability of marine disaster-bearing body detection.
[0095] Example 2
[0096] See Figure 4 This is a flowchart illustrating a method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions, as provided in Embodiment 2 of this application. Embodiment 2 is a further refinement of the scheme in Embodiment 1, to fully disclose the technical solution provided in this application.
[0097] like Figure 4 As shown, the specific implementation steps of the above method include:
[0098] Step 201: Obtain remote sensing images of the coastal zone, crop out images of marine disaster-bearing bodies based on the remote sensing images, use annotation tools to annotate the targets in the images, and construct a marine disaster-bearing body dataset.
[0099] In this embodiment of the application, tools such as LabelImg are used to annotate the above-mentioned marine disaster-bearing body images, and the annotation results are saved in XML format.
[0100] Step 202: Use the Pascal VOC2012 dataset as the base class dataset C. base A new category dataset C is constructed using the marine disaster-bearing body dataset. novel .
[0101] Among them, the aforementioned basic class dataset C base It includes 20 categories such as airplanes, cars, birds, and boats. New category dataset C novel It includes four categories of hazardous chemicals: airports, schools, bridges, and docks.
[0102] Step 203: From the new category dataset C mentioned above novel K = {1, 2, 3, 5, 10} samples were selected from each category for small-sample fine-tuning, and the remaining data were used for validation and testing.
[0103] Step 204: Construct the Meta R-CNN framework, including the backbone network, region candidate network, and detection head.
[0104] like Figure 2 As shown in the illustration, the backbone network in this embodiment uses ResNet-101. The category image and the query category image are input into the ResNet-101 backbone network respectively, and the two are linked through a parameter sharing mechanism. Figure 5 As shown, ResNet-101 is used as the backbone network to extract feature maps, and the extracted feature maps are input into the Region Proposal Network (RPN) to generate candidate bounding boxes. White represents object detection boxes, and gray represents background detection boxes. After processing by the Region of Interest (ROI), a fully connected layer performs bounding box regression and classification, thus completing the object detection process using the original MetaR-CNN.
[0105] Step 205: Using the Meta R-CNN framework described above, add a mislabeling adaptive mitigation MAM module, a two-stage sampling module, and a weighted nonlinear aggregation module between the Region Proposal Network (RPN) and the detector head to form the PRRS-Net network.
[0106] Specifically, this application uses Meta R-CNN++ as the baseline model to construct a marine disaster-bearing body detection model PRRS-Net based on a candidate region rescreening mechanism under small sample conditions. This model continues the core architecture design of Meta R-CNN, and its implementation is based on MMDetection.
[0107] During model training, the aforementioned mislabeling adaptive mitigation MAM module uses a candidate region re-selection strategy to filter out mislabeled samples, reducing the model's learning of erroneous knowledge and recovering potential positive class information from the mislabeled samples, thereby effectively mitigating the negative impact of mislabeled samples on model training.
[0108] Specifically, for all negative candidate regions generated by the Region Proposal Network (RPN), the Mislabeling Adaptive Mitigation Model (MAM) module calculates the similarity distance between the query features of the Region of Interest (ROI) and the prototype features of all supporting classes. If the distance is greater than a set threshold ε, it indicates that the region should be a positive sample, and it is reclassified into the positive sample set, thereby improving the target detection rate, especially reducing the false negative rate of distant, small, blurred, and occluded targets.
[0109] Furthermore, the weights are dynamically adjusted based on the maximum similarity value of the mislabeled samples. Samples with high similarity are given higher weights, while samples with low similarity are given lower weights, in order to optimize their contribution to model training. The initial weights are all set to 1.
[0110] The aforementioned two-stage sampling module increases the diversity of class features through class-independent aggregation in the first half of training, improving the model's generalization ability to unseen classes and avoiding overfitting caused by the limited number of class features in early training. In the second half of training, it precisely focuses on the key positive features of the target class through class feature aggregation methods, effectively strengthening the model's feature representation of the target class.
[0111] The aforementioned weighted nonlinear aggregation module is constructed for the final aggregation of features. Specifically, during iterative training, the weighted nonlinear aggregation module calculates an attention weighting matrix between the ROI query features and supporting class prototype features to capture the semantic relationships between features. The supporting class prototype features are weighted using the attention weighting matrix to ensure full utilization of category information.
[0112] After the final feature aggregation is completed, target region pooling is used to map the candidate regions to the feature maps and perform pooling operations. Each candidate region is then classified using a fully connected layer and softmax, and the bounding boxes are refined to obtain accurate detection boxes.
[0113] Step 206: Set training parameters and perform two-stage model training on the PRRS-Net network. The loss function during training includes classification loss L. clsand regression loss L reg .
[0114] In this embodiment, all experiments were performed on two RTX 3090 GPUs with a batch size of 8, using the SGD optimizer with a momentum of 0.9 and a weight decay rate of 0.0001.
[0115] The model training in the two phases described above includes a base training phase and a fine-tuning phase. In the base training phase, the learning rate for the VOC base dataset was set to 0.005, with a total of 20k iterations; the learning rate for the COCO dataset was set to 0.004, with a total of 110k iterations. In the fine-tuning phase, the learning rate was adjusted to 0.001. For the marine disaster-bearing body dataset, the number of iterations was {800, 1200, 1600, 2000, 3000} when K = {1, 2, 3, 5, 10}. For the COCO dataset, the number of iterations was {10000, 18000} when K = {10, 30}. Furthermore, after validation through ablation experiments, the similarity threshold ε for mislabeled sample selection in the Mislabeled Adaptive Mitigation (MAM) was set to 0.7.
[0116] In this embodiment, the two-stage training and testing of the model are completed based on a small sample dataset of marine disaster-bearing bodies, and the parameters with the best test results are saved. The test results are shown in Table 1. Figure 7 As shown in the image.
[0117] Table 1. Test results of the marine disaster-bearing body dataset.
[0118]
[0119] To further verify the effectiveness of the proposed model, this application also compared it with current mainstream few-shot object detection models on the same dataset, such as MetaDet, MPSR, FSRW, Meta R-CNN, etc.
[0120] Specifically, this embodiment extensively compares the proposed method with existing methods on the widely used MS COCO benchmark dataset, which has varying levels of difficulty. For the MS COCO dataset, this embodiment divides its 80 categories, treating the 20 categories overlapping with PASCAL VOC as new categories and the remaining 60 categories as base categories. For each new category, we provide K = {10, 30} support samples for small-sample fine-tuning and evaluate on 5k images of the COCO2017 validation set.
[0121] Table 2 shows a comparison between the proposed method and state-of-the-art methods. Experimental results demonstrate that the proposed method performs well in multiple scenarios, especially under high-shot settings (such as 30-shot).
[0122] Table 2 shows the test results on the COCO dataset.
[0123]
[0124] Step 207: Apply the trained model to marine disaster-bearing target detection under small sample conditions in real-world scenarios to obtain the category, confidence score, and corresponding bounding box coordinates of each detected target. The detected targets include public places such as airports and schools, bridges, docks, and hazardous chemicals.
[0125] Compared with the prior art, the method provided in Embodiment 2 of this application has the following beneficial effects:
[0126] This application proposes an adaptive mitigation strategy for mislabeling. It filters potential mislabeled samples from the background class based on feature similarity to reduce the model's learning of erroneous knowledge. The filtered mislabeled samples are then redistributed as positive samples, and their weights are dynamically adjusted to reasonably control their positive contribution to model training. Furthermore, in terms of feature aggregation, this application proposes a two-stage sampling strategy and a weighted nonlinear aggregation method, which work synergistically to enhance feature interaction and fusion capabilities. Specifically, the two-stage sampling strategy uses different feature sampling schemes to ensure enhanced class diversity learning in the early stages of training and focuses on class specificity learning in the later stages. The weighted nonlinear aggregation method captures fine-grained relationships between class features through nonlinear mapping, optimizing the feature aggregation method and improving class discrimination ability. Finally, extensive experiments on a constructed small-sample dataset of marine disaster-bearing bodies and the MS-COCO benchmark dataset show that the proposed method outperforms existing state-of-the-art methods in multiple small-sample settings, demonstrating significant performance improvements. For example, on the COCO dataset, it achieves a 13.2 percentage point improvement over previous state-of-the-art methods (30-shot nAP setting).
[0127] Although embodiments of this application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions, characterized in that, The method is based on a pre-built few-sample target detection network PRRS-Net, which adopts the Meta R-CNN framework and adds a mislabeling adaptive mitigation module, a two-stage sampling module, and a weighted nonlinear aggregation module between the Meta R-CNN region proposal network and the detection head. A basic class dataset and a new class dataset are constructed. The PRRS-Net model is trained in two stages. The training process includes extracting feature maps using a backbone network and generating candidate boxes based on a region proposal network. After processing the Region of Interest (ROI), the similarity distance between the ROI query features and all supporting class prototype features is calculated based on the mislabeling adaptive mitigation module. This distance is used to filter mislabeled samples and assign weights to these samples, resulting in positive samples for model training. The two-stage sampling module adjusts the aggregation strategy based on the training progress, including category-independent aggregation and category-specific aggregation. Combined with the weighted nonlinear aggregation module, an attention weighting matrix is calculated between the ROI query features and supporting class prototype features. The supporting class prototype features are then weighted using this attention weighting matrix to obtain aggregated features. The aggregated features are input into the detection head to identify the target detection box; the training process is repeated until a preset number of iterations is reached or a preset termination condition is met to obtain a target detection model for target detection under small sample conditions.
2. The method for detecting marine disaster-bearing bodies based on a candidate region re-screening mechanism under small sample conditions according to claim 1, characterized in that, The two-stage model training includes a basic training stage and a fine-tuning stage; Construct a base class dataset and a new class dataset, and perform a two-stage model training on the PRRS-Net, including: In the basic training phase, iterative training of the PRRS-Net is completed based on the basic class dataset. In the fine-tuning phase, the obtained object detection model is fine-tuned based on the new class dataset. The loss function used during training includes classification loss L. cls and regression loss L reg .
3. The method for detecting marine disaster-bearing bodies based on a candidate region rescreening mechanism under small sample conditions according to claim 1, characterized in that, Candidate boxes are generated based on the region proposal network, and the generated proposals are divided into positive and negative samples after IoU calculation. The mislabeling adaptive mitigation module is used to calculate the feature similarity between the negative sample and the supporting class prototype, and the method includes: Based on the mislabeling adaptive mitigation module, the ROI query features f of all negative samples generated by the region proposal network are calculated. r With all supporting class prototype features f s The similarity distance between them is expressed as: In the formula, N represents the number of negative samples, and M represents the number of supporting categories.
4. The method for detecting marine disaster-bearing bodies based on a candidate region rescreening mechanism under small sample conditions according to claim 3, characterized in that, Based on the mislabeling adaptive mitigation module, mislabeled samples are filtered and weights are assigned to the mislabeled samples to obtain positive samples for model training, including: For each negative sample, the maximum similarity distance corresponding to the negative sample is selected, denoted as: If the maximum similarity distance corresponding to the negative sample is greater than a preset threshold, then the negative sample is designated as a positive sample for model training, and D is taken as the threshold. i The corresponding category label assignment is supported.
5. The method for detecting marine disaster-bearing bodies based on a candidate region rescreening mechanism under small sample conditions according to claim 1, characterized in that, The two-stage sampling module is used to adjust the aggregation strategy based on the training progress, wherein the training progress is determined based on the current iteration number t and the total number of iterations T, and is expressed as R = t / T; When R < 0.5, sampling is performed based on the class-independent aggregation strategy (CAA), as follows: C CAA ={c s ∈C s |c s ~C s } (4) In the formula, C CAA For the supported categories of CAA sampling, C s c represents the set of classes that support the sample. s C represents s One of the elements, ~ indicates random selection; When R > 0.5, the category-specific aggregation strategy (CSA) enhances the feature representation of the target category, as shown below: C CSA ={c s ∈C s |c q ~C q ,c s =c q } (5) In the formula, C CSA For the supported categories of CAS sampling, C q c represents the set of categories for the queried samples; q Indicate C q One of the elements; Support category C for sampling CAA Or C CSA The corresponding category prototype features are aggregated with the query features after ROI.
6. The method for detecting marine disaster-bearing bodies based on a candidate region rescreening mechanism under small sample conditions according to claim 1, characterized in that, Combining the weighted nonlinear aggregation module, the attention weighting matrix between the ROI query features and the supporting class prototype features is calculated, and is expressed as: In the formula, R represents the ROI query feature f roi The total number, M represents the number of supporting class prototype features f p The total number.
7. The method for detecting marine disaster-bearing bodies based on a candidate region rescreening mechanism under small sample conditions according to claim 1, characterized in that, The support class prototype feature f is applied through the attention weighting matrix A. p We perform weighted aggregation to obtain the aggregated features, which are represented as follows: F=N1[N2(f roi ⊙(A·f p )),N3(f roi -(A·f p )),f roi ] (7) In this network, N1 is a fully connected layer used for the final aggregation of features; networks N2 and N3 consist of fully connected layers and ReLU activation layers, respectively used for nonlinear mapping of the features after element-wise multiplication and subtraction operations, f roi Features for ROI queries.
8. The method for detecting marine disaster-bearing bodies based on a candidate region rescreening mechanism under small sample conditions according to claim 1, characterized in that, The aggregated features are input into the detection head for target detection bounding box recognition, including: Map candidate regions to feature maps and perform pooling operations; Each candidate region is classified using a fully connected layer and softmax, and the bounding boxes are refined to obtain the target detection boxes.
9. The method for detecting marine disaster-bearing bodies based on a candidate region rescreening mechanism under small sample conditions according to claim 1, characterized in that, Construct the base class dataset and the new class dataset, including: Acquire coastal zone remote sensing images, crop marine disaster-bearing body images based on the remote sensing images, use annotation tools to annotate targets in the images, and construct a marine disaster-bearing body dataset; Using the Pascal VOC2012 dataset as the base class dataset C base A new category dataset C is constructed using the marine disaster-bearing body dataset. novel ; From the new category dataset C novel K = {1, 2, 3, 5, 10} samples were selected from each category for small-sample fine-tuning, and the remaining data were used for validation and testing.
10. The method for detecting marine disaster-bearing bodies based on a candidate region rescreening mechanism under small sample conditions according to claim 1, characterized in that, The target detection model is used for marine disaster-bearing body target detection under small sample conditions in real-world scenarios, and the method includes: Remote sensing images of the coastal zone are acquired and input into the target detection model to obtain the category, confidence score, and corresponding bounding box coordinates of each detected target; wherein, the detected targets include airports, schools, bridges, docks, and hazardous chemicals.
Citation Information
Patent Citations
Small sample target detection method based on decoupling classifier and attention feature alignment
CN118674913A
Method for complex target identification from mass videos based on human-machine collaboration
US20240290084A1