MTL Nairobi is a deep learning model that serves as an evidence-based XAI tool for community groups and city planners to assess housing conditions and access to water and sanitation against UN-Habitat standards in Three major informal settlement regions of Kibera, Mathare and Mukuru in Nairobi.
# Multi-Task Deep Learning for Just Urban Governance
Parcel-level flood risk micro-zonation and structural deprivation
assessment for Nairobi's informal settlements (Kibera, Mathare, Mukuru),
combining an Attention U-Net (flood hazard) and GraphSAGE (structural
deprivation) through a late-fusion policy decision engine, surfaced via an
explainable-AI Folium dashboard.
Strathmore University, School of Computing and Engineering Sciences —
ICS Project II. Full methodology in the project proposal.
## Status
**Sprint 1 (weeks 1-2): Data pipeline** — implemented. Acquires and
validates all four data sources (Sentinel-2, Sentinel-1, SRTM/TWI, OSM
vectors) for a given settlement and produces a tiled raster stack + a
serialised PyTorch Geometric graph. `DataPipeline` is settlement-agnostic
(pass `settlement_key="kibera" | "mathare" | "mukuru"`), and
`run_sprint1_all_settlements()` runs all three in one call — see notebook
section 5.
Sprints 2-6 (model heads, fusion engine, dashboard) are not yet
implemented — this repo currently covers the data layer only.
## Repo structure
```
src/
config.py # settlement boundaries, date ranges, thresholds
data_pipeline.py # DataPipeline class -- Sprint 1 entrypoint
utils/
gee_utils.py # Sentinel-2/1, SRTM/TWI acquisition (Google Earth Engine)
graph_utils.py # OSM ingestion + proximity graph construction
notebooks/
01_sprint1_data_pipeline.ipynb # Colab notebook, runs the pipeline end-to-end
tests/
test_graph_construction.py # unit tests for graph edge cases (no network needed)
data/ # gitignored; populated at runtime
```
## Setup
### Local (for editing / running tests)
```bash
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
pytest tests/
```
The unit tests run entirely offline against synthetic geometries — they
don't need GEE or OSM credentials.
### Google Colab (for actually running the pipeline)
Open `notebooks/01_sprint1_da …