Hole-Centered Background Prediction for Label-Free Infrared Small Target Detection

Finding a few warm pixels in an infrared image full of clouds, sea glint and coastlines is a hard case of anomaly detection. A reconstruction-based detector works by learning what "normal" background looks like, redrawing the image as pure background, and flagging whatever does not match. For tiny targets this approach has one recurring failure. If the reconstruction network can see any part of the target, it often redraws the target too, the difference between input and reconstruction vanishes, and the target is missed. The strongest reconstruction approach for single infrared frames avoids this only by using a supervised network that first locates targets and shifts the image so each one sits inside a masked patch (DBR). That reintroduces the labels that reconstruction was meant to remove.

We propose removing the need for target centering. A network predicts every pixel's intensity only from a ring of surrounding context that excludes a disk of radius $r$ around that pixel. Because of how the network is wired, the center can never leak into its own prediction. The prediction is made at several hole radii, and the ring is combined with a downsampled view of the whole image. The detection score at each pixel is the largest gap between the observed pixel and what its surroundings say it should be, taken over those radii. Put simply, this is a learned version of the classic "center versus surrounding ring" contrast test. Instead of comparing a pixel to the ring's average, it compares the pixel to what a model of infrared backgrounds would draw there. The whole system trains on unlabeled infrared frames in a single forward pass.

Core Claim

A predictor that is structurally blind to a central disk, applied densely at every position, avoids target leakage without a target locator. It does this by construction, because every possible target location is the center of its own hole. Two further claims follow. First, the radius of the hole is a scale axis that matches the 3–9 pixel size range of infrared targets cited in CourtNet. Second, a learned predictor can continue anisotropic clutter such as a cloud edge or a horizon across the hole, but it cannot conjure an isotropic blob that its ring does not imply. That second property is what should fix the failure that CodeMamba reports. CodeMamba compresses background into a discrete codebook, and a dim target next to a bright edge gets absorbed into the codebook entry for that edge. In our design the target pixels are never part of the input that produces their own prediction, so they cannot be absorbed.

The work differs from its closest relatives in specific ways. DBR uses a fixed-grid masked autoencoder, which fills in masked image patches from visible ones, plus a supervised shift module and a supervised detection head. We use no labels at any stage and no fixed grid. CodeMamba learns a background manifold from video and relies on temporal continuity. We target single frames, where no unsupervised manifold method exists in the corpus. Diffusion-based anomaly localization, as in Denoising Diffusion Models for Anomaly Localization in Medical Images, erases anomalies by adding noise. This creates a real tension in the infrared setting: the targets sit near the noise floor, so enough noise to erase them also erases the cloud texture, and the reconstruction then disagrees with the input everywhere. Masking removes the target without degrading its surroundings, and that tension is why we choose masking over noising.

Research Program

The predictor is built as a hole-excluding convolutional network. Four branches each see only one half-plane of the image, each offset by $r$ pixels from the center, so their union covers everything except a central disk of radius roughly $r$. Each branch outputs a predicted mean and spread for the center pixel, and their outputs are fused. We train separate heads for $r \in \{2,3,5\}$ on a shared trunk.

Multi-scale context enters in the way the clinical dual-view design of Multi-Context Deep Network and the dual-patch sampling of meU-net suggest. A full-resolution local branch sees the ring. A coarse branch sees a downsampled whole frame, and its features are injected into every decoder stage, as in SparseMask. The coarse branch is downsampled by at least $4r$. At that factor a target of at most $2r$ pixels falls well below one coarse cell, so the coarse view cannot carry recoverable target detail. We verify this empirically by planting synthetic targets and checking that the coarse branch's outputs do not change.

Training uses a robust heteroscedastic loss, a Gaussian negative log-likelihood whose per-pixel residual is clipped above a high quantile. Real targets occupy under 0.15% of pixels, so the few target pixels in unlabeled training frames act as outliers rather than signal. With predicted mean $\mu_r(p)$ and spread $\sigma_r(p)$ at pixel $p$ for hole radius $r$, the score is

$$ s(p) = \max_{r} \frac{x(p) - \mu_r(p)}{\sigma_r(p) + \epsilon}, $$

where $x(p)$ is the observed intensity and $\epsilon$ is a small constant. The score is one-sided because infrared targets are hotter than their surroundings. Taking the maximum over radii handles unknown target size. A hole smaller than the target lets the target's own periphery leak into the ring and shrinks the residual, while a hole larger than needed only costs some background accuracy.

There is a known risk in dividing by $\sigma_r$. The spread is likely to inflate near edges, which could hide exactly the edge-adjacent targets we want to rescue. We therefore treat the unnormalized residual as a co-equal variant. We also report both variants on the edge-proximity stratum defined below, rather than assuming the normalization helps.

Baselines

The naive reference is the hand-designed version of the same idea: compare each pixel to the mean of an annular ring at the same radii, together with the top-hat filter and a Laplacian high-pass filter. This is the "do nothing learned" point. If the trained predictor cannot beat a ring mean, the learning contributes nothing. We implement it ourselves on identical splits.

The classical unsupervised competitors are low-rank-plus-sparse decompositions, which model background as a low-rank matrix and targets as a sparse remainder. We include IPI and the non-convex tensor method of Non-Convex Tensor Low-Rank Approximation, using the authors' default hyperparameters and a small grid search on a held-out split matched to our own tuning budget. No reported result was found on Lacuna for these methods on SIRST, NUDT-SIRST or IRSTD-1k under our protocol, so we run them ourselves.

The strongest existing reconstruction method is DBR, which reports an F1 of 75.01% on SIRST and 64.10% on MFIRST. We run it in two modes. The first is as published, with its supervision. The second removes its supervised shift and head modules, so that it becomes a pure masked autoencoder with residual scoring. Beating label-free DBR is the main bar. Matching published DBR's 75.01% F1 on SIRST without labels would be a strong result, and coming within a few points would still be meaningful.

Supervised multi-scale networks serve as ceilings rather than targets. DNA-Net reports an IoU of 87.09, a detection probability of 98.73% and a false-alarm rate of $4.223\times10^{-6}$ on NUDT-SIRST. HDNet reports an IoU of 70.26% and a detection probability of 94.56% on IRSTD-1k, and 79.17% IoU on NUAA-SIRST. UIU-Net reports 0.7825 IoU on SIRST. We do not expect to match them in-domain. The comparison that matters is cross-dataset: each supervised model is trained on one dataset and tested on another, while our model is trained on unlabeled frames.

The ablations isolate the key ingredient. One replaces the hole-excluding wiring with an ordinary U-Net trained to reconstruct the full frame, which tests whether structural blindness matters. Others remove the coarse global branch, collapse to a single radius, and remove the $\sigma$ normalization.

Why not just…?

Why not just use local contrast or low-rank decomposition, which are already unsupervised? They are the honest competitors, and our naive baseline is literally the ring-mean contrast test. The evidence that they fall short is indirect. DNA-Net reports that top-hat filtering and IPI produce high false-alarm rates on bright, irregular cloud borders. Non-Convex Tensor Low-Rank Approximation notes that uniform singular-value weighting misestimates heterogeneous backgrounds. A ring mean cannot continue an edge across a hole, whereas a learned predictor can. The edge-proximity stratum below tests exactly this. If the ring mean matches us there, the proposal fails.

Why not just run an off-the-shelf masked autoencoder with many random masks and average the results? This is a real threat. Averaging over enough random grids also gives every pixel a chance to be fully masked. However, DBR documents both target leakage when grid lines split a target and blocky artifacts in high-frequency clutter, and random-mask averaging needs many forward passes per frame. We run this baseline with 16 and 64 masks per frame and plot detection quality against compute. If it matches us at equal compute, our contribution shrinks to an efficiency gain, and we would report it that way.

Why not just inpaint with a diffusion model using annular masks? A diffusion model, which generates images by gradually removing noise, can perform the same hole-centered prediction. Doing it densely, however, would need one sampling chain per hole location, or a lattice of holes over many passes, each costing 50 to 1000 network evaluations. That cost is the latency problem the field already identifies for diffusion. We include a lattice-hole diffusion variant on a subset of IRSTD-1k to measure whether it is any more accurate. If it is clearly better, a distilled version becomes the follow-up.

Why not just train a supervised network, or use the point labels of Diffuse to Detect? Diffuse to Detect shows that single-point labels recover much of the performance of full masks, but it still needs labels and a clean validation set. Our claim concerns new sensors and new clutter, where no labels exist. As a secondary experiment, we use our thresholded score maps as automatic point labels for DNA-Net and compare against human point labels.

Proposed Experiments

We train on unlabeled MFIRST training frames, 9,900 images, and evaluate on SIRST, NUDT-SIRST and IRSTD-1k using the 60/20/20 splits from Diffuse to Detect. The validation split is used only for threshold selection.

The primary metric is detection probability at fixed false-alarm rates of $10^{-5}$ and $10^{-6}$, together with the full curve of detection versus false alarms. This choice is deliberate: IoU after thresholding penalizes unsupervised score maps for boundary sloppiness that is irrelevant to detection. We still report IoU and F1 so results can be compared with the published numbers. Runtime is measured on a single GPU against DBR's 19.96 FPS.

The decisive check is stratified. We bin every test target by its distance to the nearest pixel whose gradient magnitude exceeds the 99th percentile of that image. The claim holds only if our detection rate in the closest bin, under 5 pixels, beats both the ring-mean baseline and label-free DBR by a clear margin at equal false-alarm rate, while overall performance is not worse.

A second check plants synthetic Gaussian blobs at controlled contrast and position, both on and beside real edges, in held-out frames. This yields detection-versus-contrast curves for each method and verifies that the hole-excluding predictor's output at a target's center does not depend on the target's amplitude.

A third check is cross-dataset. DNA-Net and HDNet are trained on NUDT-SIRST and tested on IRSTD-1k, and compared with our model, which never sees labels. Narrowing the in-domain gap substantially under this transfer setting is the practical result that would justify label-free detection.