An improved RTDETR-based unmanned aerial vehicle target detection method
By improving the LSKNet neural network architecture of RT-DETR, extracting multi-scale feature maps and performing feature fusion, the problems of poor performance and high computational cost in UAV small target detection are solved, achieving high-precision and high-real-time target detection.
Patent Information
- Application Number
- CN202411647198.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The existing RT-DETR algorithm has poor performance in detecting small targets in UAV aerial images and has a large number of model parameters, which is not conducive to deployment on UAV airborne platforms.
The LSKNet neural network architecture is used to extract multi-scale feature maps, and feature fusion and detection are performed through DSConv, HLD Encoder, HLD-GD modules and object detection head module to reduce the amount of computation and improve the detection accuracy.
It improves the accuracy and real-time performance of UAV target detection, reduces the computational load of the model, and is suitable for UAV airborne platforms.
Smart Images

Figure CN119832448B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of unmanned aerial vehicle target detection, in particular to an unmanned aerial vehicle target detection method based on improved RTDETR. BACKGROUND
[0002] Unmanned aerial vehicle target detection technology is a key technology in the intelligent perception system of unmanned aerial vehicles, and is widely used in forest fire fighting, intelligent security, emergency rescue, anti-terrorism and explosion prevention and many other fields. The target under the aerial view of the unmanned aerial vehicle has complex background information, small target pixel, easy occlusion and large target scale variation. This technology is mainly based on a single-stage detection method of deep learning. The feature of the aerial image of the unmanned aerial vehicle is extracted by a convolutional neural network, and then the features are fused to densely predict the target class and regress the object bounding box on the feature map. This process is usually completed by a deep learning model such as SSD and YOLO series algorithm. The single-stage target detection method is suitable for the low computing power of the unmanned aerial vehicle on-board platform and the real-time requirement due to its fast speed and relatively small resource occupation.
[0003] The current single-stage target detection method is represented by the YOLO series algorithm, which has good real-time performance in some versions, but has low accuracy in detecting targets in aerial images of unmanned aerial vehicles, especially when the target size in the image is very small. With the development of single-stage target detection technology, single-stage detection methods based on Transformer have gradually emerged. Algorithms represented by DETR, Deformable-DETR and RT-DETR have surpassed the YOLO series in terms of accuracy and real-time performance. In previous detection algorithms, the non-maximum suppression post-processing operation for the predicted box has a greater impact on real-time performance, and the related parameter settings also affect the model accuracy and real-time performance. In the DETR series algorithm, this operation is removed to improve the overall performance and real-time performance of the model. RT-DETR has a wide application prospect in the field of unmanned aerial vehicle target detection due to its high real-time performance and accuracy. RT-DETR performs poorly in detecting small targets in aerial images of unmanned aerial vehicles. Small target objects are usually detected in high-resolution images, while the feature map resolution used by RT-DETR is low, and the backbone has limited ability to extract small target features. Moreover, the large number of model parameters is not conducive to deployment on the unmanned aerial vehicle on-board platform. SUMMARY
[0004] In view of the problems existing in the prior art, the purpose of the present disclosure is to provide an unmanned aerial vehicle target detection method based on improved RTDETR, an electronic device and a computer readable storage medium, so as to at least partially overcome one or more problems caused by the limitations and defects of the related art.
[0005] The first aspect of the present application provides a UAV target detection method based on improved RTDETR, comprising the following steps:
[0006] Four scale feature maps B2, B3, B4 and B5 of the UAV photographed image are extracted by using the LSKNet neural network architecture.
[0007] The four scale feature maps B2, B3, B4 and B5 are made consistent in size and merged in the channel dimension after being processed by average pooling, maximum value pooling and bilinear interpolation, and then are subjected to convolution processing by a DSConv convolution module to obtain a global feature map.
[0008] After the global feature map is subjected to convolution processing, the Split function is used to split and output feature maps inject_P3 and inject_P4.
[0009] After the feature map B3 and the feature map inject_P3 are fused, a feature map P3 is generated, and after the feature map B4 and the feature map inject_P4 are fused, a feature map P4 is generated.
[0010] After the feature map B5 is subjected to HLD Encoder processing, a feature map P5 is generated.
[0011] After the feature maps P3 and P4 are subjected to average pooling and maximum value pooling processing, they are spliced in the channel dimension with the feature map P5, and then subjected to feature extraction processing by an HLD-GD module, and then the Split function is used to split and output feature maps inject_N4 and inject_N5.
[0012] After the feature map P4 and the feature map inject_N4 are fused, a feature map N4 is generated, and after the feature map P5 and the feature map inject_N5 are fused, a feature map N5 is generated.
[0013] After the feature map P3, the feature map N4 and the feature map N5 are fused and merged, they are output to a target detection head module for target detection.
[0014] Further, after the four scale feature maps B2, B3, B4 and B5 are merged, convolution processing by a DSConv convolution module includes:
[0015] The merged feature map is processed by a CBS module and the processed feature is retained.
[0016] The feature processed by the CBS module is further processed by a DBS module.
[0017] After the feature processed by the CBS module and the feature processed by the DBS module are spliced in the channel dimension, the channel features of the two parts are randomly mixed by a Shuffle module, and then the global feature map is output.
[0018] Furthermore, the feature map B5 is processed by the HLD Encoder, including:
[0019] Feature map B5 is input into the first branch's multi-head deformable attention and then stitched together for mapping;
[0020] The feature map B5 is average pooled to use the downsampled feature map as the key and value of the multi-head deformable attention input to the second branch;
[0021] The downsampled feature map is then input into the multi-head deformable attention of the second branch and then stitched together for mapping.
[0022] The outputs of the first branch of multi-head deformable attention and the second branch of multi-head deformable attention are concatenated in the channel dimension;
[0023] Add the original feature map to the corresponding positions of the feature map after HLD Attention and normalize them;
[0024] The normalized feature map is added to the corresponding positions of the feature map processed by the feedforward neural network (FFN) and then normalized to obtain feature map P5.
[0025] Furthermore, feature maps P3 and P4 are processed by average pooling and max pooling, then concatenated with feature map P5 along the channel dimension. The resulting concatenation is then processed by the HLD-GD module for feature extraction, including:
[0026] After performing average pooling and max pooling on feature maps P3 and P4 respectively, a downsampled feature map with the same size as feature map P5 is output.
[0027] The downsampled feature maps P3 and P4 are concatenated with feature map P5 along the channel dimension.
[0028] The concatenated feature map is then input into the HLD Attention module for concatenation mapping and feature extraction processing using the feedforward neural network FFN.
[0029] A second aspect of the present invention provides an electronic device, comprising:
[0030] Processor; and
[0031] A memory storing computer-readable instructions that, when executed by the processor, implement the method described above.
[0032] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described method.
[0033] The backbone network of this invention uses the LSKNet neural network architecture to extract features from four scale feature maps of images captured by UAVs. This improves feature extraction performance while reducing model computation. Furthermore, it improves the feature fusion network to form a new feature extraction and feature fusion network framework, thereby improving feature extraction and fusion efficiency. At the same time, it reduces network computation and loss during feature information transmission, improving target detection accuracy while maintaining high real-time detection performance.
[0034] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0035] The above and other features and advantages of this disclosure will become more apparent from the detailed description of exemplary embodiments thereof with reference to the accompanying drawings.
[0036] Figure 1 This is a block diagram illustrating the working principle of an unmanned aerial vehicle (UAV) target detection method based on an improved RTDETR according to an embodiment of the present invention.
[0037] Figure 2 This is a block diagram illustrating the working principle of an LSKNet module according to an embodiment of the present invention.
[0038] Figure 3 This is a block diagram illustrating the working principle of the LSKNet neural network architecture according to an embodiment of the present invention.
[0039] Figure 4 This is a block diagram illustrating the working principle of an LSKNet Block according to an embodiment of the present invention.
[0040] Figure 5 This is a block diagram illustrating the working principle of the DSConv convolution module according to an embodiment of the present invention.
[0041] Figure 6 This is a block diagram illustrating the working principle of a DS-GD module according to an embodiment of the present invention.
[0042] Figure 7 This is a block diagram illustrating the working principle of a CBS module according to an embodiment of the present invention;
[0043] Figure 8 This is a block diagram illustrating the working principle of a DBS module according to an embodiment of the present invention.
[0044] Figure 9 This is a block diagram illustrating the working principle of the HLD Attention module according to an embodiment of the present invention.
[0045] Figure 10 This is a block diagram illustrating the working principle of an HLD Encoder module according to an embodiment of the present invention.
[0046] Figure 11 This is a block diagram illustrating the working principle of an FFN module according to an embodiment of the present invention.
[0047] Figure 12 This is a block diagram illustrating the working principle of the HLD-GD module according to an embodiment of the present invention. Detailed Implementation
[0048] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0049] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details described, or other methods, components, materials, apparatuses, steps, etc., can be employed. In other instances, well-known structures, methods, apparatuses, implementations, materials, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0050] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, or in one or more software-hardened modules, or in different network and / or processor devices and / or microcontroller devices.
[0051] like Figure 1 As shown, a UAV target detection method based on improved RTDETR includes the following steps:
[0052] Step S210: Use the LSKNet neural network architecture to extract four scale feature maps B2, B3, B4, and B5 from the drone-captured image; among them, the size of feature map B2, feature map B3, feature map B4, and feature map B5 decreases in order, feature map B2 has the largest size and contains relatively rich feature information, while feature map B5 has the smallest size and contains relatively less feature information.
[0053] Step S220: Use average pooling, max pooling and bilinear interpolation to make the feature maps B2, B3, B4 and B5 of the four scales the same size, merge them in the channel dimension, and then perform convolution processing through the DSConv convolution module to obtain the global feature map.
[0054] Step S230: After the global feature map is processed by convolution, it is split using the Split function and the feature maps inject_P3 and inject_P4 are output.
[0055] Step S240: Feature map P3 is generated by fusing feature map B3 and feature map inject_P3, and feature map P4 is generated by fusing feature map B4 and feature map inject_P4.
[0056] Step S250: After processing feature map B5 with HLD Encoder, feature map P5 is generated;
[0057] Step S260: After the feature maps P3 and P4 are processed by average pooling and max pooling, they are concatenated with the feature map P5 in the channel dimension. After feature extraction processing by the HLD-GD module, the feature maps inject_N4 and inject_N5 are split and output using the Split function.
[0058] Step S270: Feature map N4 is generated by fusing feature map P4 and feature map inject_N4, and feature map N5 is generated by fusing feature map P5 and feature map inject_N5.
[0059] Step S280: Merge feature map P3, feature map N4 and feature map N5 and output them to the target detection head module for target detection.
[0060] In one embodiment of the present invention, step S210 utilizes the LSKNet neural network architecture to replace the traditional backbone neural network for extraction. It can dynamically adjust the spatial receptive field to better capture background information features of different objects in the remote sensing scene, thereby improving the model's detection capability. LSKNet uses two large convolutional kernels and dilation rate to increase the receptive field range, and then uses a spatial selection mechanism to enhance the network's ability to focus on the spatial context region most relevant to the target after fusing the convolutional features. Compared with traditional target detection methods, LSKNet improves the detection accuracy of small targets through keypoint localization, utilizes multi-scale feature information to better adapt to targets of different sizes to improve adaptability, and enhances the ability to extract local features of targets through the spatial selection mechanism, which helps capture detailed information of small targets. At the same time, LSKNet improves feature extraction performance while reducing model computation, achieving good performance under different computing power hardware conditions.
[0061] like Figure 2As shown, the LSKNet module includes large kernel convolutions and a spatial kernel selection mechanism, which are embedded in the LK Selection sub-block of the LSK Block (see [link to LSK Block]). Figure 4 ). Figure 3 The LSKNet backbone network structure, after convolution and normalization, is input into the LSK Block, and after further normalization and refining, it is input into the next stage. The LSKNet Block is a repeatable, stackable block in the backbone network. Each LSK Block includes two residual sub-blocks: a Large Kernel Selection (LK Selection) sub-block and a Feed-forward Network (FFN) sub-block, such as... Figure 4 The LKSelection sub-block dynamically adjusts the network's receptive field as needed, while the FFN sub-block, used for channel blending and feature refinement, consists of a fully connected layer, a depthwise convolution, a GELU activation, and a second fully connected layer. To make the model focus more on the spatially important background information of the target, a spatial selection mechanism is used to spatially select feature maps from large convolutional kernels of different scales. First, features from convolutional kernels of different receptive fields are concatenated. Then, channel-level average pooling and max pooling are applied to extract spatial relationships to obtain the corresponding spatial feature descriptors (SA). To achieve information interaction between different spatial descriptors, convolutional layers are used to concatenate the spatial pooling features, transforming the pooling features of two channels into N spatial attention feature maps. Next, the Sigmoid activation function is applied to each spatial attention feature map (SA) to obtain an independent spatial selection mask corresponding to each decoupled large convolutional kernel. Then, the features of the decoupled large convolutional kernel sequence are weighted with the corresponding spatial selection mask and fused through a convolutional layer to obtain the attention feature S. Finally, the output of the LSK module can be obtained by element-wise conversion of the input feature X and the attention feature S.
[0062] In one embodiment of the present invention, step S220, which involves merging the feature maps B2, B3, B4, and B5 at four scales and then performing convolution processing via the DSConv convolution module, includes:
[0063] The merged feature map is processed by the CBS module, and the processed features are retained.
[0064] The features processed by the CBS module are then processed by the DBS module.
[0065] The features processed by CBS and DBS are concatenated along the channel dimension, and then the two channel features are randomly mixed by the Shuffle module before the global feature map is output.
[0066] Specifically, such as Figure 5 and 6 As shown, CBS stands for Convolution-Batch Normalization-Activation Module, and DBS stands for Dilated Convolution-Batch Normalization-Activation Module. The input feature map first passes through the CBS module to retain its features and then concatenates them with the features from the DBS module along the channel dimension. The Shuffle module then randomly mixes the channel features from both parts, outputting the final feature map. Each compression of the spatial dimensions (width and height) and expansion of the channel dimensions results in the loss of some semantic information. DSConv can maximize the preservation of hidden connections between each channel with low time complexity. Dilated convolution allows the network to capture information from a wider range of contexts without significantly increasing the number of parameters. By introducing gaps in the convolution kernels, the receptive field is expanded without increasing computational load, enhancing the network's understanding of complex patterns in the data and improving the detection capability of small objects. The Shuffle module fully mixes the information from CBS into the output of DBS, promoting information exchange between channels and effectively reducing computational costs.
[0067] like Figure 7 and Figure 8 These diagrams illustrate the working principles of the CBS and DBS modules. The CBS module consists of standard convolutional layers, batch normalization layers, and the SiLU activation function, used to extract image features. The DBS module consists of dilated convolutional layers, batch normalization layers, and the SiLU activation function. Dilated convolutions allow the network to capture information from a wider range of contexts without significantly increasing the number of parameters. By introducing gaps in the convolutional kernels, the receptive field is expanded without increasing computational load, enhancing the network's understanding of complex patterns in the data and improving the detection capability of small objects.
[0068] In one embodiment of the present invention, step S250, which processes feature map B5 using an HLD Encoder, includes:
[0069] Feature map B5 is input into the first branch's multi-head deformable attention and then stitched together for mapping;
[0070] The feature map B5 is average pooled to use the downsampled feature map as the key and value of the multi-head deformable attention input to the second branch;
[0071] The downsampled feature map is then input into the multi-head deformable attention of the second branch and then stitched together for mapping.
[0072] The outputs of the first branch of multi-head deformable attention and the second branch of multi-head deformable attention are concatenated in the channel dimension;
[0073] Add the original feature map to the corresponding positions of the feature map after HLD Attention and normalize them;
[0074] The normalized feature map is added to the corresponding positions of the feature map processed by the feedforward neural network (FFN) and then normalized to obtain feature map P5.
[0075] Specifically, such as Figure 9 As shown, the HLD Attention mechanism comprises two branches. One branch concatenates the input feature map after passing it through a multi-head deformable attention layer. The other branch first performs average pooling, using the downsampled feature map as the key and value input to the multi-head deformable attention layer, while the query comes from the original feature map. After further concatenation and mapping, the result is concatenated with the output of the first branch along the channel dimension. N is the total number of attention heads, and α is the segmentation ratio. HLD Attention's use of a deformable attention mechanism effectively reduces training time while helping the model better understand and utilize spatial relationships. By using feature maps of two sizes, it achieves the fusion of global and local features, improving the ability to detect small objects. The input feature map B5 is processed as follows... Figure 10 The final output of the HLD Encoder. Applying this module to the B5 feature map fully utilizes the rich semantic attributes of high-level features, significantly reducing computational requirements and improving processing speed without compromising performance robustness. This optimized hybrid encoder enables intra-scale feature interaction, transforming multi-scale features into sequential image feature sequences, enhancing the model's ability to capture dense, high-resolution, small-target features.
[0076] In one embodiment of the present invention, step S260, which involves concatenating feature maps P3 and P4 after average pooling and max pooling with feature map P5 along the channel dimension, followed by feature extraction processing by the HLD-GD module, includes:
[0077] After performing average pooling and max pooling on feature maps P3 and P4 respectively, a downsampled feature map with the same size as feature map P5 is output.
[0078] The downsampled feature maps P3 and P4 are concatenated with feature map P5 along the channel dimension.
[0079] The concatenated feature map is then input into the HLD Attention module for concatenation mapping and feedforward neural network (FFN) for feature extraction. Specifically, as follows... Figure 11As shown, FFN stands for Feed-Forward Neural Network, a basic neural network architecture used for feature transformation in deep learning models. FFN typically consists of two linear transformations separated by a non-linear activation function, ReLU. The first linear layer, called the hidden layer, maps the input features to a larger dimension. The ReLU activation function is applied to the hidden layer to introduce non-linearity, which helps the network capture more complex features. The second linear layer maps the output of the hidden layer back to the original feature dimension. FFN transforms features independently at each position in the input sequence, without considering other positions in the sequence. This increases the expressive power of the model and allows the network to learn more complex feature representations.
[0080] like Figure 12 As shown, the HLD-GD module concatenates the P3 and P4 feature maps with the P5 layer features along the channel dimension after average pooling and max pooling to obtain feature map f0. The concatenated feature map f0 is then added to the corresponding positions of the feature map f0 processed by the HLDA attention module to obtain feature map f1. Finally, feature map f1 is added to the corresponding positions of the feature map f2 processed by the FFN module to obtain feature map f2. The split function divides feature map f2 into feature maps inject_N4 and inject_N5 along the channel dimension, which are then fused with the P4 and P5 layers to generate feature maps N4 and N5. This model employs a hybrid pooling structure, which helps reduce the spatial dimensionality of the features and achieves translation invariance, enhancing the network's robustness to spatial changes and translations in the input image. This module downsamples all feature maps to the smallest P5 feature map, obtaining high-level semantic information and reducing the computational load of subsequent steps. Using a residual structure effectively improves information utilization efficiency and enhances network stability.
[0081] In one embodiment of the present invention, the target detection head module in step S280 includes feature selection, a decoder, and a detection head. This part consists of IoU-aware Query Selection, a Decoder, and a Head. The IoU-aware Query Selection selects a fixed number of features as object queries from the feature sequence output by the feature fusion part. The DETR-based feature selection method incorporates an IoU-based selection method, generating high classification scores for high-IoU features and low classification scores for low-IoU features, thus ensuring that the predicted bounding boxes corresponding to the features selected by the model based on the classification scores simultaneously have both high classification and high IoU scores. The Decoder replaces the original cross-attention mechanism with a multi-scale deformable attention mechanism, allowing the attention mechanism to sample within a small range, considering only the most valuable points to reduce computation and accelerate convergence. The detection head consists of a classification prediction network and a bounding box prediction network, where the classification prediction network is composed of fully connected network layers, and the bounding box prediction network is composed of multilayer perceptrons. The input to the detection module is the feature sequence after feature fusion, which extracts a fixed number of feature sequences through feature selection, and then outputs the final prediction result through the Decoder and Head.
[0082] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented as entirely hardware embodiments, entirely software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, collectively referred to herein as “circuit,” “module,” or “system.”
[0083] Electronic devices are manifested in the form of general-purpose computing devices. Components of electronic devices may include, but are not limited to: at least one processing unit, at least one storage unit, a bus connecting different system components (including storage units and processing units), and a display unit.
[0084] The storage unit stores program code that can be executed by the processing unit, causing the processing unit to perform the steps described in the "Exemplary Methods" section above, based on various exemplary embodiments of the present invention. For example, the processing unit can perform actions such as... Figure 2 Steps S210 to S280 are shown in the figure.
[0085] The storage unit may include readable media in the form of volatile storage units, such as random access memory (RAM) and / or cache storage units, and may further include read-only memory (ROM).
[0086] The storage unit may also include a program / utility having a set (at least one) of program modules, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0087] A bus can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus that uses any of the various bus structures.
[0088] The electronic device can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be achieved through input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. As shown in the figure, the network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0089] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0090] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section above.
[0091] The program product may be a portable compact disc read-only memory (CD-ROM) containing program code and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0092] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0093] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0094] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0095] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0096] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0097] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0098] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A UAV target detection method based on an improved RTDETR, characterized in that, Includes the following steps: The LSKNet neural network architecture is used to extract four scale feature maps B2, B3, B4, and B5 from images captured by drones; the size of feature maps B2, B3, B4, and B5 decreases in that order. The feature maps B2, B3, B4, and B5 at four scales are made to have the same size using average pooling, max pooling, and bilinear interpolation. After being merged along the channel dimension, they are then convolved by the DSConv convolution module to obtain the global feature map. The convolution process of merging the feature maps B2, B3, B4, and B5 at four scales and then performing convolution by the DSConv convolution module includes: The merged feature map is processed by the CBS module, and the processed features are retained. The features processed by the CBS module are then processed by the DBS module. The features processed by the CBS module and the features processed by the DBS module are concatenated along the channel dimension, and then the global feature map is output after the channel features of the two parts are randomly mixed by the Shuffle module. The global feature map is processed by convolution and then split using the Split function to output feature maps inject_P3 and inject_P4. Feature map P3 is generated by fusing feature map B3 and feature map inject_P3, and feature map P4 is generated by fusing feature map B4 and feature map inject_P4. Feature map B5 is processed by HLD Encoder to generate feature map P5; After feature maps P3 and P4 are processed by average pooling and max pooling, they are concatenated with feature map P5 in the channel dimension. After downsampling by the HLD-GD module, the feature maps inject_N4 and inject_N5 are split and output using the Split function. Feature map N4 is generated by fusing feature map P4 and feature map inject_N4, and feature map N5 is generated by fusing feature map P5 and feature map inject_N5. Feature maps P3, N4, and N5 are merged and then output to the target detection head module for target detection.
2. The UAV target detection method as described in claim 1, characterized in that, The feature map B5 is processed by HLDEncoder, including: Feature map B5 is input into the first branch's multi-head deformable attention and then stitched together for mapping; The feature map B5 is average pooled to use the downsampled feature map as the key and value of the multi-head deformable attention input to the second branch; The downsampled feature map is then input into the multi-head deformable attention of the second branch and then stitched together for mapping. The outputs of the first branch of multi-head deformable attention and the second branch of multi-head deformable attention are concatenated in the channel dimension; Add the original feature map to the corresponding positions of the feature map after HLD Attention and normalize them; The normalized feature map is added to the corresponding position of the feature map processed by the feedforward neural network and then normalized to obtain feature map P5.
3. The UAV target detection method as described in claim 1, characterized in that, Feature maps P3 and P4 are processed by average pooling and max pooling, then concatenated with feature map P5 along the channel dimension. The resulting concatenation is then processed by the HLD-GD module for feature extraction, including: After performing average pooling and max pooling on feature maps P3 and P4 respectively, a downsampled feature map with the same size as feature map P5 is output. The downsampled feature maps P3 and P4 are concatenated with feature map P5 along the channel dimension. The concatenated feature map is then input into the HLD Attention module for concatenation mapping and feature extraction processing using the feedforward neural network FFN.
4. An electronic device, characterized in that, include Processor; and A memory storing computer-readable instructions that, when executed by the processor, implement the method according to any one of claims 1 to 3.
5. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Target detection method based on Transform global and local attention interaction
CN114743017A
Lung CT image segmentation method based on global and local attention mechanisms
CN117649385A