A target detection method based on a mixed feature pyramid fusion network

CN118071995BActive Publication Date: 2026-09-22THE 54TH RESEARCH INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY GROUP CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410227937.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2026-09-22
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

[0006]2)FPN没有将存在于低层特征图的准确定位信号反馈到高层语义特征图,同时各层级之间的特征传递仅限于相邻层级,导致特征融合不平衡

Benefits of technology

[0044]1、本发明提出了一个多尺度平衡注意力特征金字塔网络MBA-Net。在特征金字塔主干网络的基础上,对各层级的特征进行了充分的融合,加深了参与预测的特征图对原始图像信息的充分挖掘。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118071995B_ABST
    Figure CN118071995B_ABST
Patent Text Reader

Abstract

The application provides a target detection method based on a mixed feature pyramid fusion network, and belongs to the field of target detection. The application designs a target detection model based on the mixed feature pyramid fusion network. The model extracts initial features of an image through a multi-scale balanced attention feature pyramid network, fully fuses features of each level on the basis of a feature pyramid FPN backbone network, promotes sufficient use of original image information by feature maps participating in prediction, strengthens effective features of the fused feature maps by using an attention mechanism, reduces information redundancy of each scale feature map, and further enhances feature expression. Experiments show that the method realizes accurate detection of image targets by effectively fusing multi-scale features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection, and in particular to a target detection method based on a hybrid feature pyramid fusion network. Background Technology

[0002] Residual Networks (ResNet) have made Convolutional Neural Networks (CNNs) perform better in terms of image robustness and feature representation in the field of computer vision. Computer vision tasks such as image classification and object detection have also made rapid progress with the continuous iterative optimization of CNNs.

[0003] Based on continuous iterations of CNNs, the R-CNN series of object detection algorithms has emerged and been widely applied in engineering fields, making the two-stage object detection framework the mainstream. As an upgraded version of the R-CNN series, Faster R-CNN effectively improves the accuracy and speed of object detection. Faster R-CNN was the first to use a Region Proposal Network (RPN), which not only improved accuracy but also increased speed. Furthermore, the RPN can automatically generate initial object proposal boxes and, by sharing network weight parameters with the Fast R-CNN network in end-to-end training, improves the algorithm's efficiency.

[0004] The Feature Pyramid Network (FPN) enhances the representation of image information based on CNNs, fusing feature maps from different layers and using multi-scale feature maps for prediction. While FPN improves the performance of object detection networks (such as Faster R-CNN), FPN-based Faster R-CNN models still suffer from the following problems:

[0005] 1) The deepest layer of FPN contains rich semantic features. The Faster R-CNN model uses this layer for detection, which to some extent loses the detailed information of the original image.

[0006] 2) FPN does not feed back the accurate localization signals existing in the low-level feature maps to the high-level semantic feature maps. At the same time, feature transfer between levels is limited to adjacent levels, resulting in unbalanced feature fusion. Summary of the Invention

[0007] To overcome the above problems, this invention proposes a target detection method based on a hybrid feature pyramid fusion network. Addressing the challenging issues of imbalance in FPN feature fusion, this method designs a target detection model based on a hybrid feature pyramid fusion network, enabling effective fusion of multi-scale features, based on relevant theories.

[0008] The technical solution adopted in this invention is as follows:

[0009] A target detection method based on a hybrid feature pyramid fusion network includes the following steps:

[0010] Step 1: Collect image samples to form a standard format dataset for image recognition;

[0011] Step 2: Preprocess the image samples in the standard format dataset for image recognition and divide them into training and test sets;

[0012] Step 3: Using the training set obtained in Step 2, train the target detection model based on the hybrid feature pyramid fusion network to obtain the weight parameter file;

[0013] Step 4: Using the weight parameter file generated in Step 3, identify the test set images to generate target categories and detection boxes.

[0014] Furthermore, the specific method of step 1 is as follows:

[0015] Step 1.1: Collect image samples containing specific targets;

[0016] Step 1.2: Use annotation tools to annotate the bounding boxes and categories of the targets in the image to obtain a standard format dataset for image recognition.

[0017] Furthermore, the specific method for step 2 is as follows:

[0018] Step 2.1: Perform image enhancement and noise addition processing on the images in the standard format dataset for image recognition;

[0019] Step 2.2: Standardize the images in the processed dataset and enlarge or reduce them to a uniform size. At the same time, the target annotation information is also enlarged or reduced proportionally.

[0020] Step 2.3: Divide the standard format image recognition dataset into a training set and a test set in an 8:2 ratio.

[0021] Furthermore, the specific method for step 3 is as follows:

[0022] Step 3.1, Multi-scale feature acquisition: Input the training set images into the ResNet base network to extract image features, and obtain the outputs of the second, third, fourth, and fifth convolutional modules of the ResNet base network; use this output as the feature pyramid for multi-scale prediction, which contains four different scales of multi-scale feature maps, denoted as {C2, C3, C4, C5}, and input it into MBA-Net to perform feature fusion of the feature pyramid, and output four scales of multi-scale feature maps {P2, P3, P4, P5};

[0023] Step 3.2, Region Proposal: The four scale feature maps {P2, P3, P4, P5} from Step 3.1 are input into the RPN network. The RPN network first uses a sliding box to traverse the feature maps and generate initial anchor boxes. Then, these anchor boxes are fed into the classification and regression branches of the RPN network to determine whether the target is a background class and to make preliminary corrections to the bounding boxes. Further, non-maximum suppression (NMS) is used to select a corresponding number of target boxes, their position coordinate information is recorded, and region proposals are output. In addition, the loss of the output results of the classification and regression branches of the RPN network is calculated.

[0024] Step 3.3, ROI Pooling: The multi-scale feature map output from Step 3.1 and the region proposal output from Step 3.2 are simultaneously input into the ROI pooling layer. The ROI pooling layer pools a portion of the multi-scale feature map selected by the region proposal into a feature map of a fixed size.

[0025] Step 3.4, Target Classification and Boundary Regression: The feature map obtained in Step 3.3 is input into the fully connected layer. After processing, feature vectors are obtained. These feature vectors are then input into the final classification branch and regression branch of the model, respectively. The classification branch determines the specific target category of the object in the bounding box, while the regression branch corrects the position coordinate information of the bounding box. Finally, the output information of the classification and regression branches is combined to achieve accurate target detection in the image. In addition, the loss of the output results of the final classification and regression branches of the model is calculated.

[0026] Step 3.5: Perform gradient backpropagation on the losses of the RPN network and the final classification and regression branches of the model to update the parameters of the object detection model and save the optimal parameter model.

[0027] Furthermore, in step 3.1, MBA-Net performs full feature fusion on multi-scale feature maps based on the feature pyramid network, and MBA-Net uses the ResNet base network for feature extraction;

[0028] In this process, the outputs of the second, third, fourth, and fifth modules of the feature extraction network are combined to form a feature pyramid with L layers. The feature pyramid generates feature maps of the same size as the corresponding layers from the outputs at four different scales, denoted as {C2, C3, C4, C5}. Then, multi-scale feature fusion is performed on {C2, C3, C4, C5} to generate {N2, N3, N4, N5}. Each scale feature map in {N2, N3, N4, N5} is associated with all feature maps in {C2, C3, C4, C5}. By using upsampling and downsampling, {C2, C3, C4, C5} is reconstructed to the same size as {N2, N3, N4, N5} and then fused. The upsampling operation uses interpolation, and the downsampling uses a 3*3 convolutional kernel with a stride of 2. The fused {N2, N3, N4, N5} balances the imbalance between positional and semantic information in the feature maps at each scale.

[0029] To reduce information redundancy in feature maps at different scales and further enhance feature representation, attention extraction is performed on {N2, N3, N4, N5}. Specifically, the features {N2, N3, N4, N5} at different levels are first reconstructed to size N4 through interpolation or max pooling to obtain {F2, F3, F4, F5}. Then, their average is taken to obtain the balanced semantic feature F. b The index of the l-layer feature is denoted as F. l The indices of the lowest and highest level features are denoted as l. min l max ,in

[0030]

[0031] The fused balanced semantic features F b As input to the attention module, the attention extraction operation generates a corresponding feature map A. To feed back the balanced semantic feature information to each layer, A is reconstructed to the same size as each layer, resulting in {A2, A3, A4, A5}. Then, A is summed with {N2, N3, N4, N5} to obtain {P2, P3, P4, P5}, i.e.

[0032] P i =A i +N i i = 2, 3, 4, 5

[0033] Furthermore, in step 3.2, the implementation process of the RPN network is as follows:

[0034] First, the feature map is traversed sequentially using a sliding bounding box, and each position in the feature map is converted into an initial proposal box, which is named an anchor box. The nine initial proposal boxes consist of three areas of 128×128, 256×256, and 512×512, and three aspect ratios of 1:1, 2:1, and 1:2. Then, the feature map of the corresponding anchor box region is input into the classification layer and the regression layer, respectively. A 1*1 convolutional kernel is used to classify the foreground target and regress the position of the bounding box, thereby achieving accurate target detection.

[0035] The foreground object classification and bounding box regression use a loss function consisting of the cross-entropy function and the SmoothL1 function, as shown in the following formula:

[0036]

[0037] Among them, L cls Let p be the softmax classification loss function. i The probability of the anchor box belonging to a category is calculated by the softmax function. The value can be 1 or 0. When the IoU value between the anchor box and the actual target box is greater than 0.7, The value is 1, meaning the IoU between the anchor box and the actual target box is less than 0.3. The value is 0; Lreg is the Smooth L1 regression loss. The translation and scaling parameters corresponding to the anchor box and the actual target box, including coordinates and size scaling, t i N represents the scaling value predicted by the network during training. cls N represents the number of anchor boxes used for classification. reg This represents the sum of the number of x and y coordinates corresponding to the four vertices of all anchor frames, where λ is used to balance N. cls and N reg Parameters;

[0038] Finally, among the given region suggestion boxes, 2000 optimal suggestion boxes are selected through non-maximum suppression, and their location coordinate information is recorded.

[0039] Furthermore, in step 3.4, the loss functions for the classification and regression branches are the same as those in step 3.2 for L({p i},{t i Consistent.

[0040] Furthermore, step 4 is specifically implemented as follows:

[0041] Step 4.1: Standardize the test image by enlarging or reducing it to a uniform size;

[0042] Step 4.2: Input the standardized image into the target detection model based on the hybrid feature pyramid fusion network, and import the pre-trained weight parameter file. Then perform the operations in steps 3.1, 3.2, 3.3, and 3.4 in sequence, and finally output the target location information and classification results.

[0043] The beneficial effects of this invention are as follows:

[0044] 1. This invention proposes a multi-scale balanced attention feature pyramid network, MBA-Net. Based on the feature pyramid backbone network, features at each level are fully integrated, deepening the extraction of original image information from the feature maps involved in prediction.

[0045] 2. This invention introduces an attention mechanism into the feature pyramid. The attention mechanism enhances the effective features of the fused feature map, reduces information redundancy at each scale, and further enhances feature representation. Attached Figure Description

[0046] Figure 1 This is a schematic diagram of the target detection method based on a hybrid feature pyramid fusion network.

[0047] Figure 2 This is a diagram of the MBA-Net structure, a multi-scale balanced attention feature pyramid network.

[0048] Figure 3 This is a schematic diagram showing the details of MBA-Net feature fusion;

[0049] Figure 4 This is a diagram of the RPN network structure. Detailed Implementation

[0050] The present invention will now be further described with reference to the accompanying drawings.

[0051] A target detection method based on a hybrid feature pyramid fusion network, such as Figure 1 As shown, it includes the following steps:

[0052] Step 1: Collect sample data to form a standard format dataset for image recognition.

[0053] Step 1 includes the following sub-steps:

[0054] Step 1.1: Collect image samples containing specific targets;

[0055] Step 1.2: Use annotation tools to annotate the bounding boxes and categories of the templates in the image to obtain a standard format dataset for image recognition, which serves as the initial dataset.

[0056] Step 2: Preprocess the sample data obtained in Step 1 and divide it into training set and test set.

[0057] Step 2 includes the following sub-steps:

[0058] Step 2.1: Process the initial dataset;

[0059] In step 2.1, the processing methods for the initial dataset include image enhancement and noise addition.

[0060] Step 2.2: Standardize the processed dataset by enlarging or reducing it to a uniform size. At the same time, the target annotation information is also enlarged or reduced proportionally.

[0061] Step 2.3: Combine the standardized images into training and testing sets at an 8:2 ratio.

[0062] Step 3: Using the training set obtained in Step 2, train the target detection model based on the hybrid feature pyramid fusion network to obtain the weight parameter file.

[0063] Step 3 includes the following sub-steps:

[0064] Step 3.1, Multi-scale Feature Acquisition: Input the training set images into the ResNet base network to extract image features, obtain the outputs of the second, third, fourth, and fifth convolutional modules of the ResNet network, and then use them as a feature pyramid for multi-scale prediction, containing feature maps of four different scales, denoted as {C2, C3, C4, C5}. Input the feature pyramid into MBA-Net for feature fusion processing, and output four scale feature maps {P2, P3, P4, P5} for the next step of the process.

[0065] In step 3.1, based on the Feature Pyramid Network, MBA-Net performs sufficient feature fusion on the multi-scale feature maps. MBA-Net uses ResNet as the base network for feature extraction. Assuming the number of feature pyramid layers is L, the outputs of the second, third, fourth, and fifth modules of the feature extraction network are combined to form the feature pyramid. Based on FPN, feature maps with the same size as the corresponding layers are generated from the outputs of the four different scales, denoted as {C2, C3, C4, C5}. First, sufficient multi-scale feature fusion is performed on {C2, C3, C4, C5} to generate {N2, N3, N4, N5}. The fusion process is as follows: Figure 2 As shown in the solid box, the feature maps at each scale in {N2, N3, N4, N5} are related to all feature maps in {C2, C3, C4, C5}. Detailed operation procedures are as follows... Figure 3As shown, {C2, C3, C4, C5} are reconstructed to the same size as {N2, N3, N4, N5} using both upsampling and downsampling methods, and then fused. The upsampling operation uses interpolation, while the downsampling uses a 3x3 convolutional kernel with a stride of 2. The fused {N2, N3, N4, N5} balances the imbalance between positional and semantic information in the feature maps at each scale.

[0066] To reduce information redundancy in feature maps at different scales and further enhance feature representation, attention extraction is performed on {N2, N3, N4, N5}. First, the features {N2, N3, N4, N5} at different levels are reconstructed to a size of N4 using interpolation or max pooling to obtain {F2, F3, F4, F5}. Then, their average is taken to obtain the balanced semantic feature F. b The index of the l-level feature is denoted as F. l The indices of the lowest and highest level features are denoted as l. min , l max ,in

[0067]

[0068] The fused balanced semantic features F b As input to the attention module, the feature map A is generated after the attention extraction operation. To feed back the balanced semantic feature information to each layer, the same but reversed process is used to reconstruct A to the same size as each layer, resulting in {A2, A3, A4, A5}. This A is then summed with {N2, N3, N4, N5} to obtain {P2, P3, P4, P5}. This process can be represented as follows:

[0069] P i =A i +N i i = 2, 3, 4, 5

[0070] Compared to {C2, C3, C4, C5}, {P2, P3, P4, P5} balances the differences between layers, enhances the original features of each layer, and reduces information redundancy in feature maps at each scale. The subsequent object detection process remains consistent with the original version.

[0071] Step 3.2, Region Proposal: Input the four scale feature maps {P2, P3, P4, P5} from Step 3.1 into the RPN network. Using a sliding box to traverse the feature maps, the RPN network generates initial anchor boxes, which are then fed into the classification and regression branches of the RPN network to determine whether the target belongs to the background class and to perform preliminary bounding box correction. After non-maximum suppression (NMS), a corresponding number of target boxes are selected, and their location information is recorded. The labeled class information and coordinate information are compared with the outputs of the RPN network's classification and regression branches to calculate the loss.

[0072] In step 3.2, the RPN network structure is as follows: Figure 4 As shown, the implementation process is as follows: First, a sliding box is used to traverse the feature map in a certain order. For each position in the feature map, it is transformed into an initial proposal box, named an anchor box. The nine initial proposal boxes are composed of three areas of 128×128, 256×256, and 512×512, and three aspect ratios of 1:1, 2:1, and 1:2. Then, the feature map of the corresponding anchor box region is input into the classification layer and the regression layer, respectively. A 1*1 convolutional kernel is used to classify the foreground target and regress the position of the bounding box, achieving accurate target detection.

[0073] Assume K = 9, representing the number of anchor boxes corresponding to a single pixel location. Each anchor box corresponds to two classification outputs (the probability of being foreground or not foreground), therefore the classification layer outputs a category probability value of length 2K. Furthermore, each anchor box corresponds to four positional parameters (the center coordinates of the anchor box, and the offsets of its length and width), therefore the regression layer outputs coordinate values ​​of length 4K.

[0074] Foreground object classification and bounding box regression use a loss function consisting of the cross-entropy function and the SmoothL1 function, as shown in the following formula:

[0075]

[0076] Among them, L cls Let p be the softmax classification loss function. i This represents the probability of the anchor box belonging to a specific category, calculated using the softmax function. The value can be 1 or 0. When the IoU value between the anchor box and the actual target box is greater than 0.7, The value is 1, meaning the IoU between the anchor box and the actual target box is less than 0.3. The value is 0. L reg For SmoothL1 regression loss, The translation and scaling parameters corresponding to the anchor box and the actual target box, including coordinates and size scaling, t i N represents the scaling value predicted by the network during training.cls N represents the number of anchor boxes used for classification. reg This represents the sum of the number of x and y coordinates corresponding to the four vertices of all anchor frames, where λ is used to balance N. cls and N reg The parameter is usually set to 10.

[0077] Finally, within the given region suggestion boxes, RPN selects 2000 optimal suggestion boxes using non-maximum suppression (NMS), records the location information, and inputs it into the next step of the process.

[0078] Step 3.3, ROI Pooling: The multi-scale feature map output from Step 3.1 and the region proposal output from Step 3.2 are simultaneously input into the ROI pooling layer. The ROI pooling layer pools the portion of the multi-scale feature map selected by the proposal box into a fixed-size feature map.

[0079] Step 3.4, Target Classification and Boundary Regression: The feature map obtained in Step 3.3 is input into the fully connected layer. After processing, the feature vector is obtained and then input into the final classification branch and regression branch of the model. The classification branch determines the specific target category of the bounding box, while the regression branch corrects the position coordinate information of the bounding box. The output information of the classification and regression branches is combined to achieve accurate detection of the target in the image. The annotated category information and coordinate information are compared with the output results of the final classification and regression branches of the model to calculate the loss.

[0080] In step 3.4, the loss functions for the classification and regression branches are the same as those for L({p) in step 3.2. i},{t i Consistent.

[0081] Step 3.5: Perform gradient backpropagation on the loss in the final classification and regression branches of the RPN network and model to update the object detection model parameters and save the optimal parameter model.

[0082] Step 4: Using the weight parameter file generated in Step 3, identify the test set images to generate target categories and detection boxes.

[0083] Step 4 includes the following sub-steps:

[0084] Step 4.1: Standardize the test image by enlarging or reducing it to a uniform size;

[0085] Step 4.2: Input the standardized image into the target detection model based on the hybrid feature pyramid fusion network, and import the pre-trained weight parameter file. Then perform the operations in steps 3.1, 3.2, 3.3, and 3.4 in sequence. Finally, output the target location information and classification results.

[0086] Here is a more specific example:

[0087] The PASCAL VOC2012 dataset was used as the validation dataset for the performance of the method in this invention. PASCAL VOC2012 has 21 classes, with a training set containing 5717 images and a test set containing 5823 images. The specific implementation is as follows:

[0088] Step 1: Collect sample data to form a standard format dataset for image recognition;

[0089] Step 2: Preprocess the sample data obtained in Step 1 and divide it into training set and test set;

[0090] Step 3: Using the training set obtained in Step 2, train the target detection model based on the hybrid feature pyramid fusion network to obtain the weight parameter file;

[0091] Step 4: Using the weight parameter file generated in Step 3, identify the test set images to generate target categories and detection boxes.

[0092] Comparative example:

[0093] The Faster R-CNN method was used for object detection experiments, and feature extraction was performed based on the Feature Pyramid Network (FPN). The same training and test sets as in the previous examples were used for the experiments.

[0094] In the tests of the examples and comparative examples, the performance metric used was Mean Accuracy (MAP), and the IoU threshold was set to 0.5. The MAP evaluation formula is as follows:

[0095]

[0096]

[0097]

[0098] Where R is recall, P is precision, TP is the number of positive samples that were correctly identified as positive, FN is the number of positive samples that were correctly identified as negative, and FP is the number of negative samples that were correctly identified as positive. TP+FN is the total number of positive samples, and TP+FP is the total number of samples that were correctly identified as positive.

[0099] TP and FP according to A threshold is used to determine the correct anchor, where A represents the manually labeled bounding box and B represents the anchor predicted by the detection model. Assuming the IOU threshold is 0.5, a sample is considered a TP (Targeted Tolerant) if the IOU is greater than 0.5, and otherwise a FP (Predicted Tolerant).

[0100] The final test results are shown in Table 1.

[0101] Table 1. Comprehensive Test Results of NWPU VHR-10 Dataset

[0102]

[0103] As shown in Table 1, based on the same feature extraction network, the test results of the embodiment are better than those of the comparative example, indicating that the method of the present invention improves the performance of the feature extraction process to a certain extent and achieves more accurate detection.

[0104] In summary, this invention addresses the challenging issues of feature imbalance in feature pyramid network feature fusion. Based on relevant theories, it designs a target detection model based on a hybrid feature pyramid fusion network. This model extracts initial image features through a multi-scale balanced attention feature pyramid network (MBA-Net) and fully fuses features at each level on the feature pyramid network (FPN) backbone. This promotes the full utilization of original image information by the feature maps participating in prediction. Simultaneously, an attention mechanism is used to enhance effective features in the fused feature maps, reducing information redundancy at each scale and further enhancing feature representation. The final model can achieve effective fusion of multi-scale features and accurate target detection in images.

[0105] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Those skilled in the art should understand that the technical solutions described in the above embodiments can still be improved and optimized, and some technical features can be equivalently replaced. These improvements or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A target detection method based on a hybrid feature pyramid fusion network, characterized in that, Includes the following steps: Step 1: Collect image samples to form a standard format dataset for image recognition; Step 2: Preprocess the image samples in the standard format dataset for image recognition and divide them into training and test sets; Step 3: Using the training set obtained in Step 2, train the target detection model based on the hybrid feature pyramid fusion network to obtain the weight parameter file; specifically: Step 3.1, Multi-scale Feature Acquisition: Input the training set images into the ResNet base network to extract image features, obtaining the outputs of the second, third, fourth, and fifth convolutional modules of the ResNet base network; use this output as the feature pyramid for multi-scale prediction, containing multi-scale feature maps of four different scales, represented as follows. Input the multi-scale balanced attention feature pyramid network MBA-Net to perform feature fusion of the feature pyramid, and output multi-scale feature maps of four scales. MBA-Net performs comprehensive feature fusion on multi-scale feature maps based on a feature pyramid network. MBA-Net uses a ResNet-based network for feature extraction. Specifically, the outputs of the second, third, fourth, and fifth modules of the feature extraction network are combined to form a feature pyramid, which has the following number of layers: ; Step 3.2, Region Proposal: Combine the four scale feature maps from Step 3.1 The input is fed into the RPN network. The RPN network first uses a sliding box to traverse the feature map and generate initial anchor boxes. Then, these anchor boxes are fed into the classification and regression branches of the RPN network to determine whether the target is a background class and to make preliminary corrections to the bounding boxes. Further, non-maximum suppression is used to select a corresponding number of target boxes, their position coordinate information is recorded, and region suggestions are output. In addition, the loss of the output results of the classification and regression branches of the RPN network is calculated. Step 3.3, ROI Pooling: The multi-scale feature map output from Step 3.1 and the region proposal output from Step 3.2 are simultaneously input into the ROI pooling layer. The ROI pooling layer pools a portion of the multi-scale feature map selected by the region proposal into a feature map of a fixed size. Step 3.4, Target Classification and Boundary Regression: The feature map obtained in Step 3.3 is input into the fully connected layer. After processing, feature vectors are obtained. These feature vectors are then input into the final classification branch and regression branch of the model, respectively. The classification branch determines the specific target category of the object in the bounding box, while the regression branch corrects the position coordinate information of the bounding box. Finally, the output information of the classification and regression branches is combined to achieve accurate target detection in the image. In addition, the loss of the output results of the final classification and regression branches of the model is calculated. Step 3.5: Perform gradient backpropagation on the losses of the RPN network and the final classification and regression branches of the model to update the parameters of the object detection model and save the optimal parameter model. Step 4: Using the weight parameter file generated in Step 3, identify the test set images to generate target categories and detection boxes.

2. The target detection method based on a hybrid feature pyramid fusion network according to claim 1, characterized in that, The specific method for step 1 is as follows: Step 1.1: Collect image samples containing specific targets; Step 1.2: Use annotation tools to annotate the bounding boxes and categories of the targets in the image to obtain a standard format dataset for image recognition.

3. The target detection method based on a hybrid feature pyramid fusion network according to claim 1, characterized in that, The specific method for step 2 is as follows: Step 2.1: Perform image enhancement and noise addition processing on the images in the standard format dataset for image recognition; Step 2.2: Standardize the images in the processed dataset and enlarge or reduce them to a uniform size. At the same time, the target annotation information is also enlarged or reduced proportionally. Step 2.3: Divide the standard format image recognition dataset into a training set and a test set in an 8:2 ratio.

4. The target detection method based on a hybrid feature pyramid fusion network according to claim 1, characterized in that, In step 3.1, the feature pyramid generates feature maps of the same size as the corresponding layer size from the outputs of the four different scales, denoted as... Then, for Perform multi-scale feature fusion to generate ; The feature map at each scale is and All feature maps are related; by using both upsampling and downsampling techniques, Reconstruct to For samples of the same size, a fusion operation is performed; interpolation is used for upsampling, and a 3x3 convolutional kernel with a stride of 2 is used for downsampling; the fused samples... It balances the imbalance between positional and semantic information in feature maps at different scales; To reduce information redundancy in feature maps at various scales and further enhance feature representation, the following measures are taken: The attention extraction operation is performed by first separating features from different levels. Reconstructed using interpolation or max pooling The size is obtained. Then, take their average value to obtain the balanced semantic features. ; The index of layer features is denoted as The indices of the lowest and highest level features are denoted as follows: , ,in ; The fused balanced semantic features As input to the attention module, the corresponding feature map is generated after the attention extraction operation. In order to feed back the balanced semantic feature information to each level, Reconstruct to the same size as each level, and obtain Then combine it with Perform the summation operation to obtain ,Right now 。 5. The target detection method based on a hybrid feature pyramid fusion network according to claim 1, characterized in that, In step 3.2, the implementation process of the RPN network is as follows: First, the feature map is traversed sequentially using a sliding bounding box, and each position in the feature map is converted into an initial proposal box, which is named an anchor box. The nine initial proposal boxes consist of three areas of 128×128, 256×256, and 512×512, and three aspect ratios of 1:1, 2:1, and 1:

2. Then, the feature map of the corresponding anchor box region is input into the classification layer and the regression layer, respectively. A 1*1 convolutional kernel is used to classify the foreground target and regress the position of the bounding box, thereby achieving accurate target detection. The foreground object classification and bounding box regression use a loss function consisting of the cross-entropy function and the SmoothL1 function, as shown in the following formula: ; in, The softmax classification loss function is used. The probability of the anchor box belonging to a category is calculated by the softmax function. The value can be 1 or 0. When the IoU value between the anchor box and the actual target box is greater than 0.7, The value is 1, meaning the IoU between the anchor box and the actual target box is less than 0.

3. The value is 0; For SmoothL1 regression loss, These are the translation and scaling parameters corresponding to the anchor box and the actual target box, including coordinates and size scaling. N represents the scaling value predicted by the network during training. cls N represents the number of anchor boxes used for classification. reg This represents the sum of the number of x and y coordinates corresponding to the four vertices of all anchor frames. For balancing N cls and N reg Parameters; Finally, among the given region suggestion boxes, 2000 optimal suggestion boxes are selected through non-maximum suppression, and their location coordinate information is recorded.

6. The target detection method based on a hybrid feature pyramid fusion network according to claim 5, characterized in that, In step 3.4, the loss functions for the classification and regression branches are the same as those in step 3.

2. Consistent.

7. The target detection method based on a hybrid feature pyramid fusion network according to claim 1, characterized in that, The specific method for step 4 is as follows: Step 4.1: Standardize the test image by enlarging or reducing it to a uniform size; Step 4.2: Input the standardized image into the target detection model based on the hybrid feature pyramid fusion network, and import the pre-trained weight parameter file. Then perform the operations in steps 3.1, 3.2, 3.3, and 3.4 in sequence, and finally output the target location information and classification results.

Citation Information

Patent Citations

  • Target detection method based on multi-scale feature fusion

    CN114118284A

  • Underwater target detection method based on depth multi-scale feature factor fusion

    CN114998603A