Cross Resolution Encoding-Decoding For Detection Transformers

## Abstract

Abstract Detection Transformers (DETR) are renowned object detection pipelines, however computationally efficient multiscale detection using DETR is still challenging. In this paper, we propose a Cross-Resolution Encoding-Decoding (CRED) mechanism that allows DETR to achieve the accuracy of high-resolution detection while having the speed of low-resolution detection. CRED is based on two modules; Cross Resolution Attention Module (CRAM) and One Step Multiscale Attention (OSMA). CRAM is designed to transfer the knowledge of low-resolution encoder output to a high-resolution feature. While OSMA is designed to fuse multiscale features in a single step and produce a feature map of a desired resolution enriched with multiscale information. When used in prominent DETR methods, CRED delivers accuracy similar to the high-resolution DETR counterpart in roughly 50 % percent 50 50\% 50 % fewer FLOPs. Specifically, state-of-the-art DN-DETR, when used with CRED (calling CRED-DETR), becomes 76 % percent 76 76\% 76 % faster, with ∼ 50 % similar-to absent percent 50 \sim 50\% ∼ 50 % reduced FLOPs than its high-resolution counterpart with 202 202 202 202 G FLOPs on MS-COCO benchmark. We plan to release pretrained CRED-DETRs for use by the community. Code: https://github.com/ashishkumar822/CRED-DETR .

## 1 Introduction

Detection Transformers (DETR) Carion et al. () are end-to-end object detection frameworks without post-processing, such as anchor boxes, box matching, and non-maximal suppression (NMS) that are required in ConvNet-based detectors Ren et al. (); Liu et al. (). Since their first entry Carion et al. (), DETRs have evolved, mainly regarding query design Gao et al. (); Zhu et al. (); Meng et al. (); Wang et al. (); Liu et al. (); Li et al. () to improve the detection performance, while recent DETR pipelines achieve that via salient points Liu et al. () or unsupervised pretraining Chen et al. ().

State-of-the-art DETRs exploit high-resolution features (known as Dilated Convolution or DC variant) Liu et al. (); Li et al. () or dense multi-scale features Zhang et al. () to push the detection accuracy further. However, they suffer from high computation complexity w.r.t. their accuracy gains. For example, DAB DETR Liu et al. () with high-resolution features improved $2.3$AP, but it introduces a $114\%$ rise in FLOPs.

The primary reason is the quadratic computational complexity Dai et al. () of the Transformer’s attention mechanism Zhang et al. () w.r.t. the spatial size, i.e., a Transformer is $O(H^{2}W^{2})$ complex in processing a feature map of a spatial size of $H\times W$. Hence, doubling the resolution of the encoder input quadruples its computations while also affecting the decoder. Although deformable attention Zhu et al. () addresses this issue, it causes additional runtime overhead due to irregular memory accesses.

To address this issue, recent IMFA Zhang et al. () proposes using a low-resolution feature map and Top-K sparsely sampled higher-resolution features (Figure 1). IMFA exhibits improvements in accuracy with lower FLOPs. However, sparse sampling incurs memory access costs due to irregular memory access, which becomes prevalent with more samples.
Recent Li et al. () exploits attention among only interleaved tokens for reducing computations in multiscale attention in the encoder. Zhao et al. () works on reduced resolution images ($640\times 640$) instead of high resolution settings ($800\times 1200$) on standard DETR.

Figure: Figure 1: Left: Single-Scale and/ DC DETR. Middle: IMFA DETR Zhang et al. (). Right: CRED DETR (Ours). Multiple arrows between two modules indicate layerwise refinement. Stage-$1$ features are generally not used due to large resolution and small receptive field.
Refer to caption: x1.png

Our aim aligns with improving DETR speed and accuracy by using multiscale features at high-resolution settings. However, our key motivation is based on our finding that the encoder consists of most computations relative to the decoder. Therefore, we propose a principal design change in the DETR pipeline, i.e., feeding the encoder with low-resolution while feeding the decoder with a high-resolution feature obtained from the backbone. By keeping the encoder input low-resolution, we save computations, while by keeping the decoder input high-resolution, we provide the decoder access to fine-grained details. Since the high-resolution features from the backbone lack large spatial context Carion et al. (), we develop a novel Cross Resolution Attention Module (CRAM). It utilizes encoder output that has a global context and transfers this information into the high-resolution feature map. When this feature map is fed to the decoder, the decoder has access to the fine-grained details and the global context, thus improving the accuracy and runtime.

Then, by exploiting this capability of CRAM to transfer the information from low-resolution encoder output to high-resolution feature, we propose to reduce the resolution of an encoder further to save computations. This behavior is intended to develop faster DETRs offering speed-accuracy tradeoffs. However, feeding the encoder naively with reduced resolution degrades its performance. Hence, we devise a novel module called One Step Multiscale Attention (OSMA), which attends to multiscale information in one step and can produce tokens or feature maps of the desired resolution enriched with multiscale information. When the encoder is fed the tokens produced by OSMA at aggressively low resolution, accuracy is considerably improved while avoiding any runtime overhead relative to the baseline which was fed with a low-resolution backbone output.

We name our overall approach as Cross-Resolution Encoding-Decoding (CRED), shown in Figure 1. We demonstrate that our CRED-enhanced DETR can attain an AP (average precision) equivalent to the original DETR’s high-resolution counterpart in $50\%$ fewer FLOPs at $76\%$ improved runtime. For instance, DN-DETR Li et al. ()+CRED reduces FLOPs from $202$G to $103$G ($\sim 50\%$\contourblack$\downarrow$) and improves FPS from $13$FPS to $23$FPS ($\sim 76\%$\contourblack$\uparrow$) without losing accuracy. In addition, applying CRED in DETR variants Meng et al. (); Liu et al. (); Zhang et al. () consistently improves their accuracy and runtime compared with their DC variants.
To improve runtime further, we half the encoder resolution via OSMA. Interestingly, we only observe $-1$AP in this configuration while the runtime is further improved by $84\%$ compared with the vanilla DC variant. This signifies the potential of Cross-Resolution Encoding-Decoding mechanism in DETRs.

## 2 Preliminary

This section revisits the architectural design of vanilla DETR Carion et al. () and advanced DETRs Liu et al. (); Li et al. (); Zhu et al. ().
DETR comprises a backbone, a Transformer encoder, and a Transformer decoder.
In a backbone Li et al. (), it is common to keep five stages, each operating at a resolution half of its previous stage.
Thus, the final stage (stage-$5$) runs at a stride of 32 at the original resolution.
Once an image $I\in\mathbb{R}^{3\times H\times W}$ is fed into a backbone (Figure 1), the backbone output $F_{b}\in\mathbb{R}^{C\times H_{0}\times W_{0}}$ is fed to a Transformer encoder, producing encoded feature embeddings or tokens $F_{e}\in\mathbb{R}^{d\times H_{0}\times W_{0}}$. These embeddings are fed to the Transformer decoder to produce a fixed number of queries ($N_{q}$), each representing an object detectable in the image. The queries are passed through two Feedforward neural Networks (FFN) to obtain the object class and its bounding box. During training, bipartite or Hungarian matching Carion et al. () is performed for one-to-one assignments of ground truth and predictions.

In DETR pipelines Carion et al. (); Liu et al. (); Li et al. (), the embeddings $F_{e}$ are directly fed to the decoder where the $N_{q}$ queries interact with $H_{0}\times W_{0}$ features in $F_{e}$ via cross attention. The encoder complexity is $O(H^{2}_{0}W^{2}_{0})$ in its self-attention, whereas for the decoder, it is $O(N_{q}H_{0}W_{0})$ in cross attention and $O(N^{2}_{q})$ in its self-attention. In DETRs, $N_{q}$ is relatively smaller, i.e., $300$; however, $H_{0}W_{0}$ is quite a large number depending on the image size, e.g., $1280\times 800$ Liu et al. (); Li et al. (). Hence, most of the computations are concentrated in the encoder. When opting for high-resolution detection, known as the DC variant Liu et al. (); Li et al. (), the backbone output stride is set lower than $32$. For this purpose, stage-$5$ of the backbone is set to run at stride 16 Meng et al. (); Liu et al. (); Li et al. () w.r.t. the image, thereby doubling the resolution of $F_{b}$. This leads to quadratic growth in the encoder computations due to the increased resolution Dai et al. ().

In this paper, we rethink the encoder-decoder information flow while leveraging multiscale features in a computationally efficient manner. Summarily, we propose an approach that feeds the encoder with a stride $\geq 32$ while feeding the decoder with a stride $\leq 32$ to harness the best of both worlds, i.e., the accuracy of high-resolution detection and speed of low-resolution detection. To our knowledge, such a mechanism has not been demonstrated in DETRs.

## 3 Method

We propose to enhance the DETR design with the two modules. Firstly, we develop CRAM which enables Cross-Resolution Encoding-Decoding. Secondly, we develop OSMA module, which facilitates generating feature maps enriched with multiscale information in a computationally efficient manner and further enhances the performance of CRED.

### 3.1 Cross Resolution Attention Module (CRAM)

As mentioned in Sec. 2, high-resolution detection improves DETR accuracy, but high-resolution input to the encoder is compute-intensive due to its quadratic complexity Dai et al. (). Hence, we feed the encoder with low resolution while feeding the decoder with high resolution, calling it cross-resolution encoding-decoding paradigm. However, the information flow between them no longer exists due to the different input sources to the encoder and decoder.
Hence, we develop CRAM that acts as a bridge between the encoder and decoder in the proposed cross-resolution encoding decoding paradigm.
The overall design of our approach (CRAM) is shown in Figure 2.

Figure: Figure 2: CRAM: Cross Resolution Attention Module.
Refer to caption: x2.png

Consider two feature maps $X\in\mathbb{R}^{C\times h\times w}$ and $Y\in\mathbb{R}^{C\times H\times W}$. In our Cross-Resolution Encoding-Decoding approach, the low-resolution feature $X$ is fed to the encoder layers, while the high-resolution feature $Y$ is fed to the attention transfer module. To transfer the knowledge of the encoder embeddings ($X_{e}=\text{Encoder}(X),\leavevmode\nobreak\ X_{e}\in\mathbb{R}^{C\times h
\times w}$) to $Y$, we spatially upsample ($\hat{X}_{e}=\text{Upsample}(X_{e})|_{H,W}\leavevmode\nobreak\ \hat{X}_{e}\in
\mathbb{R}^{C\times H\times W}$) the encoder output to match the resolution of $Y$, and a concatenation operation is performed.

Now, we use a linear projection layer, which combines the features information of the high-resolution features and the upsampled low-resolution feature from the encoder. The output ($Z=\text{Linear}(\text{Cat}(Y,X_{e}))$) is normalized via LayerNorm Ba et al. () and passed through SiLU activation Hendrycks & Gimpel () ($\hat{Y}_{e}=\text{SiLU}(\text{LayerNorm}(Z)),\leavevmode\nobreak\ \hat{Y}_{e}
\in\mathbb{R}^{C\times H\times W}$). We use the residual connections to facilitate smoother optimization. This process is repeated as many times as the number of encoder layers to refine the high-resolution $Y$ by transferring the knowledge embedded in the encoder layers. The input to CRAM is initialized with the high-resolution feature from an intermediate backbone stage (Sec. 2), whereas the final $\hat{Y}_{e}$ is fed to the decoder for the predictions

#### Computation Complexity

An encoder layer has $\mathcal{O}(h^{2}w^{2})$ complexity to process its input $X_{e}\in\mathbb{R}^{h\times w}$. In our case, we feed the encoder with
$X_{e}\in\mathbb{R}^{\nicefrac{{H}}{{r}}\times\nicefrac{{W}}{{r}}}$, where $r\geq 2$, and feed the decoder with $X_{d}\in\mathbb{R}^{H\times W}$. In aggregation, we have a total complexity of $\mathcal{O}(\frac{H^{2}W^{2}}{r^{4}}+HW)$, which is far lower than the vanilla encoder complexity of $\mathcal{O}(H^{2}W^{2})$. With this strategy, we achieve accuracy equivalent to when the encoder is fed with the high-resolution feature while having at least $50\%$ fewer overall computations for $r=2$. Specifically, w.r.t. vanilla encoder with high resolution, a FLOP saving of $50\%$ is obtained. See Sec 4.2 for the computational complexity analysis.

#### Why Could Cross Resolution Attention Transfer Improve Performance?

In vanilla DETR design, the encoder embeddings are produced from stage-$5$ (low-resolution) and have global receptive filed via self-attention Dosovitskiy et al. (), which are fed to the decoder for the predictions. However, these embeddings do not have fine details of smaller objects. On the other hand, the high-resolution input $Y$ (earlier stages, e.g., stage-$4$) to CRAM has a small receptive field but has details of smaller objects.

In CRAM, the concatenation operation followed by a linear layer infuses the local and global context to produce fine-grained, high-resolution features, similar to what earlier semantic segmentation approaches Zhao et al. () used for improving performance. In the same way, with this operation, the high-resolution feature $Y$ acquires a global receptive field when concatenated with the encoder embedding or tokens $X_{e}$. After the layerwise refinement, it is fed to the decoder, which improves the accuracy and speed; even the encoder still functions at a smaller resolution.

Figure: Figure 3: Local aggregation of the multiscale features in OSMA for $g_{0}=1$ which produces $Q\in\mathbb{R}^{N_{g}\times T\times C}$
Refer to caption: x3.png

### 3.2 One Step Multiscale Attention (OSMA)

In single-scale operation of DETRs Liu et al. (); Li et al. (), the backbone output $F_{b}$ is fed to the encoder. However, $F_{b}$ does not have direct access to the multiscale information. Whereas multiscale DETRs feed the encoder with either sampled Zhu et al. () or dense multiscale features Zhang et al. (), which is computationally heavy.

We propose OSMA, which produces $F_{o}$ enriched with multiscale information, i.e., the best of both single-scale and multiscale methods without progressive fusion, i.e., fusing two scales at a time (Figure 1). In general, $F_{b}$ has a stride $32$ w.r.t. the input He et al. (); however, using multiscale features, OSMA can produce a feature map $F_{o}$ (‘o’ refers to OSMA) of stride greater or lesser than $32$ which directly controls the encoder computations. With this functionality, OSMA offers better features or tokens enriched with multiscale information to be utilized by the encoder.

OSMA has three main steps: First, Local aggregation of multiscale features, Second, performing one-step attention on the aggregated features, and Third, broadcasting the output into desired resolution.

Local Aggregation of Multiscale Features.
This step aggregates $n$ multiscale features $F^{i}\in\mathbb{R}^{C\times H_{i}\times W_{i}}$ obtained from the backbone,
where $i=0,1,...n-1$ is the scale index (Figure 3).
In this step, all the features are first divided into non-overlapping grids of size $g_{i}=2^{i}*g$. The total number of grids for all the scales is equal and is given by $N_{g}=\nicefrac{{H_{i}}}{{g_{i}}}\times\nicefrac{{W_{i}}}{{g_{i}}}$.

Let $F^{i}_{j}\in\mathbb{R}^{C\times g\times g}$ denotes feature map of $j^{th}$-grid of $F^{i}$, where $j=\{0,1,...N_{g}\}$. For each scale, we flatten $F^{i}_{j}$ in spatial dimension and stack all its features with its corresponding grids in other scales, as shown in colors in Figure 3. This results in a matrix $M_{j}\in\mathbb{R}^{C\times T}$ for each grid.
This step is repeated for each non-overlapping grid, and we obtain $N_{g}$ matrices, referring as $Q\in\mathbb{R}^{N_{g}\times T\times C}$. The number $N_{g}$ is absorbed into the batch dimension while processing batched training or inference so that all the matrices can be processed in parallel.
This step requires all the feature maps $F^{i}$ to be an integral multiple of $g$. Hence, we align all the feature maps w.r.t. $g_{i}$ before performing local aggregation via bilinear interpolation. See Table 5 for ablation on ‘$g$’.

One Step Multiscale Attention.
We perform information fusion by attending to all the multiscale features and their channels simultaneously, thus calling it a one-step multiscale attention. We describe this process for a single grid or $M_{j}$, also depicted in Figure 4.

In the attention process, $M_{j}$ undergoes a $1\times 1$ convolution operation with weights $\mathbf{W}\in\mathbb{R}^{d\times T\times 1\times 1}$ which projects $M_{j}$ in a $d$ dimensional latent space. The $1\times 1$ layer combines information from all the $T$ multiscale features with a unit stride. In this way, the output of multiscale information becomes richer. Then, we perform a layer normalization over the columns of $M_{j}$ followed by SiLU activation (See Sec. 4.2).

This process is repeated for feature refinement, and the penultimate $1\times 1$ layer produces $P$ channels. The final layer is a linear projection applied over the columns of $\hat{M}_{j}$ to refine the column information because a column becomes a feature $\in\mathbb{R}^{C}$ in the output feature map $F_{o}$. The output of this step $\hat{Q}\in\mathbb{R}^{N_{g}\times P\times C}$ is broadcasted into a feature based on the requirements, as discussed next.

Figure: Figure 4: One step attention and Output Broadcasting in OSMA. ‘One-Step’ should not be confused with ‘single layer’; instead, it refers to all the multiscale features being attended simultaneously through $1\times 1$ layer. Output broadcasting infers the shape of the output feature based on the value of $P$.
Refer to caption: x4.png

Output Feature Broadcasting.
This step broadcasts $\hat{Q}$ into a feature map $F_{o}$ of the desired resolution based on the pair $\{g_{0},P\}$. For example, for $g_{0}=1$, if we aim to produce a feature $F_{o}$ of size $H_{0}\times W_{0}$, the value of $P$ will be set to $1$, or if a feature $F_{o}$ of size $2H_{0}\times 2W_{0}$ is required, $P$ can be set to $4$, or if a feature $F_{o}$ of size $H_{0}/2\times W_{0}/2$ is needed, $\{g_{0}=2,P=1\}$ can be used.

This flexibility of generating $F_{o}$ of desired resolution allows controlling the encoder’s input resolution and, hence, its computations. Meanwhile, multiscale information infusion helps improve DETR accuracy with a slight computational overhead. We have studied various $\{g_{0},P\}$ combinations, and our empirical results show that $\{g_{0}=1,P=1\}$ is the best combination for keeping the resolution of $F_{o}$ equals to $F_{0}$ whereas $\{g_{0}=2,P=1\}$ is best for reducing the resolution. See Table 5.

### 3.3 Configuring CRED for DETRs

We mainly test two important configurations. In all the configurations, OSMA feeds the encoder, whereas CRAM feeds the decoder. OSMA is always fed with $\{F^{3},F^{4},F^{5}\}$ output of backbone (Figure 1). Each configuration has different settings for OSMA and input sources for CRAM.

Default. OSMA operates at $\{g_{0}=1,P=1\}$ i.e. its output resolution is same as $F^{5}$. Whereas CRAM is fed with $F^{4}$. In other words, the encoder runs at half the resolution of the decoder.

Configuration: ‘DC$\times 0.25$’. OSMA operates at $\{g_{0}=2,P=1\}$, producing feature map of half the resolution of $F^{5}$ or quarter of $F^{4}$ or quarter of DC. Whereas CRAM is fed with $F^{4}$. This configuration evaluates the capability of our Cross-Resolution Encoding-Decoding when the encoder is fed with a very low-resolution map. For comparison, the encoder in baselines is fed with $F^{5}$ downsampled to half of its resolution. Since this resolution is $\nicefrac{{1}}{{4}}$ of DC resolution, it is named as DC$\times 0.25$.

Additional Configuration: ‘OO’ This is similar to the default configuration except the input source to CRAM. We use two instances of OSMA: OSMAe and OSMAc. The former operates at $\{g_{0}=1,P=1\}$, feeding the encoder, while the latter operates at $\{g_{0}=1,P=4\}$, i.e. in upsampling mode, feeding CRAM with a resolution equivalent to $F^{4}$. This configuration tests the capability of OSMA to fuse multiscale information while increasing the output resolution.

Based on the computational budget, $F^{3}$ can also be fed to CRAM in the above configurations. However, due to the large feature resolution, decoder computations also come into play, given high-resolution images in the MS-COCO benchmark Lin et al. (). Hence, although we have analyzed its effect (See supplement), we do not use this configuration.

## 4 Experiments

Dataset and Evaluation Metric.
Following Carion et al. (); Liu et al. (); Li et al. (), we use MS-COCO $2017$ benchmark Lin et al. () for evaluation, having $117$k training images and $5$k validation images. We use MS-COCO’s standard evaluation metric of Average Precision (AP) at different thresholds and different object scales.

Implementation Details.
We plug the proposed CRED into state-of-the-art DN-DETR Li et al. () for all our experimental evaluations, including ablations. However, to showcase generality, we also adapt CRED into other prominent DETR methods, e.g., Conditional DETR Meng et al. (), DAB-DETR Liu et al. () etc.

We perform experiments in the $50$-epoch setting, widely used for DETRs Liu et al. (); Li et al. (); Zhang et al. (). We also show results for the $12$-epoch or $1\times$ Li et al. () setting to demonstrate accelerated convergence due to the improved DETR design in this paper. The base learning for the backbone is set to $1\times 10^{-5}$ while for the transformer, it is set to $1\times 10^{-4}$. For the $12$-epoch schedule, the learning rate is dropped by $0.1$ at $11^{th}$ epoch, whereas it is dropped at $40^{th}$ epoch for the $50$-epoch schedule. We use $8\times$ NVIDIA A$40$ with a batch size of $16$ ($2$ per-GPU) for training. All the ablations are performed at the $1\times$ setting.

**Table 1: Comprehensive evaluation of CRED when applied in prominent DETR models under different settings, i.e., training duration, encoder resolution. Our CRED performs better and faster than DETRs operating at high resolution (DC). ‘R$50$: ResNet$50$ and ‘R$18$: ResNet$18$ He et al. (). Refer to Sec.3.3 for DC$\times 0.25$.**
| Method | #Epochs | #Params | #FLOPs | #FPS | AP | AP50 | AP75 | APS | APM | APL |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| $\bullet$ Conditional DETR-R$50$ Meng et al. () | $50$ | $44$M | $90$G | $26$ | $40.9$ | $61.8$ | $43.3$ | $20.8$ | $44.6$ | $59.2$ |
| $\bullet$ Conditional DETR-DC$5$-R$50$ Meng et al. () | $50$ | $44$M | $195$G | $15$ | $43.8$ | $64.4$ | $46.7$ | $24.0$ | $47.6$ | $60.7$ |
| $\bullet$ Conditional DETR-R$50$ Meng et al. () + CRED | $50$ | $45$M | $\mathbf{100}$G | $\mathbf{25}$ | $\mathbf{44.4}$ | $\mathbf{64.6}$ | $\mathbf{47.8}$ | $\mathbf{25.2}$ | $\mathbf{46.9}$ | $\mathbf{60.7}$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () | $50$ | $44$M | $94$G | $25$ | $42.2$ | $63.1$ | $44.7$ | $21.5$ | $45.7$ | $60.3$ |
| $\bullet$ DAB DETR-DC-R$50$ Liu et al. () | $50$ | $45$M | $202$G | $13$ | $44.5$ | $65.1$ | $47.7$ | $25.3$ | $48.2$ | $62.3$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () + IMFA Zhang et al. () | $50$ | $53$M | $108$G | $18$ | $45.5$ | $65.0$ | $49.3$ | $27.3$ | $48.3$ | $61.6$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () + CRED | $50$ | $45$M | $\mathbf{103}$G | $\mathbf{23}$ | $\mathbf{45.4}$ | $\mathbf{64.9}$ | $\mathbf{49.4}$ | $\mathbf{27.0}$ | $\mathbf{48.5}$ | $\mathbf{62.2}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () | $50$ | $44$M | $94$G | $25$ | $44.1$ | $64.4$ | $46.7$ | $22.9$ | $48.0$ | $63.4$ |
| $\bullet$ DN-DETR-DC5-R$50$ Liu et al. () | $50$ | $44$M | $202$G | $13$ | $46.3$ | $66.4$ | $49.7$ | $26.7$ | $50.0$ | $64.3$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED | $50$ | $45$M | $\mathbf{103}$G | $\mathbf{23}$ | $\mathbf{46.2}$ | $\mathbf{65.8}$ | $\mathbf{49.8}$ | $\mathbf{26.8}$ | $\mathbf{50.0}$ | $\mathbf{63.5}$ |
| $\mathbf{12}$ Epoch Schedule |  |  |  |  |  |  |  |  |  |  |
| $\bullet$ Conditional DETR-R$50$ Meng et al. () | $12$ | $44$M | $90$G | $26$ | $32.4$ | $52.1$ | $33.9$ | $14.2$ | $35.2$ | $48.4$ |
| $\bullet$ Conditional DETR-R$50$ + CRED | $12$ | $45$M | $100$G | $25$ | $\mathbf{36.6}$ | $\mathbf{56.2}$ | $\mathbf{38.7}$ | $\mathbf{18.8}$ | $\mathbf{39.5}$ | $\mathbf{52.6}$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () | $12$ | $44$M | $94$G | $25$ | $35.1$ | $55.5$ | $36.7$ | $16.2$ | $38.1$ | $52.5$ |
| $\bullet$ DAB DETR-R$50$-DC5 Liu et al. () | $12$ | $44$M | $202$G | $13$ | $38.0$ | $60.3$ | $39.8$ | $19.2$ | $40.9$ | $55.4$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () + IMFA Zhang et al. () | $12$ | $53$M | $108$G | $18$ | $37.3$ | $57.9$ | $39.9$ | $20.8$ | $40.7$ | $52.3$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () + CRED | $12$ | $45$M | $\mathbf{103}$G | $\mathbf{23}$ | $\mathbf{38.4}$ | $\mathbf{58.4}$ | $\mathbf{41.0}$ | $\mathbf{20.0}$ | $\mathbf{41.8}$ | $\mathbf{53.9}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () | $12$ | $44$M | $94$G | $25$ | $38.6$ | $59.1$ | $41.0$ | $17.3$ | $42.4$ | $57.7$ |
| $\bullet$ DN-DETR-DC5-R$50$ Li et al. () | $12$ | $44$M | $202$G | $13$ | $41.7$ | $61.4$ | $44.1$ | $21.2$ | $45.0$ | $60.2$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED | $12$ | $45$M | $\mathbf{103}$G | $\mathbf{23}$ | $\mathbf{41.1}$ | $\mathbf{60.6}$ | $\mathbf{44.0}$ | $\mathbf{22.2}$ | $\mathbf{44.1}$ | $\mathbf{58.9}$ |
| $\bullet$ DAB DETR-R$18$ Liu et al. () | $12$ | $31$M | $49$G | $38$ | $29.8$ | $49.0$ | $30.5$ | $10.9$ | $32.5$ | $46.9$ |
| $\bullet$ DAB DETR-R$18$ Liu et al. () + IMFA Zhang et al. () | $12$ | $40$M | $61$G | $23$ | $31.2$ | $51.5$ | $32.3$ | $13.0$ | $33.2$ | $49.1$ |
| $\bullet$ DAB-DETR-R$18$ Liu et al. () + CRED | $12$ | $32$M | $\mathbf{60}$G | $\mathbf{31}$ | $\mathbf{33.5}$ | $\mathbf{52.0}$ | $\mathbf{35.2}$ | $\mathbf{16.7}$ | $\mathbf{36.0}$ | $\mathbf{46.2}$ |
| $\bullet$ DN-DETR-R$18$ Li et al. () | $12$ | $31$M | $49$G | $38$ | $32.5$ | $51.6$ | $33.7$ | $13.5$ | $35.1$ | $49.4$ |
| $\bullet$ DN-DETR-R$18$ Li et al. () + CRED | $12$ | $32$M | $\mathbf{60}$G | $\mathbf{31}$ | $\mathbf{35.0}$ | $\mathbf{54.0}$ | $\mathbf{36.9}$ | $\mathbf{16.3}$ | $\mathbf{37.0}$ | $\mathbf{51.4}$ |
| DC$\times 0.25$ Configuration |  |  |  |  |  |  |  |  |  |  |
| $\bullet$ DAB DETR-R$50$ Liu et al. () | $12$ | $44$M | $94$G | $25$ | $35.1$ | $55.5$ | $36.7$ | $16.2$ | $38.1$ | $52.5$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () DC$\times 0.25$ | $12$ | $44$M | $80$G | $26$ | $28.4$ | $48.9$ | $30.0$ | $9.8$ | $31.5$ | $47.0$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () + IMFA Zhang et al. () DC$\times 0.25$ | $12$ | $44$M | $96$G | $18$ | $33.0$ | $54.2$ | $34.5$ | $16.1$ | $35.3$ | $46.5$ |
| $\bullet$ DAB-DETR-R$50$ Liu et al. () + CRED DC$\times 0.25$ | $12$ | $45$M | $\mathbf{94}$G | $\mathbf{24}$ | $\mathbf{37.5}$ | $\mathbf{57.9}$ | $\mathbf{40.1}$ | $\mathbf{18.8}$ | $\mathbf{40.7}$ | $\mathbf{53.0}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () | $12$ | $44$M | $94$G | $25$ | $38.6$ | $59.1$ | $41.0$ | $17.3$ | $42.4$ | $57.7$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () DC$\times 0.25$ | $12$ | $44$M | $80$G | $26$ | $31.5$ | $52.7$ | $31.5$ | $10.8$ | $33.7$ | $52.0$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED DC$\times 0.25$ | $12$ | $45$M | $\mathbf{94}$G | $\mathbf{2}4$ | $\mathbf{40.0}$ | $\mathbf{59.4}$ | $\mathbf{42.8}$ | $\mathbf{20.7}$ | $\mathbf{43.1}$ | $\mathbf{56.4}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () | $50$ | $44$M | $94$G | $25$ | $44.1$ | $64.4$ | $46.7$ | $22.9$ | $48.0$ | $63.4$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () DC$\times 0.25$ | $50$ | $44$M | $80$G | $26$ | $39.9$ | $60.1$ | $41.9$ | $19.2$ | $43.5$ | $59.7$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED DC$\times 0.25$ | $50$ | $45$M | $\mathbf{94}$G | $\mathbf{24}$ | $\mathbf{45.8}$ | $\mathbf{64.9}$ | $\mathbf{49.1}$ | $\mathbf{25.9}$ | $\mathbf{49.1}$ | $\mathbf{62.8}$ |
| $\bullet$ DAB DETR-R$18$ Liu et al. () | $12$ | $31$M | $49$G | $38$ | $29.8$ | $49.0$ | $30.5$ | $10.9$ | $32.5$ | $46.9$ |
| $\bullet$ DAB DETR-R$18$ Liu et al. () DC$\times 0.25$ | $12$ | $31$M | $40$G | $39$ | $24.0$ | $43.8$ | $25.2$ | $4.7$ | $27.9$ | $42.0$ |
| $\bullet$ DAB DETR-R$18$ Liu et al. () + IMFA Zhang et al. () DC$\times 0.25$ | $12$ | $40$M | $50$G | $25$ | $27.8$ | $46.9$ | $28.8$ | $14.1$ | $29.5$ | $29.5$ |
| $\bullet$ DAB-DETR-R$18$ Liu et al. () + CRED DC$\times 0.25$ | $12$ | $32$M | $\mathbf{51}$G | $\mathbf{34}$ | $\mathbf{32.2}$ | $\mathbf{50.9}$ | $\mathbf{34.1}$ | $\mathbf{15.9}$ | $\mathbf{35.2}$ | $\mathbf{44.9}$ |
| $\bullet$ DN-DETR-R$18$ Li et al. () | $12$ | $31$M | $49$G | $38$ | $32.5$ | $51.6$ | $33.7$ | $13.5$ | $35.1$ | $49.4$ |
| $\bullet$ DN-DETR-R$18$ Li et al. () DC$\times 0.25$ | $12$ | $31$M | $40$G | $39$ | $27.0$ | $46.4$ | $26.9$ | $8.3$ | $28.0$ | $45.6$ |
| $\bullet$ DN-DETR-R$18$ Li et al. () + CRED DC$\times 0.25$ | $12$ | $32$M | $\mathbf{51}$G | $\mathbf{34}$ | $\mathbf{34.2}$ | $\mathbf{53.0}$ | $\mathbf{36.2}$ | $\mathbf{16.0}$ | $\mathbf{36.1}$ | $\mathbf{50.0}$ |

### 4.1 Main Results

CRED in DETR: $\mathbf{50}$-Epoch Setting. We plug CRED into representative DETR frameworks. Table 1 shows that CRED boosts the AP in each DETR pipeline. Compared with the baseline without DC, CRED introduces a slight overhead of $9$G FLOPs with only $1-2$FPS drop. Compared with recent IMFA Zhang et al. (), the overhead is $\sim 36\%$ less with an improvement of $+4$FPS. Our CRED also performs better regarding runtime than the recent sparse sampling-based method Zhang et al. ().

Further, when plugged in Conditional-DETR Meng et al. (), CRED delivers the same accuracy at $50\%$ more FPS than the advanced high-resolution DAB-DETR-DC5-R$50$ Li et al. (). Similarly, with DN-DETR, CRED delivers the same accuracy at $76\%$ more FPS and $50\%$ fewer FLOPs.

CRED in DETR: $\mathbf{12}$-Epoch Setting. Evaluations in this setting show that CRED speeds up convergence with slight overhead. From Table 1, CRED with DAB-DETR Liu et al. () is better than vanilla DAB-DETR by $3.3$AP with only a drop of $2$FPS. Compared with high-resolution DAB-DETR-DC$5$, CRED is accurate by $0.4$AP at $50\%$ fewer FLOPs and $76\%$ more FPS.

With DN-DETR Li et al. (), CRED achieves beyond $41$AP in just $103$G FLOPs, implying that CRED improves the convergence speed (See Figure 5), i.e. DN-DETR via CRED achieves the performance of its DC counterpart in just $12$ epochs at $50\%$ fewer FLOPs and $76\%$ higher FPS. From the table, CRED can improve the performance of smaller backbones like ResNet$18$ while delivering real-time performance ($>30$FPS). This indicates the utility of CRED where smaller backbones are used due to resource constraints. Hence, by using CRED, detection performance can be boosted

Figure: Figure 5: Convergence plots over MS-COCO validation set. (a) It can be seen that despite having $50\%$ fewer FLOPs and $76\%$ higher FPS, CRED converges similarly to the baseline. (b) DETR with smaller backbone and their DC$\times 0.25$ variants in $12$ epoch setting. Notice that even in the smaller backbone, CRED-enabled model with and without DC$\times 0.25$ have similar accuracy, but this gap is noticeable in the baselines with and without DC$\times 0.25$. This strengthens the utility of CRED that encoder input resolution can be aggressively dropped to save computations while having better accuracy.
Refer to caption: x5.png

CRED in DETR: DC$\times 0.25$ Setting.
This setting is crucial to show the utility of CRED in DETRs for real-time performance. From Table 1, when encoder resolution is dropped to half (DC$\times 0.25$) of any vanilla DETR pipeline, it degrades the performance while also reducing FLOP requirement. However, the degradation in the performance supersedes the reduced FLOPs.

Whereas CRED in this configuration delivers performance better than the vanilla variant. For example, for vanilla DAB-DETR-R$50$, the AP drops from $35.1$ to $28.4$ with DC$\times 0.25$; however, by using CRED in DC$\times 0.25$ configuration, we achieve $+2.4$AP than the vanilla DAB-DETR-R$50$ in same FLOPs and same FPS. A similar case applies to DN-DETR variants with different backbones.

**Table 2: Comparison with state-of-the-art object detectors on COCO val $2017$. ‘MS’: Multiscale, ‘SM’: Sparse Multiscale Sampling, and ‘DC’: Dilated Convolution. FPS is reported at $(800\times 1280)$**
| Method | MS | SM | DC | #Epochs | #Params | #FLOPs | #FPS | AP | AP50 | AP75 | APS | APM | APL |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| $\bullet$ YOLOS-DeiT-S Fang et al. () |  |  |  | $150$ | $28$M | $172$G | $-$ | $37.6$ | $57.6$ | $39.2$ | $15.9$ | $40.2$ | $57.3$ |
| $\bullet$ Faster-RCNN-FPN-R$50$ Ren et al. (); Lin et al. () | ✓ |  |  | $108$ | $42$M | $180$G | $-$ | $42.0$ | $62.1$ | $45.5$ | $26.6$ | $45.5$ | $53.4$ |
| $\bullet$ TSP-FCOS-FPN-R$50$ Sun et al. () | ✓ |  |  | $36$ | $52$M | $189$G | $-$ | $43.1$ | $62.3$ | $47.0$ | $26.6$ | $46.8$ | $55.9$ |
| $\bullet$ TSP-RCNN-FPN-R$50$ Sun et al. () | ✓ |  |  | $36$ | $64$M | $188$G | $-$ | $43.8$ | $63.3$ | $48.3$ | $28.6$ | $46.9$ | $55.7$ |
| $\bullet$ Faster RCNN-FPN-R$101$ Ren et al. (); Lin et al. () | ✓ |  |  | $108$ | $60$M | $246$G | $-$ | $44.0$ | $63.9$ | $47.8$ | $27.2$ | $48.1$ | $56.0$ |
| $\bullet$ Sparse-RCNN-FPN-R$50$ Sun et al. () | ✓ |  |  | $36$ | $106$M | $166$G | $-$ | $45.0$ | $64.1$ | $48.9$ | $28.0$ | $47.6$ | $59.5$ |
| $\bullet$ DETR-DC5-R50 Carion et al. () |  |  | ✓ | $500$ | $41$M | $187$G | $16$ | $43.3$ | $63.1$ | $45.9$ | $22.5$ | $47.3$ | $61.1$ |
| $\bullet$ SAM-DETR-DC5-R$50$ Zhang et al. () |  |  | ✓ | $50$ | $58$M | $210$G | $-$ | $43.3$ | $64.4$ | $46.2$ | $25.1$ | $46.9$ | $61.0$ |
| $\bullet$ SMCA-DETR-R$50$ Gao et al. () | ✓ |  |  | $50$ | $40$M | $152$G | $-$ | $43.7$ | $63.6$ | $47.2$ | $24.2$ | $47.0$ | $60.4$ |
| $\bullet$ Deformable-DETR-R$50$ Zhu et al. () | ✓ |  |  | $50$ | $40$M | $173$G | $13$ | $43.8$ | $62.6$ | $47.7$ | $26.4$ | $47.1$ | $58.0$ |
| $\bullet$ Conditional-DETR-DC5-R$50$ Meng et al. () |  |  | ✓ | $50$ | $44$M | $195$G | $15$ | $43.8$ | $64.4$ | $46.7$ | $24.0$ | $47.6$ | $60.7$ |
| $\bullet$ Anchor-DETR-DC5-R$50$ Wang et al. () |  |  | ✓ | $50$ | $37$M | $172$G | $-$ | $44.2$ | $64.7$ | $47.5$ | $24.7$ | $48.2$ | $60.6$ |
| $\bullet$ Efficient-DETR-R$50$ Yao et al. () | ✓ |  |  | $36$ | $32$M | $159$G | $-$ | $44.2$ | $62.2$ | $48.0$ | $28.4$ | $47.5$ | $56.6$ |
| $\bullet$ DAB-DETR-DC5-R$50$ Liu et al. () |  |  | ✓ | $50$ | $44$M | $202$G | $13$ | $44.5$ | $65.1$ | $47.7$ | $25.3$ | $48.2$ | $62.3$ |
| $\bullet$ SAM-DETR-DC5-R$50$ Zhang et al. () w/ SMCA |  |  | ✓ | $50$ | $58$M | $210$G | $-$ | $45.0$ | $65.4$ | $47.9$ | $26.2$ | $49.0$ | $63.3$ |
| $\bullet$ Conditional DETR-DC5-R$101$ Meng et al. () |  |  | ✓ | $50$ | $63$M | $262$G | $10$ | $45.0$ | $65.5$ | $48.4$ | $26.1$ | $48.9$ | $62.8$ |
| $\bullet$ DN-DETR-R$101$ Li et al. () |  |  | ✓ | $50$ | $63$M | $174$G | $-$ | $45.2$ | $65.5$ | $48.3$ | $24.1$ | $49.1$ | $65.1$ |
| $\bullet$ Deformable-DAB-DETR-R$50$ Zhu et al. () | ✓ | ✓ |  | $50$ | $41$M | $173$G | $12$ | $45.4$ | $64.7$ | $49.0$ | $26.8$ | $48.3$ | $61.7$ |
| $\bullet$ IMFA-DAB-DETR-R$50$ Zhang et al. () |  | ✓ |  | $50$ | $53$M | $108$G | $18$ | $45.5$ | $65.0$ | $49.3$ | $27.3$ | $48.3$ | $61.6$ |
| $\bullet$ DAB DETR-DC5-R$101$ Liu et al. () |  |  | ✓ | $50$ | $63$M | $282$G | $10$ | $45.8$ | $65.9$ | $49.3$ | $27.0$ | $49.8$ | $63.3$ |
| $\bullet$ SAP-DETR-DC5-R$50$ Liu et al. () |  |  |  | $50$ | $47$M | $197$G | $12$ | $46.0$ | $65.5$ | $48.9$ | $26.4$ | $50.2$ | $62.6$ |
| $\bullet$ DN-DETR-DC5-R$50$ Li et al. () |  |  | ✓ | $50$ | $44$M | $202$G | $13$ | $46.3$ | $66.4$ | $49.7$ | $26.7$ | $50.0$ | $64.3$ |
| $\bullet$ Siamese-DETR-R$50$ Chen et al. () | ✓ | ✓ |  | $50$ | $41$M | $173$G | $-$ | $46.3$ | $64.6$ | $50.5$ | $28.1$ | $50.1$ | $61.5$ |
| $\bullet$ Lite-DETR-R$50$ Li et al. () | ✓ | ✓ |  | $50$ | $41$M | $123$G | $15$ | $46.7$ | $66.1$ | $50.6$ | $29.1$ | $49.7$ | $62.2$ |
| $\bullet$ SAP-DETR-DC5-R$101$ Liu et al. () |  |  |  | $50$ | $67$M | $266$G | $11$ | $46.9$ | $66.7$ | $50.5$ | $27.9$ | $51.3$ | $64.3$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () + CRED |  |  |  | $50$ | $45$M | $\mathbf{103}$G | $\mathbf{23}$ | $\mathbf{45.4}$ | $\mathbf{64.9}$ | $\mathbf{49.4}$ | $\mathbf{27.0}$ | $\mathbf{48.5}$ | $\mathbf{62.2}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED DC$\times 0.25$ |  |  |  | $50$ | $45$M | $\mathbf{94}$G | $\mathbf{24}$ | $\mathbf{45.8}$ | $\mathbf{64.9}$ | $\mathbf{49.1}$ | $\mathbf{25.9}$ | $\mathbf{49.1}$ | $\mathbf{62.8}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED |  |  |  | $50$ | $45$M | $\mathbf{103}$G | $\mathbf{23}$ | $\mathbf{46.2}$ | $\mathbf{65.8}$ | $\mathbf{49.8}$ | $\mathbf{26.8}$ | $\mathbf{50.0}$ | $\mathbf{63.5}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED-OO |  |  |  | $50$ | $45$M | $\mathbf{105}$G | $\mathbf{23}$ | $\mathbf{46.8}$ | $\mathbf{66.8}$ | $\mathbf{50.5}$ | $\mathbf{27.4}$ | $\mathbf{50.7}$ | $\mathbf{64.0}$ |
| $\mathbf{12}$ Epoch Schedule |  |  |  |  |  |  |  |  |  |  |  |  |  |
| $\bullet$ DETR-R$50$ Carion et al. () |  |  |  | $12$ | $41$M | $86$G | $27$ | $15.5$ | $29.4$ | $14.5$ | $4.3$ | $15.1$ | $26.7$ |
| $\bullet$ Deformable DETR-R$50$ Zhu et al. () |  | ✓ |  | $12$ | $40$M | $173$G | $12$ | $37.2$ | $55.5$ | $40.5$ | $21.1$ | $40.7$ | $50.5$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () + IMFA Zhang et al. () |  | ✓ |  | $12$ | $53$M | $108$G | $18$ | $37.3$ | $57.9$ | $39.9$ | $20.8$ | $40.7$ | $52.3$ |
| $\bullet$ DAB DETR-DC-R$101$ Carion et al. () |  |  | ✓ | $12$ | $63$M | $282$G | $10$ | $40.3$ | $62.6$ | $42.7$ | $22.2$ | $44.0$ | $57.3$ |
| $\bullet$ DN-DETR-R$18$ Li et al. () + CRED DC$\times 0.25$ |  |  |  | $12$ | $32$M | $\mathbf{51}$G | $\mathbf{34}$ | $\mathbf{34.2}$ | $\mathbf{53.0}$ | $\mathbf{36.2}$ | $\mathbf{16.0}$ | $\mathbf{36.1}$ | $\mathbf{50.0}$ |
| $\bullet$ DN-DETR-R$18$ Li et al. () + CRED |  |  |  | $12$ | $32$M | $\mathbf{60}$G | $\mathbf{31}$ | $\mathbf{35.0}$ | $\mathbf{54.0}$ | $\mathbf{36.9}$ | $\mathbf{16.3}$ | $\mathbf{37.0}$ | $\mathbf{51.4}$ |
| $\bullet$ DAB-DETR-R$50$ Liu et al. () + CRED DC$\times 0.25$ |  |  |  | $12$ | $45$M | $\mathbf{94}$G | $\mathbf{24}$ | $\mathbf{37.5}$ | $\mathbf{57.9}$ | $\mathbf{40.1}$ | $\mathbf{18.8}$ | $\mathbf{40.7}$ | $\mathbf{53.0}$ |
| $\bullet$ DAB DETR-R$50$ Liu et al. () + CRED |  |  |  | $12$ | $45$M | $\mathbf{103}$G | $\mathbf{23}$ | $\mathbf{38.4}$ | $\mathbf{58.4}$ | $\mathbf{41.0}$ | $\mathbf{20.0}$ | $\mathbf{41.8}$ | $\mathbf{53.9}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED DC$\times 0.25$ |  |  |  | $12$ | $45$M | $\mathbf{94}$G | $\mathbf{24}$ | $\mathbf{40.0}$ | $\mathbf{59.4}$ | $\mathbf{42.8}$ | $\mathbf{20.7}$ | $\mathbf{43.1}$ | $\mathbf{56.4}$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED |  |  |  | $12$ | $45$M | $\mathbf{103}$G | $\mathbf{23}$ | $\mathbf{41.1}$ | $\mathbf{60.6}$ | $\mathbf{44.0}$ | $\mathbf{22.2}$ | $\mathbf{44.1}$ | $\mathbf{58.9}$ |

CRED vs State-of-the-art.
We also compare our CRED with state-of-the-art object detection pipelines with multiscale, high-resolution, and sparse sampling approaches. Table 2 shows the results. From the table, it can be seen that CRED-DETR models are better by a large margin ($>50\%$) in FLOPs and FPS while delivering accuracy comparable with state-of-the-art methods. Even ResNet-$18$ based models with CRED show competitive performance with Deformable-DETR Zhu et al. (), DAB-DETR Liu et al. (), IMFA Zhang et al. () with a stronger backbone ResNet-$101$.

CRED w/ ResNet-$50$ performs better than heavy models, even in DC$\times 0.25$ configuration and $12$-epoch setting. For example, DN-DETR-R$50$ + CRED DC$\times 0.25$ is better than multiscale Deformable-DETR-R$50$ Zhu et al. () by $2.8$AP, $45\%$ fewer FLOPs and $50\%$ higher FPS. Similarly, DN-DETR-R$50$ + CRED is better than DAB-DETR-DC$5$-R$101$ by $0.8$AP, $63\%$ fewer FLOPs, and $130\%$ higher FPS. Then DN-DETR-R$50$ + CRED-OO has $60\%$ fewer FLOPs than Liu et al. () with the same accuracy. Furthermore, the accuracy can be improved using the latest DETR-training techniques of Zhao et al. (); Hou et al. (), which we leave for future work.

Figure 6 further strengthens our results, that CRED, while delivering comparable performance to the state-of-the-art, have far fewer FLOPs and higher FPS. Also, the results indicate that by utilizing the DC$\times 0.25$ configuration in CRED, DETRs of real-time speed and high accuracy can be constructed, indicating the huge potential of Cross-Resolution Encoding-Decoding in state-of-the-art DETRs.

Figure: Figure 6: The proposed CRED vs representative DETRs Liu et al. (); Li et al. (); Zhu et al. (); Liu et al. (); Li et al. () etc. (a,b) $50$-Epochs, and (c,d) $12$-epochs. ‘ and ‘ refers to CRED and existing models respectively. The size of the circle is proportional to the parameter count.
Refer to caption: x7.png

### 4.2 Ablations

We conduct a comprehensive ablation study on CRED design by using the state-of-the-art DN-DETR Li et al. () framework and provide insight on the design motivations.

**Table 3: Effect of OSMA and CRAM in CRED.**
| OSMA | CRAM | #Params | #FLOPs | AP | AP50 | AP75 | APS | APM | APL |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  |  | $44$M | $94$G | $38.6$ | $59.1$ | $41.0$ | $17.3$ | $42.4$ | $57.7$ |
| ✓ |  | $45$M | $97$G | $39.8$ | $59.7$ | $42.5$ | $19.1$ | $43.2$ | $58.1$ |
|  | ✓ | $45$M | $100$G | $40.4$ | $60.1$ | $43.1$ | $21.2$ | $43.6$ | $58.3$ |
| ✓ | ✓ | $45$M | $103$G | $41.1$ | $60.6$ | $44.0$ | $22.2$ | $44.1$ | $58.9$ |

**Table 4: Computation complexity analysis of CRED.**
| Method | Backbone | Encoder | Decoder | CRAM | OSMA | Total | FPS | AP50 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| $\bullet$ DN-DETR-R$50$ Li et al. () | $74$G | $12$G | $8$G | $-$ | $-$ | $94$G | $25$ | $44.1$ |
| $\bullet$ DN-DETR-DC$5$-R$50$ Li et al. () | $112$G | $80$G | $10$G | $-$ | $-$ | $202$G | $13$ | $46.3$ |
| $\bullet$ DN-DETR-R$50$ Li et al. () + CRED | $74$G | $12$G | $10$G | $3$G | $2$G | $103$G | $23$ | $46.2$ |

**Table 5: Ablation of OSMA design.**
| ablation | $F^{5}$ | $F^{4}$ | $F^{3}$ | $g_{0}$ | $P$ | $d$ | #Params | #FLOPs | AP | AP50 | AP75 | APS | APM | APL |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | ✓ | ✓ |  | $1$ | $1$ | $21$ | $45$M | $101$G | $40.2$ | $59.5$ | $43.2$ | $21.3$ | $43.2$ | $57.9$ |
| changing<br>#scales | ✓ | ✓ | ✓ | $1$ | $1$ | $21$ | $45$M | $103$G | $41.1$ | $60.6$ | $44.0$ | $22.2$ | $44.1$ | $58.9$ |
|  | ✓ | ✓ | ✓ | $2$ | $2$ | $21$ | $45$M | $101$G | $39.7$ | $59.5$ | $42.3$ | $21.0$ | $42.7$ | $56.8$ |
| Vary ‘$\{g_{0},P\}$’<br>Same res. | ✓ | ✓ | ✓ | $1$ | $1$ | $21$ | $45$M | $103$G | $41.1$ | $60.6$ | $44.0$ | $22.2$ | $44.1$ | $58.9$ |
|  | ✓ | ✓ | ✓ | $2$ | $1$ | $21$ | $45$M | $94$G | $40.0$ | $59.4$ | $42.8$ | $20.7$ | $43.1$ | $56.4$ |
| Vary ‘$\{g_{0},P\}$’<br>DC$\times 0.25$. | ✓ | ✓ | ✓ | $4$ | $4$ | $21$ | $45$M | $92$G | $39.4$ | $59.0$ | $42.1$ | $19.8$ | $42.7$ | $56.0$ |
| Vary ‘$d$’ | ✓ | ✓ | ✓ | $1$ | $1$ | $40$ | $45$M | $114$G | $41.5$ | $61.1$ | $44.2$ | $22.4$ | $44.8$ | $59.6$ |

Effect of CRAM and OSMA.
We analyze the effect of OSMA (Sec. 3.2) and CRAM (Sec. 3.1). Table 3 shows the analysis. It can be seen that by using any of OSMA or CRAM into the baseline, the accuracy improves. By using OSMA alone, AP increases by $1.2$, indicating that OSMA produces better input features or tokens for the encoder. While by using only CRAM, AP improves by $1.8$AP. Using both the modules, we get an overall improvement of $2.5$AP at a reduction of only $2$FPS and negligible parameter overhead. Interestingly, AP for small objects increases by $\sim 5$AP. If we compare this with the DC variant of the baseline, we perform on par in roughly $99$G fewer FLOPs, which is inspirational. This accuracy gap is reduced in the $50$ epoch setting.

Hence, we conjecture that feeding multiscale information to the encoder via OSMA while transferring the low-resolution encoded information to high-resolution feature via CRAM proves to be highly effective in DETRs from both accuracy and runtime perspective.

Computational Complexity.
Table 4 shows the effect of using CRAM and OSMA in DN-DETR. It can be seen that the overhead of these modules is $\sim 5$G FLOPs. However, overall computations slightly increase due to the increased resolution of the decoder when fed by CRAM.

Ablation of OSMA Hyperparameters.
OSMA mainly has intermediate projection dimension $d$ and grid size $g$ as hyperparameters. Another ablation exists within the OSMA design, i.e., the number of input multiscale features. We study them individually in Table 5.

The first two rows show the effect of input multiscale features. As we include more high-resolution features, overall AP increases along with the AP of small objects. This indicates OSMA’s one-step attention mechanism effectively produces feature maps infused with multiscale information.

We also change grid size $g$. Increasing the grid size $g_{0}=2$ reduces the FLOPs by $2$G because $T$ (Figure 3) increases and $N_{g}$ decreases. However, we observed a reduction in the AP. We hypothesize that this happens because the stage-$5$ ($F^{5}$) feature is the smallest resolution. When more than two features using $g_{0}=2$ are fused with high-res features, the individual feature at low-resolution loses its chance to interact with the high-resolution features individually because these features already have relatively large receptive fields and carry more information.

Although we are interested in keeping the values of $d$ equal to $T$, we analyze its effect. We observe that it increases the FLOPs while slightly improving the AP. Hence, based on the computational budget requirements, one can change $d$ to achieve the desired performance and runtime.

**Table 6: Effect of LayerNorm Ba et al. () and activations in CRED.**
| LayerNorm | Activation | #Params | #FLOPs | AP | AP50 | AP75 | APS | APM | APL |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| ✓ | ReLU | $45$M | $103$G | $40.6$ | $60.4$ | $43.6$ | $21.6$ | $43.6$ | $57.9$ |
| ✓ | SiLU | $45$M | $103$G | $41.1$ | $60.6$ | $44.0$ | $22.2$ | $44.1$ | $58.9$ |
| ✗ | SiLU | $45$M | $103$G | $39.3$ | $59.1$ | $41.9$ | $20.8$ | $42.5$ | $56.6$ |

**Table 7: Ablation of CRAM design.**
| Input | #Params | #FLOPs | AP | AP50 | AP75 | APS | APM | APL |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| $F^{4}$ | $45$M | $103$G | $41.1$ | $60.6$ | $44.0$ | $22.2$ | $44.1$ | $58.9$ |
| $F^{3}$ | $45$M | $147$G | $42.1$ | $61.4$ | $44.9$ | $23.3$ | $44.8$ | $59.4$ |

CRED Design.
Within the CRED design, we study the effect of different activations and the specified use of layer normalization Ba et al. (). Table 6 shows that using ReLU or removing LayerNorm from CRED decreases accuracy. This justifies the configuration described in the paper.

Ablation of CRAM.
CRAM is studied by changing its input resolution and source. Table 7 shows that despite feeding the encoder with low resolution, CRAM can effectively transfer the encoder knowledge to the high-resolution feature. By default, we feed resolution equal to $F^{4}$ to CRAM. When we feed CRAM with $F^{3}$, the computations in the decoder increase mainly in the cross-attention. Although it improves AP, the rise in FLOPs is notable. Hence, we restrict ourselves to feeding CRAM with resolution up to $F^{4}$.

## 5 Conclusion

In this work, we present a novel Cross-Resolution Encoding-Decoding (CRED) mechanism to improve the accuracy and runtime of DETR methods. CRED is based on its two novel modules Cross Resolution Attention Module (CRAM) and One Step Multiscale Attention (OSMA). CRAM transfers the knowledge of low-resolution encoder output to a high-resolution feature. While OSMA is designed to fuse multiscale features in a single step and produce a feature map of a desired resolution. With the application of CRED into state-of-the-art DETR methods, FLOPs get reduced by $50\%$, and FPS increases by $76\%$ than the high-resolution DETR at equivalent detection performance.

Future Scope & Limitations: CRED with its promising results shows huge potential in real-time and affordable DETRs with high accuracy and high-resolution image processing. There is greater scope for improvements, e.g., fusing CRAM and OSMA for even higher performance or adapting CRED to sparse sampling-based DETRs because the current design can not fuse high-resolution features with sparsely sampled encoder embeddings. In addition, CRED has huge scope in Transformer-based semantic or instance segmentation by leveraging its attention transfer to improve runtime for processing high-resolution images because semantic segmentation produces high-resolution outputs.

## Appendix A Detection Visualizations on MS-COCO Validation Set

[Uncaptioned image]: extracted/5903569/detections/0.jpg

[Uncaptioned image]: extracted/5903569/detections/1.jpg

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 5
presentation: 3
questions: The proposed OSMA combines multiscale features along the channel dimension. However, multiscale features typically have different numbers of channels—high-resolution features usually have fewer channels than low-resolution ones. How did you handle this discrepancy when aggregating them by channel? Did you reduce the number of channels for the low-resolution features? Could you provide more details about the implementation? 

Additionally, the citation format needs adjustment. For instance, in some places, citations like "Zhang et al. (2023a)" should be written as “(Zhang et al. 2023a).”
soundness: 3
strengths: The proposed approach feeds the encoder with low-resolution features while supplying the decoder with high-resolution features from the backbone. This method achieves an effective speed-accuracy tradeoff. The results are demonstrated using MS-COCO dataset.
summary: This paper introduces a Cross-Resolution Encoding-Decoding (CRED) mechanism to enhance the efficiency of DETR for object detection. CRED consists of two key modules: the Cross Resolution Attention Module (CRAM) and One Step Multiscale Attention (OSMA). CRAM transfers knowledge from low-resolution outputs to high-resolution features, while OSMA fuses multiscale features in one step. By integrating CRED into DETR models, such as DN-DETR, the approach achieves similar accuracy to high-resolution DETR with fewer FLOPs and faster performance.
weaknesses: The idea of combining low-resolution and high-resolution features or using multiscale features to enhance DETR performance is not new, as similar approaches have been used in previous studies, such as Zhang et al., (2023a); Zhao et al., (2024b); and Li et al., (2023). How do you justify the novelty of your contributions? 

The proposed approach has only been evaluated on a single dataset, MS COCO. While it outperforms the baselines, as shown in Table 1, it achieves only competitive results compared to state-of-the-art methods in Table 2. It would be more convincing if the approach were tested on additional datasets.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 4
questions: Please see weaknesses.
soundness: 4
strengths: 1. CRED improves the computational efficiency of DETR by allowing for the accuracy of high-resolution detection while operating at the speed of low-resolution processes.

2. Enhance the DETR block CRAM and OSMA are two main module for CRED. CRAM can facilitate the info transfer between high resolution and low resolution. OSMA simplifying the integration of detailed features across different scales.

3. The ablation experiment is comprehensive and adequate.
summary: This paper proposes a cross-resolution encoding-decoding mechanism to improve the efficiency of DETR. Two important components CRAM and OSMA are introduced to convert the knowledge of the low-resolution encoder output into high-resolution features. Extensive analyses and experiments have demonstrated the effectiveness of the method.
weaknesses: 1. More datasets is better, only on MS-COCO2017 didn't quite convince me.

2. While FLOPs and FPS metrics are provided, a more in-depth discussion of the tradeoffs between accuracy, computational cost, and speed of inference would be beneficial a lot.

3. Why is augmenting global information to high-resolution features better than sparse sampling methods(e.g.,IFMA)?

4. The main experiments have used DETR as a baseline, and I would like to know how the method performs on other more advanced detection algorithms, which would be valuable in understanding the generalizability of the method.

---

confidence: 3
contribution: 2
initial_rating: 6
presentation: 2
questions: 1. Including the comparison of latest efficient transformers would provide a more comprehensive evaluation of CRED’s competitiveness.
2. Given the modest gains in small object detection (APS), the authors could explore further optimizations to make CRED more effective for this class of objects.
soundness: 3
strengths: 1. The CRED mechanism is a sound approach to reduce the computational cost of DETR models by balancing low-resolution encoding with high-resolution decoding. 
2. Extensive experiments are implmented of the CRED-enhanced DETR models on the MS-COCO 2017 benchmark. The results show large improvements in FLOPs and runtime without loss in detection accuracy.
3. The paper provides detailed ablation studies, analyzing the contributions of the individual CRAM and OSMA modules. This shows the influence of each component and provides insight into the design choices.
4. The CRED mechanism is shown to be effective across different DETR variants and backbone architectures, indicating that it has a good scalability and can be applied to various object detection pipelines.
summary: The paper proposes a new Cross-Resolution Encoding-Decoding (CRED) mechanism aimed at improving the computational efficiency of Detection Transformers (DETR) while maintaining high detection accuracy. The CRED mechanism consists of two key modules: the Cross-Resolution Attention Module (CRAM) and the One Step Multiscale Attention (OSMA). CRAM transfers knowledge from low-resolution encoder outputs to higher-resolution decoder inputs, while OSMA fuses multiscale features in a single step, generating feature maps enriched with multiscale information. When applied to state-of-the-art DETR variants, the proposed method significantly reduces computational complexity, with the authors claiming a 50% reduction in FLOPs and a 76% increase in FPS, all without sacrificing detection accuracy. The paper presents extensive experiments, ablation studies, and comparisons with existing methods to support the claims.
weaknesses: 1. The overall design is more like an engineering design and lacks technical novelty. While the empirical performance improvements are well-documented, the paper could benefit from a more in-depth theoretical analysis of the CRED mechanism. For example, why does transferring low-resolution encoder information to high-resolution decoder inputs improve performance?
2. While the authors claim that CRED improves the detection of small objects, the improvements in average precision for small objects (APS) are relatively modest in some configurations. This suggests that while the CRED mechanism provides overall efficiency gains, its impact on small object detection could be further optimized.
3. Although the authors compare CRED against several state-of-the-art DETR models (such as Deformable DETR, DN-DETR, and IMFA), there is a lack of comparison with some of the latest advancements in efficient transformer architectures, such as sparse transformers and vision transformers (ViTs). 
4. The paper provides limited qualitative analysis through visualizations of detection results (Figures 7–10). While these figures are informative, a more detailed qualitative analysis of how CRED affects detection in challenging cases (e.g., cluttered backgrounds, occlusions) would strengthen the paper's narrative.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: Is the local aggregation of multiscale features module in OSMA really efficient in practice and friendly to the hardware? This module requires a lot of memory discontinuous operations, which may limit the actual running speed of the model.

As shown in Figure1, the input of CRAM module is the feature from Stage-4 or Stage-3, why we do not use Stage-2 or combine the feature from Stage-4 and Stage-3?
soundness: 3
strengths: The motivation of the paper is well-founded. The high computational burden in high-resolution detection is an important problem, and the combination of both low-level and high-level feature is a reasonable approach.

The experiment results show that the proposed CRED approach improves performance compared to the original DETR, which demonstrates the effectiveness.
summary: This paper present a novel method named Cross-Resolution Encoding-Decoding (CRED), which can reduce the computational cost of the traditional DETR model , especially for high-resolution detection. By using CRAM module and OSAM module, the CRED effectively combines low-level and high-level feature to achieve the balance between detection accuracy and computational efficiency. The authors validate the effectiveness of CRED through a series of experiments and ablation studies.
weaknesses: Compare with original DN-DETR，the improvement of CRED-DERT is not significant. More comparative analysis and deeper insights into the benefits of CRED over DN-DETR will strengthen the contribution.

The motivation of introducing multi-scale features is reasonable, but the CRAM has a similar structure to FPN, which seems to be more of an adaptation rather than a breakthrough

Lack of the comparation with SoTA method, such as RT-DETR. [1]. As far as I know, RT-DETR achieves higher throughput and is designed for real-time application. The absence of comparisons with such methods weakens the evaluation of CRED’s performance, particularly in terms of speed and efficiency, which are key claims of the paper.

Lack of visual comparison with other SoTA methods, especially the detecting result of small objects, which is the evidence of the advantage of CRED.

[1] DETRs Beat YOLOs on Real-time Object Detection, CVPR, 2024

Meta-review: To improve the efficiency of DETR computation, the Cross-Resolution Encoding-Decoding (CRED) mechanism has been proposed. CRED uses two modules, CRAM and OSMA, to achieve both low-resolution speed and high-resolution accuracy. CRAM transfers low-resolution information to high-resolution, and OSMA integrates multi-scale information to improve the desired resolution.

The strengths of this work are as follows. CRED improves the computational efficiency of DETR by achieving the accuracy of high-resolution detection while operating at the speed of low-resolution processes.

The weaknesses of this work are as follows. Although the AC acknowledges the novelty of transferring low-resolution attention computed from low-resolution features to high-resolution features, the general idea of combining low-resolution and high-resolution features is not new, and it is difficult to say that it is incredibly novel. The proposed approach has only been evaluated on a single dataset, MS COCO. Additional experiments have been submitted, but they are not comprehensive.

This paper was evaluated as borderline. As mentioned above, the paper proposes a method to improve the computational efficiency of DETR by achieving the accuracy of high resolution detection while operating at the speed of low resolution processes, and the effectiveness of the method has been recognized. However, in terms of the innovativeness of the method and the comprehensiveness of the experiments, it is difficult to say that it is a strong factor in overcoming the threshold, and at this point it is judged to be rejected. The AC recommends that the authors consider the reviewers' comments and submit the paper to the next conference.

Decision: Reject