|
|
---
|
|
|
library_name: pytorch
|
|
|
license: mit
|
|
|
datasets:
|
|
|
- TorNet
|
|
|
tags:
|
|
|
- weather
|
|
|
- radar
|
|
|
- tornado
|
|
|
- NEXRAD
|
|
|
- MRMS
|
|
|
- HRRR
|
|
|
- lightning
|
|
|
metrics:
|
|
|
- auprc
|
|
|
- f1
|
|
|
- accuracy
|
|
|
- brier
|
|
|
- ece
|
|
|
pipeline_tag: image-classification
|
|
|
---
|
|
|
|
|
|
# Wonder-Griffin/tornado-super-predictor
|
|
|
|
|
|
**TornadoSuperPredictor** from Storm-Oracle, trained on **TorNet (Zenodo)** patches.
|
|
|
Outputs a tornado probability per patch (optionally with atmospheric features).
|
|
|
|
|
|
## Summary
|
|
|
|
|
|
- **Data**: TorNet (official split); optional recent holdout recommended.
|
|
|
- **Architecture**: CNN feature extractor + heads (probability, EF logits, location, timing, uncertainty).
|
|
|
- **Temporal**: 3 volume(s) stacked as channels.
|
|
|
- **Normalization**: zscore.
|
|
|
- **Loss**: bce (pos_weight=2.0).
|
|
|
- **Calibration**: Platt (A,B)=n/a,n/a; Temperature T=n/a.
|
|
|
|
|
|
## Intended Use
|
|
|
|
|
|
- Research on tornado nowcasting from radar patches;
|
|
|
- Evaluation under class imbalance with PR metrics;
|
|
|
- **Not** an operational warning system without further validation & human oversight.
|
|
|
|
|
|
## Dataset
|
|
|
|
|
|
- **Train examples**: 6
|
|
|
- **Eval examples**: 4
|
|
|
- **Class balance**: positives=n/a, negatives=n/a, pos_weight≈2.0
|
|
|
|
|
|
## Evaluation (threshold = 0.5)
|
|
|
|
|
|
Confusion matrix (rows = truth, cols = prediction):
|
|
|
|
|
|
| | Pred 0 | Pred 1 |
|
|
|
|-------:|-------:|-------:|
|
|
|
| True 0 | 0 | 2 |
|
|
|
| True 1 | 0 | 2 |
|
|
|
|
|
|
Metrics:
|
|
|
|
|
|
- **AUPRC**: n/a
|
|
|
- **Accuracy**: n/a
|
|
|
- **(Optional)**: attach PR curve & reliability diagrams
|
|
|
|
|
|
## Training
|
|
|
|
|
|
- Optimizer: AdamW (lr=1e-4, wd=1e-4 by default)
|
|
|
- Batch size: n/a
|
|
|
- Epochs: n/a
|
|
|
- Precision: 16-mixed
|
|
|
- Augmentations: flips/rotations/intensity jitter + optional crops
|
|
|
- Hardware: 1× GPU (FP16 mixed)
|
|
|
|
|
|
## How to use
|
|
|
|
|
|
```python
|
|
|
from huggingface_hub import snapshot_download
|
|
|
import torch, os, importlib.util, sys
|
|
|
|
|
|
repo_id = "Wonder-Griffin/tornado-super-predictor"
|
|
|
local_dir = snapshot_download(repo_id)
|
|
|
sys.path.insert(0, local_dir)
|
|
|
|
|
|
from modeling import load, apply_temperature
|
|
|
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
model = load(device=device)
|
|
|
|
|
|
# x: torch.Tensor of shape (B, C, 256, 256), C = 3 * T
|
|
|
B = 1; C = 3*3
|
|
|
x = torch.randn(B, C, 256, 256, device=device)
|
|
|
|
|
|
# atmospheric dict (optional—batch-shaped)
|
|
|
atmo = {
|
|
|
"cape": torch.zeros(B,1, device=device),
|
|
|
"wind_shear": torch.zeros(B,4, device=device),
|
|
|
"helicity": torch.zeros(B,2, device=device),
|
|
|
"temperature": torch.zeros(B,3, device=device),
|
|
|
"dewpoint": torch.zeros(B,2, device=device),
|
|
|
"pressure": torch.zeros(B,1, device=device),
|
|
|
}
|
|
|
|
|
|
with torch.no_grad():
|
|
|
out = model(x, atmo)
|
|
|
prob = out["tornado_probability"] # (B,)
|
|
|
|