Directed target detection method fusing multi-scale context and task consistency focus loss
By introducing multi-scale context branches and task consistency focus loss into the Oriented RCNN model, the problems of target misclassification and positioning consistency in remote sensing images are solved, and the accuracy of target detection is improved.
Patent Information
- Application Number
- CN202510799188.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-23
AI Technical Summary
Existing directed target detection methods are prone to target misclassification in remote sensing images and the loss function is unable to enhance the consistency between target classification and target positioning.
Introducing multi-scale context branches and task-consistent focus loss, by introducing multi-scale context branches into the Oriented RCNN model, combined with task-consistent focus classification loss and task-consistent focus regression loss, the object detection accuracy is improved.
The probability of target misclassification is reduced, the consistency between target classification and target positioning is enhanced, and the target detection accuracy is improved.
Smart Images

Figure CN120689765A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and in particular to a directed target detection method. Background Art
[0002] Directed target detection is one of the most important tasks in the field of optical remote sensing image processing and a key technology for remote sensing big data information mining and extraction. It is dedicated to identifying and accurately locating high-value ground objects in remote sensing images. It has been widely used in military and security monitoring, intelligent transportation and autonomous driving, agriculture and resource monitoring and other fields, and has important civil and military value.
[0003] Current directed object detection methods can be roughly divided into three categories: anchor-based one-stage directed object detection, anchor-based two-stage directed object detection, and anchorless directed object detection. Anchor-based one-stage directed object detection methods predefine multiple anchors for each feature point and use a fully convolutional network to predict the class confidence score and position offset for each anchor. The main difference between one-stage and two-stage directed object detection methods lies in whether a region proposal network is used. Two-stage directed object detection methods first use a region proposal network to generate multiple regions of interest and then predict the class confidence score and position offset for each region of interest. Anchorless directed object detection models directly predict the distance between each feature point and the top, bottom, left, and right sides of the corresponding oriented bounding box, as well as the class confidence score and angle of the oriented bounding box. Currently, two-stage directed object detection models have demonstrated advantages in detection accuracy when computing resources are sufficient, and therefore continue to attract attention.
[0004] For example, the existing method Oriented RCNN ([X.Xie, G.Cheng, J.Wang, K.Li, X.Yao, and J.Han, “Oriented r-cnn and beyond,” International Journal of Computer Vision, pp.1–23, 2024.]) solves the contradiction between accuracy and efficiency in oriented detection through parameter innovation (midpoint offset) and structural optimization (lightweight RPN). However, despite the significant progress made in two-stage oriented object detection methods, the following two issues still need to be addressed:
[0005] 1) Target misclassification. Directed target detection tasks mostly occur in remote sensing images. Compared with natural scene images, remote sensing images have more significant intra-class diversity and inter-class similarity. However, the current two-stage directed target detection method only relies on the features of each directed candidate box to detect the target. In this case, the problem of target misclassification is very easy to occur;
[0006] 2) The loss functions used in existing directed object detection methods cannot enhance the consistency between object classification and object localization while focusing on difficult samples. Summary of the Invention
[0007] In response to the above technical problems, the present invention proposes an oriented target detection method that integrates multi-scale context and task-consistent focus loss. By introducing a multi-scale context branch on the basis of Oriented RCNN, target misclassification is reduced, and task-consistent focus classification loss and task-consistent focus regression loss are introduced to achieve the goal of focusing on difficult samples while enhancing the consistency between target classification and target positioning, thereby improving the target detection accuracy.
[0008] In order to achieve the above object, the technical solution of the present invention is achieved as follows:
[0009] A directed object detection method that integrates multi-scale context and task-consistent focal loss, such as Figure 1 As shown, the steps include:
[0010] S1: Constructing the MSC-TF model, including the first-stage model and the second-stage model, and introducing the multi-scale context branch in the second-stage model; the first-stage model generates directed candidate boxes by processing the input remote sensing image, and the second-stage model outputs regression results and multi-scale classification results based on the directed candidate boxes;
[0011] S2: In the training phase, task-consistent focus classification loss and task-consistent focus regression loss are introduced to train the second-stage model;
[0012] S3: In the inference stage, the weighted average multi-scale classification results are combined with the regression results to output the detection box containing the target category and location information in the input image.
[0013] Furthermore, the first-stage model includes an input layer, a backbone network and a directed candidate box generation network connected in sequence; the forward propagation processing process of the first-stage model is: the backbone network extracts features of the input remote sensing image and then generates a directed candidate box X through the directed candidate box generation network.
[0014] Furthermore, the second stage model includes a magnification operation, a rotation region of interest alignment operation, a parallel directional target detection head module and a multi-scale context branch module; the directional target detection head module includes a classification branch and a regression branch, the classification branch input end and the regression branch input end are both connected to the feature map generated by the rotation region of interest alignment operation, and the regression branch output end is connected to the output layer; the multi-scale context branch module includes N context branches and a weighted fusion module, the N context branch input ends are both connected to the feature map generated by the rotation region of interest alignment operation, the N context branch output ends and the classification branch output end are both connected to the weighted fusion module, the weighted fusion module is connected to the output layer, and each context branch CB n Both include a first fully connected layer, a second fully connected layer, and a softmax classifier connected in sequence.
[0015] Furthermore, the forward propagation process of the second stage model is as follows: the directed candidate box X is magnified according to the magnification ratio α n To zoom in, α n =α1+0.05(n-1), n∈[1,N], generates N enlarged directional candidate boxes EP n Then, the directional candidate box X and the enlarged N directional candidate boxes are rotated and aligned to obtain the feature map X0 and the multi-scale context feature map F. n ', the classification branch obtains the category confidence score sp output by the classification branch according to the feature map X0, and the regression branch obtains the offset between the directional candidate box X and the true value box position according to the feature map X0; each context branch CB n For the context feature map F n 'Perform classification processing to obtain N enlarged directional candidate boxes EP output by N context branches n The category confidence score sc n .
[0016] Furthermore, the training method of the training phase is as follows: input the training set, perform forward propagation based on the MSC-TF model, and calculate the loss L of the directed candidate box generation network. RPN , according to N context branches CB n The output N scale category confidence scores sc n Calculate the cross entropy loss for each context branch The task consistency focus classification loss L is calculated based on the category confidence score sp output by the classification branch and the intersection and union ratio between the directed candidate box and the true value box TFC and task-consistent focal regression loss L TFR , calculate the total loss L T , according to the total loss L TUse back propagation to update the network parameters of the first-stage model and the second-stage model.
[0017] Furthermore, the implementation method of the reasoning stage is as follows: input a test set, perform forward propagation based on the MSC-TF model, calculate the category confidence score output by the classification branch and the category confidence scores output by N context branches, and the weighted fusion module obtains the final category confidence score s of the oriented candidate box by weighted average. Based on the final category confidence score s and the position offset predicted by the regression branch in the oriented target detection head, the final category of each oriented candidate box and the spatial position corrected by the position offset are determined, and the final target detection result is obtained through non-maximum suppression operation.
[0018] Furthermore, the task consistency focus classification loss is:
[0019]
[0020] Among them, C GT represents the category label of the true value box, CE(·) represents the cross entropy loss function, and Ω P and Ω N Represent the positive sample set and the negative sample set respectively, IoU represents the intersection-over-union ratio between the directional candidate box and the true value box, λ1>0 represents the adjustment parameter, L FL represents focal loss.
[0021] Furthermore, the task consistency focus regression loss is:
[0022]
[0023] Among them, λ2>0 is the adjustment parameter, L reg is the smooth L1 loss function.
[0024] Furthermore, the total loss is:
[0025]
[0026] in,
[0027] Furthermore, the weighted average is calculated as follows:
[0028]
[0029] The beneficial effects of the present invention are:
[0030] On the one hand, the introduction of multi-scale context branches can reduce the probability of target misclassification, thereby improving target detection accuracy. There is a close contextual relationship between each target and its neighboring areas. Therefore, the present invention uses the features of each directional candidate box and its adjacent areas to jointly classify, taking into account the different sizes of neighborhoods of different types of objects in different scenarios, that is, taking into account the multi-scale characteristics of the neighborhood, avoiding the limitations of single-scale analysis to solve the misclassification problem. On the other hand, the introduction of task-consistent focus classification loss and task-consistent focus regression loss can enhance the consistency between target classification and target positioning while focusing on difficult samples, thereby improving target detection accuracy. Task-consistent focus classification loss uses the difficulty of positioning as the weight of traditional classification loss, and task-consistent focus regression loss uses the difficulty of recognition as the weight of traditional regression loss. By minimizing the sum of task-consistent focus classification loss and task-consistent focus regression loss, difficult samples can be processed centrally, and classification and regression can be optimized simultaneously, thereby improving target detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0032] Figure 1 It is a structural schematic diagram of the present invention.
[0033] Figure 2 This is the experimental visualization result of the present invention. DETAILED DESCRIPTION
[0034] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0035] A directional object detection method that integrates multi-scale context and task-consistent focal loss. Figure 1 As shown, the steps are:
[0036] S1: Construct an MSC-TF (Multi-scale context-Task Consistent Focal Loss) model, which includes the first-stage model and the second-stage model. The multi-scale context branch is introduced in the second-stage model. The first-stage model generates directed candidate boxes by processing the input remote sensing image. The second-stage model outputs regression results and multi-scale classification results based on the directed candidate boxes.
[0037] In this example, experiments were conducted on the public dataset DOTA [Gui-Song Xia, Xiang Bai, Jian Ding, Zhen Zhu, Serge Belongie, Jiebo Luo, Mihai Datcu, Marcello Pelillo, and Liangpei Zhang. Dota: A large-scale dataset for object detection in aerial images. In CVPR, pages 3974–3983, 2018.].
[0038] The DOTA dataset contains a total of 2,806 images, 1,411 of which are used as training, 458 as validation, and 937 as testing. For model training, each remote sensing image is cropped into multiple image patches with a resolution of 1024×1024 and a stride of 824.
[0039] The first-stage model includes an input layer, a backbone network, and a directed candidate box generation network (the two modules are collectively referred to as an Oriented RPN) connected in sequence. The forward propagation process is as follows: the backbone network extracts features from the input remote sensing image and then generates a directed candidate box X through the directed candidate box generation network.
[0040] The second stage model includes a magnification operation, a rotation region of interest alignment operation, a parallel directed target detection head module and a multi-scale context branch module; the directed target detection head module includes a classification branch and a regression branch, the classification branch input end and the regression branch input end are both connected to the feature map generated by the rotation region of interest alignment operation, and the regression branch output end is connected to the output layer; the multi-scale context branch module includes three context branches and a weighted fusion module, the three context branch input ends are all connected to the feature map generated by the rotation region of interest alignment operation, the three context branch output ends and the classification branch output end are all connected to the weighted fusion module, the weighted fusion module is connected to the output layer, and each context branch CB n Both include a first fully connected layer, a second fully connected layer, and a softmax classifier connected in sequence.
[0041] The forward propagation process of the second stage model is as follows: the directed candidate box X is magnified according to the magnification ratio α n To zoom in, α n =α1+0.05(n-1), n∈[1,3], generate 3 enlarged directional candidate boxes EP n Then, the directional candidate box X and the three magnified directional candidate boxes are rotated and aligned to obtain the feature map X0 and the multi-scale context feature map F. n ', the classification branch obtains the category confidence score sp output by the classification branch according to the feature map X0, and the regression branch obtains the offset between the directional candidate box X and the true value box position according to the feature map X0; each context branch CB n For the context feature map F n 'Perform classification processing to obtain 3 enlarged directional candidate boxes EP output by 3 context branches n The category confidence score sc n .
[0042] S2: In the training stage, task-consistent focus classification loss and task-consistent focus regression loss are introduced to train the second-stage model.
[0043] The training phase process is as follows: input the training set, perform forward propagation based on the MSC-TF model, and calculate the loss L of the directed candidate box generation network. RPN , according to 3 context branches CB n The output of the three scales of category confidence score sc n Calculate the cross entropy loss for each context branch The task consistency focus classification loss L is calculated based on the category confidence score sp output by the classification branch and the intersection and union ratio between the directed candidate box and the true value box TFC and task-consistent focal regression loss L TFR , calculate the total loss L T , according to the total loss L T Use back propagation to update the network parameters of the first-stage model and the second-stage model.
[0044] The cross entropy loss of each context branch is for:
[0045]
[0046] Among them, C GT represents the category label of the ground-truth box, and CE(·) represents the cross entropy loss function.
[0047] The task consistency focus classification loss L TFC for:
[0048]
[0049] Among them, Ω P and Ω N Represent the positive sample set and the negative sample set respectively, IoU represents the intersection-over-union ratio between the directional candidate box and the true value box, L FL is the focus loss, and λ1=0.6 represents the adjustment parameter.
[0050] The task consistency focus regression loss L TFR for:
[0051]
[0052] Among them, λ2=0.1 is the adjustment parameter, L reg is the smooth L1 loss function.
[0053] The total loss L T for:
[0054]
[0055] S3: In the inference stage, the weighted average multi-scale classification results are combined with the regression results to output the detection box containing the target category and location information in the input image.
[0056] The reasoning phase process is as follows: input the test set, perform forward propagation based on the MSC-TF model, calculate the category confidence score output by the classification branch and the category confidence score sc output by the three context branches n , obtain the final category confidence score s of each oriented candidate box by weighted average:
[0057]
[0058] Based on the final category confidence score s and the position offset predicted by the regression branch in the oriented object detection head, the final category of each oriented candidate box and its spatial position after position offset correction are determined; finally, the final object detection result is obtained through non-maximum suppression operation.
[0059] The method uses Oriented R-CNN [X. Xie, G. Cheng, J. Wang, K. Li, X. Yao, and J. Han, “Oriented r-cnn and beyond,” International Journal of Computer Vision, pp. 1–23, 2024.] as the baseline oriented object detection model, with ResNet50FPN [T.-Y. Lin, P. Dollar, R. Girshick, K. He, B. Hariharan, and S. Belongie, “Feature pyramid networks for object detection,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 2117–2125.] as the backbone network. Stochastic gradient descent is used for optimization, with momentum and weight decay set to 0.9 and 0.0001, respectively. The batch size, original learning rate, and threshold of the non-maximum suppression operation are consistent with those of the baseline model. Twelve training epochs were performed, and during the eighth and eleventh training epochs, the learning rate was reduced to 10% of the previous value. The hardware configuration for implementing the present invention included: CPU: E5-2650V4 (2.2GHz 12x2 cores), 512GB of RAM, and a single NVIDIA RTX 2080t graphics card (11GB of video memory); software configuration: CUDA 12.4, Ubuntu 16.04, Python 3.8, and PyTorch 1.8.1.
[0060] To better demonstrate the performance of our present invention, we conducted comparative experiments on the public dataset DOTA [Gui-Song Xia, Xiang Bai, Jian Ding, Zhen Zhu, Serge Belongie, Jiebo Luo, Mihai Datcu, Marcello Pelillo, and Liangpei Zhang. Dota: A large-scale dataset for object detection in aerial images. In CVPR, pages 3974–3983, 2018.]. As shown in Table 1, our present invention was compared with 19 similar methods, including RetinaNet-O [T.-Y. Ross and G. Dollar, “Focal loss for dense object detection,” in proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 2980–2988.].
[0061] Faster-RCNN-O [S.Ren, K.He, R.Girshick, and J.Sun, "Faster r-cnn: Towards real-time object detection with region proposal networks," IEEE transactionson pattern analysis and machine intelligence, vol.39, no.6, pp.1137–1149, 2016.],
[0062] DRN [X.Pan, Y.Ren, K.Sheng, W.Dong, H.Yuan,
[0063] ProbIoU[J.Murrugarra-Llerena,L.N.Kirsten,L.F.Zeni,and C.R.Jung,“Probabilistic intersection-over-union for training and evaluation oforiented object detectors,”IEEE Transactions on Image Processing,2024.]、
[0064] CenterMap-Net[J.Wang,W.Yang,H.-C.Li,H.Zhang,and G.-S.Xia,“Learningcenter probability map for detecting objects in aerial images,”IEEETransactions on Geoscience and Remote Sensing,vol.59,no.5,pp.4307–4323,2021.]、
[0065] SCRDet[X.Yang,J.Yang,J.Yan,Y.Zhang,T.Zhang,Z.Guo,X.Sun,and K.Fu,“Scrdet:Towards more robust detection for small,cluttered and rotatedobjects,”in Proceedings of the IEEE / CVF international conference on computervision,2019,pp.8232–8241.]、
[0066] S2A-Net[J.Han,J.Ding,J.Li,and G.-S.Xia,“Align deep features fororiented object detection,”IEEE Transactions on Geoscience and RemoteSensing,vol.60,pp.1–11,2022.]、
[0067] ARS-DETR[Y.Zeng,Y.Chen,X.Yang,Q.Li,and J.Yan,“Ars-detr:Aspect ratiosensitive detection transformer for aerial oriented object detection,”IEEETransactions on Geoscience and Remote Sensing,vol.62,pp.1–15,2024.]、
[0068] RoI Transformer[J.Ding,N.Xue,Y.Long,G.-S.Xia,and Q.Lu,“Learning roitransformer for oriented object detection in aerial images,”in Proceedings ofthe IEEE / CVF conference on computer vision and pattern recognition,2019,pp.2849–2858.]、
[0069] DFDet[X.Xie,G.Cheng,C.Rao,C.Lang,and J.Han,“Oriented object detectionvia contextual dependence mining and penalty-incentive allocation,”IEEETransactions on Geoscience and Remote Sensing,vol.62,pp.1–10,2024.]、
[0070] TCD[C.Zhang,B.Xiong,X.Li,and G.Kuang,“Tcd:Task-collaborated detectorfor oriented objects in remote sensing images,”IEEE Transactions onGeoscience and Remote Sensing,vol.61,pp.1–14,2023.]、
[0071] AOPG[G.Cheng,J.Wang,K.Li,X.Xie,C.Lang,Y.Yao,and J.Han,“Anchor freeoriented proposal generator for object detection,”IEEE Transactions onGeoscience and Remote Sensing,vol.60,pp.1–11,2022.]、
[0072] OrientedFormer[J.Zhao,Z.Ding,Y.Zhou,H.Zhu,W.-L.Du,R.Yao,and A.El Saddik,“Orientedformer:An end-to-end transformer-based oriented object detectorin remote sensing images,”IEEE Transactions on Geoscience and Remote Sensing,2024.]、
[0073] DODet[G.Cheng,Y.Yao,S.Li,K.Li,X.Xie,J.Wang,X.Yao,and J.Han,“Dual-aligned oriented detector,”IEEE Transactions on Geoscience and RemoteSensing,vol.60,pp.1–11,2022.]、
[0074] Oriented R-CNN[X.Xie,G.Cheng,J.Wang,K.Li,X.Yao,and J.Han,“Oriented r-cnn and beyond,”International Journal of Computer Vision,pp.1–23,2024.]、
[0075] Oriented RepPoints[W.Li,Y.Chen,K.Hu,and J.Zhu,“Oriented reppoints foraerial object detection,”in Proceedings of the IEEE / CVF Conference onComputer Vision and Pattern Recognition(CVPR),June 2022,pp.1829–1838];
[0076] OAN[X.Xie,G.Cheng,Q.Li,S.Miao,K.Li,and J.Han,“Fewer is more:Efficientobject detection in large aerial images,”Science China Information Sciences,vol.67,no.1,p.112106,2024.];
[0077] GSDDet[Y. Yang, C. Wang, Z. Cai, P. Song, G. Huang, M. Cheng, and Y. Zang, “Gsddet: Ground sampledistance guided object detection for remote sensing images,” IEEETransactions on Geoscience and Remote Sensing, 2023.]
[0078] CoF-Net C.Zhang,K.-M.Lam,and Q.Wang,“Cof-net:A progressive coarse-tofine framework for object detection in remote-sensing imagery,”IEETransactions on Geoscience and Remote Sensing,vol.61,pp.1–17,2023.]
[0079] Take 1 month and get a 19-hour game in the DOTA game for the first time
[0080]
[0081]
[0082] As can be seen from Table 1, the mAP of the proposed method on the DOTA dataset reaches 77.83%, which is better than 19 similar methods.
[0083] The experimental results of the present invention are visualized as follows Figure 2 As shown, Figure 2 As shown in Figure a, a background area is misclassified as a port. Due to the introduction of multi-scale context branches, the model of the present invention eliminates this misclassification. Figure 2 Similar improvements on misclassification issues can be seen in Figure b. Figure 2 As shown in Figure c, due to the introduction of task-consistent focus classification loss and task-consistent focus regression loss, the model of the present invention improves the positioning of the baseball field.
[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A directed object detection method integrating multi-scale context and task-consistent focal loss, characterized in that: Including steps: S1: Constructing the MSC-TF model, including the first-stage model and the second-stage model, and introducing a multi-scale context branch in the second-stage model; The first stage model generates directed candidate boxes by processing the input remote sensing image, and the second stage model outputs regression results and multi-scale classification results based on the directed candidate boxes; S2: In the training phase, task-consistent focus classification loss and task-consistent focus regression loss are introduced to train the second-stage model; S3: In the inference stage, the weighted average multi-scale classification results are combined with the regression results to output the detection box containing the target category and location information in the input image.
2. The directed object detection method integrating multi-scale context and task consistency focus loss according to claim 1 is characterized in that: The first-stage model includes an input layer, a backbone network, and a directed candidate box generation network connected in sequence; the forward propagation processing process of the first-stage model is: the backbone network extracts features of the input remote sensing image and then generates a directed candidate box X through the directed candidate box generation network.
3. The directed target detection method integrating multi-scale context and task consistency focus loss according to claim 2 is characterized in that: The second-stage model includes a magnification operation, a rotational region of interest alignment operation, a parallel directional object detection head module, and a multi-scale context branch module; the directional object detection head module includes a classification branch and a regression branch, the classification branch input and the regression branch input are both connected to the feature map generated by the rotational region of interest alignment operation, and the regression branch output is connected to the output layer; The multi-scale context branch module includes N context branches and a weighted fusion module. The N context branch inputs are connected to the feature map generated by the rotation region of interest alignment operation. The N context branch outputs and the classification branch output are connected to the weighted fusion module. The weighted fusion module is connected to the output layer. Each context branch CB n They all include a first fully connected layer, a second fully connected layer, and a softmax classifier connected in sequence.
4. The method for directed object detection integrating multi-scale context and task consistency focus loss according to claim 3, characterized in that: The forward propagation process of the second stage model is as follows: the directed candidate box X is magnified according to the magnification ratio α n To zoom in, α n =α1+0.05(n-1), n∈[1,N], generates N enlarged directional candidate boxes EP n Then, the directional candidate box X and the enlarged N directional candidate boxes are rotated and aligned to obtain the feature map X0 and the multi-scale context feature map F. n ', the classification branch obtains the category confidence score sp output by the classification branch according to the feature map X0, and the regression branch obtains the position offset between the directional candidate box X and the true value box according to the feature map X0; each context branch CB n For the context feature map F n 'Perform classification processing to obtain N enlarged directional candidate boxes EP output by N context branches n The category confidence score sc n .
5. The method for directed object detection integrating multi-scale context and task-consistent focal loss according to any one of claims 1 to 4, characterized in that: The training method of the training phase is as follows: input the training set, perform forward propagation based on the MSC-TF model, and calculate the loss L of the directed candidate box generation network. RPN , according to N context branches CB n The output N scale category confidence scores sc n Calculate the cross entropy loss for each context branch The task consistency focus classification loss L is calculated based on the category confidence score sp output by the classification branch and the intersection and union ratio between the directed candidate box and the true value box TFC and task-consistent focal regression loss L TFR , calculate the total loss L T , according to the total loss L T Use back propagation to update the network parameters of the first-stage model and the second-stage model.
6. The directed object detection method integrating multi-scale context and task consistency focus loss according to claim 5, characterized in that: The implementation method of the inference stage is as follows: input a test set, perform forward propagation based on the MSC-TF model, calculate the category confidence score output by the classification branch and the category confidence scores output by N context branches, and the weighted fusion module obtains the final category confidence score s of the oriented candidate box by weighted averaging. Based on the final category confidence score s and the position offset predicted by the regression branch in the oriented target detection head, the final category of each oriented candidate box and the spatial position corrected by the position offset are determined, and the final target detection result is obtained through non-maximum suppression operation.
7. The directed target detection method integrating multi-scale context and task consistency focus loss according to claim 1 or 6, characterized in that: The task consistency focus classification loss is: Among them, C GT represents the category label of the true value box, CE(·) represents the cross entropy loss function, and Ω P and Ω N Represent the positive sample set and the negative sample set respectively, IoU represents the intersection-over-union ratio between the directional candidate box and the true value box, λ1>0 represents the adjustment parameter, L FL represents focal loss.
8. The method for directed object detection integrating multi-scale context and task consistency focus loss according to claim 7, characterized in that: The task consistency focal regression loss is: Among them, λ2>0 is the adjustment parameter, L reg is the smooth L1 loss function.
9. The method for directed object detection integrating multi-scale context and task consistency focus loss according to claim 8, characterized in that: The total loss is: in, 10. The directed object detection method integrating multi-scale context and task consistency focus loss according to claim 9, characterized in that: The weighted average is calculated as follows: