Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HydraNet: Terrain-Aware Multimodal GeoVision Framework for Flood Segmentation

Overview

HydraNet is a terrain-aware flood mapping framework that combines Synthetic Aperture Radar (SAR) satellite imagery with terrain-inspired spatial priors to perform automated flood segmentation. The project aims to improve flood detection by integrating geospatial reasoning into deep learning-based computer vision models.

Traditional flood segmentation models rely solely on image appearance. HydraNet extends this approach by incorporating terrain-aware information such as pseudo-elevation and pseudo-slope maps, allowing the model to learn not only how floods look but also how they behave spatially.

The framework is built using PyTorch and employs a U-Net architecture with a ResNet34 encoder for pixel-wise flood segmentation.


Motivation

Floods are among the most destructive natural disasters worldwide, causing significant loss of life, infrastructure damage, and economic disruption.

Rapid identification of flooded regions is essential for:

  • Disaster response
  • Emergency planning
  • Resource allocation
  • Damage assessment
  • Risk management

Optical satellite imagery is often obstructed by clouds during extreme weather events. Sentinel-1 SAR imagery can penetrate clouds and operate day and night, making it highly suitable for flood monitoring.

HydraNet leverages Sentinel-1 SAR data and terrain-aware learning to improve flood segmentation performance.


Project Objectives

The primary objectives of HydraNet are:

  • Develop an end-to-end flood segmentation pipeline using Sentinel-1 SAR imagery.
  • Introduce terrain-aware learning into a computer vision framework.
  • Explore multimodal geospatial feature fusion.
  • Generate pixel-level flood predictions.
  • Investigate how terrain priors influence flood segmentation performance.

Dataset

Sen1Floods11 Dataset

HydraNet uses the Sen1Floods11 dataset, one of the most widely used benchmark datasets for flood segmentation research.

Dataset characteristics:

  • Sentinel-1 SAR imagery
  • Hand-labeled flood masks
  • Diverse geographical regions
  • Multiple flood events
  • Pixel-wise annotations

Dataset structure:

images/
│
├── Bolivia_xxx_S1Hand.tif
├── Ghana_xxx_S1Hand.tif
├── Sri-Lanka_xxx_S1Hand.tif
└── ...

masks/
│
├── Bolivia_xxx_LabelHand.tif
├── Ghana_xxx_LabelHand.tif
├── Sri-Lanka_xxx_LabelHand.tif
└── ...

Architecture

Baseline Architecture

SAR Image
    │
    ▼
U-Net
(ResNet34 Encoder)
    │
    ▼
Flood Segmentation Mask

Terrain-Aware HydraNet

SAR Image
      +
Pseudo-Elevation
      +
Pseudo-Slope
        │
        ▼
Multimodal U-Net
        │
        ▼
Flood Probability Map
        │
        ▼
Flood Segmentation

Terrain-Aware Learning

A key contribution of HydraNet is the incorporation of terrain-inspired spatial priors.

Pseudo-Elevation Map

Pseudo-elevation is generated using Gaussian smoothing on SAR imagery.

Purpose:

  • Capture large-scale terrain continuity
  • Introduce topographic context
  • Encourage spatially coherent predictions

Pseudo-Slope Map

Pseudo-slope is generated using Sobel gradients on the pseudo-elevation map.

Purpose:

  • Capture terrain gradients
  • Provide spatial structure information
  • Simulate topographic changes

Multimodal Fusion

The final input consists of three channels:

Channel 1 → SAR Image
Channel 2 → Pseudo-Elevation
Channel 3 → Pseudo-Slope

These channels are fused and passed into a modified U-Net architecture.


Model Architecture

Encoder

  • ResNet34
  • ImageNet pre-trained weights

Decoder

  • U-Net Decoder
  • Skip connections
  • Pixel-wise segmentation output

Input

3 Channels
(256 × 256)

Output

1 Channel Flood Probability Map

Loss Function

HydraNet uses a hybrid loss function:

Binary Cross Entropy Loss

Measures pixel-wise classification error.

Dice Loss

Measures segmentation overlap quality.

Combined Loss

Loss = BCE Loss + Dice Loss

This combination improves learning on highly imbalanced flood segmentation datasets.


Data Processing Pipeline

Image Loading

  • RasterIO
  • GeoTIFF support

Data Cleaning

  • NaN handling
  • Infinite value removal

Normalization

  • Mean normalization
  • Standard deviation scaling

Label Handling

Mask labels:

0 → Non-Flood
1 → Flood
255 → Ignore Region

Training Pipeline

The training pipeline includes:

  • Dataset Loader
  • DataLoader
  • GPU acceleration
  • Gradient clipping
  • Validation monitoring
  • Best model checkpointing

Hyperparameters

IMAGE_SIZE = 256
BATCH_SIZE = 4
LEARNING_RATE = 5e-5
EPOCHS = 15

Inference Pipeline

HydraNet performs:

  1. Image loading
  2. Terrain feature generation
  3. Multimodal fusion
  4. Forward pass
  5. Probability estimation
  6. Thresholding
  7. Flood mask generation

Outputs include:

  • SAR Image
  • Ground Truth Mask
  • Flood Probability Map
  • Predicted Flood Mask

Experimental Results

The model demonstrates:

  • Successful flood segmentation
  • Terrain-aware spatial consistency
  • Improved validation performance
  • Meaningful flood probability estimation

Example training progression:

Epoch 1:
Train Loss: 1.4185
Val Loss:   1.3484

Epoch 15:
Train Loss: 0.5200
Val Loss:   0.6391

This indicates successful learning and convergence.


Technologies Used

Deep Learning

  • PyTorch
  • segmentation-models-pytorch

Geospatial Processing

  • RasterIO
  • NumPy
  • OpenCV

Visualization

  • Matplotlib

Environment

  • Google Colab
  • PyCharm

Repository Structure

HydraNet/
│
├── data/
│
├── models/
│   └── unet_model.py
│
├── utils/
│   ├── dataset.py
│   └── losses.py
│
├── scripts/
│   ├── test_dataset.py
│   └── test_model.py
│
├── train.py
├── inference.py
│
└── README.md

Future Work

The current implementation serves as a proof-of-concept terrain-aware flood segmentation framework.

Future extensions include:

Real DEM Integration

  • SRTM DEM
  • Elevation alignment
  • Terrain reprojection

Rainfall-Aware Modeling

  • Precipitation datasets
  • Temporal accumulation
  • Weather-aware flood forecasting

Temporal Learning

  • ConvLSTM
  • Transformer architectures
  • Multi-temporal flood evolution modeling

Explainable AI

  • Grad-CAM
  • Attention visualization
  • Model interpretability

Physics-Informed Learning

  • Hydrological constraints
  • Flow accumulation
  • Watershed-aware prediction

Research Significance

HydraNet explores the intersection of:

  • Computer Vision
  • Geospatial Artificial Intelligence (GeoAI)
  • Remote Sensing
  • Hydrometeorology
  • Deep Learning

The project demonstrates how terrain-aware multimodal learning can enhance flood segmentation and serves as a foundation for future research in physics-aware geospatial intelligence systems.


Author

Chetan Singh Kaurav

Computer Science & Engineering Student

Interests:

  • Artificial Intelligence
  • Computer Vision
  • Geospatial AI
  • Remote Sensing
  • Hydrometeorology
  • Deep Learning Research

HydraNet is an ongoing research project exploring terrain-aware multimodal learning for automated flood mapping and geospatial intelligence.

About

Terrain-aware multimodal GeoAI framework for flood segmentation using Sentinel-1 SAR imagery and deep learning.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages