arXiv:2610.39946cs.CVOct 2026

Manuscript Offprint

arXiv:2610.39946

ElasticFormer: Detecting Objects in HRW Shots via Elastic Computing Vision Transformer

Wenxi Li, Jingchen Huang, Chenyang Lyu, Moran Liu, Haozhe Lin, Guiguang Ding, Yuchen Guo

Abstract

Recent advances in gigapixel-level imaging have brought High-Resolution Wide shots to the forefront of research. However, these images present significant challenges: extreme sparsity of foreground, gigapixel-level resolutions and diverse target counts. This makes traditional close-up detectors inaccurate and slow as they are overwhelmed by the background. Although previous research has explored sparse backbones, their fixed sparsity patterns lack the adaptability required to handle diverse target numbers. To address this, we introduce ElasticFormer, a sparse backbone that dynamically allocates computational resources based on foreground proportion. After scoring windows based on variance, proposed ElasticSelector module will predict the foreground proportion for top-k selection. The mechanism guides the model to select target-containing windows, scaling resources in areas where objects are clustered. We introduce a novel loss function combined with the 3-phase training strategy for ElasticSelector, allowing it to function properly when bounding box annotations are missing. A WSOD study is carried on PASCAL VOC 2007 to evaluate its extensibility. Further, ElasticNet is created to verify its backbone-agnostic nature. In experiments on the PANDA gigapixel benchmark, ElasticFormer reduces backbone FLOPs by 80% while achieving a significant improvement in AP50AP_{50} when compared to fixed-ratio sparse methods.

1. Introduction

Object detection is a core task in computer vision that involves both locating and identifying objects of interest in an image. It typically produces, for each detected instance, a category label and a spatial extent (usually an axis-aligned bounding box). Models such as Fast R-CNN [18] have demonstrated strong performance on MS COCO [25]. However, with the development of nondestructive high-resolution imaging systems, High-Resolution Wide (HRW) shots detection has drawn increasing attention [6, 16], which refers to object detection in imagery characterized by extremely high spatial resolution and a wide field of view, such as images captured by gigapixel-scale drone [33], satellite [12, 13, 37], or panoramic camera [4].

Firstly, in HRW scenarios, foreground density is much lower than that in conventional detection images. While typical datasets have foregrounds covering over 50% of the image, HRW images often contain less than 15% [22], with large background regions such as sky or vegetation. Given such extreme sparsity, cutting-edge detectors, including DINO [40], Deformable DETR [43], RMT [17], among others, still struggle with overwhelming background.

Secondly, limited computational resources pose another challenge. HRW detection scenarios (e.g., UAV-based inspection [14] and medical detection [24]) often require real-time responsiveness. As resolution scales from millions of pixels in COCO [25] to billions in PANDA [36], the cost of

∗^{*}Equal contribution

†^{\dagger}Corresponding author

Figure

(a) Origin Images

(b) SparseFormer (fixed ratio = 0.5)

(c) ElasticFormer (adaptive ratio)

Figure 1. Comparison of inference region selection between different backbones. (b) SparseFormer selects a fixed ratio of regions for processing, regardless of input variability. (c) ElasticFormer adaptively selects a dynamic ratio of informative regions based on the input image content, enabling more flexible and efficient inference.

conventional detectors grows polynomially with input size, leading to inference up to two orders of magnitude slower.

Thirdly, HRW scenarios show extreme variation in target counts, ranging from a few to dozens, as shown in Figure 1(a). Thus models must remain effective across both sparse and dense cases. However, existing approaches such as SaccadeDet [23] and SparseFormer [22] overlook this issue, as they rely on fixed sparsity rates that fail to adapt to fluctuations in target quantity. Consequently, their effectiveness is significantly reduced when confronted with highly variable target distributions, illustrated in Figure 1(b).

Inspired by human cognitive efficiency and recent advances [1, 7, 19, 32, 41], we propose ElasticFormer, a detection framework that introduces elasticity into backbone design. Unlike fixed-ratio methods that waste computation in HRW scenes with highly variable foreground proportion, ElasticFormer dynamically allocates resources by adaptively selecting image patches according to the predicted foreground proportion. A lightweight module, ElasticSelector, guides patch selection independently at each stage in backbone, enabling fine-grained perception while scaling cost with foreground proportion rather than overall image size. It is noteworthy that ElasticSelector is backbone-agnostic, motivating the creation of ElasticNet for verification. Experiments show that ElasticFormer reduces computation by up to 80% while improving accuracy compared with SparseFormer [22], ElasticNet also achieves a 87% computational saving compared with ResNet-50 [20].

A further challenge in weakly supervised object detection (WSOD) is the absence of bounding-box annotations, making foreground proportion hard to compute. To address this, we design a new loss function for ElasticSelector, which uses either ground truth or pseudo labels as supervision. Validation on the PASCAL VOC 2007 dataset [15] demonstrates that this extension reduces FLOPs by at least 50% while improving both mAP and CorLoc.

To summarize, our key contributions are:

• We propose ElasticFormer, a novel sparse Vision Transformer-based backbone that not only addresses the extremely sparse target distribution and redundant background in HRW images, but also dynamically adapts to varying numbers of targets across diverse scenes.

• We further introduce a lightweight component, ElasticS-selector, which dynamically predicts the foreground proportion during the forward inference process based on intermediate features, providing efficient guidance with negligible additional computational overhead.

• We design a label-free loss function that minimizes the gap between the predicted and actual foreground proportions, enabling self-supervised optimization of ElasticS-selector without the need for extra annotations.

• We validate the proposed backbone on PANDA [36] and PASCAL VOC 2007 [15] datasets, and further extend our backbone-agnostic design to CNN-based architectures, consistently demonstrating its effectiveness and generality across model families.