Athithiyanmr/chennai_urban_climate
Deep learning pipeline (UNet) for built-up area extraction from Sentinel-2 imagery β applied to Chennai for urban heat island and climate risk analysis
ποΈ Chennai Urban Climate
A deep learning pipeline for built-up area extraction from Sentinel-2 imagery using UNet semantic segmentation β applied to Chennai for urban climate analysis.
π What Is This?
Urban expansion reshapes land surfaces in ways that directly drive climate risk β intensifying heat islands, increasing flood vulnerability, and altering carbon balance. Mapping built-up areas accurately and at scale is foundational to climate-informed urban planning.
This project builds a reproducible deep learning pipeline that extracts built-up areas from Sentinel-2 satellite imagery using a multi-spectral UNet segmentation model β trained on Chennai and applicable to any Indian city.
It goes beyond traditional ML classifiers by applying convolutional neural networks to learn spatial patterns directly from satellite image patches, achieving pixel-level segmentation at 10m resolution.
π― Scientific Objective
To learn pixel-level representations of built-up surfaces from multi-spectral Sentinel-2 imagery, enriched with urban-discriminative spectral indices, using deep convolutional semantic segmentation.
π Full Pipeline Workflow
1. Download lowest-cloud Sentinel-2 scenes (Planetary Computer STAC)
β
2. Mosaic & clip scenes to AOI
β
3. Build 10-band spectral feature stack
β
4. Rasterize OSM / Google Open Buildings as binary labels
β
5. Generate balanced image patches for training
β
6. Train UNet segmentation model (BCE + Dice loss)
β
7. Sliding-window inference over full AOI
β
8. Evaluate segmentation performance (IoU)
π°οΈ Input Data
Sentinel-2 Level-2A bands:
| Band | Name | Resolution |
|---|---|---|
| B02 | Blue | 10m |
| B03 | Green | 10m |
| B04 | Red | 10m |
| B08 | Near Infrared | 10m |
| B11 | Shortwave Infrared | 20m (resampled to 10m) |
Spectral indices computed:
| Index | Purpose |
|---|---|
| NDVI | Vegetation contrast (inverse signal for built-up) |
| NDBI | Built-up surface indicator |
| NDWI | Water body detection |
| BSI | Bare soil detection |
| IBI | Integrated Built-up Index |
Final model input: 10-channel feature stack [B02, B03, B04, B08, B11, NDVI, NDBI, NDWI, BSI, IBI]
π€ Model Architecture
UNet Semantic Segmentation
- Encoder-decoder structure with skip connections
- 10-channel multi-spectral input
- Pixel-level binary classification output (built-up / non built-up)
- Chosen for strong spatial segmentation performance on remote sensing data
Loss Function:
Loss = Binary Cross-Entropy (BCE) + Dice Loss
BCE handles pixel-wise accuracy; Dice Loss handles region-level spatial overlap.
π Performance
Primary metric: Intersection over Union (IoU)
IoU = TP / (TP + FP + FN)
| IoU Range | Interpretation |
|---|---|
| < 0.40 | Weak |
| 0.40 β 0.59 | Moderate |
| 0.60 β 0.70 | Strong |
| > 0.70 | Research-grade |
β Observed validation IoU β 0.60+ at Sentinel-2 10m resolution over Chennai.
ποΈ Project Structure
chennai_urban_climate/
β
βββ scripts/
β βββ 00_download_sentinel2_best_per_year.py # Satellite acquisition
β βββ 01_prepare_aoi_raw.py # AOI preprocessing
β βββ 02_build_stack.py # Spectral stack builder
β βββ 03_make_builtup_labels_from_osm.py # Label rasterization
β βββ dl/
β βββ make_patches.py # Patch generation
β βββ train_unet.py # UNet training
β βββ predict_unet.py # Inference
β
βββ data/ # Satellite imagery, AOI, labels
βββ models/ # Saved model checkpoints
βββ outputs/ # Prediction maps and evaluation results
βββ run.py # End-to-end runner script
βββ environment.yml
βοΈ Setup
conda env create -f environment.yml
conda activate chennai_climate
export PYTHONPATH=$(pwd)
export KMP_DUPLICATE_LIB_OK=TRUEβΆοΈ Run the Pipeline
# Step 1 β Download Sentinel-2 imagery
python scripts/00_download_sentinel2_best_per_year.py
# Step 2 β Prepare AOI
python scripts/01_prepare_aoi_raw.py
# Step 3 β Build spectral feature stack
python scripts/02_build_stack.py
# Step 4 β Generate training labels from OSM
python scripts/03_make_builtup_labels_from_osm.py
# Step 5 β Create image patches
python -m scripts.dl.make_patches
# Step 6 β Train UNet model
python -m scripts.dl.train_unet
# Step 7 β Run inference
python -m scripts.dl.predict_unetπ Applications
- Urban Heat Island modeling
- Flood and surface runoff risk assessment
- Impervious surface area estimation
- Urban growth monitoring over time
- Climate resilience and adaptation planning
- Input layer for city-scale sustainability models
πΊοΈ Roadmap
- Multi-city generalization (Bengaluru, Mumbai, Hyderabad)
- Temporal change detection (built-up expansion over years)
- DeepLabV3+ comparison study
- Web map visualization of predictions
π€ Author
Athithiyan M R β Geospatial Data Scientist | Remote Sensing | Climate Analytics
π Acknowledgements
- ESA Sentinel-2 Mission
- Microsoft Planetary Computer & STAC API
- OpenStreetMap contributors
- Google Open Buildings Dataset
π License
MIT License Β© 2026 Athithiyan M R