Count-Preserving Supervision Across Downsampling for Tiny-Object Detection

Tiny objects in aerial and drone imagery, often under 16 pixels across, do not disappear all at once. They fade stage by stage as the backbone halves its resolution, and by the time a detector decides where to look, the evidence may already be gone. Recent transformer detectors for this setting predict a density map, meaning a heatmap of how many objects sit in each region, and use it to decide where to place object queries (the learned slots that each try to claim one object). But they predict it from the final, already-degraded feature maps. We propose to supervise density at every downsampling stage of the backbone. The targets are built from ordinary bounding boxes so that the total object count is preserved exactly at each resolution. The same count-faithful density then places a fixed budget of queries in proportion to local object counts.

The idea in two sentences: force each downsampled feature map to still "know" how many objects fall in each of its cells, using box-derived targets that need no extra annotation and a training-only head that is discarded afterward. Then spend a constant number of decoder queries where that count says objects are, instead of varying the query count per image. If this works, it gives cheaper and more stable detection of very tiny objects than current density-guided detectors. It also gives a measurement of where in the backbone tiny objects are lost.

Core Claim

Density-guided detectors already train a supervised density head. DQ-DETR classifies image-level count into four bins and uses a foreground heatmap to seed anchors. CrowdQuery regresses a box-scaled Gaussian density map and cross-attends queries to it. Dome-DETR predicts density from shallow features to prune attention windows and size the query set. So "use the density head as an auxiliary loss" is not new: its gradients already flow into the backbone. What none of them does is supervise count at each resolution the image passes through. A single late density loss can be satisfied by recovering count from context, such as parking-lot texture, rather than by keeping the individual object signal alive through each stride-2 reduction.

Our claim is narrower. It is that a stage-wise, mass-conserving density loss specifically improves recall of the smallest objects, AP for very tiny objects on AI-TOD-v2, beyond what a final-stage density loss gives. The reason is that it penalizes signal loss at the stage where it happens. A second, separable claim is that placing a fixed query budget in proportion to predicted local counts matches the accuracy of variable-budget schemes. It does so without the per-frame compute swings of DQ-DETR (300 to 1500 queries) or Dome-DETR (338.4 to 398.9 GFLOPs).

The targets are simple. Each box $b$ becomes a 2D Gaussian with standard deviations set by its width and height, normalized to unit mass. This differs from CrowdQuery's unnormalized Gaussians and borrows the box-as-Gaussian view from NWD-RKA. At stage $s$, with stride $r_s$, the target $D_s(c)$ for cell $c$ is the total Gaussian mass falling in that cell, so $\sum_c D_s(c) = N$, the number of objects, at every stage. A 1×1 convolution head $h_s$ on stage features $F_s$ is trained with

$$ \mathcal{L}_{\text{aux}} = \sum_{s} \lambda_s \Big( \lVert h_s(F_s) - D_s \rVert_1 + \big| \textstyle\sum_c h_s(F_s)(c) - N \big| \Big), $$

where $\lambda_s$ is a per-stage weight and the second term enforces count conservation. Count, rather than presence, is the right target at coarse stages. At stride 16, one car and twenty cars both yield a "foreground" cell, but only count tells the decoder how many queries that cell needs.

Research Program

The work has three parts. The first is diagnostic. On frozen backbones from a D-FINE baseline and from Dome-DETR, we fit linear probes that regress $D_s$ from $F_s$ at strides 4, 8, 16 and 32, stratified by object size bin. This produces a "survival curve" showing at which stage objects under 8 pixels stop being countable. If count is already fully recoverable at all stages in the baseline, the premise fails and we stop there.

The second part is the regularizer: the heads $h_s$ attached after every strided stage of the backbone and the encoder input, with all but the last removed at inference. We will monitor the cosine similarity between auxiliary and detection gradients on shared layers. Negative transfer is the known risk of this family, and we will anneal $\lambda_s$ if conflict appears.

The third part is fixed-budget query placement. Given $K$ queries, cell $c$ receives $k_c \propto D(c)$ with a small floor, allocated by largest-remainder rounding. Anchors are placed at the highest-scoring encoder positions within each cell, replacing the global top-$K$ selection. Inference cost is then constant per frame.

Baselines

The naive reference point is the D-FINE detector that Dome-DETR builds on. Dome-DETR reports a gain of +3.3 AP over it on AI-TOD-v2, so it sets the floor that any density method must clear. It is trained with the same schedule, input resolution and augmentation as every other variant.

The strongest existing method is Dome-DETR. It reports 34.6 AP on AI-TOD-v2 and 39.0 AP on VisDrone with its large model, and it already combines a supervised density extractor, window pruning and adaptive queries. We will run it from the same D-FINE base, on the same data splits and GPU budget, with an equal hyperparameter sweep of about eight configurations per method. Beating it means a higher AP_vt at matched or lower mean GFLOPs, plus lower variance in per-frame latency, with overall AP no worse within seed noise across three seeds. DQ-DETR is a second density baseline built on a different base. It reports 30.2 mAP on AI-TOD-v2 against 25.9 for DINO-DETR, and 37.0 on VisDrone. We will reimplement its counting and query modules on our base so that its coarse image-level query sizing is compared against our continuous local allocation.

The ablation that isolates the key ingredient keeps everything identical but supervises density only at the final stage, which is Dome/CrowdQuery-style supervision. A second ablation replaces count targets with binary box masks at every stage, as DATNet-style dense supervision using boxes as proxy masks. A third ablation turns our fixed-budget placement back into standard top-$K$ selection, to separate the regularizer's contribution from the placement's.

Why not just…?

Why not just keep the final-stage density loss that existing detectors already have? This is the most direct threat. The whole proposal rests on stage-wise supervision beating it. The final-stage ablation settles the question. If it matches our AP_vt, and the probe curves show no extra count survival at strides 16 and 32, the stage-wise idea is wrong and we will report it as such.

Why not just swap pooling for learnable, content-aware downsampling? LIP learns importance weights inside each pooling window and raised Faster R-CNN small-object AP on COCO from 21.9 to 24.0. It attacks the same stage-wise loss, but from local contrast alone and without any supervision on what should survive. We will run LIP alone and LIP combined with our loss. If LIP alone matches us, the auxiliary loss is unnecessary. If the two stack, the signals are complementary.

Why not just use dense foreground masks from boxes, as DATNet and SET do? DATNet showed that dense segmentation and distance-transform auxiliaries raise Mask R-CNN box AP on COCO from 42.6 to 44.7. SET smooths background features during training and reaches 26.6 AP on AI-TOD with DINO. Both use presence-style masks. Our argument is that presence saturates for clustered tiny objects at coarse strides. The mask-versus-count ablation tests this. We expect the gap to appear only in high-density images, so we will report AP split by per-image object count.

Why not just use many static queries? DQ-DETR's ablations show that removing density-guided feature enhancement costs 2.1 mAP even with enlarged query sets, so query quantity alone is insufficient. We still include a 1500-static-query variant so the compute cost of this option is explicit.

Proposed Experiments

Training and evaluation use AI-TOD-v2, with a mean object size of 12.7 pixels, reporting AP, AP_vt, AP_t and AP_50. VisDrone2019 is used for dense urban drone scenes, reporting AP and AP_s. MS COCO 2017 is a guard against losses on balanced, large-object data. DQ-DETR drops from 51.3 to 50.2 there relative to DINO, and because our heads are discarded and our budget is fixed, we expect no such drop. We report mean and standard deviation of per-frame latency and GFLOPs for every method.

The decisive checks are three. First, stage-wise supervision must beat final-stage supervision on AI-TOD-v2 AP_vt by more than seed variance. Second, the probe survival curves must shift upward at the coarse strides for objects under 8 pixels, and the size of that shift should track the AP_vt gain across ablations. Third, fixed-budget placement must match Dome-DETR's adaptive queries in AP with near-zero variance in latency.

Failing the first check falsifies the core claim. Passing it while failing the second would mean the gain comes from something other than preserving count, which we would then need to explain before publishing the mechanism.