Back to all projects

Jan 2025 – Jun 2025

AI · CS

Last edited

Deep Learning for Segmentation of Hyperspectral Satellite Images

A hyperspectral CubeSat sees far more than it can transmit: HYPSO-2 captures over a hundred spectral bands per pixel and gets a few minutes of ground-station contact per pass. An on-board sea / land / cloud segmentation lets the satellite decide which pixels are worth the downlink. This project ports the 1D-JustoLiuNet network from HYPSO-1 to HYPSO-2 for the NTNU SmallSat Lab.

The classifier labels each pixel from its reflectance spectrum alone, with no spatial context, and is small enough to run on the satellite's FPGA. Six controlled tests vary how similar and how diverse the imagery is.

Accuracy falls from 0.96 on near-identical frames, where the model has memorised the majority class, to 0.37 on geographically diverse imagery, barely above chance. The diagnosis: the published 93 % was measured on a deliberately easy corpus, per-image normalisation flattens the differences between scenes, ENVI's semi-automatic labels mislabel sea near clouds, and cross-entropy without reweighting or dropout memorises the majority class.

Affiliation

NTNU SmallSat Lab

Partners

Report

  • Manuscript

Keywords

  • Hyperspectral Imaging
  • Semantic Segmentation
  • Convolutional Neural Networks
  • Lightweight Models
  • Earth Observation
  • Spectral Signatures
  • Python
  • PyTorch
  • CUDA
  • ENVI 5

Teaching a shoebox-sized satellite to decide what’s worth sending home

A hyperspectral CubeSat sees far more than it can ever transmit. HYPSO-2 orbits at roughly 500 km, captures cubes of over a hundred narrow spectral bands per scene, and gets only a few minutes of ground-station contact per pass. So the question is not can we classify the imagery but can the spacecraft decide, on-board and in real time, which pixels are worth the downlink before the window closes. This project, for the NTNU SmallSat Lab, ports the 1D-JustoLiuNet network from HYPSO-1 to HYPSO-2 so the satellite can label every pixel sea, land, or cloud. The headline is not that the port works on easy data. It is that accuracy falls from 0.96 on near-identical imagery to 0.37 on geographically diverse imagery, and most of the work is diagnosing why.

The NTNU SmallSat Lab logo: a square camera-aperture glyph, the NTNU wordmark, a vertical divider, and 'SmallSat Lab'.
The NTNU SmallSat Lab builds and operates the HYPSO CubeSats: small satellites with hyperspectral cameras that monitor ocean colour along the Norwegian coast.

Why a lab that watches the ocean needs a CNN on-board

HYPSO exists to observe ocean colour: algal blooms, phytoplankton, river plumes. HYPSO-1 launched in 2022 and HYPSO-2 in 2024, both 6U CubeSats with a pushbroom hyperspectral imager and a small FPGA-based processing unit. A hyperspectral cube is enormous and the downlink is tiny, so the satellite has to be selective. A scene that is 90 % cloud is worthless to an oceanographer; a clear stretch of sea carrying a bloom is the whole point of the mission. A per-pixel segmentation running on-board lets the spacecraft make that call itself. The classifier has to be small enough for a modest FPGA and robust enough for the wildly varying scenes a polar orbit sees. This project stress-tests the second requirement.

One pixel, one spectrum, one label

Each image is a cube with two spatial axes and about 112 spectral bands from the visible into the near-infrared. The load-bearing idea behind the whole model family is the spectral-signature assumption: different materials reflect different wavelengths differently, so one pixel’s reflectance curve across a hundred bands is enough to name the material. No spatial context needed.

A spaceborne hyperspectral sensor builds a 3D cube from a swath: two spatial axes and a spectral axis of stacked narrow-band images. Three example pixels over land, sea, and cloud each expand into a spectral sample, and three reflectance-versus-wavelength curves show their characteristically different signatures.
Every pixel is its own reflectance-versus-wavelength curve, and land, sea, and cloud produce characteristically different ones. The task is to recover the label from that curve alone.

The classifier is therefore a function of the spectrum only, applied independently to every pixel. That single commitment is what the diversity tests put under pressure.

1D-JustoLiuNet. Four Conv1D → ReLU → MaxPool blocks slide learnable band-pass detectors along the spectral axis, widening the channels from 1 to 24 while halving the length each time, then a flatten to 48 features and one linear layer to three logits. Small enough to run pixel by pixel at the spacecraft’s clock rate, which is the point.

The 1D-Justo-LiuNet architecture: an input spectrum of 1 channel × 112 bands feeds four Conv1D + ReLU + MaxPool blocks (6, 12, 18, 24 channels, spectral length shrinking to 2), flattened to 48 neurons and passed through a linear layer to three logits: sea, land, cloud.
1D-JustoLiuNet. Because the convolutions use no padding, the spectral length shrinks by five before every pool; 112 bands become 48 features before the final projection.

Before a spectrum reaches the network it is min-max normalised per image, per band. Training uses cross-entropy with label smoothing, AdamW, and deliberately conventional hyperparameters, so any pathology is attributable to the architecture or the data rather than the recipe. The published network reaches about 93 % on HYPSO-1; that is the number this project is trying to reach on HYPSO-2.

The labels, and their noise. Ground truth is generated semi-automatically in ENVI from spectral thresholds plus manual cleanup. It is not perfect: ENVI routinely mislabels sea pixels near clouds as land.

Side by side, one HYPSO-2 scene over Ariake. Left, the RGB rendering: dark open water with bright cloud streaks and a small landmass. Right, the ENVI label map with sea in blue, land in green, cloud in white; several stretches of open water beside cloud streaks are coloured green.
Ariake, February 2025. Patches of open sea next to cloud streaks are labelled land (green). That supervision noise flows straight through cross-entropy and drags the decision boundaries.

Results: a clean collapse as the data diversifies

Six controlled tests vary how similar the evaluation images are to the training images, and how homogeneous the dataset is. T01 to T03 are sanity checks, T04 a medium similarity test, and T05 and T06 the hard diversity tests drawn from geographically and environmentally varied imagery: the regime that mirrors deployment.

TestTypeDifficultyImagesSim. index
T01SanityEasy61
T02SanityEasy80
T03SanityEasy251
T04SimilarityMedium91
T05DiversityHard120
T06DiversityHard270

The degradation is monotonic as the data diversifies:

TestAccuracyWeighted F1F_1Macro F1F_1Notable failure
T01 (sanity)0.810.810.800.800.540.54cloud F1=0.01F_1 = 0.01, class collapse
T02 (sanity)0.760.760.770.770.750.75balanced — best macro-F1F_1
T03 (sanity, replicated image)0.960.960.950.950.400.40majority-class memorisation
T04 (similarity)0.630.630.610.610.410.41cloud F1=0.00F_1 = 0.00
T05 (diversity)0.420.420.390.390.350.35sea / land confused
T06 (diversity)0.370.370.370.370.360.36\approx chance for three classes

Two rows matter. T03 trains and evaluates on 25 near-identical frames: accuracy looks spectacular at 0.96, but macro-F1 is 0.40 because the model has memorised the majority class and puts nearly every cloud and sea pixel into “land”. T06 is the deployment regime, and weighted F1 collapses to 0.37, barely above the majority-class baseline. Everywhere, the class with the largest support scores best and the rarest class is dropped first.

Why 37 % and not 93 %. Four factors compound, and architecture is not the dominant one.

  • The datasets are not comparable. The published 93 % was measured on a deliberately easy corpus: no snow, little environmental variation, high visual similarity. The diversity tests are the opposite. Most of the gap is a difference in problem difficulty, not model quality.
  • Per-image normalisation compresses inter-image variability. Rescaling each image independently flattens the genuine spectral differences between scenes, so a sea pixel from one orbit and one from another can land at similar values even when their raw spectra differ. Standard practice, but here it works against the model.
  • Label noise. The Ariake mislabelling is systematic and pulls the boundaries off. A real contributor, but it cannot account for a 56-point gap on its own.
  • Class imbalance and no regularisation. Cross-entropy favours the majority class unless reweighted, and with plain ReLU and no dropout the network is free to memorise. The widening train-versus-eval gap on T05 and T06 is the fingerprint.

What I took away

The accuracy number a paper reports is inseparable from the dataset it was measured on, and a model that classifies one pixel from its spectrum alone has no way to recover when the spectra themselves drift between scenes. The fixes follow from the diagnosis: normalise across the corpus rather than per image, reweight or resample the rare classes, add dropout, and, more fundamentally, let the model see a pixel’s neighbourhood. Each of them is a test away.