A reproducible geospatial machine learning pipeline to detect earthquake impact in Myanmar using Sentinel-2 satellite data and OpenStreetMap features.
Earthquake Date: March 28, 2025
AOI: 50km radius around epicenter (Mandalay) in Myanmar
Goal: Identify damaged zones, infrastructure vulnerability, and prioritize emergency response using ML and geospatial analysis.
This project performs change detection using pre- and post-earthquake Sentinel-2 imagery. It computes spectral indices (NDVI, NDBI, NDWI), generates difference maps, performs patch-level statistical analysis, and visualizes the impact with overlays from OpenStreetMap (OSM). The outputs include static difference maps, patch-wise heatmaps, and an interactive web map.
The pipeline is:
- Fully reproducible
- Modular (scripted in distinct steps)
- Impact-focused (vegetation, water, built-up changes)
- Integrated with OSM for infrastructure awareness
- Visualization-ready (static plots and Folium maps)
- Download Sentinel-2 pre/post-event data using
01_download_sentinel.py - Product IDs are set inside the script; change as needed
- Filtered by <10% cloud cover
- Run
02_generate_aoi_bbox.pyto define the AOI for Mandalay + 50km buffer
- Use
03_download_osm_data.pyto download roads, hospitals, landuse, and other key infrastructure layers
- Use
04_clip_and_stack.pyto clip all bands to AOI and stack them - Resamples 20m bands to 10m resolution
05_compute_indices.pycomputes indices and generates difference maps (Post - Pre)- Difference rasters are reprojected to EPSG:4326
06_visualize_indices.pysaves side-by-side static maps for pre, post, and diff
07_patch_stats.pydivides diff rasters into 128x128 pixel patches and computes average change- Outputs saved as GeoJSON and CSV
08_plot_patch_stats.pyrenders patch maps with diverging color maps for each index
09_interactive_map.pybuilds a layer-controlled Folium map grouping patch data by index- Output:
outputs/maps_interactive/map_grouped.html
git clone https://github.com/nithingm/Myanmar_Earthquake_Change_Detection.git
cd Myanmar_Earthquake_Change_DetectionUsing uv:
uv venv
source .venv/bin/activate
uv pip install -r requirements.txtOr using conda:
conda create -n myanmar_eq python=3.10 -y
conda activate myanmar_eq
pip install -r requirements.txtexport EODAG__COP_DATASPACE__AUTH__CREDENTIALS__USERNAME="your_copernicus_username"
export EODAG__COP_DATASPACE__AUTH__CREDENTIALS__PASSWORD="your_copernicus_password"Use the master runner script:
python scripts/00_run_pipeline.pyThis sequentially runs:
- Sentinel download
- AOI generation
- OSM data fetch
- Clipping + stacking
- Index computation
- Static visualizations
- Patch Stats
- Plot Patch Stats
- Interactive Map
| Band | Name | Resolution | Use |
|---|---|---|---|
| B02 | Blue | 10m | NDBI, NDWI |
| B03 | Green | 10m | NDWI |
| B04 | Red | 10m | NDVI |
| B08 | NIR | 10m | NDVI, NDWI |
| B11 | SWIR | 20m → 10m | NDBI, NDWI |
| B12 | SWIR-2 | 20m → 10m | NDBI |
Bounding box used:
North: 27.5
South: 17.05
East: 98.4
West: 95.5
File: data/aoi/myanmar_aoi_bbox.geojson
- Integrate Maxar/UNOSAT post-disaster building data
- Estimate infrastructure damage severity from index scores
- Add classification model (CNN) for binary damage prediction
- Build emergency response prioritization tool
Developed by Nithin George
ML for Impact | Geospatial AI | Disaster Response