Detectors for very small objects, such as drones a few pixels wide in an infrared frame or vehicles about 12 pixels across in aerial imagery, rarely fail because they miss the target outright. They fail because at high recall they also fire on wave crests, cloud edges and gravel, which look just as blob-like at that scale. This proposal adds a second check to each detection, borrowed from anomaly detection. For every place the detector flags, we hide that spot plus a thin guard ring around it and ask a model trained only to fill in background what should be there. Clutter can usually be predicted from its surroundings. A real target cannot. The gap between what the image shows and what the background model expected, measured against how uncertain that model is, becomes a target score that needs no box labels to learn.
The underlying idea comes from reconstruction-based anomaly detection. A model trained on normal data "heals" an input back to a normal-looking version, and the difference from the original marks the anomaly. That field has struggled with tiny anomalies. They vanish when images are downsampled (Looking for Tiny Defects via Forward-Backward Feature Transfer), they get smoothed over by compressed bottlenecks (Road Anomaly Detection by Partial Image Reconstruction with Segmentation Coupling), and they leak into the reconstruction when part of the target stays visible. We avoid all three failures by reconstructing only at candidate locations, at native resolution, with every candidate hidden at the same time.
Core Claim
We claim that a background model trained with self-supervision can separate true tiny targets from clutter better than a discriminative verifier of the same size, specifically when labels are scarce or the test domain shifts. The model is trained by masking random windows of unlabeled frames and learning to fill them in. It predicts both a mean and a per-pixel variance for the hidden window. We also claim that hiding all candidates jointly, rather than shifting the image to centre one of them, removes target leakage in dense scenes. We do not claim the method beats a strong supervised detector with full labels on in-domain data. That regime is where the idea is most at risk, and the experiments test it directly.
The score for a candidate window $W$, with guard-ringed mask $M \supset W$, is
$$s(W) = \frac{1}{|W|}\sum_{p \in W} \frac{\big(\phi(x)_p - \mu_\theta(x \odot (1-M))_p\big)^2}{\sigma^2_\theta(x \odot (1-M))_p},$$
where $x$ is the image and $\phi$ is a shallow, fixed feature map (raw intensity for infrared, early-layer features for RGB). The inpainting network $\theta$ sees only the unmasked context and outputs a predicted background mean $\mu_\theta$ and variance $\sigma^2_\theta$ at each pixel $p$. Dividing by the predicted variance means that textured clutter, where the model knows it cannot predict exactly, contributes little. This directly targets the "pixel-level trap" identified by A Recover-then-Discriminate Framework for Robust Anomaly Detection, where fixed pixel differences are swamped by benign texture.
Relation to Prior Work
The closest work is Dynamic Background Reconstruction via Transformer for Infrared Small Target Detection (DBR). It masks 50% of a fixed patch grid with a ViT-Large masked autoencoder and predicts one global image shift so that the target sits inside a single masked patch. DBR supplies the key evidence that motivates this proposal: a partially visible target gets reconstructed into the "background" and cancels out of the residual. Its fix assumes one dominant target, however, and its large backbone limits it to 19.96 FPS. We differ in three ways. We place masks at detector candidates instead of on a grid. We hide all candidates jointly, with guard rings scaled to each candidate's size, instead of applying one shift. And we inpaint only local crops at native resolution.
Two other papers constrain the design. Anomaly-Aware YOLO (AA-YOLO) already treats tiny targets as statistical departures from background, using a closed-form test on feature activations. It is frugal and strong, but it assumes channels are independent and exponentially distributed, and it builds no background counterfactual. We keep its "background as null hypothesis" view and replace the fixed parametric null with a learned model that depends on context. JSR-Net reports that bottleneck reconstruction misses thin and small obstacles. That is why we reject whole-image autoencoders here.
Two papers supply methods. We reuse the coarse-to-fine sparse compute pattern of QueryDet, which spends high-resolution computation only where a cheap head proposes objects, and apply it to reconstruction rather than to box heads. We reuse the insight from Looking for Tiny Defects that tiny defects survive only if reconstruction runs at full resolution. DRADNet also uses reconstruction to help small object detection, but it trains a super-resolution branch on paired high-resolution images and serves closed-set classes. Our reconstruction is of background, is unpaired, and is used as evidence at test time.
Research Program
The system has three parts. The first is a base detector run at a deliberately low confidence threshold so that recall is high. We use AA-YOLO on infrared data and a standard aerial detector on AI-TOD and VisDrone. The second is a lightweight convolutional inpainter with mean and variance outputs, trained on unlabeled frames from the target domain. Training masks random windows of 4 to 32 pixels with guard rings and minimises Gaussian negative log-likelihood. Because targets are rare and tiny, the optimal fill for a masked window is background even when a target happens to sit inside, so no labels are needed.
The third part is a small fusion layer. It combines detector confidence, $s(W)$ and window scale, and uses only a handful of parameters so it can be fit on very few labels. Thresholding the variance-normalised residual inside $W$ also yields a per-pixel mask. That lets us evaluate with hierarchical IoU, a metric that multiplies target-level and pixel-level scores and exposes merging and splitting errors.
The analyses focus on three questions. First, when does leakage occur? We measure how much the score drops when neighbouring candidates are left visible versus hidden, as a function of distance between targets. Second, how should the guard ring scale with target size, given point-spread blur? Third, does the variance head actually learn higher uncertainty on clutter than on flat background? We check this with per-category calibration on sea, sky and ground scenes.
Baselines
The naive reference is the base detector alone, with its threshold tuned on validation data. If our verifier does not raise precision at matched recall over this, it adds nothing.
The strongest infrared competitor is AA-YOLO. On IRSTD-1k it reports F1 92.5 and AP 96.6 with AA-YOLOv7-tiny, and it retains 90% of full performance when trained on 10% of SIRST (Anomaly-Aware YOLO). The strongest reconstruction competitor is DBR, which reports F1 75.01% on SIRST and 64.10% on MFIRST (DBR). On aerial data, SPAR-Det reports 31.2 AP on AI-TOD and 30.8 AP on VisDrone (SPAR-Det). For dense-target evaluation under hIoU, the file names DNANet as the leader on NUDT and IRSTD1k-AUG, but there is no reported result found on Lacuna for DNANet's hIoU value, so we will rerun it with the public metric toolkit.
We will retrain every baseline on identical splits with the same hyperparameter search budget and report latency on the same GPU. Our system counts as beating a baseline if it improves F1, or AP on aerial data, at equal or lower latency than DBR. In the label-scarce and cross-domain settings, it must beat AA-YOLO's F1 by a margin larger than the seed-to-seed spread.
Three ablations isolate the key ingredients. The first compares the full inpainter against a copy with the variance head removed, which becomes a plain L2 residual. The second compares joint masking against masking each candidate independently. The third, most important, is a matched discriminative verifier with the same parameter count and the same crop plus context input, trained on labels but without the inpainted background channel. If that verifier matches us in every regime, the reconstruction contributes nothing.
Why not just…?
Why not just use a stronger supervised detector and raise its threshold? With abundant in-domain labels, this may be enough. AA-YOLO's IRSTD-1k numbers leave little headroom, so we expect small or no gains there and will report that honestly. The case for reconstruction rests on regimes where supervised clutter rejection must be learned from few labels or does not transfer. We test these directly by training on 10% of SIRST and by training on SIRST and testing on IRSTD-1k and MFIRST. The inpainter can train on unlabeled target-domain frames, which a supervised detector cannot use.
Why not just run DBR several times with different grid offsets and combine the results? This is a real threat to the leakage claim. Each of several targets would be fully masked under at least one offset. We will build this multi-offset DBR as a baseline with equal compute and compare it on density-binned subsets of NUDT and IRSTD1k-AUG. If it matches joint candidate masking on accuracy, our advantage reduces to cost, from local crops versus full ViT-Large passes, and we will report the claim in those terms.
Why not just train a second-stage classifier on crops with context? This is the ablation above without the background channel. MANTA shows generic pretrained models reason poorly about fine geometry on tiny objects (about 55% accuracy for BLIP-2), but that does not rule out a small task-specific verifier. Only the matched experiment across full-label, 10%-label and cross-domain settings can settle this. The hypothesis fails if the verifier wins in the low-label or cross-domain settings.
Why not just use temporal background subtraction? FDDM shows that background models averaged over time only catch stationary anomalies, and it needs a fixed camera. Our method is single-frame, so it applies to moving platforms and to the single-image benchmarks used here.
Proposed Experiments and Decisive Checks
The infrared study uses SIRST, MFIRST and IRSTD-1k, reporting F1 and AP. NUDT and IRSTD1k-AUG are evaluated with hIoU and its error breakdown, and results are binned by the number of targets per image and the distance to the nearest neighbour. The aerial study uses AI-TOD and VisDrone, reporting AP and AP on the smallest size bin, as a test of whether the verifier helps RGB clutter such as road texture and rooftops. Every setting reports latency, including the extra cost as the number of candidates grows.
Three results would decide the proposal. First, in the 10%-SIRST and SIRST-to-IRSTD-1k settings, the full system should beat both AA-YOLO and the matched discriminative verifier, and the variance ablation should show that the uncertainty normalisation drives the gain. Second, the drop in score from leakage under independent masking should grow with target density, and joint masking should remove it. Multi-offset DBR decides whether this matters beyond compute. Third, merging errors under hIoU should fall relative to DBR on dense subsets, because each candidate's residual is computed within its own window.
If the first result fails, meaning reconstruction adds nothing over a matched verifier when labels are scarce, the central claim is refuted. The idea would then survive only as a cheaper route to leakage-free background modelling.
References
- Looking for Tiny Defects via Forward-Backward Feature Transfer
- Road Anomaly Detection by Partial Image Reconstruction with Segmentation Coupling
- A recover-then-discriminate framework for robust anomaly detection
- Dynamic Background Reconstruction via Transformer for Infrared Small Target Detection
- An anomaly-aware detection head for frugal and robust Infrared Small Target Detection
- QueryDet: Cascaded Sparse Query for Accelerating High-Resolution Small Object Detection
- Small Object Detection in Medium-Low-Resolution Remote Sensing Images Based on Degradation Reconstruction
- Rethinking Evaluation of Infrared Small Target Detection
- SPAR-Det: Segmentation-guided and Prior-Aided Routing for Small Object Detection
- MANTA: A Large-Scale Multi-View and Visual-Text Anomaly Detection Dataset for Tiny Objects
- Fractional Data Distillation Model for Anomaly Detection in Traffic Videos