Update README.md
Browse files
README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
-
-
|
| 5 |
- edsr
|
| 6 |
-
-
|
| 7 |
- wind
|
| 8 |
- super-image
|
| 9 |
library_name: super-image
|
|
@@ -12,17 +12,17 @@ datasets:
|
|
| 12 |
- your-dataset-name
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# EDSR-
|
| 16 |
|
| 17 |
This model is a custom-trained version of the Enhanced Deep Super-Resolution (EDSR) model from the [`super-image`](https://github.com/eugenesiow/super-image) library.
|
| 18 |
-
It is adapted for
|
| 19 |
|
| 20 |
---
|
| 21 |
|
| 22 |
## 🧠 Model Architecture
|
| 23 |
|
| 24 |
- **Base**: EDSR ([Lim et al. 2017](https://arxiv.org/abs/1707.02921))
|
| 25 |
-
- **Input channels**: 2
|
| 26 |
- **Output channels**: 2
|
| 27 |
- **Feature channels (`n_feats`)**: 64
|
| 28 |
- **Residual blocks**: 32
|
|
@@ -51,7 +51,7 @@ import torch
|
|
| 51 |
# load config
|
| 52 |
config, _ = EdsrConfig.from_pretrained("lschmidt/edsr-dsc")
|
| 53 |
|
| 54 |
-
# load &
|
| 55 |
model = EdsrModel(config)
|
| 56 |
del model.sub_mean
|
| 57 |
del model.add_mean
|
|
@@ -61,9 +61,9 @@ state_dict_path = hf_hub_download(repo_id="lschmidt/edsr-dsc", filename="pytorch
|
|
| 61 |
state_dict = torch.load(state_dict_path, map_location="cpu")
|
| 62 |
model.load_state_dict(state_dict, strict=False)
|
| 63 |
|
| 64 |
-
#
|
| 65 |
-
inputs = torch.randn(1, 2, 64, 64) #
|
| 66 |
|
| 67 |
-
#
|
| 68 |
outputs = model(inputs)
|
| 69 |
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
+
- downscaling
|
| 5 |
- edsr
|
| 6 |
+
- ERA5 - COSMO-REA6
|
| 7 |
- wind
|
| 8 |
- super-image
|
| 9 |
library_name: super-image
|
|
|
|
| 12 |
- your-dataset-name
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# EDSR-DSC (4× Downscaling of Wind Velocities)
|
| 16 |
|
| 17 |
This model is a custom-trained version of the Enhanced Deep Super-Resolution (EDSR) model from the [`super-image`](https://github.com/eugenesiow/super-image) library.
|
| 18 |
+
It is adapted for downscaling of **2-channel ERA5 data** (e.g., wind u and v components), by a factor of 4× (trained using **COSMO-REA6** as high-resolution data).
|
| 19 |
|
| 20 |
---
|
| 21 |
|
| 22 |
## 🧠 Model Architecture
|
| 23 |
|
| 24 |
- **Base**: EDSR ([Lim et al. 2017](https://arxiv.org/abs/1707.02921))
|
| 25 |
+
- **Input channels**: 2 (U & V components of wind speed)
|
| 26 |
- **Output channels**: 2
|
| 27 |
- **Feature channels (`n_feats`)**: 64
|
| 28 |
- **Residual blocks**: 32
|
|
|
|
| 51 |
# load config
|
| 52 |
config, _ = EdsrConfig.from_pretrained("lschmidt/edsr-dsc")
|
| 53 |
|
| 54 |
+
# load model & remove normalization
|
| 55 |
model = EdsrModel(config)
|
| 56 |
del model.sub_mean
|
| 57 |
del model.add_mean
|
|
|
|
| 61 |
state_dict = torch.load(state_dict_path, map_location="cpu")
|
| 62 |
model.load_state_dict(state_dict, strict=False)
|
| 63 |
|
| 64 |
+
# sample input: must be a 4D tensor (B, C=2, H, W)
|
| 65 |
+
inputs = torch.randn(1, 2, 64, 64) # replace with coarse wind velocity fields
|
| 66 |
|
| 67 |
+
# prediction
|
| 68 |
outputs = model(inputs)
|
| 69 |
|