A rotating target detection method based on an improved YOLO11s-OBB model

By improving the YOLO11s-OBB model and utilizing the C3RFEM module, R-AFPN network, and ACH detection head, the problems of insufficient feature representation and unstable angle prediction in rotating target detection are solved, and efficient rotating target detection is achieved.

CN122156591APending Publication Date: 2026-06-05NANJING UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING UNIV OF SCI & TECH
Filing Date
2026-03-17
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Traditional horizontal bounding box target detection methods struggle to accurately describe the true geometry of rotating targets, resulting in low detection accuracy. Furthermore, existing methods have limitations in multi-scale target feature representation and model computational complexity, leading to unstable prediction of rotating target angles.

Method used

An improved YOLO11s-OBB model is adopted, which enhances feature representation ability and angle prediction stability by constructing a C3RFEM module, a lightweight R-AFPN feature fusion network, and an ACH detection head. The model performance is optimized by combining the angle consistency loss function of cosine similarity.

Benefits of technology

It improves the accuracy and stability of rotating target detection, reduces the number of model parameters and computational complexity, and enhances the ability to represent multi-scale features and the stability of angle prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156591A_ABST
    Figure CN122156591A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on improved YOLO11s-OBB model's rotating target detection method, belong to visual detection technical field.Aiming at the problem that angle regression is unstable due to arbitrary distribution of target direction in rotating target detection and multi-scale feature expression ability is insufficient under the condition of model lightening, an improved rotating target detection framework is proposed.The method introduces C3RFEM feature enhancement module to backbone network to extract multi-scale features of input image and expand feature map receptive field;R-APFN light-weight feature fusion network is constructed to progressively fuse different scale features and improve the detection ability of multi-scale rotating targets;ACH detection head is designed to realize joint prediction of target category, position, scale and rotation angle information through angle vectorization modeling and angle consistency constraint.The application improves the accuracy and stability of rotating target detection while maintaining model lightening and computational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of visual inspection, specifically relating to a rotating target detection method based on an improved YOLO11s-OBB model. Background Technology

[0002] With the rapid development of remote sensing imaging technology, unmanned aerial vehicle (UAV) platforms, and intelligent vision systems, target detection technology has been widely applied in fields such as remote sensing image analysis, traffic monitoring, urban management, and industrial inspection. In these application scenarios, targets often exhibit arbitrary directional distribution characteristics. For example, targets such as ships, aircraft, vehicles, and buildings in remote sensing images often display different rotational attitudes. Traditional horizontal bounding box target detection methods struggle to accurately describe the true geometry of the target, easily generating redundant background regions and thus affecting detection accuracy. Therefore, rotational target detection methods that can simultaneously predict target position, scale, and rotation angle information have gradually become an important research direction in the field of target detection.

[0003] In their paper "C2-YOLO: Rotating Object Detection Network for Remote Sensing Images with Complex Backgrounds," Li et al. employed an improved YOLO detection framework. By designing feature enhancement structures and multi-scale feature fusion strategies, they enhanced the detection capability of rotating targets in remote sensing images. This method, by enhancing feature representation capabilities, enables the model to identify targets with arbitrary orientations, improving target detection accuracy in complex backgrounds. However, this method still has limitations in terms of multi-scale target feature representation capabilities and model computational complexity. Furthermore, it does not adequately consider the stability of rotating target angle prediction, which may lead to decreased detection accuracy or insufficient detection stability in complex scenes. Summary of the Invention

[0004] This invention proposes a rotating target detection method based on an improved YOLO11s-OBB model. By constructing a C3-based receptive field enhancement module (C3RFEM), an improved progressive-Asymptotic feature pyramid network (R-AFPN), and an angle-corrected detection head (ACH), the method enhances the model's feature representation ability and angle prediction stability for rotating targets, addressing the problems of unstable angle regression and insufficient multi-scale feature representation ability in lightweight models during rotating target detection. This invention improves the accuracy of rotating target detection while maintaining model lightweightness and computational efficiency, and can be applied to scenarios such as remote sensing image target detection and UAV visual perception.

[0005] The technical solution for achieving the present invention is as follows: a rotating target detection method based on an improved YOLO11s-OBB model, comprising the following steps:

[0006] Step 1: Use the HRSC2016 ship remote sensing dataset as the experimental dataset. Set all targets in the dataset to the ship category and convert the original rotated target labels in the dataset to YOLO format labels. Divide the HRSC2016 dataset into training set, validation set and test set, with sample sizes of 436, 181 and 444 respectively. Preprocess and data augment the images in the training set to obtain the model training set, and proceed to Step 2.

[0007] Step 2: Construct an improved YOLO11s-OBB rotating target detection network:

[0008] The improved YOLO11s-OBB rotating target detection network includes a backbone feature extraction network, an R-AFPN lightweight feature fusion network, and ACH.

[0009] The backbone feature extraction network includes a multi-layer convolutional module, a C3RFEM module, and a Spatial Pyramid Pooling-Fast (SPPF) module. The backbone feature extraction network is used to receive the input image and extract basic feature information at different scales, and output three backbone feature maps of different scales, C3, C4 and C5, step by step.

[0010] The R-AFPN lightweight feature fusion network is an improvement on the AFPN feature pyramid structure. It progressively fuses features at different scales extracted by the backbone network to enhance the multi-scale feature representation capability.

[0011] The ACH detection head is used to receive the fused multi-scale feature map and jointly output the target category, rotation bounding box position parameters, and angle parameters to achieve rotating target detection.

[0012] Proceed to step 3.

[0013] Step 3: Train the improved YOLO11s-OBB rotating target detection network using the model training set to obtain the trained YOLO11s-OBB rotating target detection model.

[0014] Proceed to step 4.

[0015] Step 4: Input the images in the test set into the trained improved YOLO11s-OBB rotating target detection model, and output the prediction results for each sample in the test set. The prediction results include the target category information corresponding to the sample, the position parameters of the rotating bounding box, and the rotation angle parameters. Evaluate the detection performance of the improved YOLO11s-OBB rotating target detection model based on the above prediction results.

[0016] Compared with the prior art, the significant advantages of this invention are:

[0017] (1) This invention proposes a rotating target detection method based on the improved YOLO11s-OBB model. By introducing the C3RFEM module into the backbone feature extraction network and constructing the R-AFPN lightweight feature fusion network, the receptive field is enhanced. At the same time, the progressive fusion between features of different scales is realized, which effectively alleviates the information loss problem in the cross-scale feature fusion process of the traditional feature pyramid network, thereby improving the model's feature representation ability for multi-scale rotating targets and reducing the number of model parameters and computational complexity while ensuring detection accuracy.

[0018] (2) The present invention constructs an ACH detection head, transforms the rotation angle regression into a unit direction vector prediction problem through vectorized angle modeling, and combines it with the angle consistency constraint mechanism to effectively alleviate the periodic ambiguity problem in the angle regression process and improve the stability and accuracy of the rotation target angle prediction.

[0019] (3) In the model training process, the present invention introduces an angle consistency loss function based on cosine similarity. By constraining the directional consistency between the predicted angle vector and the real angle vector, the model can further optimize the angle prediction ability while learning the target position and category information. Thus, while maintaining the model's lightweight nature and computational efficiency, the overall performance and generalization ability of rotating target detection are improved. Attached Figure Description

[0020] Figure 1 This is a flowchart of a rotating target detection method based on an improved YOLO11s-OBB model according to the present invention.

[0021] Figure 2 This is the training logic diagram for the present invention.

[0022] Figure 3 This is a model diagram of a rotating target detection method based on an improved YOLO11s-OBB model. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0024] The technical solutions of the various embodiments of the present invention can be combined with each other, but only if they can be implemented by those skilled in the art. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0025] The following section will further introduce the specific implementation method, as well as the technical difficulties and inventive points of this invention, using this design example as an example.

[0026] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below:

[0027] Combination Figures 1-3 A rotating target detection method based on an improved YOLO11s-OBB model includes the following steps:

[0028] Step 1: Use the HRSC2016 ship remote sensing dataset as the experimental dataset. Set all targets in the dataset to the ship category and convert the original rotated target labels in the dataset to YOLO format labels. Divide the HRSC2016 dataset into training set, validation set and test set, with sample sizes of 436, 181 and 444 respectively. Preprocess and data augment the images in the training set to obtain the model training set. Proceed to Step 2.

[0029] Step 2: Construct an improved YOLO11s-OBB rotating target detection network:

[0030] The improved YOLO11s-OBB rotating target detection network includes a backbone feature extraction network, an R-AFPN lightweight feature fusion network, and an ACH detection head.

[0031] The backbone feature extraction network includes a multi-layer convolutional module, a C3RFEM module, and an SPPF module. The backbone feature extraction network is used to receive the input image and extract basic feature information at different scales, and output three backbone feature maps of different scales, C3, C4, and C5, step by step.

[0032] The C3RFEM module is a feature extraction module improved from the C3k2 structure. While maintaining the cross-stage partial connection structure of C3k2, it replaces the feature extraction units with the RFEM receptive field enhancement structure to enhance the receptive field of the input features through multiple branches, thereby improving the feature representation capability of the backbone feature extraction network.

[0033] The R-AFPN lightweight feature fusion network is based on the AFPN feature pyramid structure and progressively fuses features at different scales extracted by the backbone network to enhance the multi-scale feature representation capability.

[0034] The R-AFPN lightweight feature fusion network is based on the AFPN feature pyramid structure. It progressively fuses feature maps at different scales and achieves effective integration of multi-scale feature information through cross-scale information interaction. This improves the model's ability to represent the features of multi-scale rotating targets and outputs fused multi-scale feature maps.

[0035] The ACH detection head is used to receive the fused multi-scale feature map and jointly output the target category, rotation bounding box position parameters, and angle parameters to achieve rotating target detection.

[0036] The ACH detection head introduces an angle consistency modeling mechanism to transform rotation angle prediction into a unit direction vector prediction problem, thereby alleviating the periodic discontinuity problem in the angle regression process and improving the stability of rotation bounding box prediction.

[0037] Proceed to step 3.

[0038] Step 3: Train the improved YOLO11s-OBB rotating object detection network using the model training set to obtain the trained YOLO11s-OBB rotating object detection model, as detailed below. Figure 3 :

[0039] S31. The images in the model training set are input into the backbone feature extraction network for feature extraction. The backbone feature extraction network sequentially encodes the images through a multi-layer convolutional module, a C3RFEM feature extraction module, and an SPPF module to obtain image feature information at different scales. The backbone feature extraction network ultimately outputs three backbone feature maps at different scales: C3, C4, and C5 layer backbone feature maps, with spatial resolutions of (H / 8)×(W / 8), (H / 16)×(W / 16), and (H / 32)×(W / 32), respectively, where H represents the image height and W represents the image width. These three scale backbone feature maps are used to characterize the semantic and spatial structure information of shallow, mid-level, and deep rotating targets, as detailed below:

[0040] Suppose the feature map output by a convolutional module in a backbone feature extraction network is... Where C represents the number of feature map channels, H1 represents the feature map height, and W1 represents the feature map width, this feature map is used as the input feature of the C3RFEM module.

[0041] The C3RFEM module incorporates an RFEM receptive field enhancement structure to perform multi-branch convolutional feature extraction on the input features. RFEM contains K convolutional branches with different dilation rates, each branch extracting features from the input feature map. Perform dilated convolution operation:

[0042] ,

[0043] in Indicates the expansion rate Convolution operation, This represents the feature map output by the k-th convolutional branch, where K represents the number of convolutional branches in RFEM.

[0044] The feature maps obtained from each convolutional branch are fused to obtain the enhanced feature map. :

[0045] ,

[0046] Will Residual fusion with X yields the output features. :

[0047] .

[0048] in, This represents the enhanced feature map output by the RFEM module.

[0049] The above structure enables the feature map to simultaneously acquire feature information from different receptive field ranges, thereby enhancing the network's ability to represent features of targets at different scales.

[0050] After the backbone feature extraction is completed, the backbone feature extraction network outputs three backbone feature maps C3, C4 and C5 at different scales, representing shallow feature maps, middle feature maps and deep feature maps, respectively, with spatial resolutions of (H / 8)×(W / 8), (H / 16)×(W / 16) and (H / 32)×(W / 32).

[0051] S32. Input the backbone feature maps of layers C3, C4, and C5 at three scales into the R-AFPN lightweight feature fusion network to progressively interact and fuse feature information at different scales. The R-AFPN lightweight feature fusion network jointly models the spatial detail information in shallow features and the semantic information in deep features through cross-scale feature alignment, selective feature aggregation, and residual enhancement operations, thereby obtaining fused multi-scale feature maps and enhancing the network's ability to represent features of rotated targets at different scales, as detailed below:

[0052] The backbone feature maps of the three scales, C3, C4 and C5, are input into the R-AFPN lightweight feature fusion network to progressively interact and fuse feature information at different scales.

[0053] The specific calculations for the ASFF_3 module are as follows:

[0054] Let the first Layer position The feature fusion output at the location is It consists of feature vectors from different scales. , and The following is obtained by linear combination using spatial adaptive weights:

[0055] ,

[0056] in, , Indicates from the first Layer mapping to the first Layer in spatial location The feature vector at that location, , and This represents the spatial weight coefficients of the corresponding layer features during the fusion process, and satisfies the following constraints:

[0057] ,

[0058] Similarly, in the ASFF_2 module, The corresponding feature fusion formula is:

[0059] ,

[0060] in, , Indicates from the first Layer mapping to the first Layer in spatial location The feature vector at that location, and This represents the spatial weight coefficient of the corresponding layer features during the fusion process.

[0061] By using the above adaptive spatial weighting method, features of different scales can be effectively fused in the same spatial location, thereby reducing semantic differences between features of different scales and preserving key target information;

[0062] A progressive feature fusion strategy is adopted to achieve layer-by-layer interaction of cross-scale features: first, adjacent low-level features are fused, and then higher-level semantic features are gradually introduced to participate in the fusion process, so that the high-level semantic information and the low-level detailed information are continuously enhanced in the layer-by-layer interaction, thereby reducing the semantic differences between non-adjacent scale features and avoiding information loss caused by direct cross-scale fusion; after multi-scale feature fusion, a fused feature map containing rich semantic information and spatial structure information is obtained, that is, the fused multi-scale feature map, which is transmitted to the ACH detection head for rotating target prediction.

[0063] S33. The fused multi-scale feature map is input into the ACH detection head for target prediction. The ACH detection head performs parallel prediction on feature maps of different scales and outputs the target prediction result for each candidate target, including the class probability of the candidate target, the center coordinates of the bounding box, the width and height parameters of the bounding box, and the rotation angle parameter, as detailed below:

[0064] S33-A, Constructing an angle vectorization prediction model:

[0065] First, the fused multi-scale feature map is input into the prediction branch of the ACH detection head. The spatial location features, scale features, and orientation features of the target are extracted through convolution operation, and the target category prediction results, rotation bounding box regression parameters, and rotation angle prediction information are output respectively. In the angle prediction process, in order to avoid the periodic discontinuity problem caused by directly regressing the angle value, the rotation angle information is mapped to the unit circle direction vector space, thereby transforming the angle learning process into an orientation consistency learning problem.

[0066] S33-B, Constructing a unit vector representation of the rotation angle:

[0067] Taking advantage of the geometric symmetry of the rotating target, the rotation angle is... Mapped to a two-dimensional unit direction vector representation, with angle vectors defined respectively. and as follows:

[0068] ,

[0069] ,

[0070] in, Used to characterize the angular features of a target with 90° periodic symmetry. It is used to characterize the angular features of a target with 180° periodic symmetry; by representing the rotation angle as a unit direction vector, the model learns the consistency relationship between angular directions, thereby alleviating the discontinuity problem that occurs at the angular boundary during the angle regression process.

[0071] S33-C, Constructing an angle-consistent prediction mechanism:

[0072] During network training, the ACH detector head simultaneously predicts the angle vector. and It selects the corresponding angle representation method according to the geometry of the target to predict the angle, thereby achieving stable modeling of rotation angle direction information.

[0073] S33-D, Constructing the prediction results for a rotating target:

[0074] The angle vector prediction result output by the ACH detection head is combined with the target category prediction result and the rotation bounding box regression result to obtain the final rotating target detection result. This result is then transmitted to the subsequent loss function calculation and model training stages to achieve joint prediction of the position, scale and orientation information of the rotating target.

[0075] S34. Construct a rotation target detection loss function based on the target prediction results output by the ACH detection head, and use the above rotation target detection loss function to backpropagate and update the parameters of the improved YOLO11s-OBB rotation target detection network. The rotation target detection loss function includes class loss, bounding box regression loss, distributed focus loss, and angle consistency loss. Among them, an angle consistency loss function based on cosine similarity is introduced in the angle regression stage. By measuring the directional similarity between the predicted angle vector and the true angle vector, constraints are imposed on square targets and non-square targets respectively, so as to reduce the angle prediction bias and improve the generalization ability of the model in the rotation target detection task. After multiple rounds of iterative training, the trained improved YOLO11s-OBB rotation target detection model is obtained, as follows:

[0076] First, an angle consistency loss function based on cosine similarity is constructed. Since the ACH detection head uses a unit direction vector to model the rotation angle, the angle prediction error is measured by calculating the direction consistency between the predicted angle vector and the true angle vector.

[0077] Let the actual rotation angle of the target be... The true angle vector is then obtained through trigonometric function mapping:

[0078] ,

[0079] ,

[0080] in: A 90° periodic unit vector representation of the true angle; The true angle is represented by a 180° periodic unit vector; correspondingly, the angle vectors predicted by the detection head are denoted as:

[0081] ,

[0082] ,

[0083] in, and These are the angle vectors predicted by the model. This is for the directional component output by the detection head.

[0084] To accommodate the angular symmetry characteristics of targets with different geometric shapes, it is necessary to determine whether the target is square based on its width-to-height ratio; let the target bounding box width be w and the height be h, then the width-to-height ratio... Defined as:

[0085] ,

[0086] Set the threshold parameter as , representing the square's judgment tolerance, assuming When the following conditions are met:

[0087] ,

[0088] The target is considered a square target; otherwise, it is considered a non-square target.

[0089] Based on this, the angle consistency loss function Defined as:

[0090] ,

[0091] in, This represents the vector dot product operation.

[0092] By calculating the cosine similarity between the predicted vector and the true vector, the model learns the consistency of angle direction during training, thereby reducing periodic errors in the angle regression process and improving the stability of rotating target detection.

[0093] Then, during network training, the angle consistency loss, along with the bounding box regression loss, category classification loss, and distributed focus loss in object detection, are used to form the overall training loss function.

[0094] set up This represents the bounding box regression loss. This represents the target category classification loss. Represents distributed focus loss. If we represent the angle consistency loss, then the model's total loss function is... Defined as:

[0095] ,

[0096] in, The weighting coefficient for angle loss is used to balance the impact of angle prediction error on the overall training process.

[0097] By backpropagating and updating the model using the total loss function described above, the network can further optimize the accuracy of rotation angle prediction while learning target location, category information, and scale information.

[0098] Proceed to step 4.

[0099] Step 4: Input the images in the test set into the trained improved YOLO11s-OBB rotating target detection model, and output the prediction results for each sample in the test set. The prediction results include the target category information corresponding to the sample, the position parameters of the rotating bounding box, and the rotation angle parameters. Evaluate the detection performance of the improved YOLO11s-OBB rotating target detection model based on the above prediction results.

[0100] Example 1

[0101] In the data preprocessing stage, the HRSC2016 ship remote sensing dataset was acquired. All target categories in the dataset were uniformly set to "ship," and the original rotated target annotations were converted to YOLO format. The HRSC2016 dataset was divided into training, validation, and test sets, with 436, 181, and 444 samples respectively. Preprocessing of the training set images included Mosaic enhancement, random flipping, scaling, and normalization. The input image size was uniformly adjusted to 1024×1024 pixels to obtain the model training dataset.

[0102] Before discussing the network training phase, it's important to note that the YOLO11 model is a highly efficient single-stage object detection network widely used in real-time object detection tasks. (Combined with...) Figure 3 The core structure of the YOLO11 model can be divided into three parts: Backbone, Neck, and Head.

[0103] The Backbone section is primarily responsible for extracting features from the input image. This method replaces the C3k2 module in the original YOLO11 Backbone section with a C3RFEM module. The Neck section is mainly responsible for further fusing and processing the features extracted by the Backbone, aiming to extract more expressive features at different scales. This method replaces the original YOLO11 FPN structure with an R-AFPN structure. The Head section is responsible for predicting the object category and bounding box information based on the feature map output from the Neck. This method replaces the original YOLO11 OBB detection head with an ACH head.

[0104] like Figure 3 As shown, during the network training phase, an input image of size 1024×1024 is input into the improved rotating target detection network, which consists of three parts: Backbone, Neck, and Head.

[0105] The input image first enters the Backbone section, where it undergoes feature extraction through multiple Conv modules. The first two levels of feature extraction are performed by the Conv module to obtain shallow features; subsequently, the feature map enters the first C3RFEM module for enhancement. The internal structure of the C3RFEM module is as follows... Figure 3 As shown, the input features are divided into two paths. One path passes through Conv and RFEM sequentially, while the other path undergoes branch mapping through Conv. The two paths are then concatenated using Concat, and finally, a Conv outputs the fused enhanced features. This structure enhances the receptive field and contextual expressive power of the feature map while preserving local detail information.

[0106] After receiving input features from the C3RFEM branch, the RFEM module first feeds the input features into TridentBlock for multi-branch feature extraction, while retaining the directly connected branches of the input features. Then, the output from TridentBlock is added to and fused with the input branch at the Sum module. The fused result is then sequentially processed through BN and SiLU to obtain the enhanced output features. Further, the structure of TridentBlock is as follows... Figure 3As shown, the input features first pass through a Conv layer, then are divided into three parallel branches. Each branch includes Conv2d and BN, and the residuals of each branch are added to the input branch at the corresponding Sum. Finally, the output is activated by SiLU. Through this TridentBlock structure, feature information under different receptive fields can be extracted on different branches, thereby enhancing the network's adaptability to multi-scale targets and complex backgrounds.

[0107] In the Backbone, after the feature map passes through the first C3RFEM module, it enters the Conv module for further feature extraction. This is followed by sequentially passing through the second C3RFEM, third Conv, third C3RFEM, fourth Conv, and fourth C3RFEM modules, finally entering the SPPF module. The SPPF module is used to further aggregate contextual information from different receptive fields, outputting high-level semantic features. The Backbone outputs C3, C4, and C5 backbone feature maps from layers 4, 6, and 9, respectively. Thus, the Backbone forms multi-level feature outputs, and features at three different scales are fed into the Neck section for multi-scale fusion.

[0108] In the Neck section, the three scale features from the Backbone are first processed through their respective Conv modules for channel adjustment. The two upper-layer features then pass through another Conv module before being input into two ASFF_2 modules. These two ASFF_2 modules perform a first progressive fusion of the features from the two scales, and the fused results are then fed into their respective BasicBlock modules for feature reshaping. Subsequently, the three scale features undergo a second feature fusion through three ASFF_3 modules in an intermediate stage. Specifically, the output from the previous BasicBlock and the Conv-processed features from the lower-level branches are input into three ASFF_3 modules to achieve cross-layer information interaction and progressive fusion among the three scales. The output of each ASFF_3 module is then passed through a corresponding BasicBlock module for further feature enhancement. Finally, the three scale features are each processed through a Conv module to obtain fused feature maps P3, P4, and P5, which are then fed into the Head section.

[0109] In the head section, the fused features from three different scales are input into three ACH detection heads. Each ACH detection head predicts the target category, target location, target size, and rotation angle information for the feature map at the corresponding scale, thereby achieving multi-scale detection of rotating targets in the input image.

[0110] The method of this invention was tested on a computer configured with Ubuntu 20.04 operating system, an NVIDIA vGPU with 32GB of video memory, and a CPU with 16GB of RAM. The experimental environment was built based on the CUDA 11.3, Python 3.8, and PyTorch 1.11.0 deep learning framework. During model training, the batch size was set to 16, the number of data loading threads was set to 200, the AdamW optimizer was used, the initial learning rate was 0.002, the momentum coefficient was set to 0.9, and the network input image size was 1024×1024. Multiple rounds of iterative training were performed on the training dataset to obtain the rotating object detection model based on the improved YOLO11s-OBB model described in this invention.

[0111] To verify the impact of each improved module in this invention on model performance and complexity, ablation experiments were designed. The proposed R-AFPN lightweight feature fusion network and ACH detection head were introduced and combined in experiments, and the detection accuracy, number of parameters, and computational cost under different model structures were evaluated. The experimental results are shown in Table 1.

[0112] Ablation experiments show that the improved YOLO11s-OBB model of this invention improves mAP@0.5 and mAP@0.5:0.95 by 0.8% and 1.4%, respectively, while reducing the number of parameters and computational cost to 70.1% and 79.1% of the basic model, respectively. Table 1 demonstrates that the improved YOLO11s-OBB model has excellent performance in rotating target detection tasks.

Claims

1. A rotating target detection method based on an improved YOLO11s-OBB model, characterized in that, The steps are as follows: Step 1: Use the HRSC2016 ship remote sensing dataset as the experimental dataset. All targets in the dataset are uniformly classified as "ship," and the original rotated target labels in the dataset are converted to YOLO format labels. Divide the HRSC2016 dataset into training, validation, and test sets, with sample sizes of 436, 181, and 444 respectively. Preprocess and data augment the images in the training set to obtain the model training set. Proceed to Step 2. Step 2: Construct an improved YOLO11s-OBB rotating target detection network: The improved YOLO11s-OBB rotating target detection network includes a backbone feature extraction network, an R-AFPN lightweight feature fusion network, and an ACH detection head; The backbone feature extraction network includes a multi-layer convolutional module, a C3RFEM module, and an SPPF module; the backbone feature extraction network is used to receive the input image and extract basic feature information at different scales, and output three backbone feature maps of different scales, C3, C4 and C5, step by step. The R-AFPN lightweight feature fusion network is based on the AFPN feature pyramid structure and progressively fuses features of different scales extracted by the backbone network to enhance the multi-scale feature expression capability. The ACH detection head is used to receive the fused multi-scale feature map and jointly output the target category, rotation bounding box position parameters and angle parameters to achieve rotating target detection. Proceed to step 3; Step 3: Train the improved YOLO11s-OBB rotating target detection network using the model training set to obtain the trained YOLO11s-OBB rotating target detection model; Proceed to step 4; Step 4: Input the images in the test set into the trained improved YOLO11s-OBB rotating target detection model, and output the prediction results for each sample in the test set. The prediction results include the target category information corresponding to the sample, the position parameters of the rotating bounding box, and the rotation angle parameters. Evaluate the detection performance of the improved YOLO11s-OBB rotating target detection model based on the above prediction results.

2. The rotating target detection method based on the improved YOLO11s-OBB model according to claim 1, characterized in that, In step 2, the C3RFEM module is a feature extraction module obtained by improving the C3k2 structure. While maintaining the cross-stage partial connection structure of C3k2, the feature extraction unit is replaced with the RFEM receptive field enhancement structure to achieve multi-branch receptive field enhancement of input features, thereby improving the feature expression capability of the backbone feature extraction network. In the backbone feature extraction stage, the intermediate layer features are enhanced by introducing the C3RFEM module into the backbone feature extraction network; The C3RFEM module is positioned between two adjacent convolutional layers of the backbone feature extraction network and is used to enhance the receptive field of the feature maps output from the intermediate stages of the backbone feature extraction network. The R-AFPN lightweight feature fusion network is based on the AFPN feature pyramid structure. It progressively fuses feature maps at different scales and achieves effective integration of multi-scale feature information through cross-scale information interaction, thereby improving the model's ability to represent the features of multi-scale rotating targets and outputting fused multi-scale feature maps. The ACH detection head introduces an angle consistency modeling mechanism to transform rotation angle prediction into a unit direction vector prediction problem, thereby alleviating the periodic discontinuity problem in the angle regression process and improving the stability of rotation bounding box prediction.

3. The rotating target detection method based on the improved YOLO11s-OBB model according to claim 2, characterized in that, Step 3 is detailed as follows: S31. Input the images in the model training set into the backbone feature extraction network for feature extraction. The backbone feature extraction network sequentially encodes the images through a multi-layer convolutional module, a C3RFEM feature extraction module, and an SPPF module to obtain image feature information at different scales. The backbone feature extraction network finally outputs three backbone feature maps at different scales, namely the C3, C4, and C5 layer backbone feature maps, with spatial resolutions of (H / 8)×(W / 8), (H / 16)×(W / 16), and (H / 32)×(W / 32), respectively, where H represents the image height and W represents the image width. The above three scale backbone feature maps are used to represent the semantic information and spatial structure information of shallow, middle, and deep rotating targets, respectively. Proceed to S32. S32. Input the backbone feature maps of the three scales (C3, C4, and C5) into the R-AFPN lightweight feature fusion network to progressively interact and fuse feature information at different scales. The R-AFPN lightweight feature fusion network performs cross-scale feature alignment, selective feature aggregation, and residual enhancement operations to jointly model the spatial detail information in shallow features and the semantic information in deep features, thereby obtaining fused multi-scale feature maps and enhancing the network's ability to represent features of rotating targets at different scales. Proceed to S33. S33. Input the fused multi-scale feature map into the ACH detection head for target prediction. The ACH detection head performs parallel prediction on feature maps of different scales and outputs the target prediction result for each candidate target, including the class probability of the candidate target, the center coordinates of the bounding box, the width and height parameters of the bounding box, and the rotation angle parameter; Proceed to S34. S34. Construct a rotation target detection loss function based on the target prediction results output by the ACH detection head, and use the above rotation target detection loss function to backpropagate and update the parameters of the improved YOLO11s-OBB rotation target detection network. The rotation target detection loss function includes class loss, bounding box regression loss, distributed focus loss, and angle consistency loss. In the angle regression stage, an angle consistency loss function based on cosine similarity is introduced. By measuring the directional similarity between the predicted angle vector and the true angle vector, constraints are imposed on square targets and non-square targets respectively, so as to reduce the angle prediction bias and improve the generalization ability of the model in the rotation target detection task. After multiple rounds of iterative training, the trained improved YOLO11s-OBB rotation target detection model is obtained.

4. The rotating target detection method based on the improved YOLO11s-OBB model according to claim 3, characterized in that, In S31, the details are as follows: Suppose the feature map output by a convolutional module in a backbone feature extraction network is... Where C represents the number of feature map channels, H1 represents the feature map height, and W1 represents the feature map width, this feature map is used as the input feature of the C3RFEM module; The C3RFEM module incorporates an RFEM receptive field enhancement structure to perform multi-branch convolutional feature extraction on the input features. RFEM contains K convolutional branches with different dilation rates, each branch extracting features from the input feature map. Perform dilated convolution operation: , in, Indicates the expansion rate Convolution operation, This represents the feature map output by the kth convolutional branch, where K represents the number of convolutional branches in RFEM. The feature maps obtained from each convolutional branch are fused to obtain the enhanced feature map. : , Will Residual fusion with X yields the output features. : , in, This represents the enhanced feature map output by the RFEM module; The above structure enables the feature map to simultaneously obtain feature information from different receptive field ranges, thereby enhancing the network's ability to represent features of targets at different scales. After the backbone feature extraction is completed, the backbone feature extraction network outputs three backbone feature maps C3, C4 and C5 at different scales, representing shallow feature maps, middle feature maps and deep feature maps, respectively, with spatial resolutions of (H / 8)×(W / 8), (H / 16)×(W / 16) and (H / 32)×(W / 32).

5. A rotating target detection method based on an improved YOLO11s-OBB model according to claim 4, characterized in that, In S32, the backbone feature maps of the three scales of C3, C4 and C5 layers are input into the R-AFPN lightweight feature fusion network to progressively interact and fuse feature information at different scales. The specific calculations of the ASFF_3 module are as follows: Let the first Layer position The feature fusion output at the location is It consists of feature vectors from different scales. , and The following is obtained by linear combination using spatial adaptive weights: , in, , Indicates from the first Layer mapping to the first Layer in spatial location The feature vector at that location, , and This represents the spatial weight coefficients of the corresponding layer features during the fusion process, and satisfies the following constraints: , Similarly, in the ASFF_2 module, The corresponding feature fusion formula is: , in, , Indicates from the first Layer mapping to the first Layer in spatial location The feature vector at that location, and This represents the spatial weight coefficient of the corresponding layer features during the fusion process; By using the above adaptive spatial weighting method, features of different scales can be effectively fused in the same spatial location, thereby reducing semantic differences between features of different scales and preserving key target information; A progressive feature fusion strategy is adopted to achieve layer-by-layer interaction of cross-scale features: first, adjacent low-level features are fused, and then higher-level semantic features are gradually introduced to participate in the fusion process, so that the high-level semantic information and the low-level detailed information are continuously enhanced in the layer-by-layer interaction, thereby reducing the semantic differences between non-adjacent scale features and avoiding information loss caused by direct cross-scale fusion; after multi-scale feature fusion, a fused feature map containing rich semantic information and spatial structure information is obtained, that is, the fused multi-scale feature map, which is transmitted to the ACH detection head for rotating target prediction.

6. The rotating target detection method based on the improved YOLO11s-OBB model according to claim 5, characterized in that, In S33, the details are as follows: The fused multi-scale feature map is input into the ACH detection head for target prediction. The ACH detection head predicts the direction information of the rotating target through vectorized angle modeling, thereby avoiding the instability caused by directly regressing angle values, as detailed below: S33-A, Constructing an angle vectorization prediction model: First, the fused multi-scale feature map is input into the prediction branch of the ACH detection head. The spatial location features, scale features, and orientation features of the target are extracted through convolution operation, and the target category prediction results, rotation bounding box regression parameters, and rotation angle prediction information are output respectively. In the angle prediction process, in order to avoid the periodic discontinuity problem caused by directly regressing the angle value, the rotation angle information is mapped to the unit circle direction vector space, thereby transforming the angle learning process into an orientation consistency learning problem. S33-B, Constructing a unit vector representation of the rotation angle: Taking advantage of the geometric symmetry of the rotating target, the rotation angle is... Mapped to a two-dimensional unit direction vector representation, with angle vectors defined respectively. and as follows: , , in, Used to characterize the angular features of a target with 90° periodic symmetry. Used to characterize the angular features of a target with 180° periodic symmetry; by representing the rotation angle as a unit direction vector, the model learns the consistent relationship between angular directions, thereby alleviating the discontinuity problem that occurs at the angular boundary during the angle regression process; S33-C, Constructing an angle-consistent prediction mechanism: During network training, the ACH detector head simultaneously predicts the angle vector. and And based on the geometry of the target, the corresponding angle representation method is selected to predict the angle, thereby achieving stable modeling of the rotation angle direction information; S33-D, Constructing the prediction results for a rotating target: The angle vector prediction result output by the ACH detection head is combined with the target category prediction result and the rotation bounding box regression result to obtain the final rotating target detection result. This result is then transmitted to the subsequent loss function calculation and model training stages to achieve joint prediction of the position, scale and orientation information of the rotating target.

7. A rotating target detection method based on an improved YOLO11s-OBB model according to claim 6, characterized in that, In S34, a rotation target detection loss function is constructed based on the target prediction results output by the ACH detection head. This rotation target detection loss function is then used to backpropagate and update the parameters of the improved YOLO11s-OBB rotation target detection network, thereby obtaining the trained improved YOLO11s-OBB rotation target detection model, as detailed below: First, an angle consistency loss function based on cosine similarity is constructed. Since the ACH detection head uses a unit direction vector to model the rotation angle, the angle prediction error is measured by calculating the direction consistency between the predicted angle vector and the true angle vector. Let the actual rotation angle of the target be... The true angle vector is then obtained through trigonometric function mapping: , , in: A 90° periodic unit vector representation of the true angle; The true angle is represented by a 180° periodic unit vector; correspondingly, the angle vectors predicted by the detection head are denoted as: , , in, and These are the angle vectors predicted by the model. To detect the directional component output by the head; To accommodate the angular symmetry characteristics of targets with different geometric shapes, it is necessary to determine whether the target is square based on its width-to-height ratio; let the target bounding box width be w and the height be h, then the width-to-height ratio... Defined as: , Set the threshold parameter as , representing the square's judgment tolerance, assuming When the following conditions are met: , The target is considered a square target if it is otherwise considered a non-square target. Based on this, the angle consistency loss function Defined as: , in, This represents the vector dot product operation; By calculating the cosine similarity between the predicted vector and the true vector, the model learns the consistency of angle direction during training, thereby reducing periodic errors in the angle regression process and improving the stability of rotating target detection. Then, during network training, the angle consistency loss is combined with the bounding box regression loss, category classification loss, and distributed focus loss in object detection to form the overall training loss function; set up This represents the bounding box regression loss. This represents the target category classification loss. Represents distributed focus loss. If we represent the angle consistency loss, then the model's total loss function is... Defined as: , in, These are the weighting coefficients for the angle loss, used to balance the impact of angle prediction error on the overall training process; Based on the above total loss function Backpropagation and parameter updates are performed on the model to enable the network to learn target location, category information and scale information, while further optimizing the rotation angle prediction accuracy, thereby obtaining a well-trained improved YOLO11s-OBB rotating target detection model.