Work
Source Code
Computer Vision & Geospatial

Satellite Vision UNet

High-resolution multispectral remote sensing segmentation engine built with PyTorch and Attention UNet.

Akila Wasalathilaka
Akila Wasalathilaka
Lead Systems & AI Engineer
v1.2.0Active Production
PythonPyTorchCUDAGDALOpenCVNumPy
Satellite Vision UNet
Executive Summary

Earth observation models frequently fail when cloud shadows, seasonal reflectance variations, and spectral bleeding blur boundaries between forest canopies and agricultural expansion. Satellite Vision implements an Attention-Gated UNet architecture engineered specifically for 12-band Sentinel-2 geospatial imagery.

Core Specifications
MEAN IOU
0.892
Evaluated on Sentinel-2 10m bands
INFERENCE TIME
118 ms
Per 1024x1024 multispectral tile on RTX 4090
SPECTRAL BANDS
12 Bands
Full VNIR to SWIR wavelength coverage
MEMORY PROFILE
1.4 GB VRAM
Optimized with FP16 mixed precision
Interactive System PreviewLive Client Architecture
Sentinel-2 UNet Mask0.89 mIoU
Raw NIR
Segmented

Architecture

The system accepts raw 12-channel Sentinel-2 L2A bottom-of-atmosphere reflectance matrices. Input tiles undergo top-of-atmosphere normalization, atmospheric haze removal, and sinusoidal spatial encoding. The custom PyTorch Attention-UNet backbone leverages channel attention modules to dynamically weigh SWIR and Red-Edge bands over noisy visible light bands, outputting pixel-precise segmentation masks at 10-meter ground resolution.

Problem Context

Traditional 3-channel RGB computer vision models discard the vast infrared and red-edge spectral information captured by earth observation satellites. Standard GIS workflows rely on manual thresholding (NDVI) which misclassifies urban fringes and degraded forestry.

Key Decisions

01Channel-Attention Gating Mechanism

Integrated spatial and spectral channel attention blocks at each skip connection in the UNet encoder-decoder.

Impact: Boosted boundary precision along water/urban interfaces by 14.8% mIoU.

02CUDA TensorRT Pipeline with FP16

Compiled PyTorch model into optimized TensorRT engine with custom FP16 kernel execution.

Impact: Cut inference latency from 480ms down to 118ms per tile, allowing real-time processing of gigabyte-scale GeoTIFFs.

03Automated Cloud-Shadow Inpainting

Coupled segmentation with a spatiotemporal transformer that samples clear historical scenes to inpaint obscured pixels.

Impact: Achieved consistent time-series vegetation tracking even across tropical cloud cover.

Benchmarks

MetricSatellite Vision UNetStandard / Competitor
Mean Intersection over Union (mIoU)0.8920.741 (Standard RGB ResNet UNet)
Inference Latency (1024x1024)118 ms520 ms (Vanilla PyTorch UNet)
False Deforestation Alert Rate2.1%18.4% (Fixed-threshold NDVI Index)

Installation & Setup

git clone https://github.com/akilaisadev/satellite-vision
cd satellite-vision && pip install -r requirements.txt
python segment.py --input sample_sentinel2.tif --weights models/attn_unet_v1.pth