A target detection method that decouples localization and classification
By introducing positioning fine-tuning branches and classification fine-tuning branches into the target detection network, and screening candidate samples with IOU and category confidence, the problem of difficulty in compatibility between positioning and classification is solved, and the high-accurate target detection effect is achieved.
Patent Information
- Application Number
- CN202311084992.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2043-08-28
AI Technical Summary
The existing object detection methods are difficult to compatible with positioning and classification, resulting in difficult training convergence and inaccurate regression.
By constructing a target detection network that decouples positioning and classification, the positioning and classification of objects are used respectively using positioning and classification and classification and classification branches, and screening candidate samples based on IOU and category confidence.
It realizes effective decoupling of positioning and classification, improves the accuracy and stability of object detection, and achieves the most advanced results on the CoCo data set.
Smart Images

Figure CN117152508B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer vision, and in particular relates to a target detection method that decouples positioning and classification. Background Art
[0002] There are currently two main types of methods based on anchor-free object detection methods. The first type is a bottom-up method. This type of method first detects the key points of the target (such as corners, poles, etc.), and then aggregates these points to obtain the overall bounding box. Pioneering work such as Conernet [Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In Proceedings of the European Conference on Computer Vision (ECCV), pages 734-750, 2018.1, 7]. The second type of method is a top-down method. This type of method directly predicts the category and bounding box coordinates of the target on the feature map. Typical work such as Centernet [Kaiwen Duan, Song Bai, Lingxi Xie, et al. Centernet: Keypoint triplets for object detection. In The IEEE International Conference on Computer Vision (ICCV), October 2019.7].
[0003] Centernet defines positive samples as the position mapping of the ground truth center point on the feature map, and all other feature points are negative samples. During the inference process, the confidence of the target category at each position is generated by predicting the center point heat map, and then the maximum value pooling is performed on the feature map based on the value to determine the final foreground feature point, and the bounding box regression is performed on these feature points to obtain the final result. However, this positive and negative sample division method may have problems. Some positive sample labels have incorrect labels or poor label quality. Therefore, label noise is introduced during the training process, which mainly includes three categories: occluders, background features in the center area, and non-discriminative features on objects. These label noises will make it difficult for the network training to converge, because the category confidence of the positive label is difficult to improve. The root cause is that the positioning and classification functions of the network are difficult to be compatible, that is, the feature points that are most conducive to regressing the bounding box are not conducive to obtaining the highest category confidence, and vice versa.
[0004] The current anchor-free target detector based on the center point only uses the mapping of the center point of the target ground truth in the feature map as the positive label for training, but this method can easily introduce label noise, because some of the feature points of the positive label may be located on the background or occluded objects, or may not be discriminative features at all. That is, it is difficult for the bounding box obtained by ground truth center point regression to obtain a high category confidence, which makes the positioning and classification functions of the target detector incompatible.
[0005] In response to the incompatibility problem between positioning and classification, IOU-Net [Borui Jiang, Ruixuan Luo, Jiayuan Mao, et al. Acquisition of localization confidence for accurate object detection. In Proceedings of the European Conference on Compute rVision (ECCV), pages 784-799, 2018.1, 4, 7] was the first to provide a solution. It introduced an additional branch to predict IOU as the positioning confidence, and then aggregated the positioning confidence and classification confidence together as the final score. This method alleviates the ambiguity between positioning and classification to a certain extent, but there is still the problem of inaccurate regression. Two-headed RCNN [Yue Wu, Yinpeng Chen, Lu Yuan, et al. Rethinking classification and localization in r-cnn. arXiv preprint arXiv:1904.06493, 2019.1, 2, 4, 7] decomposes the ROI feature sharing head into two branches: classification and localization, which essentially reduces the shared parameters of the two tasks. However, because the features fed into the two branches are ROI pooled features from the same candidate box, the conflict between the two still exists.
[0006] In summary, the current target detection methods still have some problems. To this end, the present invention proposes a target detection method that decouples positioning and classification. Summary of the invention
[0007] The purpose of the present invention is to provide a target detection method that decouples positioning and classification to solve the problems existing in the above-mentioned prior art.
[0008] To achieve the above object, the present invention provides a target detection method for decoupling positioning and classification, comprising:
[0009] Construct a first target detection network, initialize the weights of the model, and obtain the backbone network of the first target detection network by combining Resnet101 and upsampling operations;
[0010] Obtain an image training data set, and iteratively train the initialized first object detection network based on the image training data set to obtain a second object detection network;
[0011] Obtaining an output feature map of each image in the image training data set through the second object detection network, converting the output feature map into three branches, including a center point heat map, an offset, and a bounding box parameter, and obtaining a first category confidence based on the center point heat map;
[0012] Constructing a positioning fine-tuning branch and a classification fine-tuning branch and training them, adding the trained branches to the backbone network of the second target detection network to obtain a third target detection network; fixing the weight parameters of the third target detection network at the position corresponding to the output end of the second target detection network, and training using an image training data set;
[0013] After constructing a predicted intersection-over-union branch and adding it to the backbone network of the trained third target detection network, a fourth target detection network is obtained and trained; after fixing the weight parameters set in the fourth target detection network, training is performed to obtain a final target detection model;
[0014] The image is input into the final target detection model to achieve target detection that decouples positioning and classification.
[0015] Optionally, the process of initializing the model weights includes:
[0016] The weights of the backbone network of the first target detection network are pre-trained under the ImageNet dataset, and the other weights of the first target detection network are initialized under the default settings of Pytorch.
[0017] Optionally, the process of obtaining the second object detection network includes:
[0018] The image training data set is subjected to data enhancement processing, the resolution of the image is adjusted, and the image is scaled to a preset size; a first target detection network is trained with the processed image training data set using a synchronous BatchNorm mechanism, and a stochastic gradient descent method is used to optimize the training loss, wherein the training loss includes a center point heat map loss, a center point offset loss, and a bounding box parameter loss.
[0019] Optionally, the second target detection network downsamples the feature map at the top of the backbone network and outputs a feature map that meets a preset ratio with the input image, uses bilinear interpolation to upsample the deep feature map to the same size as the shallow layer, and refines the feature map through 3x3 convolution. After connecting the refined deep feature map with the shallow feature map, the channel direction features are refined through 1x1 convolution to obtain the output feature map, and candidate samples are obtained based on the feature output map; wherein all hidden layers use BatchNorm and RELU activation.
[0020] Optionally, the positioning fine-tuning branch uses a full convolution structure when outputting candidate boxes and regressing final bounding box parameters;
[0021] The offset of the candidate sample is obtained through three layers of convolution, and the candidate box is obtained according to the offset;
[0022] The output feature map of the candidate sample is obtained through the second target detection network. After the output feature map is calibrated for the region of interest, it is sequentially input into two convolutional layers, a global average pooling layer, and a fully connected layer to obtain the bounding box parameters.
[0023] Optionally, the classification fine-tuning branch performs a deformable ROI pooling operation on the prediction box of the candidate sample to obtain an irregular candidate box; after the prediction box of the candidate sample is pooled, the second category confidence is obtained through two fully connected layers.
[0024] Optionally, the process of training the positioning fine-tuning branch and the classification fine-tuning branch includes:
[0025] The first category confidence and the first prediction box of each image in the image training data set are obtained through the second target detection network; the real target box of the image is obtained, the intersection and union ratio of the first prediction box and the real target box is calculated, and candidate samples are obtained by sorting based on the intersection and union ratio and the first category confidence; and the positioning fine-tuning branch and the classification fine-tuning branch are trained through the candidate samples.
[0026] Optionally, during the training process, the positioning fine-tuning branch adopts the positioning loss in Faster-RCNN and the classification fine-tuning branch adopts the multi-classification loss in Faster-RCNN.
[0027] Optionally, when the fourth target detection network is trained, the total loss function is the sum of the loss function of the second target detection network and the prediction intersection-over-union branch loss function.
[0028] Optionally, the set weight parameter is a weight parameter of the prediction intersection-over-union branch.
[0029] The technical effects of the present invention are:
[0030] Compared with the previous method of screening candidate samples only by IOU, the present invention selects candidate samples for the second stage of fine-tuning by the comprehensive score of IOU and category confidence, and since Centernet itself can output the center point heat map reflecting the category confidence, no additional parameters need to be added during the training process; two branches are used after the backbone network to solve the positioning and classification of objects respectively, which is different from the mainstream method for solving such problems, the two-headed RCNN. After selecting the candidate samples, the positioning and classification branches respectively generate different ROI candidate areas, which can generate different feature representations for positioning and classification tasks; during the training process, candidate samples are jointly selected by IOU and category confidence, and an additional convolutional layer is added after the backbone network during inference to obtain the IOU score of each prediction box to ensure the consistency of reasoning and training; under the CoCo dataset, the single-model target detection algorithm of the present invention with Resnet-101 as the backbone network has achieved the most advanced effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0032] Figure 1 is a flow chart of a method in an embodiment of the present invention;
[0033] Figure 2 The diagram is a diagram of the Centernet network structure in an embodiment of the present invention;
[0034] Figure 3 A structural diagram of a positioning fine-tuning branch and a classification fine-tuning branch in an embodiment of the present invention;
[0035] Figure 4 The figure is a visualization diagram of the candidate boxes and the final detection results of an embodiment of the present invention on CoCo test-dev. DETAILED DESCRIPTION
[0036] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0037] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] Embodiment 1
[0039] like Figure 1-4As shown, this embodiment provides a target detection method for decoupling positioning and classification, including:
[0040] (1) The weights are initialized by pre-training on the ImageNet dataset, and the configuration of hyperparameters follows the existing Centernet.
[0041] (2) Centernet is trained on the CoCo training set. Its network structure is as follows: Figure 2 As shown, the center point heat map can obtain the category confidence of the object, and the center point offset and the width and height of the bounding box can obtain the bounding box of the object.
[0042] (3) In the backbone network (i.e. Figure 2 The part before the dotted box, including Resnet101 and its upsampling part), is then followed by the positioning fine-tuning branch and the classification fine-tuning branch, as shown in Figure 3 shown.
[0043] (4) Fixed Centernet output terminal ( Figure 2 The weight parameters of the network (the part in the dotted box in the middle) are used to train the entire network (backbone network, positioning fine-tuning branch and classification fine-tuning branch) under the CoCo training set. The candidate samples entering the two branches are selected after forward transmission by Centernet. First, the center point heat map can get the category confidence of the object, and then the IOU value of the predicted box and the ground truth is calculated. Finally, the average of the category confidence and IOU is calculated, and the top 30 are taken as candidate samples.
[0044] (5) Copy the weights obtained in step (4) and add a branch for predicting IOU after the backbone network. Its structure is consistent with the part for predicting the center point heat map, and train Centernet again.
[0045] (6) Repeat step (4) and train the entire network again.
[0046] Further explanation is as follows:
[0047] In step 1, the weights of the Centernet backbone network are pre-trained under the ImageNet dataset. Other weights are initialized under the default settings of Pytorch. The image resolution is uniformly adjusted to 256x256, Adam is used as the network optimizer, and the learning rate is set to 0.0001.
[0048] Step 2: Train Centernet on the CoCo training set, adjust the image resolution so that the shorter side is 800 pixels, and keep the original aspect ratio. Train 10 iterations on 4 NVIDIA GeForce RTX 3090 graphics cards, with a batch size of 32, an initial learning rate of 0.00125, and use stochastic gradient descent (SGD) to optimize the training loss, with a momentum of 0.9% and a weight decay coefficient of 0.0001. Except for horizontal flipping, no data enhancement is used, and the synchronized BatchNorm mechanism [Chao Peng, Tete Xiao, Zeming Li, et al. Megdet: A large mini-batch object detector. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6181-6189, 2018.5] is used to make multi-GPU training more stable.
[0049] Furthermore, the Centernet network structure is as follows Figure 2 As shown in the figure, it is based on the U-net [Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015.], using Resnet-101 cov1-5 as the backbone. At the top of the backbone network, the feature map is downsampled and a feature map 4 times smaller than the input image is output (scales = 4). In the upsampling process, the deep layer and the shallow layer are combined together through jump connections, sharing both high-level semantic information and underlying fine details. In the upsampling process, the deep layer is first upsampled to the same size as the shallow layer through bilinear interpolation, and then the feature map is refined through 3x3 convolution. Then, the refined feature map is connected to the shallow layer, and then 1x1 convolution is used to refine the channel-wise features. All hidden layers use BatchNorm and RELU activation. Assume that the input RGB image is Where H and W are the height and width of the image, and then the output feature map Transformed into 3 branches, center point heat map Offset Bounding box parameters Where K is the number of categories in the dataset.
[0050] Furthermore, the training loss refers to the 2D object detection loss in the original Centernet text, which includes the center point heat map loss L h , center point offset loss L o and the bounding box parameter loss L b .
[0051] Step 3: Add the positioning fine-tuning branch and the classification fine-tuning branch after the backbone network.
[0052] Inspired by the dual-head RCNN, the fully convolutional structure is more suitable for target positioning, and the fully connected structure is more suitable for target classification. Therefore, the present invention adopts a similar network structure, such as Figure 3 However, unlike the two-headed RCNN, the present invention further reduces the shared parameters of the two task branches on this basis, that is, the positioning and classification branches generate different ROI candidate regions respectively, so as to better generate different feature representations for positioning and classification tasks.
[0053] Specifically, for the positioning fine-tuning branch, a full convolution structure is used when outputting candidate boxes and regressing the parameters of the final bounding box. Inspired by RepPoints [Ze Yang, Shaohui Liu, Han Hu, et al. RepPoints: Point Set Representation for Object Detection. 2019 IEEE International Conference on Computer Vision (ICCV2019), pages 9656-9665], the convolution offset of each feature point is directly predicted after the backbone network to obtain the candidate box. The offset domain is the eight-domain area of each feature point. Each candidate box corresponds to 9 offset feature points. The offset includes the offset in both horizontal and vertical directions. The final offset direction is synthesized by the two. Therefore, 18 channels of feature maps are required to output the offset of each feature point, that is, this part outputs the feature map In the implementation process, the maximum-minimum operation in the RepPoints paper is used to obtain the final candidate box. However, unlike RepPoints, we do not use its two-stage regression method, that is, there is no deformable convolution operation, and simply obtain all offsets through 3 layers of convolution. The output of the candidate box is calculated by the point loss L in the original RepPoints paper. pAfter obtaining the candidate box, the ROIAlign operation is performed on the feature map X output by the backbone network, and its grid size is 7x7. It is followed by two 1024-channel 3x3 convolutions and global average pooling to obtain a 1x1024-dimensional vector. Finally, the bounding box parameters are obtained through full connection. The regression of the bounding box parameters uses the positioning loss L in the Faster-RCNN [Shaoqing Ren, Kaiming He, Ross Girshick, et al. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. 1, 2, 3, 5] paper. loc Conduct training.
[0054] For the classification fine-tuning branch, the candidate box output by Centernet in the previous stage is directly used, and then the deformable ROI Pooling operation is applied to the feature map X output by the backbone network, with a grid size of 3x3, followed by two fully connected layers to obtain a 1x1024-dimensional vector, and then a layer of full connection is used to obtain the category confidence. The calculation of category confidence uses the multi-classification loss L in the Faster-RCNN paper cls After the candidate box is determined, deformable ROIPooling is deformed point by point on the 3x3 grid. For the (x,y)th grid, the sample point is translated by ΔC(x,y,*) to obtain a new sample point, where * represents the horizontal and vertical directions. This process is represented by the following formula:
[0055]
[0056] here F is the ROI feature of the candidate box, It is a two-layer fully connected network, the output of each layer is {256, 3×3×2}, θ c is a learnable parameter. Feature map after deformable ROI Pooling (Irregular candidate box) can be expressed as follows:
[0057]
[0058] Here G(x,y) represents the (x,y)th grid, G(x,y) is the number of sampling points in the grid, (a x ,a y) are the coordinates of the sampling points in the grid G(x,y), represents bilinear interpolation, which can make ΔC differentiable.
[0059] Step 4: Fix the output of Centernet after the training in step 2 is completed ( Figure 2 The weight parameters of the network are shown in the dashed box in the figure, and the entire network is trained under the CoCo training set.
[0060] During the training process, the Centernet trained in step 2 is used to select candidate samples for the positioning fine-tuning branch and the classification fine-tuning branch. Specifically, the center point heat map can first obtain the category confidence of the object, and then the prediction box is obtained through the center point offset and the width and height parameters of the bounding box, and the IOU value of the prediction box and the ground truth is calculated. Finally, the average of the category confidence and IOU is calculated, and the top 30 are taken as candidate samples. The positioning fine-tuning branch obtains the candidate box by regressing the convolution offset of the feature points of the candidate sample, and the classification fine-tuning branch obtains the irregular candidate box by deformable ROIPooling the prediction box of the candidate sample. The two branches only calculate the loss of these candidate samples during training. This step is trained on 4 NVIDIA GeForce RTX 3090 graphics cards for 13 iterations, with a batch size of 48. In the first iteration, the learning rate warm-up strategy [Priya Goyal, Piotr Dollar, Ross Girshick, et al. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.5] is used to increase the learning rate from 0.00125 to 0.04, and the learning rate is reduced by 10% in the 8th and 11th iterations. The other training settings are the same as step 2. Referring to the description of steps 2 and 3, the loss function of the training in this step is defined as:
[0061]
[0062] Step 5: Add a branch for predicting IOU after the backbone network and train Centernet again.
[0063] Specifically, a branch prediction IOU is added after the backbone network outputs the feature map X. Similar to the process of generating the center point heat map, the IOU heat map is obtained through a layer of 3x3 convolution and a layer of 1x1 convolution. In this way, the reasoning process can also be consistent with the training process, and the candidate samples can be screened by combining IOU and category confidence. When training Centernet again, the weights of its backbone network directly copy the results of step 4 training, the number of iterations is 5, and other training settings are the same as step 2. The training loss in this step adds the IOU prediction loss, which can be obtained by calculating the intersection-over-union ratio IOU (b, g) between the predicted box and the ground truth. The IOU loss is defined as:
[0064] L IOU =1-IOU(b,g)
[0065] Therefore, the total loss in this step is:
[0066] L centernet =L h +L o +L b +L IOU
[0067] Step 6: Repeat step 4, replace the related operations of step 2 in step 4 with step 5, and train the entire network again. It is worth mentioning that the IOU prediction branch added in step 5 does not need to be trained in this step. This branch is only used for forward propagation during the final inference.
[0068] During the reasoning process, Soft-NMS [Navaneeth Bodla, Bharat Singh, Rama Chellappa, et al. Soft-nms-improving object detection with one line of code. In Proceedings of the IEEE international conference on computer vision, pages 5561-5569, 2017.7] is used for post-processing to complete the final output. We evaluated the object detection method proposed in this invention on the CoCo test-dev set. The results of different single model algorithms evaluated on the CoCo test-dev are shown in Table 1.
[0069] For fair comparison, we report the results of our method under different settings, where b&w denotes training with additional features, such as multi-scale training / testing, Cascade-R-CNN[Zhaowei Cai and Nuno Vasconcelos.Cascade r-cnn:Delving into high quality object detection.InProceedings of the IEEE conference on computer vision and pattern recognition,pages 6154-6162,2018.7], or Dropblock[Golnaz Ghiasi,Tsung-Yi Lin,andQuoc V Le.Dropblock:A regularization method for convolutional networks.InAdvances in Neural Information Processing Systems,pages 10727-10737,2018.7].
[0070] Table 1
[0071]
[0072]
[0073] In the table, the first comparison scheme is the scheme proposed by Lin et al. [Tsung-Yi Lin, Piotr Dollár, Ross Girshick, et al. Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2117-2125, 2017.1, 7], the second comparison scheme is the dual-head RCNN, the third comparison scheme is RepPoints, the fourth comparison scheme is the scheme proposed by Li et al. [Yanghao Li, Yuntao Chen, Naiyan Wang, et al. Scale-aware trident networks for object detection. arXiv preprint arXiv: 1901.01892, 2019.7], and the fifth comparison scheme is the scheme proposed by Singh et al. [Bharat Singh, Mahyar Najibi, and Larry SDavis. Sniper: Efficient multi-scale training. In Advances in Neural Information Processing Systems, pages 9310-9320,2018.7], and the comparison scheme 6 is the scheme proposed by Cao et al. [YueCao, Jiarui Xu, Stephen Lin, et al. Gcnet: Non-local networks meet squeeze-excitation networks and beyond. arXiv preprint arXiv:1904.11492,2019.7]. The scheme of the present invention is a scheme with Resnet-101 as the backbone network and no IOU prediction branch. The scheme of the present invention is a scheme with Resnet-101-DCN as the backbone network and no IOU prediction branch. The scheme of the present invention It is a solution with Resnet-101-DCN as the backbone network and an IOU prediction branch. It can be seen from Table 1 that for the single-model algorithm with Resnet-101 as the backbone, the results of the solution of the present invention are the most advanced. At the same time, the AP value of the best single-model Resnet-101-DCN is 50.7, which has exceeded other methods with the same backbone network. In addition, in the evaluation index with a higher IOU threshold (AP. 75 ) and small object detection (APs ) aspects, the method of the present invention has achieved more leading, in the scheme of the present invention By comparing with the solution of the present invention*, it can be found that using the IOU prediction branch in reasoning can indeed comprehensively improve the final detection effect.
[0074] Figure 4 The visualization effect of the positioning fine-tuning branch and the classification fine-tuning branch in the present invention on CoCo test-dev is shown. The white solid-line frame in the first row represents the original candidate frame obtained by Centernet, the gray solid-line frame represents the candidate frame obtained by the positioning fine-tuning branch, and the white dot (the center point of each grid) represents the irregular candidate frame obtained by the classification fine-tuning branch. The second row is the final detection frame, and the white dotted frame represents the ground truth. As expected, the positioning fine-tuning branch is more inclined to regress the boundary of the object, while the classification fine-tuning branch is more inclined to focus on the local appearance and contextual semantic information of the object, which shows that deformable ROI Pooling plays a corresponding role.
[0075] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A target detection method for decoupling positioning and classification, characterized in that: The following steps are involved: Construct a first target detection network, initialize the weights of the model, and obtain the backbone network of the first target detection network by combining Resnet101 and upsampling operations; Obtain an image training data set, and iteratively train the initialized first object detection network based on the image training data set to obtain a second object detection network; Obtaining an output feature map of each image in the image training data set through the second object detection network, converting the output feature map into three branches, including a center point heat map, an offset, and a bounding box parameter, and obtaining a first category confidence based on the center point heat map; Constructing a positioning fine-tuning branch and a classification fine-tuning branch and training them, and adding the trained branches to the backbone network of the second object detection network to obtain a third object detection network; After fixing the weight parameters of the position corresponding to the output end of the second object detection network in the third object detection network, training is performed using the image training data set; After constructing a prediction intersection-over-union branch and adding it to the backbone network of the trained third object detection network, a fourth object detection network is obtained and trained; Fixing the weight parameters set in the fourth target detection network and then performing training to obtain a final target detection model; The second object detection network downsamples the feature map at the top of the backbone network and outputs a feature map that meets a preset ratio with the input image, uses bilinear interpolation to upsample the deep feature map to the same size as the shallow layer, refines the feature map through 3x3 convolution, connects the refined deep feature map with the shallow feature map, and refines the channel direction features through 1x1 convolution to obtain the output feature map, and obtains candidate samples based on the feature output map; wherein all hidden layers are activated by BatchNorm and RELU; The positioning fine-tuning branch uses a full convolution structure when outputting candidate boxes and regressing the parameters of the final bounding box; The offset of the candidate sample is obtained through four layers of convolution, and the candidate frame is obtained based on the offset; Obtaining an output feature map of the candidate sample through the second object detection network, calibrating the region of interest on the output feature map, and sequentially inputting the output feature map into two convolutional layers and a global average pooling layer to obtain bounding box parameters; The classification fine-tuning branch performs a deformable ROI pooling operation on the prediction box of the candidate sample to obtain an irregular candidate box; after the prediction box of the candidate sample is pooled, the second category confidence is obtained through two fully connected layers; The process of training the localization fine-tuning branch and the classification fine-tuning branch includes: Obtaining the first category confidence and the first prediction box of each image in the image training data set through the second target detection network; obtaining the real target box of the image, calculating the intersection-over-union ratio of the first prediction box and the real target box, and sorting to obtain candidate samples based on the intersection-over-union ratio and the first category confidence; training the positioning fine-tuning branch and the classification fine-tuning branch through the candidate samples; During the training process, the positioning fine-tuning branch uses the positioning loss in Faster-RCNN, and the classification fine-tuning branch uses the multi-classification loss in Faster-RCNN; The image is input into the final target detection model to achieve target detection that decouples positioning and classification.
2. The target detection method for decoupling positioning and classification according to claim 1, characterized in that: The process of initializing the model's weights includes: The weights of the backbone network of the first target detection network are pre-trained under the ImageNet dataset, and the other weights of the first target detection network are initialized under the default settings of Pytorch.
3. The target detection method for decoupling positioning and classification according to claim 1, characterized in that: The process of obtaining the second object detection network includes: The image training data set is subjected to data enhancement processing, the resolution of the image is adjusted, and the image is scaled to a preset size; a first target detection network is trained with the processed image training data set using a synchronous BatchNorm mechanism, and a stochastic gradient descent method is used to optimize the training loss, wherein the training loss includes a center point heat map loss, a center point offset loss, and a bounding box parameter loss.
4. The target detection method for decoupling positioning and classification according to claim 1, characterized in that: When the fourth target detection network is trained, the total loss function is the sum of the loss function of the second target detection network and the prediction intersection-over-union branch loss function.
5. The target detection method for decoupling positioning and classification according to claim 1, characterized in that: The set weight parameter is the weight parameter of the prediction intersection-over-union branch.
Citation Information
Patent Citations
Weak supervision visual target detection method based on semantic segmentation and instance re-detection
CN116310299A