-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_config.yaml
More file actions
136 lines (131 loc) · 3.19 KB
/
Copy pathexample_config.yaml
File metadata and controls
136 lines (131 loc) · 3.19 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
experiment_name: "Terramind V1 Base - No Perturbation"
data_version: "v0.50.1"
chip_tracker: "gelos_chip_tracker.geojson"
chip_id_column: "id"
seed_everything: 0
trainer:
accelerator: auto
strategy: auto
devices: auto
num_nodes: 1
callbacks: []
max_epochs: 0
data:
class_path: gelos.gelosdatamodule.GELOSDataModule
init_args:
dataset_class: tests.test_data.ExampleGELOSDataSet
batch_size: 1
num_workers: 0
bands:
S2L2A:
- blue
- green
- red
- nir08
- swir16
- swir22
S1RTC:
- VV
- VH
DEM:
- DEM
repeat_bands:
DEM: 4
transform:
- class_path: terratorch.datasets.transforms.FlattenTemporalIntoChannels
- class_path: albumentations.augmentations.geometric.resize.Resize
init_args:
height: 96
width: 96
interpolation: 0 # Nearest Neighbor
- class_path: albumentations.pytorch.transforms.ToTensorV2
- class_path: terratorch.datasets.transforms.UnflattenTemporalFromChannels
init_args:
n_timesteps: 4
model:
class_path: terratorch.tasks.EmbeddingGenerationTask
title: Terramind V1 Base
init_args:
model: terramind_v1_base
model_args:
modalities:
- S2L2A
- S1RTC
- DEM
merge_method: mean
pretrained: True
output_format: parquet
embed_file_key: filename
layers: [-1] # Model layers to extract embeddings from, -1 means the last layer
embedding_pooling: null
has_cls: False
temporal_cfg:
temporal_wrapper: True
temporal_pooling: keep
# each strategy defines extraction args (slice_args) and optional analysis steps (transforms, plots, models)
embedding_extraction_strategies:
# since terramind embeddings are nested lists, the first args dict gets all time steps, the second gets patch at idx 18 (center)
all_steps_middle_patch:
title: "All Steps of Middle Patch"
slice_args:
- start: 0
stop: null
step: 1
- start: 18
stop: 19
step: 1
transforms:
- type: tsne
- type: pca
params:
n_components: 2
- type: umap
plots:
- type: scatter_2d
transform: tsne
- type: temporal_cosine_similarity
transform: raw
params:
n_timesteps: 4
timestep_labels: ["Jan-Mar", "Apr-Jun", "Jul-Sep", "Oct-Dec"]
models:
- type: knn
transform: pca
params:
n_neighbors: 5
- type: linear_probe
transform: pca
all_patches_april_to_june:
title: "All Patches from April to June"
slice_args:
- start: 1
stop: 2
step: 1
transforms:
- type: tsne
plots:
- type: scatter_2d
transform: tsne
all_embeddings:
title: "All Embeddings"
slice_args:
- start: 0
stop: null
step:
transforms:
- type: pca
params:
n_components: 2
models:
- type: random_forest
transform: pca
params:
n_estimators: 50
style:
category_column: "lulc"
colors:
"1": "#419bdf" # Water
"2": "#397d49" # Trees
labels:
"1": "Water"
"2": "Trees"