ProtoCast / README.md
OliverLee520's picture
Link the source repository in the evaluation instructions
f580112 verified
|
Raw History Blame Contribute Delete
3.51 kB
---
library_name: pytorch
datasets:
- OliverLee520/WeatherForecast
tags:
- weather-forecasting
- spatiotemporal-forecasting
- arxiv:2611.25848
---
# ProtoCast
[![Paper on Hugging Face](https://img.shields.io/badge/Hugging%20Face-Paper-FCD34D?style=for-the-badge&logo=huggingface&logoColor=white)](https://huggingface.co/papers/2611.25848) [![Project Page](https://img.shields.io/badge/Project%20Page-2457A6?style=for-the-badge)](https://zhixuanli.github.io/projects/li2026protocast) [![GitHub Repository](https://img.shields.io/badge/GitHub-Repository-24292F?style=for-the-badge&logo=github&logoColor=white)](https://github.com/zhixuanli/ProtoCast)
ProtoCast takes 12 hourly observations on a weather grid and predicts the next 12 hourly fields for every input variable. At each location, it matches local weather patterns to prototypes learned for the corresponding variable group. The prototype matches guide low-rank corrections to the forecast. The project page illustrates these matches and shows forecast examples. The GitHub repository is the home of the training and evaluation code.
## Checkpoints
Each checkpoint was trained on its own benchmark and selected by validation loss. Choose the file that matches your data grid and channel order.
| Benchmark | Grid | Channels in input and output order | Checkpoint |
| --- | --- | --- | --- |
| GlobalForecast | 32 × 64 | Eastward and northward 10 m wind (U10, V10), 2 m temperature (T2M), total cloud cover (TCC), relative humidity at 1000 hPa (R) | [GlobalForecast/protocast.ckpt](https://huggingface.co/OliverLee520/ProtoCast/resolve/main/GlobalForecast/protocast.ckpt) |
| TyphoonTracking | 32 × 32 | Mean sea-level pressure (MSL), U10, V10, T2M | [TyphoonTracking/protocast.ckpt](https://huggingface.co/OliverLee520/ProtoCast/resolve/main/TyphoonTracking/protocast.ckpt) |
## Evaluate a Checkpoint
From the [ProtoCast source repository](https://github.com/zhixuanli/ProtoCast) root, activate the `protocast` environment and prepare the matching test split from [WeatherForecast](https://huggingface.co/datasets/OliverLee520/WeatherForecast/tree/f999fd0f3e866d806c258b347e1efb99511eccdb). The commands below use the Hugging Face CLI to place the checkpoint under `weights/` and then evaluate it.
```bash
# GlobalForecast
hf download OliverLee520/ProtoCast GlobalForecast/protocast.ckpt --local-dir weights
bash scripts/GlobalForecast/ProtoCast.sh test data/GlobalForecast \
--checkpoint weights/GlobalForecast/protocast.ckpt
# TyphoonTracking
hf download OliverLee520/ProtoCast TyphoonTracking/protocast.ckpt --local-dir weights
bash scripts/TyphoonTracking/ProtoCast.sh test data/TyphoonTracking \
--checkpoint weights/TyphoonTracking/protocast.ckpt
```
GlobalForecast evaluation reads `test.npy` and `train_stats.json`. TyphoonTracking evaluation reads `test_32_32.npz` and the normalization statistics stored in `train_32_32.npz`. Each evaluation needs one model checkpoint. Metrics in physical units are written to `work_dirs/<benchmark>/ProtoCast/evaluation/saved/metrics.json`.
## Citation
If you use these checkpoints, please cite [Interpretable Prototype-Conditioned Adaptation for Weather Forecasting](https://huggingface.co/papers/2611.25848).
```bibtex
@article{li2026protocast,
title={Interpretable Prototype-Conditioned Adaptation for Weather Forecasting},
author={Li, Zhixuan and Jiang, Hao and Hui, Chen and Geng, Kai and Lin, Weisi},
journal={arXiv preprint arXiv:2611.25848},
year={2026}
}
```