File size: 2,479 Bytes
0cc5bf3
 
 
 
 
 
 
 
 
 
 
66f43ca
0cc5bf3
 
 
 
 
 
 
 
 
66f43ca
0cc5bf3
66f43ca
0cc5bf3
66f43ca
0cc5bf3
66f43ca
0cc5bf3
66f43ca
0cc5bf3
66f43ca
0cc5bf3
66f43ca
0cc5bf3
66f43ca
0cc5bf3
66f43ca
0cc5bf3
66f43ca
0cc5bf3
 
ef16512
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
language: en
license: mit
tags:
- precipitation
- convlstm
- multitask-learning
- climate
- vegetation
- amazon
model-index:
- name: MultiTask ConvLSTM w/veg inputs
  results:
  - task:
      type: time-series-forecasting
      name: Precipitation Prediction
    dataset:
      name: ERA5-Land Amazon Basin (2021–2023)
      type: reanalysis
    metrics:
    - type: mean_squared_error
      value: 0.28
    - type: spearman_correlation
      value: 0.87
    - type: pearson_correlation
      value: 0.79
    - type: kendall_tau
      value: 0.70
    - type: nash_sutcliffe_efficiency
      value: 0.62
    - type: f1
      value: 0.82
    - type: accuracy 
      value: 0.90
    - type: precision
      value: 0.90
    - type: ROC-AUC
      value: 0.97
    - type: recall
      value: 0.75
---

# MultiTask ConvLSTM for Precipitation Prediction

This repository contains two MultiTask ConvLSTM models:
- **veg/**: Model trained with vegetation input variables
- **noveg/**: Model trained without vegetation input variables

Both directories include:
- `convlstm.py`: base ConvLSTM layers
- `model.py`: MultiTask ConvLSTM model definition
- `example_inference.py`: inference script
- `data/`: example `.pth` files (test)

These scripts are provided for reproducibility of the model architecture and workflow. 
Exact runtime and performance may vary depending on hardware.

## Example Data

We provide a large test `.pth` files
so you can immediately run the inference script without preprocessing.
These files are already preprocessed and normalized from the ECWMF REA5 reanalysis data.

Each `.pth` file loads as a list of batches:

- `X_batch`: shape `(B, T_in, C_in, H*W)`  
- `y_batch`: shape `(B, T_out, C_out, H*W)`  
- `y_zero_batch`: shape `(B, T_out, C_out, H*W)`  

with `H=81`, `W=97`. Inside `evaluate(...)`, these are reshaped to `(B, T, C, H, W)`.

---

## How to Use

Ensure all files are in the correct directory then run the example_inference.py file.

# 1 Get the repo
git clone https://huggingface.co/<your-username>/MultiTaskConvLSTM
cd MultiTaskConvLSTM

# 2 Install minimal deps
pip install -r requirements.txt

# 3 Run inference (choose one variant)
python veg/example_inference.py
# or
python noveg/example_inference.py


## Citation If you use this model, please cite: > Lilly Horvath-Makkos (2025). [title] [journal] BibTeX:
bibtex
@article{horvathmakkos2025,
  title={Title},
  author={Horvath-Makkos, Lilly},
  journal={Journal},
  year={2025}
}