Skip to content

Commit 3768fad

Browse files
committed
Add results and folder structure to README
1 parent 5bfcdd5 commit 3768fad

1 file changed

Lines changed: 91 additions & 26 deletions

File tree

README.md

Lines changed: 91 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
## S4A Models Main Repository
2-
### Institute of Astronomy, Astrophysics, Space Applications and Remote Sensing (IAASARS)
3-
#### National Observatory of Athens (NOA)
1+
## S4A Models
2+
#### Institute of Astronomy, Astrophysics, Space Applications and Remote Sensing (IAASARS), National Observatory of Athens (NOA)
43

5-
Contributors: [Sykas D.](https://github.com/dimsyk), [Zografakis D.](https://github.com/dimzog), [Sdraka M.](https://github.com/paren8esis)
4+
**Contributors:** [Sykas D.](https://github.com/dimsyk), [Zografakis D.](https://github.com/dimzog), [Sdraka M.](https://github.com/paren8esis)
65

6+
**This repository contains the models and training scripts for reproducing the experiments presented in [add publication].**
77

8-
This repository contains the models and training scripts for reproducing the experiments presented in [add publication] .
9-
10-
#### Requirements
8+
### Requirements
119

1210
This repository was tested on:
1311
* Python 3.8
@@ -17,10 +15,58 @@ This repository was tested on:
1715

1816
Check `requirements.txt` for other essential modules.
1917

20-
#### Changing Defaults
18+
### Available models
19+
20+
For PAD:
21+
1. [ConvLSTM](https://papers.nips.cc/paper/2015/file/07563a3fe3bbe7e3ba84431ad9d055af-Paper.pdf)
22+
2. [ConvSTAR](https://www.sciencedirect.com/science/article/pii/S0034425721003230)
23+
3. [U-Net](https://link.springer.com/chapter/10.1007/978-3-319-24574-4_28)
24+
4. [TempCNN](https://www.mdpi.com/2072-4292/11/5/523)
25+
26+
For OAD:
27+
1. [TempCNN](https://www.mdpi.com/2072-4292/11/5/523)
28+
2. [LSTM](https://direct.mit.edu/neco/article-abstract/9/8/1735/6109/Long-Short-Term-Memory?redirectedFrom=fulltext)
29+
3. [Transformer](https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html)
30+
31+
### Instructions
32+
33+
#### Folder structure
34+
35+
```
36+
S4A-models\
37+
L dataset\
38+
L netcdf\
39+
L annotations\
40+
L oad\
41+
L coco_files\
42+
L logs\
43+
L medians
44+
L model\
45+
L utils\
46+
L settings\
47+
L mappings\
48+
```
49+
50+
#### Annotations
51+
52+
In the `dataset/annotations/` folder are the annotations required for exporting the COCO files.
53+
54+
#### NetCDF4 files
55+
56+
In the `dataset/netcdf/` folder you should place the netCDF4 files.
57+
58+
#### COCO files
2159

22-
* Configuration file `utils/settings/config.py`.
23-
* Custom Taxonomy Mapping at `utils/settings/mappings/mappings_{cat, fr}.py`.
60+
In the `coco_files/` folder are the COCO files required for training, validating and testing the models. Some proof-of-concept COCO files are also given (with the refix `poc_`) just for testing and playing around.
61+
62+
#### OAD files
63+
64+
In the `dataset/oad/` folder you should place the exported files containing the OAD statistics.
65+
66+
#### Configuration
67+
68+
* The main configuration file is `utils/settings/config.py`.
69+
* Custom Taxonomy Mapping is located at `utils/settings/mappings/mappings_{cat, fr}.py`.
2470

2571
Every script inherits settings from the aforementioned files.
2672

@@ -34,22 +80,9 @@ Every script inherits settings from the aforementioned files.
3480
- `oad_experiments.py`: The main script for training/testing the OAD models.
3581
- `visualize_predictions.py`: Produces a visualization of the ground truth and the prediction of a given model for a given image.
3682

37-
#### Available models
38-
39-
For PAD:
40-
1. [ConvLSTM](https://papers.nips.cc/paper/2015/file/07563a3fe3bbe7e3ba84431ad9d055af-Paper.pdf)
41-
2. [ConvSTAR](https://www.sciencedirect.com/science/article/pii/S0034425721003230)
42-
3. [U-Net](https://link.springer.com/chapter/10.1007/978-3-319-24574-4_28)
43-
4. [TempCNN](https://www.mdpi.com/2072-4292/11/5/523)
83+
#### Using the repo
4484

45-
For OAD:
46-
1. [TempCNN](https://www.mdpi.com/2072-4292/11/5/523)
47-
2. [LSTM](https://direct.mit.edu/neco/article-abstract/9/8/1735/6109/Long-Short-Term-Memory?redirectedFrom=fulltext)
48-
3. [Transformer](https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html)
49-
50-
#### Instructions
51-
52-
For PAD:
85+
**For PAD:**
5386
1. Run `export_medians_multi.py` to precompute the medians needed for training, validation and testing.
5487
2. Run `pad_experiments.py` with the appropriate arguments. Example:
5588
```
@@ -58,10 +91,42 @@ For PAD:
5891
The above command is for training the **ConvLSTM** model using the **weighted parcel loss** described in the associated publication. Training will continue for **10 epochs** with **batch size 32**, using the Sentinel-2 **bands Blue (B02), Green (B03), Red (B04) and NIR (B08)**. The **input image size is 61x61**, the **precomputed medians are used** to speed up training and all input data are **normalized**. The **window length is 12**, including all months. Please use the `--help` argument to find information on all available parameters.
5992
3. Optionally, run `visualize_predictions.py` to visualize the image, ground truth and prediction for a specific model and image.
6093

61-
For OAD:
94+
**For OAD:**
6295
1. Run `object-based-csv.py` to export the statistics needed for OAD.
6396
2. Run `oad_experiments.py` with the appropriate arguments. Example:
6497
```
6598
python oad_experiments.py --train --model transformer --prefix <run_prefix> --file <oad_file_name> --num_epochs 10 --batch_size 32 --num_workers 16 --num_gpus 1 --hidden_size 1024 --num_layers 3
6699
```
67100
The above command is for training the **Transformer** model. Training will continue for **10 epochs** with **batch size 32**, using given **file containing the OAD statistics**. The **hidden size is 1024** and **three layers** are used for the model. Please use the `--help` argument to find information on all available parameters.
101+
102+
### Reported results
103+
104+
The results reported on the given COCO files are presented in the following tables.
105+
106+
#### PAD
107+
108+
Scenario | Model | Acc. W. (%) | F1 W. (%) | Precision W. (%)
109+
--|---|---|---|--
110+
1 | U-Net | 93.70 | 82.61 | 86.64
111+
1 | ConvLSTM | **94.72** | **85.18** | **86.86**
112+
1 | ConvSTAR | 92.78 | 80.38 | 83.33
113+
2 | U-Net | **83.12** | **57.85** | **61.57**
114+
2 | ConvLSTM | 82.53 | 56.56 | 60.57
115+
2 | ConvSTAR | 79.52 | 52.15 | 58.98
116+
3 | U-Net | **72.11** | **43.54** | **68.42**
117+
3 | ConvLSTM | 69.86 | 40.47 | 66.17
118+
3 | ConvSTAR | 69.07 | 34.45 | 67.43
119+
120+
#### OAD
121+
122+
Scenario | Model | Acc. W. (%) | F1 W. (%) | Precision W. (%)
123+
--|---|---|---|--
124+
1 | LSTM | 88.52 | 88.03 | 87.85
125+
1 | Transformer | 88.36 | 88.10 | 87.90
126+
1 | TempCNN | **90.08** | **89.97** | **90.01**
127+
2 | LSTM | **91.55** | **91.34** | **91.31**
128+
2 | Transformer | 39.17 | 31.45 | 58.52
129+
2 | TempCNN | 36.90 | 30.14 | 60.71
130+
3 | LSTM | **60.60** | **63.96** | **70.55**
131+
3 | Transformer | 51.21 | 56.71 | 67.76
132+
3 | TempCNN | 52.32 | 57.38 | 68.35

0 commit comments

Comments
 (0)