You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This repository contains the models and training scripts for reproducing the experiments presented in [add publication].**
6
+
**This repository contains the models and training scripts for reproducing the experiments presented in:**\
7
+
[A Sentinel-2 multi-year, multi-country benchmark dataset for crop classification and segmentation with deep learning](https://ieeexplore.ieee.org/document/9749916).
7
8
8
9
### Requirements
9
10
@@ -36,7 +37,6 @@ For OAD:
36
37
S4A-models\
37
38
L dataset\
38
39
L netcdf\
39
-
L annotations\
40
40
L oad\
41
41
L coco_files\
42
42
L logs\
@@ -47,18 +47,14 @@ S4A-models\
47
47
L mappings\
48
48
```
49
49
50
-
#### Annotations
50
+
#### COCO files
51
51
52
-
In the `dataset/annotations/` folder are the annotations required for exporting the COCO files.
52
+
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.
53
53
54
54
#### NetCDF4 files
55
55
56
56
In the `dataset/netcdf/` folder you should place the netCDF4 files.
57
57
58
-
#### COCO files
59
-
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
58
#### OAD files
63
59
64
60
In the `dataset/oad/` folder you should place the exported files containing the OAD statistics.
@@ -72,13 +68,13 @@ Every script inherits settings from the aforementioned files.
72
68
73
69
#### Essential scripts
74
70
75
-
-`coco_data_split.py`: Uses the nectCDF4 data and the annotations to produce three COCO files for training, validation and testing.
76
-
-`export_medians_multi.py`: Uses the netCDF4 data and the COCO files to compute the median image per month.
71
+
-`coco_data_split.py`: Uses the nectCDF4 data to produce three COCO files for training, validation and testing.
72
+
-`export_medians_multi.py`: Uses the netCDF4 data and the COCO files to compute the median image per month and export them to the disk.
77
73
-`compute_class_weights.py`: Computes the class weights based on the exported medians, to account for class imbalance.
78
74
-`object-based-csv.py`: Uses the netCDF4 data to compute the statistics required for OAD.
79
75
-`pad_experiments.py`: The main script for training/testing the PAD models.
80
76
-`oad_experiments.py`: The main script for training/testing the OAD models.
81
-
-`visualize_predictions.py`: Produces a visualization of the ground truth and the prediction of a given model for a given image.
77
+
-`visualize_predictions.py`: Produces a visualization of the ground truth and the prediction of a given model for a given image. Only relevant for PAD models.
82
78
83
79
#### Using the repo
84
80
@@ -95,7 +91,7 @@ Every script inherits settings from the aforementioned files.
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.
98
-
2. Optionally, run `visualize_predictions.py` to visualize the image, ground truth and prediction for a specific model and image.
94
+
2. Optionally, after training run `visualize_predictions.py` to visualize the image, ground truth and prediction for a specific model and image.
99
95
100
96
**For OAD:**
101
97
1. Run `oad_experiments.py` with the appropriate arguments. Example:
@@ -135,3 +131,18 @@ Scenario | Model | Acc. W. (%) | F1 W. (%) | Precision W. (%)
135
131
3 | LSTM | **60.60** | **63.96** | **70.55**
136
132
3 | Transformer | 51.21 | 56.71 | 67.76
137
133
3 | TempCNN | 52.32 | 57.38 | 68.35
134
+
135
+
### Citation
136
+
137
+
If you use our work, please cite:
138
+
139
+
```
140
+
@ARTICLE{
141
+
9749916,
142
+
author={Sykas, Dimitrios and Sdraka, Maria and Zografakis, Dimitrios and Papoutsis, Ioannis},
143
+
journal={IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing},
144
+
title={A Sentinel-2 multi-year, multi-country benchmark dataset for crop classification and segmentation with deep learning},
0 commit comments