Skip to main content
Back to ArchiveSYSTEMS ARCHIVE
05 // Geospatial Deep LearningLive • 0.38% Snow FP

CloudMask AI

Real-time 4-band 16-bit Landsat 8 cloud segmentation workbench powered by a custom PyTorch U-Net (RGB + Near-Infrared) served through a zero-disk FastAPI engine and an interactive React + Three.js mission-control UI.

RoleML & Full-Stack Engineer
Context38-Cloud Earth Observation Workbench • Live
Live DemoSource Code
Snow vs Cloud
0.38% FP (NIR)
Val Loss (Ep 11)
0.0958
CPU Latency
~1.24s
01 // THE BOTTLENECK

Problem Space

Over 65% of Earth is cloud-covered at any moment, and standard 3-channel RGB vision models mistake bright snow and ice for clouds—corrupting downstream satellite analytics.

02 // THE SYSTEM

Production Architecture

Ingests 4 synchronized 16-bit Landsat 8 spectral bands (Red, Green, Blue, Near-Infrared) strictly in memory, runs a trained 4-channel PyTorch U-Net, and renders 4 visual artifacts into a split-curtain React + Three.js workbench.

Execution Pipeline

  1. STAGE 01

    4-Band Spectral Ingestion

    Auto-matches dropped 16-bit GeoTIFF files (B04 Red, B03 Green, B02 Blue, B05 NIR) or loads 3 bundled 38-Cloud patches in 1 click.

  2. STAGE 02

    In-Memory Radiometric Prep

    Decodes and normalizes raw 16-bit bands into a [1, 4, 384, 384] tensor completely in RAM with zero temporary disk writes.

  3. STAGE 03

    4-Channel PyTorch U-Net

    Executes Epoch 11 checkpoint (weights_only=True, CPU wheel) using B05 Near-Infrared reflectance to separate snow/ice from true clouds.

  4. STAGE 04

    Multi-Artifact Inspection

    Returns RGB composite, Cyan Overlay, Binary Mask, and Magma Probability Heatmap with live confidence threshold (10–90%) and split-curtain comparison.

Key Engineering Trade-Offs & Decisions

  • Verified NIR snow-rejection on 38-Cloud patch_291 (0.38% predicted cloud vs ~0% ground truth), partial cloud patch_113 (57.06% vs ~56%), and heavy overcast patch_157 (94.24% vs ~90%).
  • Bundled 3 real Landsat 8 patches (~3.5 MB) with a 1-click Live Demo and 3-step guided coachbar so anyone can reproduce benchmarks immediately.
  • Hardened container runtime with CPU-only PyTorch, weights_only=True checkpoint loading, non-root appuser, and /api/ready probes.
  • Backed by pytest backend tests, oxlint frontend checks, and GitHub Actions CI.

Tech Stack

PyTorchU-NetFastAPIReactViteThree.jsDockerNginxAzure ACAVercel
Deployment & Runtime

Live at cloud-mask-ai.vercel.app; FastAPI + PyTorch U-Net container (ghcr.io/tusharsingh-sde/cloudmask-backend:v1) deployed scale-to-zero on Azure Container Apps.

Open-source repo: PRs, issues, and feature collabs are always welcome on GitHub.