A remote sensing image target detection method based on multi-scale local attention

By embedding a lightweight multi-scale local attention module into the YOLOv11 detection model, the accuracy and real-time performance issues of remote sensing image target detection in dense urban scenes are solved, achieving efficient target detection results.

CN122135229APending Publication Date: 2026-06-02NORTHEASTERN UNIV CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHEASTERN UNIV CHINA
Filing Date
2026-02-24
Publication Date
2026-06-02

Smart Images

  • Figure CN122135229A_ABST
    Figure CN122135229A_ABST
Patent Text Reader

Abstract

This invention provides a remote sensing image target detection method based on multi-scale local attention, belonging to the field of remote sensing image target detection technology. The invention constructs a detection model, inputs the optical remote sensing image to be detected into the trained detection model, and obtains the detection result. The detection model includes a lightweight multi-scale local attention module for enhancing feature maps and generating enhanced feature maps. This lightweight multi-scale local attention module has linear computational complexity and is more efficient in terms of computation and memory usage compared to traditional attention mechanisms when processing high-resolution remote sensing images, making it suitable for deployment on resource-constrained edge computing devices. Furthermore, the lightweight multi-scale local attention module supports parallelizable computation, enabling it to achieve fast inference speeds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing image target detection technology, and particularly relates to a remote sensing image target detection method based on multi-scale local attention. Background Technology

[0002] With the rapid development of computer vision technology, target detection plays an increasingly important role in remote sensing image analysis. Especially in practical applications such as urban planning, infrastructure monitoring, environmental analysis, and disaster management, accurately detecting various targets from aerial remote sensing images has significant practical value. However, due to the unique characteristics of remote sensing images, existing target detection methods face severe technical challenges when dealing with dense urban scenes.

[0003] Optical remote sensing images possess unique complexities: First, the scale of targets in the images varies greatly; large buildings and tiny vehicles may coexist in the same scene, resulting in significant scale differences. Second, targets are highly densely distributed in urban areas, with buildings, vehicles, and other targets closely arranged, leading to numerous instances of occlusion and overlap. Third, the background environment is complex and diverse, encompassing various land cover types such as buildings, roads, vegetation, and water bodies, creating severe background interference. Furthermore, the unique overhead angle of aerial images differs significantly from that of natural images, causing changes in the apparent characteristics of targets. Finally, imaging conditions are significantly affected by factors such as weather, season, and shooting time, resulting in large fluctuations in image quality and lighting conditions.

[0004] In the current technological landscape, deep learning-based object detection methods are mainly evolving in two directions: single-stage detectors and two-stage detectors. Faster R-CNN, a representative of two-stage detectors, achieves high detection accuracy through a cascaded design of region proposal networks and detection networks, but its computational complexity is high, making it difficult to meet the real-time requirements of practical applications.

[0005] Therefore, there is an urgent need to develop a lightweight target detection scheme specifically designed for the characteristics of dense remote sensing images, which can significantly improve detection accuracy in complex urban scenes while maintaining real-time inference speed, especially enhancing the ability to identify small and dense targets. Summary of the Invention

[0006] To address the shortcomings of existing technologies and overcome their limitations in target detection in dense urban remote sensing images, this invention provides a remote sensing image target detection method based on multi-scale local attention, specifically optimized for such scenarios. This method significantly improves the detection accuracy of the model in complex urban scenes with almost no increase in computational load.

[0007] In a first aspect, the present invention provides a remote sensing image target detection method based on multi-scale local attention, comprising the following steps:

[0008] Acquire aerial images of the city, construct an aerial image dataset, and divide the dataset into training, validation, and test sets according to the proportions.

[0009] Build a detection model, train the detection model using the training set and validation set, and evaluate the detection model using the test set to obtain a trained detection model;

[0010] The optical remote sensing image to be detected is input into the trained detection model to obtain the detection result;

[0011] The detection model includes a lightweight multi-scale local attention module for enhancing the feature map and generating an enhanced feature map.

[0012] Furthermore, the detection model is built based on YOLOv11 and includes a backbone network, a neck network, and a head network. The neck network includes a bottom-up path aggregation subnetwork and a top-down multi-scale feature fusion subnetwork.

[0013] Furthermore, at least one lightweight multi-scale local attention module is embedded in the multi-scale feature fusion subnetwork.

[0014] Furthermore, the lightweight multi-scale local attention module includes a first normalization layer, a multi-scale local attention sub-block, a second normalization layer, and a multilayer perceptron. The feature map input to the lightweight multi-scale local attention module and the feature map output by the multi-scale local attention sub-block are concatenated through residual connections to obtain an intermediate feature map. The intermediate feature map and the feature map output by the multilayer perceptron are then concatenated through residual connections to obtain an enhanced feature map output by the lightweight multi-scale local attention module.

[0015] Furthermore, the specific method for obtaining the feature map output by the multi-scale local attention sub-block is as follows:

[0016] The feature maps of the input multi-scale local attention sub-blocks are tokenized in batches, flattened in the spatial dimension, and the dimensional order is adjusted to obtain a token sequence.

[0017] Perform a linear mapping operation on the token sequence to obtain the mapping result, and then split it along the channel dimension to obtain the query vector and key vector; use the token sequence directly as the value vector.

[0018] Rotational position encoding is applied to the query vector and key vector respectively to obtain the query vector and key vector after fusing positional information; a non-negative kernel mapping operation is performed on the query vector and key vector after fusing positional information to obtain the non-negative mapped query vector and key vector; a weighted convergence operation is performed on the non-negative mapped key vector and value vector to obtain the intermediate matrix.

[0019] Perform matrix multiplication on the query vector and intermediate matrix after non-negative mapping to obtain the unnormalized output of global attention. Perform convergence operation on the key vector and the all-1 vector after non-negative mapping to obtain the normalized intermediate quantity.

[0020] Multiply the query vector after nonnegative mapping and the normalized intermediate quantity to obtain the normalization factor. Normalize the unnormalized output of global attention based on the normalization factor to obtain the linear global attention output. Perform two-dimensional reconstruction on the linear global attention output to obtain the reconstructed linear global attention.

[0021] Spatial structure restoration is performed on the value vector to obtain a two-dimensional feature map. Depthwise separable convolution is then performed on the two-dimensional feature map to obtain a local enhanced output.

[0022] The feature map of the input multi-scale local attention sub-block, the reconstructed linear global attention, and the local location enhancement output are subjected to residual summation to obtain the feature map of the multi-scale local attention sub-block output.

[0023] Furthermore, the specific method for training the detection model is as follows:

[0024] The loss function of the detection model is constructed using bounding box loss, classification loss, and distribution focus loss; cosine annealing learning rate scheduling is employed, and data augmentation methods such as Mosaic and Mixup are combined to augment the aerial image dataset.

[0025] Secondly, this application proposes an electronic device, comprising: one or more processors, and a memory for storing instructions, which, when executed by the one or more processors, cause the one or more processors to perform the remote sensing image target detection method based on multi-scale local attention.

[0026] Thirdly, this application proposes a computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform the aforementioned remote sensing image target detection method based on multi-scale local attention.

[0027] Fourthly, this application proposes a computer program product, including a computer program or instructions that, when executed by a processor, implement the aforementioned remote sensing image target detection method based on multi-scale local attention.

[0028] The beneficial effects of adopting the above technical solution are as follows: The remote sensing image target detection method based on multi-scale local attention provided by this invention constructs a lightweight multi-scale local attention module with linear computational complexity. When processing high-resolution remote sensing images, it is more efficient in terms of computation and memory usage compared to traditional attention mechanisms, making it suitable for deployment on resource-constrained edge computing devices. The lightweight multi-scale local attention module outperforms various visual Mamba models in image classification and high-resolution dense prediction tasks. Simultaneously, the lightweight multi-scale local attention module supports parallelizable computation, enabling it to achieve fast inference speeds. For the P4 and P5 detection heads in the head network of the detection model, due to their large receptive fields and strong global dependencies, the lightweight multi-scale local attention module is embedded in the multi-scale feature fusion path of the neck network, leveraging the long-range modeling advantages of linear attention within the lightweight multi-scale local attention module. Attached Figure Description

[0029] Figure 1 A schematic diagram of the detection model structure provided in Embodiment 1 of the present invention;

[0030] Figure 2 A schematic diagram of the lightweight multi-scale local attention module structure provided in Embodiment 1 of the present invention. Detailed Implementation

[0031] The specific implementation methods of this application will be further described in detail below with reference to the accompanying drawings and embodiments.

[0032] Example 1:

[0033] A remote sensing image target detection method based on multi-scale local attention includes the following steps:

[0034] Step 1: Acquire aerial images of the city, construct an aerial image dataset, and divide the dataset into training, validation, and test sets according to the proportions.

[0035] Step 2: Build a detection model. Train the detection model using the training set and validation set, and evaluate the detection model using the test set to obtain a trained detection model.

[0036] This embodiment constructs a detection model based on the YOLOv11 object detection network. The YOLOv11 object detection network (YouOnly Look Once version 11) is a single-stage detection algorithm in the field of object detection. By transforming the object detection task into a regression problem, it achieves simultaneous object localization and classification within a single network, characterized by high detection speed and high accuracy. In remote sensing image detection tasks, single-stage detectors, represented by the YOLO series, are widely used due to their good balance between speed and accuracy. The YOLOv11 object detection network, as the latest evolution of the YOLO series, includes a backbone network, a neck network, and a head network. The backbone network consists of four C3K2 modules from top to bottom, with the last layer being a C2PSA layer. The backbone network outputs the first feature map, the second feature map, and the third feature map (P3 / 8, P4 / 16, P5 / 32) sequentially from the outputs of the second C3K2 module, the third C3K2 module, and the C2PSA layer. The neck network consists of two paths: a bottom-up path aggregation subnetwork and a top-down multi-scale feature fusion subnetwork. The path aggregation subnetwork has three inputs, which receive three feature maps output from the backbone network. The multi-scale feature fusion subnetwork has three outputs, which are connected to the three detection heads of the head network, namely P3, P4 and P5. The detection heads include classification branches and regression branches.

[0037] The YOLOv11 object detection network features several significant architectural improvements: it employs an enhanced C3K2 module to improve feature extraction capabilities and uses an improved loss function to enhance bounding box localization accuracy. Test results on general datasets such as COCO demonstrate that YOLOv11 indeed exhibits superior overall performance.

[0038] However, for remote sensing data in urban scenes, the existing architecture of the YOLOv11 object detection network reveals significant limitations. Specifically, these shortcomings are mainly reflected in the following aspects: In terms of network structure design, the existing YOLOv11 object detection network has insufficient feature extraction capabilities for small targets. During multiple downsampling processes in the feature pyramid, detailed information of tiny targets is easily lost, resulting in a high false negative rate for small targets such as vehicles in dense urban scenes. In terms of feature processing mechanisms, traditional convolutional operations are difficult to effectively distinguish the boundary between targets and complex backgrounds, easily generating a large number of false detections in densely built-up areas. Although existing attention mechanisms such as SE and CBAM can improve feature representation capabilities to some extent, their ability to model spatial relationships remains limited. In terms of computational efficiency, although powerful attention mechanisms such as Transformer can improve detection accuracy, their computational complexity increases quadratically with the image size, generating huge computational overhead when processing high-resolution remote sensing images, failing to meet the real-time requirements of practical applications. In terms of utilizing location information, ordinary convolutional networks and attention mechanisms have weak encoding capabilities for the precise geometric location of targets, making it difficult to accurately distinguish spatially adjacent similar targets. More importantly, existing models are mainly designed for natural images and lack specific optimization measures for the unique characteristics of remote sensing images, such as shooting angle, lighting conditions, and target distribution.

[0039] Therefore, this embodiment constructs a detection model based on the YOLOv11 object detection network, such as... Figure 1 As shown, at least one lightweight multi-scale local attention module (MLLA, Mamba-like Linear Attention) is embedded in the multi-scale feature fusion sub-network of the neck network. For the two C3K2 modules connected to the detection heads P4 and P5, due to their large receptive fields and strong global dependencies, the lightweight multi-scale local attention module MLLA is embedded in the multi-scale feature fusion sub-network of the neck network to make full use of the long-range modeling advantage of the linear attention of the lightweight multi-scale local attention module MLLA.

[0040] In this embodiment, a first lightweight multi-scale local attention module (MLLA) and a second lightweight multi-scale local attention module (MLLA) are inserted after the two C3K2 modules connected to the detection heads P4 and P5, respectively. The input and output dimensions of the lightweight multi-scale local attention modules are kept consistent to achieve integration.

[0041] The Lightweight Multi-Scale Local Attention Module (MLLA) integrates linear attention with the most gaining mechanism of the Mamba model. Its core is to introduce two key advantages of the Mamba model while maintaining the fully parallel computation and high inference throughput of linear attention: the local inductive bias and positional information utility derived from the forget gate, and a more efficient block-level structure design. This achieves a better balance between accuracy and efficiency in non-autoregressive tasks such as vision. Compared to directly using the loop formula with the forget gate, the MLLA avoids the throughput reduction and computational serialization caused by causal constraints, preserving the parallel paradigm of linear attention.

[0042] In terms of structural design, the Lightweight Multi-Scale Local Attention Module (MLLA) does not directly introduce the forget gate mechanism, which relies on sequence-based recursive computation. Instead, it achieves an equivalent function through a parallel-friendly approach: by leveraging inductive biases such as Rotation-Position Encoding (RoPE) and Local Position Enhancement (LePE), it explicitly injects order sensitivity and local structural constraints into the attention computation, thereby achieving modeling capabilities similar to the forget gate while maintaining end-to-end parallel computation characteristics. Simultaneously, MLLA performs targeted rearrangement and optimization of the block-level structure, including the placement of normalization layers, the execution order of linear projection and nonlinear activation, and the design of residual connection topology, making the attention submodule and feedforward submodule more coordinated in terms of feature scale, gradient propagation, and expressive power. To further improve stability and representational capabilities, MLLA adopts a linear attention form with explicit normalization, introduces a multi-head mechanism to enhance representational diversity, and uses standard identity residual connections to reduce uncertainty during training, thus achieving stable and efficient global-local feature modeling. Its specific computational flow is as follows:

[0043] Lightweight multi-scale local attention module MLLA such as Figure 2 As shown, it includes a first normalization layer, a multi-scale local attention sub-block (MLLA Block), a second normalization layer, and a multilayer perceptron. The feature map of the input lightweight multi-scale local attention module (MLLA) and the feature map output by the multi-scale local attention sub-block are concatenated through residual connections to obtain an intermediate feature map. The intermediate feature map and the feature map output by the multilayer perceptron are then concatenated through residual connections to obtain the enhanced feature map output by the lightweight multi-scale local attention module (MLLA).

[0044] The feature maps input to the multi-scale local attention sub-block (MLLA Block) are processed in batches. Tokenization is performed, and the feature map is obtained by flattening it in the spatial dimension and adjusting the dimensional order. Token sequence As shown in the formula below:

[0045] ;

[0046] in, For batch size, For feature map The number of channels, For feature map height, For feature map Width, Token sequence The dimension is , The number of tokens;

[0047] Token sequence In, each batch of the first The feature map corresponding to the nth sample is the nth... The feature vector of each token is ;

[0048] For Token Sequence Perform a linear mapping operation, and the mapping result is... As shown in the formula below:

[0049] ;

[0050] in, The linear mapping weight matrix, For the bias vector, the mapping result ;

[0051] For the mapping results Split along the channel dimension to obtain the query vector. and key vector ;

[0052] This embodiment does not introduce an additional linear mapping, but rather uses the token sequence. Directly as a value vector ;

[0053] For query vector and key vector Apply rotational position encoding operations separately to obtain the query vector after fusing position information. and the key vector after fusing location information As shown in the formula below:

[0054] ;

[0055] in, For rotational position encoding function;

[0056] To ensure the numerical stability of linear attention computation, the query vector after fusing location information is... and the key vector after fusing location information Perform a nonnegative kernel mapping operation to obtain the nonnegative mapped query vector. Key vectors after nonnegative mapping As shown in the formula below:

[0057] ;

[0058] Among them, the query vector after nonnegative mapping Key vectors after nonnegative mapping All elements in the array are non-negative. The non-negative kernel mapping function is shown in the following formula:

[0059] ;

[0060] in, The vector of input nonnegative mapping functions;

[0061] The key vector after nonnegative mapping AND value vector Perform a weighted aggregation operation to obtain the intermediate matrix. :

[0062] ;

[0063] in, The key vector after nonnegative mapping transpose;

[0064] query vector after nonnegative mapping and intermediate matrix Perform matrix multiplication to obtain the global attention unnormalized output. As shown in the formula below:

[0065] ;

[0066] At the same time, the key vector after nonnegative mapping with all-1 vectors Perform a convergence operation to obtain the normalized intermediate quantity. As shown in the formula below:

[0067] ;

[0068] in, A vector whose elements are all 1s. Copying or broadcasting at the batch dimension to the non-negative mapped key vector The dimensions remain consistent.

[0069] query vector after nonnegative mapping and normalized intermediate quantity Perform a multiplication operation to obtain the normalization factor. As shown in the formula below:

[0070] ;

[0071] Based on normalization factor For global attention unnormalized output Normalization is performed to obtain a linear global attention output. :

[0072] ;

[0073] in, This is element-wise division.

[0074] For linear global attention output Perform two-dimensional reconstruction to obtain the reconstructed linear global attention. ;

[0075] value vector Perform spatial structure restoration operations to obtain a two-dimensional feature map. As shown in the formula below:

[0076] ;

[0077] For two-dimensional feature maps Perform depthwise separable convolution operations to obtain locally enhanced outputs. As shown in the formula below:

[0078] ;

[0079] in, This indicates a channel-by-channel independent 3×3 convolution operation, with localized output enhancement. Used to characterize detailed features within a local neighborhood;

[0080] For feature maps Reconstructed linear global attention and local location enhancement output Perform residual summation to obtain the feature map output by the multi-scale local attention sub-block (MLLA Block). As shown in the formula below:

[0081] ;

[0082] Step 3: Input the optical remote sensing image to be detected into the trained detection model to obtain the detection result.

[0083] This embodiment uses the CADOT dataset for training. This dataset contains high-resolution urban aerial images with 14 target categories. As a benchmark dataset specifically built for urban aerial photography, the CADOT dataset presents unique technical challenges: the CADOT dataset contains 14 fine-grained target categories with very subtle differences between them; the target distribution density in the images is significantly higher than that of general datasets; the original image resolution is as high as several thousand pixels, which, while preserving rich detail information, also brings a heavy computational burden; especially in real urban scenes, similar targets vary greatly in appearance, scale, orientation, etc., which further increases the difficulty of accurate detection.

[0084] During training, cosine annealing learning rate scheduling was employed, combined with Mosaic and Mixup data augmentation. A combined loss function, including bounding box loss, classification loss, and distribution focus loss, was used. After 200 epochs of training on the CADOT dataset, the improved model achieved a best mAP50 of 0.472, a 1.6% improvement compared to the base model's 0.456. The final recall of the improved model increased from 0.442 to 0.487. This significant improvement in key metrics demonstrates that the MLLA module effectively enhances the model's ability to detect and locate targets, significantly reducing false negatives. For categories where the base model performed poorly on the CODAT dataset, the improved model achieved breakthrough progress. For example, the mAP50 for the graveyard category improved from 0.436 to 0.636, the mAP50 for the football field category from 0.233 to 0.383, and the mAP50 for the ship category from 0.557 to 0.627.

[0085] Example 2:

[0086] This embodiment proposes an electronic device, including: one or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the remote sensing image target detection method based on multi-scale local attention.

[0087] The electronic device may be a mobile phone, computer, or tablet computer, etc., and includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the remote sensing image target detection method based on multi-scale local attention as described in the embodiments. It is understood that the electronic device may also include an input / output (I / O) interface and communication components.

[0088] The processor is used to execute all or part of the steps in the remote sensing image target detection method based on multi-scale local attention as described in the above embodiments. The memory is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.

[0089] The processor can be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, and is used to execute the remote sensing image target detection method based on multi-scale local attention described in the above embodiments.

[0090] Example 3:

[0091] This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0092] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the remote sensing image target detection method based on multi-scale local attention described in the various embodiments of this application.

[0093] The aforementioned storage media include: flash memory, hard disk, multimedia card, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory), random access memory (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disk, optical disk, server, APP (Application) application store, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the aforementioned remote sensing image target detection method based on multi-scale local attention.

[0094] Example 4:

[0095] This embodiment proposes a computer program product, including a computer program or instructions, which, when executed by a processor, implements the aforementioned remote sensing image target detection method based on multi-scale local attention.

[0096] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer program product.

[0097] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0098] The scope of protection of this application is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from the scope and spirit of this disclosure. If such modifications and variations fall within the scope of this disclosure and its equivalents, then the intent of this disclosure also includes these modifications and variations.

Claims

1. A remote sensing image target detection method based on multi-scale local attention, characterized in that, Includes the following steps: Acquire aerial images of the city, construct an aerial image dataset, and divide the dataset into training, validation, and test sets according to the proportions. Build a detection model, train the detection model using the training set and validation set, and evaluate the detection model using the test set to obtain a trained detection model; The optical remote sensing image to be detected is input into the trained detection model to obtain the detection result; The detection model includes a lightweight multi-scale local attention module for enhancing the feature map and generating an enhanced feature map.

2. The remote sensing image target detection method based on multi-scale local attention according to claim 1, characterized in that, The detection model is built based on YOLOv11 and includes a backbone network, a neck network, and a head network. The neck network includes a bottom-up path aggregation subnetwork and a top-down multi-scale feature fusion subnetwork. The multi-scale feature fusion subnetwork includes three outputs, which are respectively connected to the three detection heads of the head network.

3. The remote sensing image target detection method based on multi-scale local attention according to claim 2, characterized in that, At least one lightweight multi-scale local attention module is embedded in the multi-scale feature fusion subnetwork.

4. The remote sensing image target detection method based on multi-scale local attention according to claim 3, characterized in that, The lightweight multi-scale local attention module includes a first normalization layer, a multi-scale local attention sub-block, a second normalization layer, and a multilayer perceptron. The feature map input to the lightweight multi-scale local attention module and the feature map output by the multi-scale local attention sub-block are concatenated through residual connections to obtain an intermediate feature map. The intermediate feature map and the feature map output by the multilayer perceptron are then concatenated through residual connections to obtain an enhanced feature map output by the lightweight multi-scale local attention module.

5. The remote sensing image target detection method based on multi-scale local attention according to claim 4, characterized in that, The specific method for obtaining the feature map output by the multi-scale local attention sub-block is as follows: The feature maps of the input multi-scale local attention sub-blocks are tokenized in batches, flattened in the spatial dimension, and the dimensional order is adjusted to obtain a token sequence. Perform a linear mapping operation on the token sequence to obtain the mapping result, and then split it along the channel dimension to obtain the query vector and key vector; use the token sequence directly as the value vector. Apply rotation position encoding operations to the query vector and the key vector respectively to obtain the query vector and the key vector after fusing position information; A non-negative kernel mapping operation is performed on the query vector and key vector after fusing location information to obtain the non-negative mapped query vector and non-negative mapped key vector; a weighted convergence operation is then performed on the non-negative mapped key vector and value vector to obtain an intermediate matrix. Perform matrix multiplication on the query vector and intermediate matrix after non-negative mapping to obtain the unnormalized output of global attention. Perform convergence operation on the key vector and the all-1 vector after non-negative mapping to obtain the normalized intermediate quantity. Multiply the query vector after nonnegative mapping and the normalized intermediate quantity to obtain the normalization factor. Normalize the unnormalized output of global attention based on the normalization factor to obtain the linear global attention output. Perform two-dimensional reconstruction on the linear global attention output to obtain the reconstructed linear global attention. Spatial structure restoration is performed on the value vector to obtain a two-dimensional feature map. Depthwise separable convolution is then performed on the two-dimensional feature map to obtain a local enhanced output. The feature map of the input multi-scale local attention sub-block, the reconstructed linear global attention, and the local location enhancement output are subjected to residual summation to obtain the feature map of the multi-scale local attention sub-block output.

6. The remote sensing image target detection method based on multi-scale local attention according to claim 1, characterized in that, The specific method for training the detection model is as follows: The loss function of the detection model is constructed using bounding box loss, classification loss, and distribution focus loss; cosine annealing learning rate scheduling is employed, and data augmentation methods such as Mosaic and Mixup are combined to augment the aerial image dataset.

7. An electronic device, comprising: One or more processors, and a memory for storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the remote sensing image target detection method based on multi-scale local attention as described in any one of claims 1 to 6.

8. A computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform the remote sensing image target detection method based on multi-scale local attention as described in any one of claims 1 to 6.

9. A computer program product comprising a computer program or instructions which, when executed by a processor, implement the remote sensing image target detection method based on multi-scale local attention as described in any one of claims 1 to 6.