Add configs_train folder
Browse files
configs_train/config_modalities.yaml
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
modalities:
|
| 2 |
+
|
| 3 |
+
inputs:
|
| 4 |
+
AERIAL_RGBI : True
|
| 5 |
+
AERIAL-RLT_PAN : False
|
| 6 |
+
DEM_ELEV : False
|
| 7 |
+
SPOT_RGBI : False
|
| 8 |
+
SENTINEL2_TS : True
|
| 9 |
+
SENTINEL1-ASC_TS : True
|
| 10 |
+
SENTINEL1-DESC_TS : True
|
| 11 |
+
|
| 12 |
+
inputs_channels:
|
| 13 |
+
AERIAL_RGBI : [4,1,2]
|
| 14 |
+
SPOT_RGBI :
|
| 15 |
+
SENTINEL2_TS : [1,2,3,4,5,6,7,8,9,10]
|
| 16 |
+
SENTINEL1-ASC_TS : [1,2]
|
| 17 |
+
SENTINEL1-DESC_TS : [1,2]
|
| 18 |
+
|
| 19 |
+
aux_loss:
|
| 20 |
+
AERIAL_RGBI : True
|
| 21 |
+
AERIAL-RLT_PAN : False
|
| 22 |
+
DEM_ELEV : False
|
| 23 |
+
SPOT_RGBI : False
|
| 24 |
+
SENTINEL2_TS : True
|
| 25 |
+
SENTINEL1-ASC_TS : True
|
| 26 |
+
SENTINEL1-DESC_TS : True
|
| 27 |
+
|
| 28 |
+
aux_loss_weight: 1 # multiplier before adding to main loss
|
| 29 |
+
|
| 30 |
+
modality_dropout: # between 0 (no dropout) and 1 (complete systematic dropout)
|
| 31 |
+
AERIAL_RGBI : 0
|
| 32 |
+
AERIAL-RLT_PAN : 0
|
| 33 |
+
DEM_ELEV : 0
|
| 34 |
+
SPOT_RGBI : 0
|
| 35 |
+
SENTINEL2_TS : 0
|
| 36 |
+
SENTINEL1-ASC_TS : 0
|
| 37 |
+
SENTINEL1-DESC_TS : 0
|
| 38 |
+
|
| 39 |
+
pre_processings:
|
| 40 |
+
filter_sentinel2: True
|
| 41 |
+
filter_sentinel2_max_cloud : 1 # [0-100]
|
| 42 |
+
filter_sentinel2_max_snow : 1 # [0-100]
|
| 43 |
+
filter_sentinel2_max_frac_cover : 0.05 # [0-1]
|
| 44 |
+
temporal_average_sentinel2 : False # possible : False, monthly, semi-monthly
|
| 45 |
+
temporal_average_sentinel1 : False
|
| 46 |
+
|
| 47 |
+
calc_elevation : True
|
| 48 |
+
calc_elevation_stack_dsm : True
|
| 49 |
+
|
| 50 |
+
use_augmentation: False
|
| 51 |
+
|
| 52 |
+
normalization:
|
| 53 |
+
norm_type : custom # possible : custom, scaling, without
|
| 54 |
+
|
| 55 |
+
AERIAL_RGBI_means : [106.59, 105.66, 111.35]
|
| 56 |
+
AERIAL_RGBI_stds : [39.78, 52.23, 45.62]
|
| 57 |
+
|
| 58 |
+
AERIAL-RLT_PAN_means : [125.92]
|
| 59 |
+
AERIAL-RLT_PAN_stds : [38.45]
|
| 60 |
+
|
| 61 |
+
SPOT_RGBI_means : [433.26, 508.75, 467.77, 1137.03]
|
| 62 |
+
SPOT_RGBI_stds : [312.76, 284.61, 226.02, 543.11]
|
| 63 |
+
|
| 64 |
+
DEM_ELEV_means : [311.06, 311.06] # use same for both DSM/DTM to allow keeping differences of elevation
|
| 65 |
+
DEM_ELEV_stds : [537.55, 537.55] # use same for both DSM/DTM to allow keeping differences of elevation
|
configs_train/config_models.yaml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
models:
|
| 2 |
+
|
| 3 |
+
monotemp_model: # encoder-decoder from SMP
|
| 4 |
+
|
| 5 |
+
arch: swin_base_patch4_window12_384-upernet
|
| 6 |
+
new_channels_init_mode: 'random'
|
| 7 |
+
|
| 8 |
+
multitemp_model:
|
| 9 |
+
|
| 10 |
+
ref_date: '05-15' # defined for whole dataset
|
| 11 |
+
encoder_widths: [64, 64, 64, 128] # last must be equivalent to decoder_widths
|
| 12 |
+
decoder_widths: [32, 32, 64, 128] # last must be equivalent to encoder_widths
|
| 13 |
+
out_conv: [32, 19]
|
| 14 |
+
str_conv_k: 3
|
| 15 |
+
str_conv_s: 1
|
| 16 |
+
str_conv_p: 1
|
| 17 |
+
agg_mode: "att_group"
|
| 18 |
+
encoder_norm: "group"
|
| 19 |
+
n_head: 16
|
| 20 |
+
d_model: 256
|
| 21 |
+
d_k: 4
|
| 22 |
+
pad_value: 0
|
| 23 |
+
padding_mode: "reflect"
|
configs_train/config_supervision.yaml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
labels:
|
| 2 |
+
- AERIAL_LABEL-COSIA
|
| 3 |
+
|
| 4 |
+
labels_configs:
|
| 5 |
+
AERIAL_LABEL-COSIA:
|
| 6 |
+
task_weight: 1
|
| 7 |
+
value_name:
|
| 8 |
+
0 : 'building'
|
| 9 |
+
1 : 'greenhouse'
|
| 10 |
+
2 : 'swimming_pool'
|
| 11 |
+
3 : 'impervious surface'
|
| 12 |
+
4 : 'pervious surface'
|
| 13 |
+
5 : 'bare soil'
|
| 14 |
+
6 : 'water'
|
| 15 |
+
7 : 'snow'
|
| 16 |
+
8 : 'herbaceous vegetation'
|
| 17 |
+
9 : 'agricultural land'
|
| 18 |
+
10 : 'plowed land'
|
| 19 |
+
11 : 'vineyard'
|
| 20 |
+
12 : 'deciduous'
|
| 21 |
+
13 : 'coniferous'
|
| 22 |
+
14 : 'brushwood'
|
| 23 |
+
15 : 'clear cut'
|
| 24 |
+
16 : 'ligneous'
|
| 25 |
+
17 : 'mixed'
|
| 26 |
+
18 : 'undefined'
|
| 27 |
+
value_weights:
|
| 28 |
+
default: 1
|
| 29 |
+
default_exceptions:
|
| 30 |
+
15: 0
|
| 31 |
+
16: 0
|
| 32 |
+
17: 0
|
| 33 |
+
18: 0
|
| 34 |
+
per_modality_exceptions:
|
| 35 |
+
AERIAL_RGBI:
|
| 36 |
+
SENTINEL2_TS:
|
| 37 |
+
SENTINEL1-ASC_TS:
|
| 38 |
+
SENTINEL1-DESC_TS:
|
| 39 |
+
|
configs_train/config_task.yaml
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SLURM
|
| 2 |
+
|
| 3 |
+
paths :
|
| 4 |
+
|
| 5 |
+
out_folder: '../'
|
| 6 |
+
out_model_name: 'FLAIR-HUB_LC-F_swinbase-upernet'
|
| 7 |
+
|
| 8 |
+
train_csv: '../TRAIN_FLAIR-INC.csv'
|
| 9 |
+
val_csv: '../VALID_FLAIR-INC.csv'
|
| 10 |
+
test_csv: '../TEST_FLAIR-INC.csv'
|
| 11 |
+
global_mtd_folder: '../GLOBAL_ALL_MTD/'
|
| 12 |
+
ckpt_model_path: ''
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
tasks:
|
| 16 |
+
|
| 17 |
+
train: True
|
| 18 |
+
train_tasks:
|
| 19 |
+
init_weights_only_from_ckpt: False
|
| 20 |
+
resume_training_from_ckpt: False
|
| 21 |
+
|
| 22 |
+
predict: True
|
| 23 |
+
write_files: False
|
| 24 |
+
georeferencing_output: False
|
| 25 |
+
|
| 26 |
+
metrics_only: False
|
| 27 |
+
|
| 28 |
+
hyperparams:
|
| 29 |
+
|
| 30 |
+
num_epochs: 150
|
| 31 |
+
batch_size: 5
|
| 32 |
+
seed: 2025
|
| 33 |
+
learning_rate: 0.00005
|
| 34 |
+
|
| 35 |
+
optimizer: adamw #sgd, adam, adamw
|
| 36 |
+
optim_weight_decay: 0.01
|
| 37 |
+
optim_betas: [0.9, 0.999]
|
| 38 |
+
|
| 39 |
+
scheduler: one_cycle_lr # [one_cycle_lr, reduce_on_plateau, cycle_then_plateau]
|
| 40 |
+
warmup_fraction: 0.2 #if using one_cycle_lr. [0-1]
|
| 41 |
+
plateau_patience: 5
|
| 42 |
+
|
| 43 |
+
hardware:
|
| 44 |
+
accelerator: 'gpu'
|
| 45 |
+
num_nodes: 6
|
| 46 |
+
gpus_per_node: 4
|
| 47 |
+
strategy: 'ddp_find_unused_parameters_true'
|
| 48 |
+
num_workers: 10
|
| 49 |
+
|
| 50 |
+
saving:
|
| 51 |
+
ckpt_save_also_last: True
|
| 52 |
+
ckpt_weights_only: False
|
| 53 |
+
ckpt_monitor: 'val_miou'
|
| 54 |
+
ckpt_monitor_mode: 'max'
|
| 55 |
+
ckpt_earlystopping_patience: 20
|
| 56 |
+
cp_csv_and_conf_to_output: True
|
| 57 |
+
enable_progress_bar: True
|
| 58 |
+
progress_rate: 10
|
| 59 |
+
|
| 60 |
+
ckpt_verbose: True
|
| 61 |
+
verbose_config: False
|