Skip to content
aadeshmaxPublic

About

​AI-powered real-time flood and water anomaly detection platform leveraging NASA Synthetic Aperture Radar (SAR) satellite data and computer vision to map inundation through cloud cover, monitor hydrological shifts, and generate early disaster alerts.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

52 Commits

Folders and files

Repository files navigation

PARALLAX — NISAR-Powered Surface Change Intelligence

NASA Space Apps Challenge NASA NISAR NASA OPERA Backend Frontend MapLibre GL

See Beyond the Visible.

NISAR L-Band Flight Observation Ingestion & Dual-Sensor Surface Change Intelligence

🏆 NASA Space Apps 2026 Submission Package: Explore the complete judge walkthrough, mathematical methodology, and verified findings in the submission/ directory.


🌍 Executive Summary & Scientific Mission

Traditional optical remote sensing and multispectral surface water classifiers (e.g. Landsat, Sentinel-2, NDWI) are fundamentally blind to water and soil moisture concealed beneath dense vegetation canopies.

PARALLAX resolves this blind spot using microwave synthetic aperture radar (SAR) physics. Designed for the NASA Space Apps 2026 Challenge (Dancing with the SARs), PARALLAX ingests:

  1. NASA-ISRO SAR (NISAR) Level-2 Geocoded Polarimetric Covariance (GCOV) provisional flight observations: Using 24 cm L-band microwaves (1.2575 GHz) that penetrate deep through tropical forest crowns and mangrove canopies to detect surface moisture dynamics.
  2. NASA OPERA Level-2 Radiometric Terrain-Corrected (RTC-S1) backscatter imagery ($\text{VV} + \text{VH}$) alongside NASA OPERA Level-3 Dynamic Surface Water Extent (DSWx-S1) products: Providing historical C-band surface water baselines and cross-sensor gap intelligence.
       Radar Pulse 🛰️                             Radar Pulse 🛰️
          \                                          \        ▲
           \                                          \      / (Enhanced Double-Bounce)
            \                                          \    /
    ┌────────▼────────┐                         ┌───────▼──/──────┐
    │  Open Water     │                         │  Flooded Canopy │
    │  Specular Mirror│                         │  Dihedral Bounce│
    │  ΔdB ≤ -3.0 dB  │                         │  ΔdB ≥ +2.5 dB  │
    └────────┬────────┘                         └───────┬─────────┘
             ▼                                          ▼
     Radar energy scatters                     Water-trunk corner reflector
     away from sensor                          redirects intense pulse back
     (Signal Attenuation)                      (Signal Enhancement)

Scientific Taxonomy & Physical Interpretations

PARALLAX reports candidate surface changes using strict scientific terminology, recognizing multiple physical mechanisms:

  • Backscatter Attenuation Zones ($\Delta HH \le -3.0\text{ dB}$, $\sigma^0_B \le -15.0\text{ dB}$): Identifies candidate open surface water expansion. Alternative physical interpretations include tidal mudflat drainage, calm saturated sediment, or agricultural soil smoothing.
  • Backscatter Enhancement Zones — Potential Inundation Indicators ($\Delta HH \ge +2.5\text{ dB}$): Identifies potential inundation indicators under woody vegetation via dihedral double-bounce. Alternative physical interpretations include post-deluge volumetric soil moisture saturation, mangrove canopy moisture increase, or urban dihedral scattering.
  • Cross-Sensor Distinction: Direct subtraction of C-band from L-band is scientifically invalid due to differing penetration depths and interaction mechanics; comparisons are treated as independent multi-frequency investigations.

⚡ Core Platform Capabilities

1. Dual-Signature Radar Physics Engine

  • Canopy Dihedral Double-Bounce ($\Delta\sigma^0 \ge +2.5\text{ dB}$): Identifies candidate sub-canopy inundation where submerged tree trunks act as natural dihedral corner reflectors.
  • Specular Surface Darkening ($\Delta\sigma^0 \le -3.0\text{ dB}$, $\sigma_{\text{post}}^0 \le -14.0\text{ dB}$): Maps open-water surface expansion where calm flood pools scatter incident microwaves away from the satellite antenna.
  • Dual-Polarization ($\text{VV} + \text{VH}$) Cross-Ratio Discrimination: Suppresses false positives arising from agricultural tillage, soil moisture saturation, or urban geometry by evaluating co-pol to cross-pol power ratios ($\sigma_{\text{VV}}^0 / \sigma_{\text{VH}}^0$).

2. NASA OPERA Cross-Sensor Gap Intelligence

  • Cross-references radar inundation candidates directly against the official NASA OPERA L3 DSWx surface water mask.
  • Computes Sensor Agreement (IoU) and isolated Detection Gap Extent without unverified Bayesian or synthetic ground-truth assumptions.
  • Delineates newly emergent flood pools hidden from optical surveillance.

3. Professional GIS & Felt-Inspired 3D Map Interface

  • Radiometric Photographic Contrast Stretch: Implements an optimized $-22.0\text{ dB}$ to $-2.5\text{ dB}$ contrast curve with non-linear shadow opening ($\gamma = 0.85$), delivering crisp, readable radar imagery matching modern satellite reconnaissance standards.
  • Hardware Texture Linear Resampling: Zero pixel ghosting or blur; GPU bilinear interpolation enables razor-sharp raster clarity up to zoom level 18.
  • Sub-Pixel Polygon Smoothing: High-resolution vectorization utilizing topological buffer-deflate smoothing ($\text{buffer}(+8\text{m}) \to \text{buffer}(-8\text{m}) \to \text{simplify}(6\text{m})$), eliminating $90^\circ$ staircase raster pixelation.
  • Burst Footprint Perimeter: Delineates exact Sentinel-1 satellite swath burst boundaries in rose-red dashed styling (#f43f5e).
  • Synchronized Swipe Comparison: Real-time cross-fade comparison between Pre-Event Baseline SAR and Post-Event Peak Flood SAR with percentage callouts.
  • Field Validation Staging Sites: Interactive site pins with animated radar halos for ground-truth inspection.
  • 🎬 30s Guided Pitch Tour: Autonomous camera fly-through choreographed for hackathon judges, highlighting AOI overviews, sub-canopy gap anomalies, and floodplain channels.
  • Interactive Evidence Drawer ("How-We-Know"): Click any feature to inspect exact decibel differentials, source scene IDs, surface area in hectares, and physics classification rules.
  • Section 06 / 08 Scientific Deliverables Export: 1-click download of PARALLAX_<case_id>_Scientific_Export.json providing complete reproducibility packaging.

🗺️ Verified Benchmark Case Studies

All case studies operate on verified, real-world NASA OPERA and Copernicus Sentinel-1 datasets:

Case ID Event Name & Location Target Acquisition CRS / Grid Key Scientific Finding
mumbai_nisar_2026 Mumbai & Thane Creek (NISAR 2026)
Thane Creek Mangroves, India
June 22 – July 04, 2026 EPSG:32643
UTM Zone 43N
571.13 km² Backscatter Enhancement Zones — Potential Inundation Indicators (+2.5 dB) under mangrove canopy; 2.85 km² attenuation.
chennai_live_case Cyclone Fengal Disaster
Pallikaranai Marshlands, India
Nov 20 – Dec 02, 2024 EPSG:32644
UTM Zone 44N
-9.8 dB specular attenuation in Cooum overflow combined with reed-bed double-bounce brightening.
real_event_rio_grande_do_sul Rio Grande do Sul Historic Flood
Guaíba River Basin, Brazil
April 26 – May 08, 2024 EPSG:32622
UTM Zone 22S
+4.8 dB double-bounce enhancement across Jacuí Delta gallery forests unmapped by standard DSWx.
demo_flood_case NASA OPERA Demonstration
Brittany Basin, France
Jan 10 – Jan 22, 2024 EPSG:32630
UTM Zone 30N
Official NASA demonstration scene validating baseline radiometric coregistration.

🏗️ System Architecture

┌────────────────────────────────────────────────────────────────────────┐
│                        NASA EARTHDATA ECOSYSTEM                        │
│   ASF DAAC (OPERA L2 RTC-S1)        │   PO.DAAC (OPERA L3 DSWx-S1)     │
│   VV / VH Radiometric Backscatter   │   30m Dynamic Surface Water Extent│
└───────────────────────────────────┬────────────────────────────────────┘
                                    │ CMR API & Direct S3 / HTTPS
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│                      PARALLAX BACKEND (FastAPI)                        │
│  ┌───────────────────────┐  ┌───────────────────────────────────────┐  │
│  │ NASA EDL Authenticator│  │ Scientific Detection Engine           │  │
│  │ Live Token Handshake  │  │ • Logarithmic Unit Validation (dB)    │  │
│  └───────────────────────┘  │ • Bilinear / Nearest-Neighbor Resample│  │
│  ┌───────────────────────┐  │ • Specular Attenuation (ΔdB ≤ -3.0)   │  │
│  │ Static Tile Server    │  │ • Double-Bounce Rise (ΔdB ≥ +2.5)     │  │
│  │ XYZ Tiles (Zoom 1-15) │  │ • Dual-Pol VV/VH False-Positive Filter│  │
│  └───────────────────────┘  └───────────────────────────────────────┘  │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │ REST API / XYZ Raster Tiles / GeoJSON
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│                    PARALLAX 3D DASHBOARD (React + Vite)                │
│  ┌──────────────────────────────────────────────────────────────────┐  │
│  │ MapLibre GL JS 3D Canvas                                          │  │
│  │ • Linear GPU Hardware Resampling   • 3D Terrain & 52° Pitch Tilt │  │
│  │ • Synchronized Swipe Slider        • 30s Guided Pitch Tour       │  │
│  │ • Burst Footprint Boundary (#f43f) • Field Staging Site Halos    │  │
│  └──────────────────────────────────────────────────────────────────┘  │
│  ┌───────────────────────┐  ┌───────────────────────────────────────┐  │
│  │ Interactive Sidebar   │  │ Detection Intelligence Panel          │  │
│  │ • AOI Case Switcher   │  │ • Dual-Pol Metric Area Grid (km²)     │  │
│  │ • Scene Timeline Card │  │ • Cross-Sensor Gap Analysis (Agreement│  │
│  │ • Dynamic dB Sliders  │  │ • Radar Backscatter Statistics (γ⁰ dB)│  │
│  └───────────────────────┘  └───────────────────────────────────────┘  │
└────────────────────────────────────────────────────────────────────────┘

📁 Repository Structure

├── backend/
│   ├── app/
│   │   ├── auth/              # NASA Earthdata Login (URS) authentication
│   │   ├── routers/           # API routes: /api/cases, /api/nasa, /api/process
│   │   ├── schemas/           # Pydantic data schemas and contracts
│   │   ├── services/          # SAR processor, detection engine, CMR search
│   │   ├── config.py          # Storage and environment configurations
│   │   └── main.py            # FastAPI application entry point
│   ├── alignment.py           # Coregistration & common observation masking
│   ├── dswx_ingestion.py      # OPERA DSWx-S1 raster reader & validator
│   ├── exporter.py            # Section 06/08 scientific JSON & GeoTIFF exporter
│   ├── metrics.py             # Geodesic & UTM ground-area integration
│   ├── rtc_ingestion.py       # Safe dB conversion & dual-pol reader
│   └── requirements.txt       # Backend Python dependencies
├── frontend/
│   ├── src/
│   │   ├── components/
│   │   │   ├── Header.tsx       # Mission title, EDL status badge, export triggers
│   │   │   ├── Sidebar.tsx      # AOI selection, scene timeline, layer toggles
│   │   │   ├── MapViewer.tsx    # MapLibre GL 3D canvas, toolbar, swipe slider
│   │   │   ├── MetricsPanel.tsx # Intelligence panel, KPIs, cross-sensor gap
│   │   │   └── CitationModal.tsx# NASA citations, DOIs, and data source licenses
│   │   ├── api.ts               # REST client for backend communication
│   │   ├── types.ts             # TypeScript scientific interfaces
│   │   ├── App.tsx              # Root application layout and responsive grid
│   │   └── main.tsx             # Application mount point
│   ├── package.json
│   ├── tailwind.config.js
│   └── vite.config.ts
├── data/
│   ├── cases/                 # 4 pre-packaged study cases (GeoTIFFs & Tiles)
│   │   ├── real_event_rio_grande_do_sul/
│   │   ├── mumbai_monsoon_event/
│   │   ├── chennai_live_case/
│   │   └── demo_flood_case/
├── scripts/
│   ├── run_analysis.py        # Standalone headless pipeline runner
│   ├── generate_tiles.py      # XYZ map tile pyramid generator
│   └── vectorize.py           # Topological buffer-deflate polygon smoother
├── tests/
│   ├── test_nasa_integration.py # Live NASA Earthdata integration suite
│   └── test_rtc_pipeline.py     # Decibel conversion and detection tests
├── SCIENCE.md                 # Complete mathematical formulations & radar physics
└── README.md                  # System documentation

🚀 Quickstart & Setup Guide

1. Prerequisites

2. Environment Configuration

Clone the repository and copy the environment template:

cp .env.example .env

Populate .env with your NASA Earthdata credentials (optional, system automatically falls back to verified demonstration data if unconfigured):

EARTHDATA_USERNAME=your_username
EARTHDATA_PASSWORD=your_password
API_HOST=127.0.0.1
API_PORT=8000

3. Backend Setup

# Activate virtual environment
python -m venv .venv
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate

# Install dependencies
cd backend
pip install -r requirements.txt

4. Frontend Setup

cd frontend
npm install

5. Launch Services

Option A: Unified Production Mode (FastAPI + Embedded SPA)

# Launch FastAPI backend (serves API, data tiles, and compiled SPA)
uvicorn app.main:app --app-dir backend --host 127.0.0.1 --port 8000

Open http://127.0.0.1:8000/app/ in your browser.

Option B: Development Mode (with Live Hot-Reloading)

# Terminal 1: Launch FastAPI Backend (Port 8000)
uvicorn app.main:app --app-dir backend --host 127.0.0.1 --port 8000 --reload

# Terminal 2: Launch Vite Dev Server (Port 5173)
cd frontend
npm run dev -- --host 127.0.0.1 --port 5173

Open http://127.0.0.1:5173 in your browser.

Interactive FastAPI Swagger documentation is available at: 👉 http://127.0.0.1:8000/docs


💻 Headless CLI Execution

For automated batch processing or remote high-performance computing clusters:

python scripts/run_analysis.py \
  --pre-sar data/cases/real_event_rio_grande_do_sul/OPERA_L2_RTC-S1_T22JBM_20240426T220719Z_VV.tif \
  --post-sar data/cases/real_event_rio_grande_do_sul/OPERA_L2_RTC-S1_T22JBM_20240508T220719Z_VV.tif \
  --pre-vh data/cases/real_event_rio_grande_do_sul/OPERA_L2_RTC-S1_T22JBM_20240426T220719Z_VH.tif \
  --post-vh data/cases/real_event_rio_grande_do_sul/OPERA_L2_RTC-S1_T22JBM_20240508T220719Z_VH.tif \
  --dswx data/cases/real_event_rio_grande_do_sul/OPERA_L3_DSWx-S1_T22JBM_20240508T220719Z_v1.0_B01_WTR.tif \
  --darkening-thresh -3.0 \
  --brightening-thresh 2.5 \
  --out-dir data/processed/cli_run_export

Output directory will contain:

  • candidate_inundation.geojson: Smoothed, attributed vector polygons.
  • metrics.json: Full mathematical KPI breakdown, IoU agreement, and decibel distributions.
  • diff_db.tif: 32-bit floating point backscatter change raster.

📡 REST API Reference

Endpoint Method Description
/api/cases GET Returns list of all available study cases, bounding boxes, and scene IDs.
/api/process/{case_id} POST Executes dual-polarization change detection and returns spatial KPIs & GeoJSON URLs.
/api/nasa/status GET Validates NASA Earthdata credentials and returns masked username.
/api/datasets GET Returns catalog of integrated satellite collections, DOIs, and DAAC endpoints.
/health GET Service liveness probe.
/readiness GET Verifies local case data availability and disk storage readiness.

🔬 Scientific Validation Protocol & Caveats

  1. Candidate Status: In adherence to rigorous scientific ethics, all radar backscatter double-bounce anomalies are explicitly reported as Candidate Inundated Vegetation. They represent high-probability sub-canopy water anomalies until validated with in-situ hydrologic gauge networks or aerial drone LiDAR.
  2. Complementarity Principle: Discrepancies between PARALLAX radar candidates and NASA OPERA DSWx observations represent cross-sensor detection complementarity, not product error. Optical/surface products measure clear water extent; SAR double-bounce identifies water concealed beneath biomass.
  3. Common Observation Masking: Metric comparisons and IoU ratios are evaluated strictly across the spatial intersection of valid radar and DSWx observations, ensuring zero contamination from cloud shadow, radar shadow, or nodata borders.

📚 Official Citations & DOIs

  • NISAR Level-2 GCOV (PROVISIONAL):
    NASA-ISRO SAR Mission (NISAR). (2026). NISAR Level-2 Geocoded Polarimetric Covariance (GCOV) Provisional Product. NASA Alaska Satellite Facility (ASF) DAAC / Jet Propulsion Laboratory / ISRO.
    DOI: https://doi.org/10.5067/NISAR-L2-GCOV-V1

  • OPERA Level-2 RTC-S1:
    OPERA Project (2024). OPERA Level-2 Radiometric Terrain Corrected SAR from Sentinel-1 (OPERA_L2_RTC-S1_V1). NASA Alaska Satellite Facility (ASF) DAAC.
    DOI: https://doi.org/10.5067/SN1OP-RTC20

  • OPERA Level-3 DSWx-S1:
    OPERA Project (2024). OPERA Level-3 Dynamic Surface Water Extent from Sentinel-1 (OPERA_L3_DSWX-S1_V1). NASA Physical Oceanography Distributed Active Archive Center (PO.DAAC).
    DOI: https://doi.org/10.5067/SN1OP-DSW30

  • Copernicus Sentinel-1:
    European Space Agency (ESA) & European Commission Copernicus Programme (2024). Sentinel-1 C-Band SAR Constellation Data. Distributed by NASA ASF DAAC.


📄 License

This project is licensed under the MIT License — open and accessible for humanitarian emergency response, flood disaster management, and scientific peer review. See the LICENSE file for full details.

About

​AI-powered real-time flood and water anomaly detection platform leveraging NASA Synthetic Aperture Radar (SAR) satellite data and computer vision to map inundation through cloud cover, monitor hydrological shifts, and generate early disaster alerts.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages