English | 中文
U-RNN vs. hydrodynamic solver — 100-year return-period rainfall event, location1. U-RNN delivers >100× faster inference with high spatial accuracy at 2 m / 1 min resolution.
U-RNN nowcasts urban flood inundation through time — predicting water-depth maps from rainfall and terrain at 2 m / 1 min resolution, >100× faster than a physics-based hydrodynamic solver. It pairs a U-shaped ConvGRU encoder–decoder with a Sliding-Window Pre-warming (SWP) training paradigm for memory-efficient long-sequence learning.
⚡ Just want to see it work? Run the full pipeline in your browser in < 2 min — no GPU, no data download, no setup: ▶ Open the Colab quickstart
📚 Want to reproduce the paper? The complete step-by-step tutorials live in
tutorials/(English & 中文).
- [2026.05] 🎉 Our follow-up work LarNO accepted by Journal of Hydrology (DOI: 10.1016/j.jhydrol.2026.135686) — large-scale urban flood modeling with zero-shot high-resolution generalization. Code and dataset are open-sourced.
- [2026.03] Quickstart notebook released — reproduce flood nowcasting in < 2 minutes, no local GPU or dataset needed.
- [2026.03] LarNO benchmark datasets supported: train on Futian (Shenzhen, 20 m/5 min) and UKEA (UK, 8 m/5 min). See Training.
- [2026.03] Training speedup tips added: use the lightweight dataset (8 m / 10 min) for fast iteration — see Training.
- [2025.04] Peking University's official media promoted our work — Chinese | English.
- [2025.04] Paper online at ScienceDirect.
- [2025.03] U-RNN accepted by Journal of Hydrology.
- [2024.12] UrbanFlood24 dataset publicly released at official project page and Baidu Cloud (code: urnn).
U-RNN architecture. A U-like Encoder-Decoder with multi-scale ConvGRU cells processes spatiotemporal rainfall + terrain inputs. The Sliding Window-based Pre-warming (SWP) paradigm decomposes long sequences into overlapping windows for memory-efficient training.
| No local GPU? Try in your browser. The quickstart notebook runs end-to-end in < 2 min — no installation, no dataset download. Covers architecture demo and real inference. |
Or run locally in 3 commands (full setup in Installation):
# 1. Clone & install
git clone https://github.com/holmescao/U-RNN && cd U-RNN/code
pip install torch==2.0.0 torchvision==0.15.1 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
# 2. Download a checkpoint (tutorials/en/03) and dataset (tutorials/en/02), then:
# 3. Run inference — results in exp/<timestamp>/figs/
python test.py --exp_config configs/lite.yaml --timestamp 20260316_130418_443889U-RNN reproduces the hydrodynamic solver's flood fields at a fraction of the cost. Pre-trained checkpoints for every dataset are in Pre-trained Weights.
| Dataset | Grid | Test R² | vs. solver |
|---|---|---|---|
| UrbanFlood24 location1 (full-res) ⭐ | 500×500 | paper accuracy | >100× faster |
| UrbanFlood24 Lite location1 | 128×128 | 0.989 | — |
| Futian (Shenzhen) | 400×560 | 0.888 | — |
| UKEA (UK) | 52×120 | 0.896 | — |
Full reproduction tutorials live in tutorials/ — available in English and 中文.
| I want to… | Guide |
|---|---|
| Install the environment | 1. Installation |
| Get the datasets | 2. Dataset Preparation |
| Get pre-trained weights | 3. Pre-trained Weights |
| Run inference (incl. TensorRT) | 4. Inference |
| Train (lite / LarNO / full) | 5. Training |
| Use a rented cloud GPU | 6. Cloud GPU — AutoDL |
| Look up repo layout & outputs | 7. Reference |
| Troubleshoot | 8. FAQ |
If you find this project useful, please cite our paper and dataset:
@article{cao2025u,
title={U-RNN high-resolution spatiotemporal nowcasting of urban flooding},
author={Cao, Xiaoyan and Wang, Baoying and Yao, Yao and Zhang, Lin and Xing, Yanwen
and Mao, Junqi and Zhang, Runqiao and Fu, Guangtao
and Borthwick, Alistair GL and Qin, Huapeng},
journal={Journal of Hydrology},
pages={133117},
year={2025},
publisher={Elsevier}
}
@misc{cao2024supplementary,
author = {Cao, Xiaoyan and Wang, Baoying and Qin, Huapeng},
title = {Supplementary data of "U-RNN high-resolution spatiotemporal
nowcasting of urban flooding"},
year = {2024},
publisher = {figshare},
note = {Dataset}
}If you also use the LarNO datasets (Futian, UKEA) or its zero-shot generalization framework, please additionally cite:
@article{cao2026large,
title={Large-scale urban flood modeling and zero-shot high-resolution generalization with LarNO},
author={Cao, Xiaoyan and Yao, Yao and Wang, Zhi and Zhao, Zhangxinyue
and Borthwick, Alistair GL and Qin, Huapeng},
journal={Journal of Hydrology},
pages={135686},
year={2026},
publisher={Elsevier}
}Released under the MIT License.
Contributions are welcome — bug reports, new datasets, and documentation improvements. See CONTRIBUTING.md for guidelines and CHANGELOG.md for the change history.


