Detectors that see through both a color camera and a thermal camera should do better than either alone. Yet the strongest fusion methods either pay heavily in speed or quietly rely on the thermal image. On the LLVIP low-light benchmark, a thermal-only YOLOv5 already reaches 0.965 AP50 (LLVIP). Part of the reason is that the two sensors disagree in different ways at different depths of the network. In the high-resolution early layers, color images carry texture and, at night, mostly noise, while thermal images carry smooth heat blobs. In the coarse deep layers, both should describe the same objects. Bidirectional feature pyramids are "necks" that pass information both downward, from deep semantic layers to shallow ones, and upward, from shallow detail layers to deep ones. They were designed for a single camera, so their upward path blindly carries early-layer color detail into the deep layers, including in the dark, when that detail is pure noise.
We propose a cross-modal bidirectional pyramid in which every fusion point decides how much to trust each sensor. It decides using a cheap, local test of whether the two sensors agree on geometry at that scale and location. The test compares self-similarity patterns, meaning how each pixel's feature relates to its neighbors, rather than raw feature values. Self-similarity is known to survive changes of spectrum (DASC). The same relational structure is also used as a training loss inside the neck. It aligns the sensors' geometry while leaving their complementary content, such as heat emission and color texture, free to differ. In one sentence: fuse where the geometry agrees, fall back to the structurally reliable sensor where it does not, and do both at every pyramid level in both directions.
Core Claim
The claim has two parts, and both can be falsified. First, the gap between visible and thermal features depends on scale. It is large and location-dependent at shallow pyramid levels and small at deep levels. A fusion rule that is fixed per level, such as BiFPN's learned scalar weights from EfficientDet, therefore cannot handle it, because the right weighting changes across locations within one image. Second, aligning relational structure (self-similarity maps) between sensors inside the neck recovers most of the robustness of modality-invariant training without the accuracy loss of feature-level invariance. Feature-level invariance is what MiPa enforces with an adversarial modality classifier, and it strips away information the other sensor lacks.
The practical payoff is a single model that works in three regimes. It fuses both sensors when both are healthy, degrades gracefully when one is noisy or misaligned, and still runs when one sensor is absent. It also runs near the speed of a plain YOLOv5 neck, instead of the 45.3-to-17.0 FPS drop reported for IRDFusion.
Relation to Prior Work
The closest works each cover two of the three pieces. MiPa trains one shared encoder on mixed visible and infrared patches, with a gradient-reversal classifier that makes features indistinguishable by modality. It then runs on either sensor alone. It motivates our robustness goal but constrains our design: it never fuses at inference, and its average LLVIP AP50 of 93.00 trails fusion methods. That gap suggests feature-level invariance throws away useful signal.
FD2-Net splits features into frequency bands and swaps high- and low-frequency components between streams. IRDFusion iterates attention and difference signals between modalities to cancel background noise the two sensors share. ICAFusion iterates a weight-shared cross-attention block. All three exchange information horizontally between sensors. None of them makes the scale-to-scale, two-way pyramid itself aware of the sensors. MFMG-Net adds multi-scale fusion with channel and spatial attention, but its neck is one-directional and has no geometric constraint.
On the pyramid side, EfficientDet supplies the method we reuse: fast normalized weighted fusion in a bidirectional pyramid. Deeper SSD and Recursive Hybrid Fusion Pyramid Network supply the evidence that the upward path matters for small objects. On the invariance side, DASC and the local self-similarity descriptors used for MRI-to-ultrasound registration (Sun et al.) supply the descriptor. We move it from handcrafted pixels to learned neck features and use it both as a gate and as a loss. The edge-map registration work (Kaissis et al.) supports the premise that structure peaks at the same coordinates across contrast inversions. That same literature warns that handcrafted structure alone discards useful texture. This is why we align structure without replacing the features.
Research Program
We build a two-stream YOLOv5 detector, the base used by FD2-Net and IRDFusion. The two backbones are modality-specific, and they feed a single weight-shared bidirectional neck. The neck is shared rather than duplicated so that it can process either stream alone, which keeps MiPa's ability to run on one sensor.
At each pyramid level $l$ and location $p$, we compute a self-similarity vector for each modality $m$. This is the cosine similarity between the feature at $p$ and each of its $k\times k$ neighbours, written $S^l_m(p)\in[-1,1]^{k^2}$. The structural disagreement between the two sensors is
$$D^l(p)=\frac{1}{k^2}\big\|S^l_{\text{rgb}}(p)-S^l_{\text{ir}}(p)\big\|_1 .$$
Each cross-modal fusion node in both pathways replaces BiFPN's fixed scalar weights with location-dependent weights,
$$F^l(p)=\frac{w_{\text{ir}}\,g^l_{\text{ir}}(p)\,X^l_{\text{ir}}(p)+w_{\text{rgb}}\,g^l_{\text{rgb}}(p)\,X^l_{\text{rgb}}(p)}{\epsilon+w_{\text{ir}}g^l_{\text{ir}}(p)+w_{\text{rgb}}g^l_{\text{rgb}}(p)},$$
where $X^l_m$ are the modality features, $w_m\ge 0$ are BiFPN's learned scalars, and $\epsilon$ is a small constant. The gates $g^l_m(p)$ come from a tiny network that reads two inputs: $D^l(p)$, and each modality's self-similarity sharpness, measured as the entropy of $S^l_m(p)$. High entropy means structureless noise. When the sensors agree, the gates stay near one and the node reduces to BiFPN. When they disagree, the gate favours the modality whose local structure is sharper. The added cost is a local correlation over a small window per node, with no attention matrices.
Training adds one auxiliary loss, $\mathcal{L}_{\text{struct}}=\sum_l \lambda_l \sum_p \rho(p)\,D^l(p)$. It is applied only where both sensors are informative, so that pure noise is never matched to real structure. The mask $\rho(p)$ is set from the entropy test above and inside ground-truth boxes. We also randomly drop or degrade one modality per sample, a simpler relative of MiPa's patch mixing and MFMG-Net's masking, so that the shared neck learns to run on one sensor.
The analysis component comes first and tests the scale-dependence premise directly. On frozen standard two-stream detectors, we measure at each pyramid level how well a linear probe can tell the modality of a feature, and how large $D^l$ is. We break these measurements down by illumination and object size. If the gap turns out to be uniform across levels, the per-scale gating argument collapses, and we would report that result.
Baselines
The naive reference points are a thermal-only YOLOv5 and a visible-only YOLOv5. The LLVIP paper reports AP50 of 0.965 and 0.908 for these (LLVIP). We add 4-channel early fusion and a two-stream network with a plain summed neck. Any fusion model that does not clearly beat thermal-only has failed.
The strongest accuracy competitor is IRDFusion. It reports mAP50 of 98.4% on LLVIP, 88.3% on FLIR and 90.8% on M³FD, but at 17.0 FPS and about 60M parameters. The strongest efficient competitor is FD2-Net, which reports mAP50 of 96.2% on LLVIP, 82.9% on FLIR and 83.5% on M³FD. ICAFusion is the KAIST reference, with a 7.17% miss rate at 38.46 FPS. MiPa is the reference for running on one sensor, with an average LLVIP AP50 of 93.00 and a FLIR AP50 of 81.3.
For a fair comparison, we re-run IRDFusion, FD2-Net and MiPa-style training with public or re-implemented code. All methods share our YOLOv5 variant, input resolution, epoch count and a matched hyperparameter search budget, and we report their published numbers alongside our reproductions. Beating IRDFusion means one of two things. Either we come within 0.5 mAP50 of it on FLIR and M³FD at at least twice its frame rate, or we exceed it under the degraded-sensor and misalignment protocols below at comparable speed. Clean LLVIP is nearly saturated and will not be used to claim a win.
Three ablations isolate the key ingredients. The first is a cross-modal BiFPN with only BiFPN's per-level scalar weights and no gates or structural loss, which tests whether location-dependent gating matters at all. The second keeps the gates but replaces $\mathcal{L}_{\text{struct}}$ with feature-level alignment, using either a gradient-reversal modality classifier as in MiPa or a cosine loss on raw features. This tests whether aligning relations rather than values preserves complementary signal. The third applies gating only in the downward pathway, which tests whether the upward pathway is where unreliable detail does its damage.
Why not just…?
Why not just add a second input to BiFPN's learned fusion weights? Scalar weights are fixed after training and shared across all locations of a level. They can learn that thermal is usually better at the finest level, but they cannot learn that color is better on a lit storefront and useless in the dark alley beside it. This is a real threat on LLVIP, where darkness is fairly uniform, so a static weighting may suffice there. The first ablation settles it on FLIR and M³FD, which mix day and night, and on per-image illumination buckets. If static weights match the gated neck, we drop the gate and report that result.
Why not just gate each image globally by estimated illumination? A global illumination score handles the day-versus-night case cheaply. It misses local failures such as headlight glare, partial occlusion of one lens, or thermal crossover, when an object and its background reach the same temperature. It also misses spatial misalignment between the two sensors, which RGBT-Tiny shows is critical for tiny objects: a 2-pixel shift drops IoU on an 8×8 object from 1.0 to 0.39. We include an illumination-gated neck as a baseline. We expect it to tie on clean LLVIP and to lose under the local-degradation and shift protocols. If it does not lose there, location-dependent gating is unnecessary.
Why not just use IRDFusion or ICAFusion-style iterative cross-modal exchange? These methods are the accuracy leaders, and we do not claim to beat IRDFusion's clean numbers. Their exchange happens between the sensors at a fusion stage, not along the pyramid, and IRDFusion pays with a 45.3-to-17.0 FPS drop. Our question is whether most of that gain can be obtained by putting reliability control inside the pyramid at near-baseline cost. The speed-matched comparison answers it. If IRDFusion throttled to our frame rate, for example with fewer iterations, still wins, our approach is not worth adopting.
Why not just make features modality-invariant as MiPa does and fuse afterwards? Forcing features to be indistinguishable by modality removes exactly the thermal-only and color-only cues that fusion is meant to add. MiPa's single-sensor 93.00 AP50 on LLVIP, below the fusion methods, is consistent with that. The second ablation tests it directly by swapping our structural loss for adversarial alignment with everything else fixed.
Proposed Experiments
We train and evaluate on LLVIP, FLIR (three classes), M³FD, KAIST and RGBT-Tiny. RGBT-Tiny carries most of the weight for the claim about the upward pathway, because over 81% of its objects are smaller than 16×16 pixels. We found no reported detection mAP on Lacuna for RGBT-Tiny baselines, so we reproduce all baselines there. We report mAP50 and mAP75, miss rate on KAIST, FPS on one fixed GPU, and parameter count.
We apply three stress protocols to test sets. The first corrupts the color image with synthetic low-light noise at several levels. The second blacks out either sensor entirely, and here we compare against MiPa and the single-sensor models. The third shifts the thermal image by 1 to 4 pixels relative to the color image.
The decisive checks follow directly from the claims. The per-level probe analysis must show a gap that shrinks with depth and varies with illumination; otherwise the premise fails. The gated neck must beat the static-weight ablation mainly on small objects and in the degraded and shifted conditions, and the gain must concentrate in the upward pathway. The structural loss must beat feature-level alignment in two-sensor accuracy while matching it when one sensor is blacked out. Finally, the gate values $g^l_{\text{rgb}}(p)$ should fall where the color image is dark or noisy. We will check this by correlating the gates with local image brightness, a sanity check that the mechanism does what we say it does rather than acting as a second attention layer.
References
- LLVIP: A Visible-infrared Paired Dataset for Low-light Vision
- DASC: Dense adaptive self-correlation descriptor for multi-modal and multi-spectral correspondence
- EfficientDet: Scalable and Efficient Object Detection
- Mixed Patch Visible-Infrared Modality Agnostic Object Detection
- IRDFusion: Iterative relation-map difference guided feature fusion for multispectral object detection
- FD2-Net: Frequency-Driven Feature Decomposition Network for Infrared-Visible Object Detection
- ICAFusion: Iterative cross-attention guided feature fusion for multispectral object detection
- MFMG-Net: Multispectral Feature Mutual Guidance Network for Visible–Infrared Object Detection
- Deeper SSD: Simultaneous Up-sampling and Down-sampling for Drone Detection
- Recursive Hybrid Fusion Pyramid Network for Real-Time Small Object Detection on Embedded Devices
- Efficient Convex Optimization Approach to 3D Non-rigid MR-TRUS Registration
- Multi-Modal Unsupervised Brain Image Registration Using Edge Maps
- Visible-Thermal Tiny Object Detection: A Benchmark Dataset and Baselines