James Fulton
commited on
Commit
·
c95bf49
1
Parent(s):
76a1440
add IAM4VP model
Browse files- README.md +44 -12
- iam4vp/README.md +38 -0
- iam4vp/iam4vp_checkpoint_0.4.3.ckpt +3 -0
README.md
CHANGED
|
@@ -9,12 +9,12 @@ library_name: pytorch
|
|
| 9 |
|
| 10 |
## Model Description
|
| 11 |
|
| 12 |
-
These models are trained to predict future frames of satellite data from past frames. The model uses
|
| 13 |
-
of recent satellite imagery at 15 minute intervals and predicts 3 hours into the future also
|
| 14 |
-
15 minute intervals. The satellite inputs and predictions are multispectral with 11 channels.
|
| 15 |
|
| 16 |
|
| 17 |
-
See [1] for the repo used to train
|
| 18 |
|
| 19 |
- **Developed by:** Open Climate Fix and the Alan Turing Institute
|
| 20 |
- **License:** mit
|
|
@@ -27,7 +27,7 @@ See [1] for the repo used to train the model.
|
|
| 27 |
This was trained on EUMETSAT satellite imagery derived from the data stored in [this google public
|
| 28 |
dataset](https://console.cloud.google.com/marketplace/product/bigquery-public-data/eumetsat-seviri-rss?hl=en-GB&inv=1&invt=AbniZA&project=solar-pv-nowcasting&pli=1).
|
| 29 |
|
| 30 |
-
The data was processed using the protocol in [
|
| 31 |
|
| 32 |
|
| 33 |
## Results
|
|
@@ -37,7 +37,10 @@ See the READMEs in each model dir for links to the wandb training runs
|
|
| 37 |
|
| 38 |
## Usage
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
```{python}
|
| 43 |
import hydra
|
|
@@ -47,8 +50,8 @@ from safetensors.torch import load_model
|
|
| 47 |
|
| 48 |
|
| 49 |
REPO_ID = "openclimatefix/cloudcasting_example_models"
|
| 50 |
-
REVISION = <commit-id>
|
| 51 |
-
MODEL = "simvp_model"
|
| 52 |
|
| 53 |
# Download the model checkpoints
|
| 54 |
hf_download_dir = snapshot_download(
|
|
@@ -57,18 +60,47 @@ hf_download_dir = snapshot_download(
|
|
| 57 |
)
|
| 58 |
|
| 59 |
# Create the model object
|
| 60 |
-
with open(f"{hf_download_dir}/model_config.yaml", "r", encoding="utf-8") as f:
|
| 61 |
model = hydra.utils.instantiate(yaml.safe_load(f))
|
| 62 |
|
| 63 |
# Load the model weights
|
| 64 |
load_model(
|
| 65 |
model,
|
| 66 |
-
filename=f"{hf_download_dir}/model.safetensors",
|
| 67 |
strict=True,
|
| 68 |
)
|
| 69 |
```
|
| 70 |
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
- [1] https://github.com/openclimatefix/sat_pred
|
| 74 |
-
- [2] https://github.com/alan-turing-institute/
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
## Model Description
|
| 11 |
|
| 12 |
+
These models are trained to predict future frames of satellite data from past frames. The model uses
|
| 13 |
+
3 hours of recent satellite imagery at 15 minute intervals and predicts 3 hours into the future also
|
| 14 |
+
at 15 minute intervals. The satellite inputs and predictions are multispectral with 11 channels.
|
| 15 |
|
| 16 |
|
| 17 |
+
See [1] and [2] for the repo used to train these model.
|
| 18 |
|
| 19 |
- **Developed by:** Open Climate Fix and the Alan Turing Institute
|
| 20 |
- **License:** mit
|
|
|
|
| 27 |
This was trained on EUMETSAT satellite imagery derived from the data stored in [this google public
|
| 28 |
dataset](https://console.cloud.google.com/marketplace/product/bigquery-public-data/eumetsat-seviri-rss?hl=en-GB&inv=1&invt=AbniZA&project=solar-pv-nowcasting&pli=1).
|
| 29 |
|
| 30 |
+
The data was processed using the protocol in [3]
|
| 31 |
|
| 32 |
|
| 33 |
## Results
|
|
|
|
| 37 |
|
| 38 |
## Usage
|
| 39 |
|
| 40 |
+
The models in this repo have slightly different requirements. The SimVP and eartherformer models
|
| 41 |
+
require [1] to be installed and the IAM4VP model requires [2].
|
| 42 |
+
|
| 43 |
+
The SimVP and earthfomer models can be loaded like:
|
| 44 |
|
| 45 |
```{python}
|
| 46 |
import hydra
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
REPO_ID = "openclimatefix/cloudcasting_example_models"
|
| 53 |
+
REVISION = None # None for latest or set <commit-id>
|
| 54 |
+
MODEL = "simvp_model" # simvp_model or earthformer_model
|
| 55 |
|
| 56 |
# Download the model checkpoints
|
| 57 |
hf_download_dir = snapshot_download(
|
|
|
|
| 60 |
)
|
| 61 |
|
| 62 |
# Create the model object
|
| 63 |
+
with open(f"{hf_download_dir}/{MODEL}/model_config.yaml", "r", encoding="utf-8") as f:
|
| 64 |
model = hydra.utils.instantiate(yaml.safe_load(f))
|
| 65 |
|
| 66 |
# Load the model weights
|
| 67 |
load_model(
|
| 68 |
model,
|
| 69 |
+
filename=f"{hf_download_dir}/{MODEL}/model.safetensors",
|
| 70 |
strict=True,
|
| 71 |
)
|
| 72 |
```
|
| 73 |
|
| 74 |
+
The IAM4VP model can be loaded like
|
| 75 |
+
|
| 76 |
+
```
|
| 77 |
+
from huggingface_hub import snapshot_download
|
| 78 |
+
from ocf_iam4vp import IAM4VPLightning
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
REPO_ID = "openclimatefix/cloudcasting_example_models"
|
| 82 |
+
REVISION = None # None for latest or set <commit-id>
|
| 83 |
+
|
| 84 |
+
# Download the model checkpoints
|
| 85 |
+
hf_download_dir = snapshot_download(
|
| 86 |
+
repo_id=REPO_ID,
|
| 87 |
+
revision=REVISION,
|
| 88 |
+
)
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
model = IAM4VPLightning.load_from_checkpoint(
|
| 92 |
+
f"{hf_download_dir}/iam4vp/iam4vp_checkpoint_0.4.3.ckpt",
|
| 93 |
+
num_forecast_steps=12,
|
| 94 |
+
).model
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
See the cloudcasting package [3]
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
### Packages
|
| 102 |
|
| 103 |
- [1] https://github.com/openclimatefix/sat_pred
|
| 104 |
+
- [2] https://github.com/alan-turing-institute/ocf-iam4vp
|
| 105 |
+
- [3] https://github.com/alan-turing-institute/cloudcasting
|
| 106 |
+
|
iam4vp/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: mit
|
| 4 |
+
library_name: pytorch
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
# Cloudcasting
|
| 9 |
+
|
| 10 |
+
## Model Description
|
| 11 |
+
|
| 12 |
+
<!-- Provide a longer summary of what this model is/does. -->
|
| 13 |
+
This model is trained to predict future frames of satellite data from past frames. It takes 3 hours
|
| 14 |
+
of recent satellkite imagery at 15 minute intervals and predicts 3 hours into the future also at
|
| 15 |
+
15 minute intervals. The satellite inputs and predictions are multispectral with 11 channels.
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
See [1] for the repo used to train the model.
|
| 19 |
+
|
| 20 |
+
- **Developed by:** Open Climate Fix and the Alan Turing Institute
|
| 21 |
+
- **License:** mit
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
# Training Details
|
| 25 |
+
|
| 26 |
+
## Data
|
| 27 |
+
|
| 28 |
+
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 29 |
+
This was trained on EUMETSAT satellite imagery derived from the data stored in [this google public
|
| 30 |
+
dataset](https://console.cloud.google.com/marketplace/product/bigquery-public-data/eumetsat-seviri-rss?hl=en-GB&inv=1&invt=AbniZA&project=solar-pv-nowcasting&pli=1).
|
| 31 |
+
|
| 32 |
+
The data was processed using the protocol in [2]
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
### Software
|
| 36 |
+
|
| 37 |
+
- [1] https://github.com/alan-turing-institute/ocf-iam4vp
|
| 38 |
+
- [2] https://github.com/alan-turing-institute/cloudcasting
|
iam4vp/iam4vp_checkpoint_0.4.3.ckpt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:511d803cf6907bb041de85ffdf02b44a2ab201bb3c7254fc5966d9820557dd9b
|
| 3 |
+
size 24569644
|