Next Article in Journal
Enhancing Remote Sensing Object Detection with K-CBST YOLO: Integrating CBAM and Swin-Transformer
Previous Article in Journal
Spatial Models of Solar and Terrestrial Radiation Budgets and Machine Learning: A Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Skip-Encoder and Skip-Decoder for Detection Transformer in Optical Remote Sensing

School of Geography and Ocean Science, Nanjing University, Nanjing 210023, China
*
Author to whom correspondence should be addressed.
Remote Sens. 2024, 16(16), 2884; https://doi.org/10.3390/rs16162884
Submission received: 27 June 2024 / Revised: 25 July 2024 / Accepted: 5 August 2024 / Published: 7 August 2024

Abstract

:
The transformer architecture is gradually gaining attention in remote sensing. Many algorithms related to this architecture have been proposed. However, the DEtection TRansformer (DETR) has been proposed as a new approach for implementing object detection tasks. It uses the transformer architecture for feature extraction, and its improved derivative models are uncommon in remote sensing object detection (RSOD). Hence, we selected the DETR with the improved deNoising anchor boxes (DINO) model as a foundation, upon which we have made improvements under the characteristics of remote sensing images (RSIs). Specifically, we proposed the skip-encoder (SE) module that can be applied to the encoder stage of the model and the skip-decoder (SD) module for the decoder stage. The SE module can enhance the model’s ability to extract multiscale features. The SD module can reduce computational complexity and maintain the model performance. The experimental results on the NWPU VHR-10 and DIOR datasets demonstrate that the SE and SD modules can improve DINO for better learning small- and medium-sized targets in RSIs. We achieved a mean average precision of 94.8% on the NWPU VHR-10 dataset and 75.6% on the DIOR dataset.

1. Introduction

Object detection intends to locate and classify some special objects such as those present in complex images, including natural scene images, medical images, and remote sensing images (RSIs). Remote sensing object detection (RSOD) is a cutting-edge research field. Detecting targets on RSIs has been commonly used in various scenarios, including military reconnaissance, natural resource exploration, and post-disaster relief. However, compared with natural scene images, target detection on RSIs is challenging because of the presence of rich background information and severe data imbalance in RSIs.
As deep learning has advanced in recent years, most RSOD methods have been primarily improved based on natural image object detection methods. The mainstream object detection approaches can be roughly categorized into the two-stage and one-stage types. The two-stage object detection model adopts a region proposal extraction process and combines the derived region proposal to regress the coordinate and classification of the Bounding boxes (Bbox). For instance, R-CNN [1] and its improved variants, such as Fast R-CNN [2] and Faster R-CNN [3], are classic two-stage object detection models. By contrast, the one-stage object detection model processes the image in one step to determine the object’s location and category. YOLO [4] and RetinaNet [5] are the typical one-stage methods. All the aforementioned methods involve a post-processing operation, non-maximum suppression (NMS), which eliminates redundant boxes and helps locate the optimal matching box. However, NMS exhibits limitations such as difficult parameter tuning, less hardware support, and deployment challenges, which hinder the further promotion and industrialization of these object detection methods.
The DEtection TRansformer (DETR) [6] introduces a novel end-to-end object detection method that eliminates the need for NMS, thereby solving the aforementioned issue. It replaces the operation of removing redundant boxes in NMS with that of bipartite matching. Unlike mainstream CNN-based object detection architectures, it mainly uses the transformer [7] architecture for feature extraction. Although the DETR [6] model offers a novel and high-potential implementation for object detection models, the original DETR [6] model is characterized by slow convergence and a long training time. Therefore, Zhu et al. [8] proposed the Deformable DETR, which replaces the self-attention module in the transformer [7] with a deformable attention module to achieve multiscale feature extraction and improve slow convergence issues. Meng et al. [9] also proposed an alternative method, the Conditional DETR, for enhancing the convergence speed of the model. They first analyzed that the difficulty in learning target spatial positions was a reason for the slow convergence of the original DETR [6]. Thus, they incorporated additional spatial information into the query in the cross-attention module of the transformer decoder, thereby improving the model’s convergence speed. The Anchor DETR [10] is a step further as it transforms the learnable query into 2D spatial coordinates involved in the decoder part. They also analyzed that objects in the scene might display varying patterns. By learning these different patterns, the performance of the model can be improved. Liu et al. [11] analyzed the reasons for accelerating the convergence of the DETR with the introduction of spatial coordinate information and proposed the DAB-DETR. They augmented the learnable query by transforming it into 4D spatial information (i.e., the box’s x-coordinate, y-coordinate, width, and height). Based on the foundation of the DAB-DETR [11], the DN-DETR [12] and DETR with improved deNoising anchor boxes (DINO) [13] additionally incorporate denoising learning to allow for faster model convergence and have achieved state-of-the-art (SOTA) performance in natural scene object detection. However, as new implementation paths for object detection, these models have not yet received considerable attention in the RSOD field.
Compared to natural images, RSIs are taken from an overhead perspective, cover a larger area, contain complex background information, and exhibit greater scale differences among different categories of targets. Existing object detection models for natural images typically face challenges in recognizing targets captured at various distances and angles, identifying obscured targets, and operating under different lighting conditions. In contrast, the primary challenge in RSOD is detecting targets of varying scales within large areas of a rich background.
In response to the RSI characteristics, improvements in the RSOD field are typically made from the aspects of information fusion and feature enhancement, background suppression, the exploration of contextual background relationships, and target information mining at different scales. For instance, Liu et al. [14] proposed the adaptive feature pyramid network and the context enhancement module to better aggregate multiscale features and enhance them. They also introduced the enhanced effective channel attention module to confine the disturbance caused by the complicated background. Hu et al. [15] designed a global semantic interaction module to improve model performance by suppressing background information and enhancing foreground objects. They also incorporated the local attention pyramid to extract small objects specifically. Similarly, Zhang et al. [16] proposed the coarse-to-fine feature adaptation and coarse-to-fine sample assignment to improve features and select stronger training samples on RSIs, respectively. To better capture important information, Dong et al. [17] proposed a gated context-aware module to adaptively use local valuable information and overall context information in the feature pyramid network (FPN). Likewise, Teng et al. [18] adopted Clip-long short-term memory (LSTM) to exploit the spatial correlation information and used multiscale perception for extracting global context clues. Ye et al. [19] proposed an adaptive attention fusion mechanism to integrate semantic information at different scales and thus better extract multiscale objects. To generate high-quality feature presentations for each scale, Wang et al. [20] developed a feature-reflowing pyramid structure by integrating fine-grained features from the adjacent lower level. Similarly, to underscore the features of small objects in shallow feature maps, SME-Net [21] proposed a feature split-and-merge module for eliminating the salient information of large objects. However, most of the aforementioned methods improve CNN-based object detection architectures, such as Faster R-CNN [3], and typically require NMS as a post-processing operation for eliminating redundant boxes in the training phase.
With the advancement of remote sensing technology, the acquisition of RSIs has significantly increased in both speed and area, leading to a growing demand for processing ample RSI data. NMS evidently hinders the training of object detection models involving abundant RSI data. As a potential new implementation of object detection, the DETR-based object detection method is worthy of attention and development in the RSOD field because it does not use NMS operations in the training phase. Thus, this study aims to introduce the DETR-based model and propose some improvements to better adapt the characteristics of RSIs.
Considering the aforementioned factors and inspired by the skip-attention module [22], we proposed the skip-encoder (SE) and skip-decoder (SD) modules for DINO [13], which currently achieves SOTA performance in natural images. The SE module enhances the model’s multiscale feature extraction capability at the encoder stage, thereby improving the capacity to learn small- and medium-sized targets of DINO [13]. In RSIs, small-to-medium-sized targets are often numerous and more prevalent. In tasks such as military reconnaissance and disaster emergency rescue, these small-to-medium-sized targets typically constitute the primary objectives. Therefore, the SE module is a better option for DINO [13] in RSOD. The SD module is used to replace the multi-head self-attention (MSA) in the decoder layer, transforming the computational complexity from growing quadratically with the length of the decoder input data to growing linearly, without decreasing the performance of the model. Finally, our proposed modules were evaluated on two representative remote sensing public datasets, including NWPU VHR-10 [23] and DIOR [24]. The contributions of the present study are summarized as follows:
  • To enhance the capabilities for detecting small- and medium-sized targets, we proposed the SE module, which is mainly used in the encoder stage of the model, to enhance the model’s ability to extract multiscale features.
  • We proposed the SD module, which is primarily used in the decoder stage and can reduce the computational cost of the model without affecting its performance.
Our method achieved a mean average precision ( mAP 50 ) of 94.8% on the small public dataset NWPU VHR-10 and of 75.6% on the large public dataset DIOR. The remainder of this article is organized as follows. In Section 2.1, we briefly review the related works on DETR-based models and the skip-attention [22] module. A detailed description of the proposed methodology is provided in Section 2.2, and the settings and results of our experiments are presented in Section 3. Finally, the conclusion is presented in Section 5.

2. Materials and Methods

2.1. Related Work

2.1.1. DETR-Based Model

Being a rare end-to-end model in the object detection field, the DETR [6] elegantly implements object detection by discarding NMS operations in the training phase. While the DETR [6] simplifies object detection, it faces two main challenges: First, its convergence speed is extremely slow, and second, the computational costs of using the original transformer increase quadratically with the sequence length.
Subsequent studies and improvements in the DETR [6] are chiefly aimed at addressing these two issues. First, the Deformable DETR [8] introduces the deformable attention module to replace the self-attention module, thereby reducing the quadratic complexity that increases with the sequence length to linear complexity. Figure 1 provides an example illustrating the implementation of the deformable attention module. The input data for this module comprise two components: a single vector query from the sequence data, and the feature map restored from the sequence.
Firstly, the query identifies a reference point on the feature map. Through a linear layer, it learns the offset points near the reference point on the feature map that need to be attended to. The values of the feature map at the positions corresponding to these offset points are the focus of this query. These values are combined with an attention weight derived from the query to produce the output. Compared with the self-attention module [7] where each query needs to be computed with all vectors of the input sequence, the deformable attention module [8] only needs to concentrate on a predetermined number of focus points. This considerably reduces the computational costs and eliminates many background interferences.
Along with addressing the slow convergence issue of self-attention in the DETR [6], some researchers intend to optimize the decoder stage of the DETR [6]. The Conditional DETR [9] suggests that learnable queries in the DETR [6] take too long to learn spatial information, which is one of the reasons for the slow convergence speed of the DETR [6]. Consequently, the Conditional DETR [9] proposes that spatial information can be artificially added to learnable queries in the decoder. The Anchor DETR [10] further proposes to transform randomly initialized learnable queries in the decoder into those learned from uniformly initialized anchor points, thus improving the learning of spatial coordinate information. Moreover, based on the design philosophy of the Anchor DETR [10], the DAB-DETR [11] improves the decoder part of the DETR [6]. In addition to spatial coordinates, it introduces scale information such as width and height, thereby significantly accelerating the convergence speed. The DN-DETR [12] incorporates denoising learning, thereby extending the DAB-DETR [11] to handle the instability of bipartite matching in loss computation and improving the learning capability for boxes. Furthermore, building upon the DN-DETR [12], DINO [13] refines denoising learning and introduces mixed query selection and Contrastive DeNoising (CDN) training.
As shown in Figure 2, DINO comprises a backbone, an encoder made up of 6 encoder layers, a decoder section consisting of 6 decoder layers, and a linear layer that transforms the decoder output into categories and box outputs. The backbone is used to extract multiscale feature maps from the input image, typically utilizing ResNet50 [25] as the backbone. Each encoder layer in DINO [13] adopts the deformable attention module [8], replacing the MSA [7] module. After passing through a total of 6 encoder layers, the resulting output is referred to as memory, which participates in the cross-attention computation in the decoder layer. Simultaneously, DINO [13] uses a Multi-Layer Perceptron (MLP) to derive an initial anchor from the encoder’s output memory, which then initializes learnable queries in the decoder input. This approach of incorporating spatial information more effectively improves convergence speed compared with direct random initialization of learnable queries in the DETR [6], which is the aforementioned mixed query selection. In the decoder stage, the input consists of three parts: First, a learnable sequence of one-dimensional vectors is randomly initialized, which is referred to as the embedding. Second, learnable queries are derived by the mixed query selection, which will play a role similar to position encoding. Third, noise data obtained by adding noise to the truth data primarily accelerates the training. It does not participate in the final bounding box matching process but instead learns to denoise through the CDN module. The specific denoising training process can be referred to [13].
In this study, as DINO [13] exhibited the SOTA performance among the current DETR [6] series models, we used DINO [13] as the baseline in the experiments and improved it to better meet the requirements of RSOD.

2.1.2. Skip-Attention

Skip-attention [22], introduced in 2023, enhances the computational efficiency of the vision transformer (ViT) [26]. As shown in Figure 3, this module approximates the output of the MSA from the preceding layer using a simpler module Φ . This module reduces computational redundancy without compromising on model performance.
Specifically, the module Φ consists of two linear layers, a depth-wise convolution (DwC) [27], and an efficient channel attention module (ECA) [28]. Given the output Z l 1 MSA R n × d of the MSA at layer l 1 , the approximation Z ^ l MSA R n × d of the output Z l MSA of the MSA at layer l can be calculated using the following formula:
Z ^ l MSA = ECA F C 2 Dwc F C 2 Z l 1 MSA
The input Z l 1 MSA first passes through the first linear layer FC 1 : R n × d R n × 2 d , thereby expanding the dimension of the channel. The sequence, with length n and channel dimension d, is reshaped into a 3D tensor of dimensions n × n × 2 d . The subsequent kernel of size r × r in DwC R n × n × 2 d R n × n × 2 d is applied to capture relationships between different input tokens. Of note, GeLU activations are used after FC 1 and DwC. Subsequently, the DwC output is flattened, which then enters FC 2 : R n × 2 d R n × d to be restored to the input dimension d. Finally, the ECA [28] first uses the global average pooling along the channel to aggregate features. Then, a 1 × 1 convolution with an adaptive kernel size proportional to the channel’s dimension and a sigmoid activation function are employed to learn the dependencies between different channels.
Skip-attention [22] is applied when the intermediate layers of the model have highly correlated vectors, thereby replacing the MSA to reduce computation. The correlation is analyzed through the CKA similarity [29]. However, although skip-attention [22] can be applied to highly correlated MSA modules [7], the design of the parametric function Φ in skip-attention [22] is neither suitable for RSOD nor can be used in the deformable attention module [8]. In this study, inspired by the skip-attention module [29], we designed SE and SD modules that are suitable for RSIs.

2.2. Methods

We propose two modules, SE and SD. The SE module replaces the deformable attention module [8] in the encoder stage, enhancing the model’s ability to extract features at different scales. The SD replaces part of the MSA module [7] in the decoder stage. The SD module can reduce a certain amount of computational complexity without significantly affecting the model’s performance. As the number of candidate Bboxes to be detected increases, the SD brings a greater reduction in computational load. The details of the two components and computational complexity are presented in the following.

2.3. Skip-Encoder Module

In the deformable attention module [8], the input is typically a concatenation of flattened multiscale feature maps. However, the parametric function Φ in the skip-attention module [22] does not apply to multiscale feature maps. The parametric function Φ of the skip-attention module [22] neglects the spatial information inherent in the input sequence. It transforms 1D sequence data directly into 2D data for DwC [27] operations, which is evidently flawed. Meanwhile, in the encoder stage, the indiscriminate stacking use of the deformable attention module [8] also leads to a lot of redundant computation.
Considering the aforementioned reasons, we designed the SE module. The SE module can replace the deformable attention module [8] because it can extract features from targets of different scales, reduce information interference between scales, and better handle complex backgrounds in RSIs. As illustrated in Figure 4, the proposed SE module is predominantly employed to replace the highly correlated adjacent layers within DINO’s encoder. In the SE module, a linear layer doubles the input data dimensionality, enhancing the detailed recognition of the image pattern. Then, the SE module reshapes the input data into four parts, consistent with the shapes of different scale feature maps input into the encoder. Then, each part is passed through its DwC [27] and point-wise convolution (PwC) [27] while aiming at information extraction at their specific scales without interference from other scales. Subsequently, all four parts are flattened, concatenated together, and passed through a linear layer for their restoration to a sequence consistent with the shape of the input data. Finally, an ECA module [28] is used to exchange information between channels at different scales, thus obtaining an output. The detailed implementation of the SE module can be referred to in Algorithm 1.
Algorithm 1 Implementation of the SE module
Input: Previous layer’s output Z i 1
Output: Z i
 1: X Linear( Z i 1 )
 2: X 2 d GELU(X)
  // reshape X 2 d into { x i } , matching the shapes of the multiscale feature maps input to the encoder
 3: { x i } Reshape( X 2 d )
  //Each x i passes through its DwC and PwC.
 4: for x in { x i }  do
 5:    t Dwc(x)
 6:    x n e w Pwc(t)
 7: end
 8: X n e w = Concat( { x n e w } )
  //restore the shape of X from R n × 2 d to R n × d .
 9: X d Linear( X n e w )
  //exchange information across different scales using ECA
 10: Z i ECA( X d )
The results from the SE module will be combined with the input to the SE and the output from the previous layer in a residual operation. This is primarily performed to maintain consistency with the original encoder layer process and preserve information.

2.4. Skip-Decoder Module

In the decoder stage, the input data are a sequence of one-dimensional vectors. Each 1D vector, after passing through the decoder, participates in the final category and Bbox output. That is, each 1D vector corresponds to the candidate Bbox on the image. Compared to natural images, RSIs often involve detection tasks of dense objects or extensive areas of images. Intuitively, the more candidate boxes, the better. The computational complexity of the MSA module [7] increases quadratically with the length of the input sequence. In the face of increasing demand for the number of candidate Bboxes, there is room for improvement. Therefore, we proposed the SD module for use in the decoder stage. The SD module can reduce computational complexity without significantly affecting the model’s performance. The increase in the number of candidate Bboxes only brings a linear increase in computational complexity.
As illustrated in Figure 5, the SD module separates the input sequence data and noise data during the decoder stage. First, the sequence data are passed through a linear layer to double its original dimension. Then, the sequence data are treated as 2D data with a width of 1 and a height equal to the sequence length, and DwC and PwC [27] are performed on the 2D plane. In this case, DwC [27] is equivalent to exchanging information between single dimensions of the sequence data, and PwC [27] enables the exchange of information within the dimensions of a single vector itself. This allows for exploring information across all data in the sequence without adding any extra artificial information. We also use an additional DwC [27] to enhance the degree of information exchange between different vectors. Finally, we restore the original dimensions through a linear layer and use ECA [28] to achieve information exchange on the dimension.
For the noise part, the denoising learning of the DINO [13] model requires the unique function of the attention mask in MSA [7]. To maintain the denoising process, we adopt the concept of the cross-attention module to facilitate the implementation of denoising learning in the SD module. Specifically, we use the noise as the query for MSA [7], and the sequence data as the key and value to facilitate the learning of the noise part. This ensures that the noise part can learn information from the Sequence, while the Sequence does not learn from the noise, preventing information leakage that could affect the training process.
From the computational complexity perspective, if the input sequence length is n, and the noise component is fixed at a length of 200, the computational complexity through the SD module can be summarized as O ( n d d + 200 n d ) , where we have simplified some constant factors to emphasize the importance of each variable. In comparison to the computational complexity of MSA [7], which is O ( n n d ) , it is evident that the SD module can provide a more lightweight computational cost as n, corresponding to the number of candidate Bboxes, increases.

2.5. Network Details

Our proposed module is mainly an enhancement of a DINO-based foundation. As illustrated in Figure 6, the SD and SE modules are applied to specific layers within the encoder and decoder of DINO [13], respectively. Further network details are summarized as follows:
  • Backbone: We used a pre-trained ResNet-50 [25] on ImageNet-1K [30] as the backbone of our model, returning the last three feature maps. The fourth feature map is convolved from the final feature map output by the backbone, thus forming four feature maps of different scales as the input for the transformer [7] stage.
  • Transformer Encoder: The encoder consists of six layers. In our experiments, the proposed SE module mainly replaced the deformable attention module [8] in the 4th, 5th, and 6th encoder layers of DINO [13], which resulted in optimal performance. The other encoder layers are consistent with those of DINO [13], adopting the deformable attention module [8] instead of the MSA module [7].
  • Transformer Decoder: The decoder consists of six layers. The proposed SD module mainly replaced the MSA module in the 3rd and 4th decoder layers of DINO [13]. In line with the approach adopted by DINO [13], the multi-head cross-attention module [7] in the decoder layer was replaced with the deformable attention module [8].
  • Loss Function: We did not add a new loss function. The most suitable results were selected from the output sequence of the decoder through bipartite matching. These results were then used for calculating the three main loss functions, including focal loss [5] for classification, L1 loss, and generalized intersection over union loss [31] for learning the bounding box.

3. Results

This section introduces the basic experimental setup, including the dataset, evaluation metrics, and implementation details. Subsequently, we compare our model with mainstream RSOD models. Then, the impact of our proposed module on the model’s performance is evaluated using various metrics. Finally, ablation experiments have been conducted to demonstrate the effectiveness of the proposed module.

3.1. Datasets

We selected two datasets, NWPU VHR-10 and DIOR. NWPU VHR-10 is a dataset with a smaller volume of data, smaller image sizes, and fewer target categories. It presents lower training difficulty and can reflect the model’s performance on the datasets containing fewer data. By contrast, DIOR involves a larger volume of data, larger image sizes, and more target categories and presents higher training difficulty. It can reflect the model’s performance on higher data-containing datasets. The introductions of these datasets are as follows:
  • NWPU VHR-10: This dataset constitutes an aerial image dataset for bounding box object detection and encompasses ten categories. The second version of this dataset contains 1172 images (400 × 400 pixels) cropped from 650 aerial imagery with sizes ranging from 533 × 597 to 1728 × 1028 pixels. We used the prevalent data distribution, that is, 75% of the dataset (879 images) was allocated for training and the remaining 25% (293 images) was allocated for testing.
  • DIOR: This dataset is the most representative object detection dataset for RSIs. It contains 23,463 images (800 × 800 pixels), encompassing 20 categories. Following the mainstream setup, this dataset allocated 11,725 images (50% of the dataset) for training, with the remaining 11,738 images being designated for testing.

3.2. Evaluation Metrics

We employed the average precision (AP) of each class and the mAP of all the classes for evaluating the model’s performance. The AP and mAP are metrics that are commonly used in the remote sensing field. A higher mAP indicates a better object detection capability of the model. The AP and mAP are calculated as follows:
AP = 0 1 P ( R ) d R
mAP = 1 N c i = 1 N c A P i
where P and R represent the precision and the recall, respectively, and N c denotes the number of classes contained in the current dataset. The precision P and the recall R are defined as
P = N T P N T P + N F P
R = N T P N T P + N F N
where N T P , N F P , and N F N denote the number of true positives, false positives, and false negatives, respectively. Suppose the intersection over union (IoU) of the model’s predicted bounding box and the ground truth exceeds a specific value, such as 0.5, and the model’s predicted class is correct. In that case, we consider them as true positives. In this study, the mainstream metric in remote sensing mAP 50 was primarily used as the evaluation criterion for performance comparison. In the “Model Analysis” section, we also provide mAP 75 and mAP @ 50 : 5 : 95 as additional metrics for measuring the model’s performance. Here, the subscripts 50 and 75 in the mAP represent the values when the IoU threshold for true positives is 50 and 75, respectively. mAP @ 50 : 5 : 95 represents the average mAP value obtained with an IoU threshold ranging from 50 to 95, with a step size of 5. Moreover, we adopted the standard for target-scale division provided by the COCO [32] dataset. Small refers to targets less than 32 × 32 pixels, which are classified as small targets. Medium requires targets to be between 32 × 32 and 96 × 96 pixels, and large requires targets to be larger than 96 × 96 pixels. Finally, we provided the mAP @ 50 : 5 : 95 of the AP s , AP m , and AP l at different scales, which are used for a better comparison of performance across various scales. The subscripts correspond to the recognition rates AP s , AP m , and AP l of the small, medium, and large scales, respectively.

3.3. Implementation Details

Our experimental environment was the PyTorch framework and our models were trained using two NVIDIA Tesla T4 GPUs. Then, we adopted the AdamW optimizer [33,34] with a weight decay of 1 × 10 4 , and the models used an initial learning rate of 1 × 10 4 .
In the experiment conducted on the NWPU VHR-10.v2 dataset, the batch size was set to 2 and the number of epochs was set to 50. The learning rate was dropped to 0.1 times the value at the 35th epoch. Data augmentation was performed using random horizontal flipping and cropping. The input size of the images was fixed at 400 × 400 pixels.
In the experiment conducted on the DIOR dataset, the batch size of the model was set to 2 and the number of epochs was set to 18. Data augmentation was performed using only random horizontal flipping. The learning rate dropped to 0.1 times its original value at the 14th epoch. The input size of the images was fixed at 800 × 800 pixels.
We also used the same training settings to train the previously mentioned DETR [6], Deformable DETR [8], and DINO [13]. Apart from the DETR [6], which used overall pre-trained weights on the COCO dataset for 300 epochs because of its slow training speed, all the other models only used the pre-trained weights from the ImageNet-1K [30] classification task for the ResNet50 [25] backbone. These models were compared with the current mainstream models in RSOD and thus served as a new standard baseline for reference.

3.4. Performance Comparison

In this part, our comparative study primarily focuses on key models, including Fast R-CNN [2], Faster R-CNN [3], Yolov3 [35], FPN [36], FCOS [37], GLNet [18], ABNet [14], CoF-Net [16], and GLSANet [15]. These models were selected for comparison mainly because they have been trained on the NWPU VHR-10 and DIOR datasets, thereby providing sufficient reference value.
  • Results on NWPU VHR-10: In Table 1, after DINO [13] used the SE module, most categories of NWPU VHR-10 exhibited significant improvement, with the overall mAP50 increasing from 92.1% to 94.8%, thereby attaining SOTA performance. Compared with the mainstream models of RSOD, DINO [13] with the SE module demonstrated superior comprehensive performance. On the other hand, the SD module also brought a minor improvement to DINO [13], which aligns with our motivation for designing the SD, that is, to reduce computational complexity without compromising model performance. Additionally, an odd phenomenon observed is that the model performance did not match that of using the SE or SD module individually when the SD and SE were used together. This will be explained in the subsequent model analysis section. Overall, the results obtained with NWPU VHR-10 reflect that our SE module can comprehensively enhance DINO’s feature extraction capability, thereby improving the model’s performance. It also proves that the SE module does not affect the model’s performance.
  • Results on DIOR: As shown in Table 2, our SE module enhanced the overall mAP50 of DINO [13] from 74.6% to 75.6%, finally achieving a performance close to the SOTA on the DIOR dataset. In the results of DINO [13] using the SE module, an improvement can be observed in the recognition of common small- and medium-sized object categories in RSIs, such as airplanes, bridges, ships, vehicles, and storage tanks. For instance, in the airplane class, the SE module increased the mAP50 from 71.1% to 76.3%, enhancing the performance by 5.2%. On the other hand, the SD module did not compromise the model’s performance on the large-scale dataset DIOR, reflecting the generalizability of the SD module. In summary, the results on DIOR reflect the performance improvements in various aspects of DINO [13] provided by the SE module, illustrating the role of the SE in mining useful information. This also reflects that the SD module can maintain the model’s performance while reducing computational complexity, regardless of the size of the dataset.

3.5. Model Analysis

To further analyze the role of the SE and SD modules for DINO [13], more comprehensive indicators were used for comparison. First, different scales were evaluated using AP s , AP m , and AP l . Then, stricter overall evaluation indicators such as mAP 75 and mAP @ 50 : 5 : 95 were used. Finally, we computed the model’s parameters, evaluated the computational costs in giga floating-point operations per second (GFLOPs), and assessed the inference speed in frames per second (FPS).
  • Model analysis on NWPU VHR-10: As shown in Table 3, under the same training conditions, either the SE or SD module can enhance performance on small- and medium-sized targets, which are useful for RSOD. It is noteworthy that the SE module increased the AP s from 30.5% to 36.5%, and the SD module improved the AP s from 30.5% to 36.7%. However, when the SE and SD modules were used in combination, the AP s only increased from 30.5% to 32.9%. We attributed this phenomenon to the fact that NWPU VHR-10 is a small dataset, and both the SD and SE modules enhance the AP s , leading to overfitting, which in turn significantly decreases the performance on the AP s . In Figure 7, we provide representative detection results for each category in the NWPU VHR-10 dataset.
  • Model analysis on DIOR: As shown in Table 4, the SE module slightly increased DINO’s mAP 50 from 74.6% to 75.6%, and the SD module maintained DINO’s model performance. On DIOR, the individual use of the SE and SD modules brings a slight improvement to the detection of medium-sized targets but does not significantly enhance the AP s for small-sized targets. This is primarily because the DIOR dataset, a large dataset with 20 categories, presented high training difficulty, and there is still a bottleneck in the model’s performance. When the SD and SE modules are used in combination, they can increase the AP s from 15.6% to 16.6%. This not only demonstrates that both the SD and SE can enhance the model’s ability to detect small targets but also validates the previously mentioned overfitting phenomenon of the SD and SE on NWPU VHR-10. Similarly, in Figure 8, we present representative detection results for each category in the DIOR dataset.
Finally, as shown in Figure 9, we analyzed the influence of the SE and SD modules on the model’s convergence time. We observed that both on the smaller-scale NWPU VHR-10 dataset and the large-scale DIOR dataset, the SE and SD modules significantly enhance the convergence speed.

3.6. Ablation Study

In this section, we mainly conducted ablation experiments in two directions. First, we employed CKA analysis [29] and heatmaps to elucidate why the deformable attention module and MSA in specific layers of DINO [13] were chosen to be replaced with the SD and SE. Second, we verified the impact of using the SD or SE on different numbers of layers.
First, as shown in Figure 10, we can observe that, whether it is the NWPU VHR-10 or the DIOR dataset, and whether it is the encoder stage or the decoder stage, there are areas of high correlation. This indicates sufficient computational redundancy in the architectural design of DINO. Specifically, during the encoder stage, we can see that there is a high correlation between the second to fourth layers corresponding to one to four and between the fourth to sixth layers corresponding to three to six. However, compared to the encoder stage, during the decoder stage, although the CKA similarity [29] can also indicate which specific decoder layers have high correlation, it is not accurate enough. As shown in Figure 11, in the output of each decoder layer, most of the vectors typically correspond to redundant boxes with low category probability scores, which can affect the accuracy of CKA similarity [29]. Therefore, in the use of the SE module, we mainly selected the encoder layers with high CKA similarity [29]. For the SD module, we primarily considered the CKA similarity [29], the Pearson correlation coefficient of the heatmap for boxes with high probability, and the trade-off between the combined use of MSA [7] and the SD.
Second, as shown in Table 5, a gradual increase was observed in the model’s mAP 50 as more layers of DINO’s encoder were replaced by the layers of the SE module. Correspondingly, each layer of the SE module contributes to an approximately 2% increase in the model’s parameters and GFLOPs. Consequently, this leads to a 1–2% decrease in inference speed, indicating that optimizing the SE module is one of our future improvement directions. Overall, even after applying a single SE module on DINO [13], the mAP 50 increased from 92.1% to 93.4%. This indirectly confirms our hypothesis that the SE can enhance feature extraction capabilities, thereby improving the model’s performance.
Moreover, we can observe that with the use of the SD module, each layer of the SD module can bring about a reduction of 0.2 GFLOPs and also introduce approximately 0.5 M parameters. Given that the decoder part typically accounts for approximately 10% of the computational load in DINO, a single layer of the SD can bring about a 3.6% reduction in computational load for the decoder. Hence, when the input image is of a smaller magnitude, such as 400 × 400 images on NWPU VHR-10, and the demand for the bounding box is not substantial, a single SD reduces the computational cost by 0.4%. Although this is not a significant improvement, the SD module not only maintains the performance of the original model but also brings about some enhancement. For future RSIs requiring more bounding box recognition, the SD module offers further optimization. In addition, we also found that as the number of layers replaced by the SD module increases, the performance of the model does not always improve, but rather, the increase in performance turns into a decrease. We believe this is mainly because the SD module, composed of CNNs, plays a different role in the network compared to MSA [7]. Therefore, when used in combination with MSA [7], it can bring about a better performance.

4. Discussion

4.1. Applicability

Both the SE and SD modules can improve the model’s ability, but they each have different focuses. The use of these two modules should be based on actual needs.
First, for wide-range RSIs with complex backgrounds, only using MSA [7] to consider all scale information may increase training difficulty and have negative effects. Thus, the SE module can be combined with modules like MSA [7] that perform multiscale feature fusion extraction. As for when to use the SE module, mathematical indicators such as the CKA similarity [29], which evaluates the hidden representation of the neural network, can be used to assist in the selection. If there are some modules with high similarity outputs, it indicates that these modules have some computational redundancy. At this time, the SE module can shift this unnecessary computation and reduce the difficulty of feature extraction at different scales. Importantly, no perfect mathematical indicator exists to explain the hidden representations of neural networks. Existing indicators mainly provide a general direction. Optimal use of the SE module requires consideration of different experimental results.
On the other hand, detection tasks on RSIs often require dense objects or need to cover a wide area, where we typically need a sufficient number of candidate boxes to detect targets or to prevent missed detections. At this time, the length of the input sequence data in the decoder stage will increase, and MSA [7] will bring a quadratic increase in computation, which hinders large-scale data processing. The SD module can provide a better option without reducing the model’s performance. However, in the decoder stage, although the SD module can reduce computational cost, it cannot fully replace the role of MSA. MSA performs sufficient information exchange for each vector in the input sequence, while the SD module mainly conducts information exchange on the overall sequence through the combination of PwC and DwC. The SD module is more like a trade-off between computational cost and performance. When there is computational redundancy in the decoder, the SD module can be used to achieve a reduction in computational costs while maintaining model performance. However, the decoder also cannot simply use similarity indicators like CKA to detect computational redundancy, because the representation data in the decoder corresponds to the actual output candidate boxes. This means that most boxes overlap and are redundant boxes that will be filtered, which can lead to misjudgments by the similarity indicators. Therefore, the overall CKA similarity and the similarity after filtering out those with low probability vectors are used in combination to determine the degree of redundancy. These analyses then guide the application of the SD module.

4.2. Limitations

Although our research has made some important findings, we must acknowledge that it has certain limitations. First, the public datasets used in the experiments consist solely of optical RSIs and do not include multispectral and hyperspectral RSIs. Compared to optical RSIs, hyperspectral and multispectral RSIs provide more channel information reflecting the physical properties of the target. The SE and SD modules can be extended to these two types of data. However, due to hardware limitations and data acquisition, we acknowledge a certain gap in demonstrating the generalizability of the SE and SD modules. We hope to extend the application of the SE and SD modules to other types of remote sensing data in our future work.
Second, the SE and SD show a slight performance decrease of about 1% in detecting large-scale targets, which is one of the directions that needs improvement. The detection performance for large-scale targets may be primarily due to the lower degree of full-scale information exchange in the SE module, compared to deformable attention. The extraction of full-scale information can affect the receptive field of the model, thereby further impacting the detection of large-scale targets. We will attempt to improve this limitation of the SE module in our future work.
Third, although the SE module can enhance performance, it has some drawbacks. Compared with the deformable attention module [8], due to the addition of four different scales of DwC [27] and PwC [27], the model’s parameters slightly increase in a single SE module. A single SE module adds approximately one million parameters (compared with the total parameters of DINO [13], which is 46.6 M) and increases the GFLOPs by 2%.

4.3. Other Directions

The SE module’s ability to enhance the model’s multiscale features suggests its potential for future application in fields that demand high recognition accuracy for small-to-medium-sized targets, such as object detection in medical imaging. On the other hand, the SD module can be extended to scenarios that require a reduction in model computational cost, yet need large-scale object recognition, such as object detection in autonomous driving.

5. Conclusions

In this study, we introduced the DINO [13] model and the skip-attention module [22]. Subsequently, we proposed the SE module that can be applied to the encoder stage of the model and the SD module for the decoder stage. The SE module can enhance the model’s ability to extract multiscale features. The SD module can reduce computational complexity and maintain the performance of the model. Experiments on the NWPU VHR-10 and DIOR datasets were conducted using the DETR [6], the Deformable DETR [8], DINO [13], and DINO [13] with the SE and SD modules. Our SE and SD modules can significantly enhance the accuracy of DINO [13] on small- and medium-sized targets, which is a useful improvement for RSOD tasks. Finally, we achieved SOTA performance on NWPU VHR-10 and near-SOTA performance on DIOR.
Despite the significant improvement in performance that the SE and SD modules bring to DINO [13], the modules have certain limitations. First, the SE introduces a slight increase in the model’s parameters and GFLOPs. Creating a more lightweight SE module is one of our future improvement goals. Second, we also intend to extend the application of the SE and SD modules to other remote sensing tasks in the future.

Author Contributions

Conceptualization, F.Y.; methodology, F.Y.; software, F.Y.; validation, F.Y.; formal analysis, F.Y.; investigation, F.Y.; resources, F.Y. and G.C.; data curation, F.Y.; writing—original draft preparation, F.Y. and G.C.; writing—review and editing, F.Y. and J.D.; visualization, F.Y.; supervision, F.Y.; project administration, F.Y., G.C. and J.D.; funding acquisition, G.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the National Natural Science Foundation of China (No. 42071172).

Data Availability Statement

The data presented in this study are available at https://github.com/Afakash/Skip-Multiscale-Attention (accessed on 25 July 2024).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 580–587. [Google Scholar]
  2. Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
  3. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
  4. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 779–788. [Google Scholar]
  5. Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
  6. Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-end object detection with transformers. In Proceedings of the European Conference on Computer Vision, Glasgow, UK, 23–28 August 2020; pp. 213–229. [Google Scholar]
  7. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 5998–6008. [Google Scholar]
  8. Zhu, X.; Su, W.; Lu, L.; Li, B.; Wang, X.; Dai, J. Deformable detr: Deformable transformers for end-to-end object detection. arXiv 2020, arXiv:2010.04159. [Google Scholar]
  9. Meng, D.; Chen, X.; Fan, Z.; Zeng, G.; Li, H.; Yuan, Y.; Sun, L.; Wang, J. Conditional detr for fast training convergence. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 11–17 October 2021; pp. 3651–3660. [Google Scholar]
  10. Wang, Y.; Zhang, X.; Yang, T.; Sun, J. Anchor detr: Query design for transformer-based detector. In Proceedings of the AAAI Conference on Artificial Intelligence, Online, 22 February–1 March 2022; Volume 36, pp. 2567–2575. [Google Scholar]
  11. Liu, S.; Li, F.; Zhang, H.; Yang, X.; Qi, X.; Su, H.; Zhu, J.; Zhang, L. Dab-detr: Dynamic anchor boxes are better queries for detr. arXiv 2022, arXiv:2201.12329. [Google Scholar]
  12. Li, F.; Zhang, H.; Liu, S.; Guo, J.; Ni, L.M.; Zhang, L. Dn-detr: Accelerate detr training by introducing query denoising. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 13619–13627. [Google Scholar]
  13. Zhang, H.; Li, F.; Liu, S.; Zhang, L.; Su, H.; Zhu, J.; Ni, L.M.; Shum, H.Y. Dino: Detr with improved denoising anchor boxes for end-to-end object detection. arXiv 2022, arXiv:2203.03605. [Google Scholar]
  14. Liu, Y.; Li, Q.; Yuan, Y.; Du, Q.; Wang, Q. ABNet: Adaptive balanced network for multiscale object detection in remote sensing imagery. IEEE Trans. Geosci. Remote Sens. 2021, 60, 1–14. [Google Scholar] [CrossRef]
  15. Hu, X.; Zhang, P.; Zhang, Q.; Yuan, F. GLSANet: Global-Local Self-Attention Network for Remote Sensing Image Semantic Segmentation. IEEE Geosci. Remote Sens. Lett. 2023, 20, 1–5. [Google Scholar] [CrossRef]
  16. Zhang, C.; Lam, K.M.; Wang, Q. Cof-net: A progressive coarse-to-fine framework for object detection in remote-sensing imagery. IEEE Trans. Geosci. Remote Sens. 2023, 61, 1–17. [Google Scholar] [CrossRef]
  17. Dong, X.; Qin, Y.; Fu, R.; Gao, Y.; Liu, S.; Ye, Y. Remote sensing object detection based on gated context-aware module. IEEE Geosci. Remote Sens. Lett. 2022, 19, 1–5. [Google Scholar] [CrossRef]
  18. Teng, Z.; Duan, Y.; Liu, Y.; Zhang, B.; Fan, J. Global to local: Clip-LSTM-based object detection from remote sensing images. IEEE Trans. Geosci. Remote Sens. 2021, 60, 1–13. [Google Scholar] [CrossRef]
  19. Ye, Y.; Ren, X.; Zhu, B.; Tang, T.; Tan, X.; Gui, Y.; Yao, Q. An adaptive attention fusion mechanism convolutional network for object detection in remote sensing images. Remote Sens. 2022, 14, 516. [Google Scholar] [CrossRef]
  20. Wang, J.; Wang, Y.; Wu, Y.; Zhang, K.; Wang, Q. FRPNet: A feature-reflowing pyramid network for object detection of remote sensing images. IEEE Geosci. Remote Sens. Lett. 2020, 19, 1–5. [Google Scholar] [CrossRef]
  21. Ma, W.; Li, N.; Zhu, H.; Jiao, L.; Tang, X.; Guo, Y.; Hou, B. Feature split–merge–enhancement network for remote sensing object detection. IEEE Trans. Geosci. Remote Sens. 2022, 60, 1–17. [Google Scholar] [CrossRef]
  22. Venkataramanan, S.; Ghodrati, A.; Asano, Y.M.; Porikli, F.; Habibian, A. Skip-Attention: Improving Vision Transformers by Paying Less Attention. arXiv 2023, arXiv:2301.02240. [Google Scholar]
  23. Cheng, G.; Han, J.; Zhou, P.; Guo, L. Multi-class geospatial object detection and geographic image classification based on collection of part detectors. ISPRS J. Photogramm. Remote Sens. 2014, 98, 119–132. [Google Scholar] [CrossRef]
  24. Li, K.; Wan, G.; Cheng, G.; Meng, L.; Han, J. Object detection in optical remote sensing images: A survey and a new benchmark. ISPRS J. Photogramm. Remote Sens. 2020, 159, 296–307. [Google Scholar] [CrossRef]
  25. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
  26. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
  27. Chollet, F. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1251–1258. [Google Scholar]
  28. Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient channel attention for deep convolutional neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 11534–11542. [Google Scholar]
  29. Kornblith, S.; Norouzi, M.; Lee, H.; Hinton, G. Similarity of neural network representations revisited. In Proceedings of the International Conference on Machine Learning, Long Beach, CA, USA, 10–15 June 2019; pp. 3519–3529. [Google Scholar]
  30. Deng, J.; Dong, W.; Socher, R.; Li, L.J.; Li, K.; Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA, 20–25 June 2009; pp. 248–255. [Google Scholar]
  31. Rezatofighi, H.; Tsoi, N.; Gwak, J.; Sadeghian, A.; Reid, I.; Savarese, S. Generalized intersection over union: A metric and a loss for bounding box regression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 658–666. [Google Scholar]
  32. Lin, T.Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft coco: Common objects in context. In Proceedings of the Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, 6–12 September 2014; Proceedings, Part V 13. Springer: Berlin/Heidelberg, Germany, 2014; pp. 740–755. [Google Scholar]
  33. Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
  34. Loshchilov, I.; Hutter, F. Decoupled weight decay regularization. arXiv 2017, arXiv:1711.05101. [Google Scholar]
  35. Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
  36. Lin, T.Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125. [Google Scholar]
  37. Tian, Z.; Shen, C.; Chen, H.; He, T. Fcos: Fully convolutional one-stage object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 9627–9636. [Google Scholar]
Figure 1. Illustration of the different attention modules. (a) Simplified architecture of the deformable attention module. (b) Simplified architecture of the self-attention module.
Figure 1. Illustration of the different attention modules. (a) Simplified architecture of the deformable attention module. (b) Simplified architecture of the self-attention module.
Remotesensing 16 02884 g001
Figure 2. An overview of DINO. The input RSI is processed by the backbone for feature map extraction. These maps are flattened into a one-dimensional sequence feature, with the application of spatial position encoding. These data will be input into the transformer’s encoder and decoder, with the classification results and spatial coordinates obtained through two simple MLP operations. The obtained candidate categories and boxes will be selected through the matching algorithm for the most suitable results to participate in loss calculation. The noise data in the decoder input will complete the denoising learning through the CDN. The FFN denotes the Feedforward Neural Network.
Figure 2. An overview of DINO. The input RSI is processed by the backbone for feature map extraction. These maps are flattened into a one-dimensional sequence feature, with the application of spatial position encoding. These data will be input into the transformer’s encoder and decoder, with the classification results and spatial coordinates obtained through two simple MLP operations. The obtained candidate categories and boxes will be selected through the matching algorithm for the most suitable results to participate in loss calculation. The noise data in the decoder input will complete the denoising learning through the CDN. The FFN denotes the Feedforward Neural Network.
Remotesensing 16 02884 g002
Figure 3. Illustration of the skip-attention module.
Figure 3. Illustration of the skip-attention module.
Remotesensing 16 02884 g003
Figure 4. Illustration of the SE module. Suppose the output of the i-th layer of the encoder highly correlates with those of its subsequent i + 1 and i + 2 layers. In that case, the output of the i-th layer can be leveraged through the SE modules of the latter two layers. The SE allows the model to shift from redundant computation to information extraction across different scales.
Figure 4. Illustration of the SE module. Suppose the output of the i-th layer of the encoder highly correlates with those of its subsequent i + 1 and i + 2 layers. In that case, the output of the i-th layer can be leveraged through the SE modules of the latter two layers. The SE allows the model to shift from redundant computation to information extraction across different scales.
Remotesensing 16 02884 g004
Figure 5. Illustration of the SD module.
Figure 5. Illustration of the SD module.
Remotesensing 16 02884 g005
Figure 6. Illustration of replacing the SE and SD modules in the overall architecture of DINO. “SE encoder layer” denotes the SE module replacing the deformable attention of the encoder layer. “SD and deformable attention decoder layer” suggests the use of the SD module instead of MSA, with deformable attention as the cross-attention.
Figure 6. Illustration of replacing the SE and SD modules in the overall architecture of DINO. “SE encoder layer” denotes the SE module replacing the deformable attention of the encoder layer. “SD and deformable attention decoder layer” suggests the use of the SD module instead of MSA, with deformable attention as the cross-attention.
Remotesensing 16 02884 g006
Figure 7. Some representative detection results of DINO-SE on the NWPU VHR-10.v2 dataset. (a) Airplane. (b) Baseball. (c) Bridge. (d) Ground track field. (e) Harbor. (f) Ship. (g) Tennis court and basketball. (h) Vehicle.
Figure 7. Some representative detection results of DINO-SE on the NWPU VHR-10.v2 dataset. (a) Airplane. (b) Baseball. (c) Bridge. (d) Ground track field. (e) Harbor. (f) Ship. (g) Tennis court and basketball. (h) Vehicle.
Remotesensing 16 02884 g007
Figure 8. Some representative detection results of DINO-SE on the DIOR dataset. (a) Airplane. (b) Airport. (c) Storage tank and vehicle. (d) Bridge, ground track field, and stadium. (e) Chimney. (f) Golf field and dam. (g) Expressway toll station, overpass, and expressway service area. (h) Ship and harbor. (i) Storage tank. (j) Basketball court, and tennis court. (k) Train station. (l) Windmill. Red boxes are the missing predictions.
Figure 8. Some representative detection results of DINO-SE on the DIOR dataset. (a) Airplane. (b) Airport. (c) Storage tank and vehicle. (d) Bridge, ground track field, and stadium. (e) Chimney. (f) Golf field and dam. (g) Expressway toll station, overpass, and expressway service area. (h) Ship and harbor. (i) Storage tank. (j) Basketball court, and tennis court. (k) Train station. (l) Windmill. Red boxes are the missing predictions.
Remotesensing 16 02884 g008
Figure 9. The influence of the SE and SD modules on the model’s convergence speed.
Figure 9. The influence of the SE and SD modules on the model’s convergence speed.
Remotesensing 16 02884 g009
Figure 10. CKA analysis of the representations of each layer in DINO. Each position’s value represents the degree of similarity between the outputs of the two layers, with a higher value indicating greater computational redundancy.
Figure 10. CKA analysis of the representations of each layer in DINO. Each position’s value represents the degree of similarity between the outputs of the two layers, with a higher value indicating greater computational redundancy.
Remotesensing 16 02884 g010
Figure 11. A heatmap of the overlapping regions for the candidate boxes corresponding to the feature vectors at each layer. (a) Rows corresponding to the areas of interest without considering the probability score weights of each box. (b) Rows corresponding to the areas of interest considering the probability score weights of each box.
Figure 11. A heatmap of the overlapping regions for the candidate boxes corresponding to the feature vectors at each layer. (a) Rows corresponding to the areas of interest without considering the probability score weights of each box. (b) Rows corresponding to the areas of interest considering the probability score weights of each box.
Remotesensing 16 02884 g011
Table 1. A comparison with the state of the arts on NWPU-VHR 10. * denotes our implementation, and indicates the model’s overall use of pre-trained weights. The best results are marked in bold.
Table 1. A comparison with the state of the arts on NWPU-VHR 10. * denotes our implementation, and indicates the model’s overall use of pre-trained weights. The best results are marked in bold.
ModelBackboneAirplaneShipStorage
Tank
Baseball
Diamond
Tennis
Court
Basketball
Court
Ground
Track Field
HarborBridgeVehicle mAP 50
Fast R-CNN [1]ResNet-5090.990.689.347.310085.984.988.280.369.882.7
Faster R-CNN [3]ResNet-5090.986.390.598.289.769.610080.161.578.184.5
YOLOv3 [35]DarkNet5399.681.880.398.380.681.899.574.389.687.087.3
FPN [36]ResNet-5010090.910096.890.795.110093.750.990.290.8
FCOS [37]ResNet-10110085.296.997.895.880.399.795.081.888.992.1
GLNet [18]ResNet-10110084.498.581.688.210097.288.490.988.791.8
ANnet [14]ResNet-5010092.697.897.899.396.099.994.369.095.694.2
CoF-Net [16]ResNet-5010090.996.198.891.195.810091.489.790.894.5
GLSANet [15]ResNet-5099.995.897.199.498.886.199.597.584.886.894.5
DETR *,† [6]ResNet-5010088.698.696.594.393.910091.870.083.791.7
Deformable DETR * [8]ResNet-5097.588.991.193.389.487.694.483.773.779.187.9
DINO * [13]ResNet-5010089.096.996.195.888.910091.674.588.592.1
DINO-SE *ResNet-5010094.197.495.195.095.610093.788.089.494.8
DINO-SD *ResNet-5010093.796.495.395.291.510091.583.788.693.6
DINO-SE-SD *ResNet-5099.793.096.495.196.696.510093.669.987.292.8
Table 2. A comparison with the state of the arts on DIOR. * denotes our implementation, and indicates the model’s overall use of pre-trained weights. The best results are marked in bold.
Table 2. A comparison with the state of the arts on DIOR. * denotes our implementation, and indicates the model’s overall use of pre-trained weights. The best results are marked in bold.
ModelBackboneALAYBFBCBGCMDMEAESGCGFHBOPSPSDSTTCTSVHWM mAP 50
Fast R-CNN [2]ResNet-5044.266.867.060.515.672.352.065.944.872.162.946.238.032.171.035.058.337.919.238.150.0
Faster R-CNN [3]ResNet-5050.362.666.080.928.868.247.358.548.160.467.043.946.958.552.442.479.548.034.865.455.5
YOLOv3 [35]DarkNet5372.229.274.078.631.269.726.948.654.431.161.144.949.787.470.668.787.329.448.378.757.1
FPN [36]ResNet-5054.074.563.380.744.872.560.075.662.376.076.846.457.271.868.353.881.159.543.181.265.1
FCOS [37]ResNet-10161.182.676.687.642.880.664.179.167.282.079.646.457.872.164.863.485.262.843.887.569.4
GLNet [18]ResNet-10162.983.272.081.150.579.367.486.270.981.883.051.862.672.075.353.781.365.543.489.270.7
ANnet [14]ResNet-5066.884.074.987.750.378.267.885.974.279.781.255.461.675.174.066.787.062.253.689.172.8
CoF-Net [16]ResNet-5084.085.382.690.047.180.773.389.374.084.583.257.462.282.977.668.289.968.749.385.275.8
GLSANet [15]ResNet-5095.878.992.987.950.781.155.579.874.171.687.666.465.595.292.486.394.850.662.189.277.9
DETR *,† [6]ResNet-5063.878.671.685.121.776.341.768.345.474.074.224.846.133.836.940.081.647.538.378.856.4
Deformable DETR * [8]ResNet-5054.281.572.184.441.075.358.872.565.673.470.325.654.556.260.543.782.060.839.681.562.7
DINO * [13]ResNet-5071.188.880.886.749.380.172.688.977.079.682.357.361.776.572.172.287.166.652.788.874.6
DINO-SE *ResNet-5076.387.881.086.750.981.271.988.078.080.782.756.164.177.175.273.086.970.953.689.475.6
DINO-SD *ResNet-5070.189.779.286.951.882.369.688.078.180.781.756.064.175.771.971.887.465.853.688.974.7
DINO-SE-SD *ResNet-5071.989.078.787.751.981.568.989.278.979.983.553.464.676.476.973.687.967.554.690.475.3
AL: Airplane. AT: Airport. BF: Baseball Field. BC: Basketball Court. BG: Bridge. CM: Chimney. DM: Dam. EA: Expressway Service Area. ES: Expressway Toll Station. GC: Golf Course. GF: Ground Track Field. HB: Harbor. OP: Overpass. SP: Ship. SD: Stadium. ST: Storage Tank. TC: Tennis Court. TS: Train Station. VH: Vehicle. WM: Windmill.
Table 3. The model analysis on NWPU VHR-10. indicates the model’s overall use of pre-trained weights. The best results are marked in bold.
Table 3. The model analysis on NWPU VHR-10. indicates the model’s overall use of pre-trained weights. The best results are marked in bold.
ModelBackboneEpochs AP s AP m AP l mAP 50 mAP 75 mAP @ 50 : 5 : 95 ParamsGFLOPsFPS
DETR [6]ResNet-505029.752.767.591.765.758.441.3M16.040.0
Deformable DETR [8]ResNet-505027.251.361.187.964.555.139.8M34.120.3
DINO [13]ResNet-505030.557.465.492.171.662.146.6M55.115.7
DINO-SEResNet-505036.560.364.094.870.862.749.9M58.115.2
DINO-SDResNet-505036.757.764.293.671.662.547.7M54.716.0
DINO-SE-SDResNet-505032.958.465.192.872.662.951.0M57.715.6
Table 4. A model analysis on DIOR. indicates the model’s overall use of pre-trained weights. The best results are marked in bold.
Table 4. A model analysis on DIOR. indicates the model’s overall use of pre-trained weights. The best results are marked in bold.
ModelBackboneEpochs AP s AP m AP l mAP 50 mAP 75 mAP @ 50 : 5 : 95 ParamsGFLOPsFPS
DETR [6]ResNet-50183.827.161.756.440.438.041.3M60.218.8
Deformable DETR [8]ResNet-50186.730.160.062.741.639.439.8M111.39.2
DINO [13]ResNet-501815.640.372.374.655.752.146.6M179.56.6
DINO-SEResNet-501815.640.971.775.656.352.349.9M191.46.1
DINO-SDResNet-501815.741.072.374.756.152.347.7M179.16.6
DINO-SE-SDResNet-501816.640.771.775.356.252.351.0M191.06.2
Table 5. Ablation study of the SE and SD modules on the NWPU VHR-10 dataset. The best results are marked in bold.
Table 5. Ablation study of the SE and SD modules on the NWPU VHR-10 dataset. The best results are marked in bold.
Model mAP 50 mAP 75 mAP @ 50 : 5 : 95 ParamsGFLOPsFPS
Baseline (DINO)92.171.662.146.6M55.115.7
+Skip Attention93.0 (+0.9)72.162.346.7M55.516.4
+SE-493.4 (+1.3)72.262.547.7M56.115.5
+SE-4, 593.9 (+1.8)71.462.448.8M57.015.3
+SE-4, 5, 694.8 (+2.7)70.862.749.9M58.115.2
+SE-2, 3, 493.0 (+0.9)71.762.449.9M58.115.2
+SD-292.4 (+0.3)71.861.447.1M54.915.7
+SD-2, 393.6 (+1.5)71.662.547.7M54.716.0
+SD-2, 3, 493.5 (+1.4)72.462.448.2M54.516.1
SE-i,j,k or SD-i,j,k denotes the module used in the i-th, j-th, and k-th layer of the encoder or decoder.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yang, F.; Chen, G.; Duan, J. Skip-Encoder and Skip-Decoder for Detection Transformer in Optical Remote Sensing. Remote Sens. 2024, 16, 2884. https://doi.org/10.3390/rs16162884

AMA Style

Yang F, Chen G, Duan J. Skip-Encoder and Skip-Decoder for Detection Transformer in Optical Remote Sensing. Remote Sensing. 2024; 16(16):2884. https://doi.org/10.3390/rs16162884

Chicago/Turabian Style

Yang, Feifan, Gang Chen, and Jianshu Duan. 2024. "Skip-Encoder and Skip-Decoder for Detection Transformer in Optical Remote Sensing" Remote Sensing 16, no. 16: 2884. https://doi.org/10.3390/rs16162884

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop