← Progress

Detecting contrails in VIIRS imagery

Testing whether an existing contrail detection model trained on GOES ABI imagery can be applied to VIIRS data with no or only little tuning.

LAE's existing contrail ABI-trained mcast contrail detection model operates on geostationary imagery with 2 km resolution at nadir. Imagery from the lo-Earth orbiting VIIRS instrument aboard Suomi-NPP and NOAA-20/21 offers 750 m (375 m) resolution at nadir and similar — but not identical — spectral channels. If the current detection model generalizes to VIIRS with little or no retraining, it unlocks additional higher-resolution contrail detections whenever VIIRS data is available, contributing to multi-sensor observational contrail verification.

Pipeline

The current investigation pipeline takes raw VIIRS Level-1B granules, maps the bands that are closest to the ABI equivalents required by the model via a lightweight adapter (viirs_adapter.py), applies VIIRS-derived normalization statistics, and runs the unmodified mcast detection model. The output is a float32 probability map — no threshold is applied at inference time, so the detection threshold can be swept interactively without re-running the model. Two model versions are being evaluated: detection-1.1 (initially trained by Vincent Meijer) and marvelous-moth-137 (trained by Téo Bloch).

Completed Detection model In progress M-band only M-band + I5
Val set of VIIRS MOD granules
VIIRS input scenes
Applying
normalization
detection-1.1
Threshold tuning
🔍 Evaluate
↑
marvelous-moth-137
Threshold tuning
🔍 Evaluate
Compare
outputs
against
labels
Contrail labels
Contrail labels
Plug in I5 channel
from IMG product
Determine
standardization values
Find, sample & download
a range of VIIRS swaths

Channel mapping

The detection model takes three inputs: ABI channels C11, C14, and the brightness temperature difference C13−C15. VIIRS bands are mapped to these as closely as possible. The M-band product (moderate resolution; 750 m at nadir) lacks a channel near 11 µm, so M15 (10.76 µm) substitutes for both C13 and C14. The I-band product (imaging resolution; 375 m at nadir) adds I5 at 11.45 µm — a much closer match to C14 (11.2 µm) — but requires a second data product and reprojection onto the lower-resolution M-band grid.

M-band only (750 m)
ABI channel Center wavelength Closest VIIRS channel Center wavelength
C118.4 µmM148.55 µm
C1310.3 µmM1510.76 µm
C1411.2 µmM1510.76 µm
C1512.3 µmM1612.01 µm
M-band + I5 (375 m for C14)
ABI channel Center wavelength Closest VIIRS channel Center wavelength
C118.4 µmM148.55 µm
C1310.3 µmM1510.76 µm
C1411.2 µmI511.45 µm
C1512.3 µmM1612.01 µm

Grey-shaded rows contribute to the BTD (C13−C15) input. The I5 channel (right table, highlighted in red) is a closer spectral match to ABI C14 than M15, but requires the additional 375 m I-band product and reprojection onto the M-band grid.

Bowtie handling & detection performance

VIIRS M-band L1B data contains bowtie deletion zones — pixels removed where adjacent scan lines overlap at high viewing angles. About 13% of pixels are invalid, concentrated in the left and right thirds of each swath in repeating 4-row gaps. Unhandled, NaN values propagate through the model's convolutional layers and suppress all detections across ~80% of the swath width.

Three strategies were tested, each improving substantially on the last. The current fix — along-track interpolation — fills each 4-row gap by column-wise linear interpolation using the nearest valid pixels above and below, a physically reasonable approximation given the small spatial extent (~3 km) of each gap.

Bowtie handling Precision Recall F1 IoU
None (NaN propagation) 0.5870.0530.0970.051
Band-mean fill 0.3910.3180.3510.213
Along-track interpolation (current) 0.4910.3650.4190.265

Pixel-wise metrics for detection-1.1 model run on Scene 01 (part of val set), zero-shot with M15 as C14 substitute. No threshold tuning applied.

Zero-shot VIIRS contrail detection result for scene 1
Scene 1 (NOAA-20, daytime): false-color VIIRS composite (left) and zero-shot detection mask after along-track interpolation fill (right). No threshold tuning or fine-tuning applied beyond NaN handling. Credit: MVE

Labeled dataset

12 manually labeled VIIRS scenes are available, covering both NOAA-20 and Suomi-NPP, daytime and nighttime overpasses. All model inputs are thermal infrared channels with no solar-reflectance dependency, so day/night does not affect data values directly — it serves mainly as a proxy for viewing geometry. The dataset is split to keep tuning (threshold selection, normalization) on val only, with train and test locked until tuning is complete.

SplitScenesSatellitesOverpass
Val1, 7NOAA-20, Suomi NPP2 day
Train2, 3, 5, 6, 8, 10, 11NOAA-20 ×4, Suomi NPP ×36 day, 1 night
Test4, 9, 12NOAA-20 ×2, Suomi NPP ×12 day, 1 night

Splits are stratified by satellite and overpass type. The single night scene in train (scene 6) ensures tuning sees both overpass types; scene 9 (night) is reserved as an out-of-distribution test.

Retraining the segmentation head

Zero-shot transfer reveals a fundamental output calibration problem: both detection-1.1 and marvelous-moth-137 collapse nearly all pixels — contrail and background alike — to logit ≈ −13 on VIIRS data. This places the entire output distribution in the flat left tail of the sigmoid, far from the linear region where small logit shifts translate into large probability changes. There is simply no usable operating range to sweep.

The root cause is the original cross-entropy training loss, which is overwhelmed by the gradient from the vast majority of easy-negative background pixels at VIIRS class-imbalance ratios (~10,000:1). A linear separability check on pre-extracted decoder features confirms the fix is tractable: a 5-fold logistic regression on the 16-dimensional feature space achieves ROC-AUC = 0.957 for both channel variants, meaning the encoder and decoder features already separate the classes well — only the final output layer needs retraining.

The approach freezes the encoder and decoder entirely and retrains only model.segmentation_head — a single 1×1 convolution mapping 16 decoder channels to 2 class scores — using focal loss (γ = 2, α = 0.25) on 7 labeled training scenes. Features are extracted once from the frozen backbone and reused each epoch to keep training fast.

Logit distributions — contrail vs background pixels across all model variants
Logit distributions (log scale) for contrail and background pixels on val scenes 1 and 7, across all six model/channel combinations. Zero-shot models (rows 1–2) collapse both classes to logit ≈ −13 — the model assigns nearly identical scores to every pixel regardless of class. After fine-tuning (row 3), background pixels shift to around logit ≈ −2 and contrail pixels to around logit ≈ 0, with visible but overlapping separation. M15 and I5 channel variants perform nearly identically. Credit: MVE
Sigmoid mapping with logit density for all model variants
The same logit distributions overlaid on the sigmoid curve, showing where each model's outputs land on the probability axis. Zero-shot models (rows 1–2) concentrate both classes in the far-left tail where the sigmoid is flat — probability ≈ 0 for everything, no threshold can separate them. After fine-tuning (row 3), both distributions move into the sigmoid's linear region, where the curve is steep and small logit differences produce meaningful probability differences. Credit: MVE
Probability distributions — contrail vs background pixels across all model variants
The operational result: probability distributions after applying the sigmoid. Zero-shot models (rows 1–2) assign near-zero probability to nearly every pixel, including true contrails — nothing to threshold. The fine-tuned model (row 3) spreads contrail predictions across 0.2–1.0, with the background distribution peaked near 0.05 but trailing off well past 0.5. The precision=recall crossover lands at threshold ≈ 0.42, with P ≈ R ≈ 0.48 on the val set. Credit: MVE

The fine-tuned model is a genuine improvement, but not a clean solution. The logit distributions (row 3 of the first figure) show the peaks only about 2 units apart — background at logit ≈ −2, contrails at logit ≈ 0 — with heavily overlapping tails. The sigmoid mapping shows both classes sitting in the same steep portion of the curve, so any threshold that catches most contrail pixels also catches a meaningful fraction of background speckle. The probability distribution makes the practical consequence explicit: the background has a long tail past 0.5, so precision cannot be high without sacrificing recall. At the operating point this gives P ≈ R ≈ 0.48 — modestly better than the zero-shot baselines (~0.45), but not a step change. The frozen decoder features are well-separated in the full 16-dimensional space (logistic regression ROC-AUC = 0.957), so the remaining overlap likely reflects what a single linear layer can express from those features, not a fundamental limit. Unfreezing the decoder is the natural next step.

Threshold explorer

Drag the slider to set a detection threshold and see how it moves the operating point along the precision–recall curve — and how the actual detection mask changes across two held-out val scenes. All four model variants are shown simultaneously on the curve; select one to update the scene previews. Yellow outlines are the manually labeled contrail boundaries.

Loading detection data…

Intermediate findings and next steps

Fine-tuning the segmentation head on 7 VIIRS training scenes demonstrates that ABI→VIIRS transfer is feasible with light adaptation. Zero-shot output calibration is unusable — both model variants collapse nearly every pixel to logit ≈ −13, leaving no operating range to threshold. Retraining only the final 1×1 convolution shifts background and contrail pixels into the sigmoid's linear region, producing a genuinely tunable precision/recall tradeoff across thresholds 0.2–0.7, with the precision=recall crossover at threshold ≈ 0.42 and precision ≈ recall ≈ 0.48 on val scenes 1 and 7 — a modest, yet not overly impressive, improvement over the zero-shot detection-1.1 baseline (~0.45 precision), not yet a clean separation. Substituting the spectrally closer I5 channel for M15 as the C14 proxy made no measurable difference to either the logit distributions or the precision/recall curves. This might be partially due to the resampling of the the channel to match the lower-resolution M-band channels.

Paths forward:

  • Head-only fine-tuning suffices for a usable baseline. The frozen encoder and decoder transfer from ABI to VIIRS without retraining, and adapting a single 1×1 convolution on 7 scenes produces a calibrated model — the main positive result so far.
  • For tighter separation, unfreeze the decoder. The current feature distributions overlap substantially; retraining the decoder on VIIRS data is the natural next step if sharper separation is required. The difference in pixel size is more relevant for the earlier layers of the model and cannot be tackled by fine-tuning only the segmentation head.
  • Training data is the binding constraint. Only 7 scenes were available for fine-tuning. If this project continues in the fall, engaging UROPs to label additional, more diverse VIIRS scenes is the highest-leverage investment before attempting a decoder fine-tune. However, light-tuning of all layers might be a promising path forward, especially since there is also room for improvement of the ABI detection model.

The test set (scenes 4, 9, 12) remains untouched and locked, and will only be evaluated once fine-tuning decisions are finalized.