metnet
PyTorch Implementation of Google Research's MetNet and MetNet-2
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
PyTorch Implementation of Google Research's MetNet and MetNet-2
Basic Info
Statistics
- Stars: 271
- Watchers: 5
- Forks: 53
- Open Issues: 34
- Releases: 43
Topics
Metadata Files
README.md
MetNet and MetNet-2
<!-- ALL-CONTRIBUTORS-BADGE:END -->
PyTorch Implementation of Google Research's MetNet for short term weather forecasting (https://arxiv.org/abs/2003.12140), inspired from https://github.com/tcapelle/metnetpytorch/tree/master/metnetpytorch
MetNet-2 (https://arxiv.org/pdf/2111.07470.pdf) is a further extension of MetNet that takes in a larger context image to predict up to 12 hours ahead, and is also implemented in PyTorch here.
Installation
Clone the repository, then run
shell
pip install -r requirements.txt
pip install -e .
`
Alternatively, you can also install a usually older version through pip install metnet
Please ensure that you're using Python version 3.9 or above.
Data
While the exact training data used for both MetNet and MetNet-2 haven't been released, the papers do go into some detail as to the inputs, which were GOES-16 and MRMS precipitation data, as well as the time period covered. We will be making those splits available, as well as a larger dataset that covers a longer time period, with HuggingFace Datasets! Note: The dataset is not available yet, we are still processing data!
```python from datasets import load_dataset
dataset = load_dataset("openclimatefix/goes-mrms") ```
This uses the publicly avaiilable GOES-16 data and the MRMS archive to create a similar set of data to train and test on, with various other splits available as well.
Pretrained Weights
Pretrained model weights for MetNet and MetNet-2 have not been publicly released, and there is some difficulty in reproducing their training. We release weights for both MetNet and MetNet-2 trained on cloud mask and satellite imagery data with the same parameters as detailed in the papers on HuggingFace Hub for MetNet and MetNet-2. These weights can be downloaded and used using:
python
from metnet import MetNet, MetNet2
model = MetNet().from_pretrained("openclimatefix/metnet")
model = MetNet2().from_pretrained("openclimatefix/metnet-2")
Example Usage
MetNet can be used with:
```python from metnet import MetNet import torch import torch.nn.functional as F
model = MetNet( hiddendim=32, forecaststeps=24, inputchannels=16, outputchannels=12, satchannels=12, inputsize=32, )
MetNet expects original HxW to be 4x the input size
x = torch.randn((2, 12, 16, 128, 128)) out = [] for leadtime in range(24): out.append(model(x, leadtime)) out = torch.stack(out, dim=1)
MetNet creates predictions for the center 1/4th
y = torch.randn((2, 24, 12, 8, 8)) F.mse_loss(out, y).backward() ```
And MetNet-2 with:
```python from metnet import MetNet2 import torch import torch.nn.functional as F
model = MetNet2( forecaststeps=8, inputsize=64, numinputtimesteps=6, upsamplerchannels=128, lstmchannels=32, encoderchannels=64, centercrop_size=16, )
MetNet expects original HxW to be 4x the input size
x = torch.randn((2, 6, 12, 256, 256)) out = [] for leadtime in range(8): out.append(model(x, leadtime)) out = torch.stack(out, dim=1) y = torch.rand((2,8,12,64,64)) F.mse_loss(out, y).backward() ```
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Jacob Bieker 💻 |
Jack Kelly 💻 |
Valter Fallenius 📓 |
terigenbuaa 💬 |
Kan.Dai 💬 |
Sailesh Bechar 💬 |
Rahul Maurya ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!
Owner
- Name: Open Climate Fix
- Login: openclimatefix
- Kind: organization
- Email: info@openclimatefix.org
- Location: London
- Website: openclimatefix.org
- Twitter: openclimatefix
- Repositories: 88
- Profile: https://github.com/openclimatefix
Using open science to mitigate climate change
GitHub Events
Total
- Create event: 1
- Release event: 1
- Issues event: 2
- Watch event: 34
- Issue comment event: 18
- Push event: 47
- Pull request event: 1
- Pull request review event: 3
- Pull request review comment event: 11
- Fork event: 5
Last Year
- Create event: 1
- Release event: 1
- Issues event: 2
- Watch event: 34
- Issue comment event: 18
- Push event: 47
- Pull request event: 1
- Pull request review event: 3
- Pull request review comment event: 11
- Fork event: 5
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jacob Bieker | j****b@b****h | 78 |
| BumpVersion Action | b****n@g****s | 37 |
| Raahul Singh | r****2@g****m | 19 |
| allcontributors[bot] | 4****] | 14 |
| pre-commit-ci[bot] | 6****] | 13 |
| peterdudfield | p****d@h****m | 2 |
| Rahul Maurya | 9****b | 1 |
| Jack Kelly | j****k@O****g | 1 |
| Database Missing no1 | 9****e | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 34
- Total pull requests: 31
- Average time to close issues: 2 months
- Average time to close pull requests: 25 days
- Total issue authors: 20
- Total pull request authors: 9
- Average comments per issue: 2.97
- Average comments per pull request: 1.48
- Merged pull requests: 26
- Bot issues: 0
- Bot pull requests: 12
Past Year
- Issues: 4
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 3 days
- Issue authors: 4
- Pull request authors: 1
- Average comments per issue: 0.75
- Average comments per pull request: 11.5
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jacobbieker (10)
- ValterFallenius (4)
- peterdudfield (2)
- JackKelly (2)
- ShileiCao (1)
- CUITCHENSIYU (1)
- codeastra2 (1)
- NMC-DAVE (1)
- terigenbuaa (1)
- Nagessen (1)
- lucasbs97 (1)
- Raahul-Singh (1)
- jramosss (1)
- SaileshBechar (1)
- dsuhoi (1)
Pull Request Authors
- jacobbieker (11)
- allcontributors[bot] (7)
- pre-commit-ci[bot] (4)
- Averagenormaljoe (2)
- rahul-maurya11b (2)
- ValterFallenius (1)
- peterdudfield (1)
- JackKelly (1)
- Raahul-Singh (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 338 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 2
(may contain duplicates) - Total versions: 86
- Total maintainers: 2
proxy.golang.org: github.com/openclimatefix/metnet
- Documentation: https://pkg.go.dev/github.com/openclimatefix/metnet#section-documentation
- License: mit
-
Latest release: v4.1.18+incompatible
published about 1 year ago
Rankings
pypi.org: metnet
PyTorch MetNet Implementation
- Homepage: https://github.com/openclimatefix/metnet
- Documentation: https://metnet.readthedocs.io/
- License: MIT License
-
Latest release: 4.1.18
published about 1 year ago
Rankings
Maintainers (2)
Dependencies
- antialiased_cnns *
- axial_attention *
- einops >=0.3.0
- huggingface_hub *
- numpy >=1.19.5
- pytorch_msssim *
- torchvision >=0.10.0