lschmidt commited on
Commit
cafd2d6
·
verified ·
1 Parent(s): 835483f

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -0
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - image-super-resolution
5
+ - climate
6
+ - wind-power
7
+ - torch
8
+ - rcan
9
+ library_name: super-image
10
+ inference: false
11
+ ---
12
+
13
+ # RCAN-DSC: Residual Channel Attention Network for Downscaling Wind Fields
14
+
15
+ This model is a modified version of [RCAN](https://arxiv.org/abs/1807.02758), originally designed for image super-resolution, adapted for use in **climate downscaling** tasks. Specifically, it is configured to process **2-channel input data** representing wind vector components (u, v) at low spatial resolution and produce higher-resolution output fields.
16
+
17
+ ## 🧠 Model Description
18
+
19
+ - Based on the original RCAN architecture from `super-image`.
20
+ - `sub_mean` and `add_mean` normalization layers have been **removed**, as normalization of physical variables differs from image RGB workflows.
21
+ - Supports **multi-channel inputs**, currently set up for **2-channel wind fields**.
22
+ - Custom head and tail layers allow flexible channel dimensions and upscaling factors (e.g., ×2, ×4).
23
+ - Optional partial weight loading from pretrained RCAN (trained on DIV2K) to initialize the main body.
24
+
25
+ ## 🛰️ Intended Use
26
+
27
+ This model is intended for:
28
+ - **Super-resolution of wind fields** in climate modeling applications.
29
+ - **Downscaling wind speed or wind power-related variables** from coarse-resolution reanalysis or GCM output.
30
+ - Research on generalizing deep learning architectures to geoscience and Earth system science domains.
31
+
32
+ ## 🧪 Example
33
+
34
+ ```python
35
+ import torch
36
+ from custom_rcan import RcanModelM # Replace with your actual module
37
+ from huggingface_hub import hf_hub_download
38
+
39
+ # Load model
40
+ model = RcanModelM(in_channels=2, scaling_factor=4)
41
+ state_dict = torch.load(hf_hub_download(repo_id="your-username/rcan-dsc", filename="pytorch_model_4x.pt"))
42
+ model.load_state_dict(state_dict, strict=False)
43
+
44
+ # Dummy input: shape (B, C=2, H, W)
45
+ x = torch.randn(1, 2, 64, 64)
46
+ y = model(x)
47
+ print(y.shape) # (1, 2, 256, 256) for scale=4