lschmidt commited on
Commit
57a3f37
·
verified ·
1 Parent(s): c927594

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +44 -0
  2. config.json +11 -0
  3. edsr_dsc_weather_4x.pt +3 -0
README.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EDSR-SR-DSC (4× Super-Resolution for Wind Data)
2
+
3
+ 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. 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×.
4
+
5
+ ---
6
+
7
+ ## 🧠 Model Architecture
8
+
9
+ - **Base**: EDSR ([Lim et al. 2017](https://arxiv.org/abs/1707.02921))
10
+ - **Input channels**: 2 (not RGB)
11
+ - **Output channels**: 2
12
+ - **Feature channels (`n_feats`)**: 64
13
+ - **Residual blocks**: 32
14
+ - **Upsampling**: Enabled
15
+ - **Scale factor**: 4×
16
+
17
+ Mean-shift normalization layers were removed (`sub_mean`, `add_mean`), as the model was trained on standardized wind data.
18
+
19
+ ---
20
+
21
+ ## 📦 Files in this Repository
22
+
23
+ | File | Description |
24
+ |------------------------|-----------------------------------------------|
25
+ | `config.json` | Configuration compatible with `super-image` |
26
+ | `pytorch_model_4x.pt` | Pretrained model weights (4× model) |
27
+
28
+ ---
29
+
30
+ ## 🚀 How to Use
31
+
32
+ ```python
33
+ from super_image import EdsrModel, ImageLoader
34
+ import torch
35
+
36
+ # Load model
37
+ model = EdsrModel.from_pretrained("lschmidt/edsr-sr-dsc", scale=4)
38
+
39
+ # Load a 2-channel tensor (e.g., from a NetCDF or preprocessed image)
40
+ # Example assumes shape (1, 2, H, W)
41
+ inputs = torch.randn(1, 2, 64, 64) # replace with your real data
42
+
43
+ # Super-resolve
44
+ outputs = model(inputs)
config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "EDSR",
3
+ "n_colors": 2,
4
+ "n_feats": 64,
5
+ "n_resblocks": 32,
6
+ "no_upsampling": false,
7
+ "res_scale": 1,
8
+ "rgb_range": 255,
9
+ "scale": 4
10
+ }
11
+
edsr_dsc_weather_4x.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60a0798fdd2b001ce82b3065b25e08d8179b346e96cef287c2129107cdb28d51
3
+ size 6093322