Update README.md
Browse files
README.md
CHANGED
|
@@ -14,43 +14,45 @@ datasets:
|
|
| 14 |
|
| 15 |
# EDSR-SR-DSC (4× Super-Resolution for Wind Data)
|
| 16 |
|
| 17 |
-
This model is a custom-trained version of the Enhanced Deep Super-Resolution (EDSR) model from the `super-image`
|
|
|
|
| 18 |
|
|
|
|
| 19 |
|
| 20 |
## 🧠Model Architecture
|
| 21 |
|
| 22 |
- **Base**: EDSR ([Lim et al. 2017](https://arxiv.org/abs/1707.02921))
|
| 23 |
-
- **Input channels**: 2
|
| 24 |
-
- **Output channels**: 2
|
| 25 |
-
- **Feature channels (`n_feats`)**: 64
|
| 26 |
-
- **Residual blocks**: 32
|
| 27 |
-
- **
|
|
|
|
| 28 |
- **Scale factor**: 4×
|
| 29 |
|
| 30 |
-
|
| 31 |
---
|
| 32 |
|
| 33 |
## 📦 Files in this Repository
|
| 34 |
|
| 35 |
| File | Description |
|
| 36 |
|------------------------|-----------------------------------------------|
|
| 37 |
-
| `config.json` | Configuration
|
| 38 |
-
| `pytorch_model_4x.pt` | Pretrained
|
| 39 |
|
| 40 |
---
|
| 41 |
|
| 42 |
## 🚀 How to Use
|
| 43 |
|
| 44 |
```python
|
| 45 |
-
from super_image import EdsrModel
|
| 46 |
import torch
|
| 47 |
|
| 48 |
-
# Load model
|
| 49 |
model = EdsrModel.from_pretrained("lschmidt/edsr-dsc", scale=4)
|
| 50 |
|
| 51 |
-
#
|
| 52 |
-
|
| 53 |
-
inputs = torch.randn(1, 2, 64, 64) # replace with your real data
|
| 54 |
|
| 55 |
-
#
|
| 56 |
outputs = model(inputs)
|
|
|
|
|
|
| 14 |
|
| 15 |
# EDSR-SR-DSC (4× Super-Resolution for Wind Data)
|
| 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 super-resolution of **2-channel weather data** (e.g., wind u and v components), upscaling coarse-resolution wind fields by a factor of 4×.
|
| 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
|
| 29 |
+
- **Mean-shift normalization**: Removed
|
| 30 |
+
- **Upsampling**: Enabled
|
| 31 |
- **Scale factor**: 4×
|
| 32 |
|
|
|
|
| 33 |
---
|
| 34 |
|
| 35 |
## 📦 Files in this Repository
|
| 36 |
|
| 37 |
| File | Description |
|
| 38 |
|------------------------|-----------------------------------------------|
|
| 39 |
+
| `config.json` | Configuration for the modified EDSR model |
|
| 40 |
+
| `pytorch_model_4x.pt` | Pretrained weights for 4× upscaling |
|
| 41 |
|
| 42 |
---
|
| 43 |
|
| 44 |
## 🚀 How to Use
|
| 45 |
|
| 46 |
```python
|
| 47 |
+
from super_image import EdsrModel
|
| 48 |
import torch
|
| 49 |
|
| 50 |
+
# Load model and weights directly from Hugging Face Hub
|
| 51 |
model = EdsrModel.from_pretrained("lschmidt/edsr-dsc", scale=4)
|
| 52 |
|
| 53 |
+
# Prepare input: must be a 4D tensor (B, C=2, H, W)
|
| 54 |
+
inputs = torch.randn(1, 2, 64, 64) # Replace with actual wind field data
|
|
|
|
| 55 |
|
| 56 |
+
# Forward pass
|
| 57 |
outputs = model(inputs)
|
| 58 |
+
|