Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions data/helios/togo_2020/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"layers": {
"label": {
"type": "vector"
},
"sentinel1_ascending": {
"band_sets": [
{
"bands": [
"vv",
"vh"
],
"dtype": "float32"
}
],
"data_source": {
"cache_dir": "cache/planetary_computer",
"duration": "366d",
"ingest": false,
"name": "rslp.satlas.data_sources.MonthlySentinel1",
"query": {
"sar:instrument_mode": {
"eq": "IW"
},
"sar:polarizations": {
"eq": [
"VV",
"VH"
]
},
"sat:orbit_state": {
"eq": "ascending"
}
},
"query_config": {
"max_matches": 12
},
"time_offset": "-180d"
},
"type": "raster"
},
"sentinel1_descending": {
"band_sets": [
{
"bands": [
"vv",
"vh"
],
"dtype": "float32"
}
],
"data_source": {
"cache_dir": "cache/planetary_computer",
"duration": "366d",
"ingest": false,
"name": "rslp.satlas.data_sources.MonthlySentinel1",
"query": {
"sar:instrument_mode": {
"eq": "IW"
},
"sar:polarizations": {
"eq": [
"VV",
"VH"
]
},
"sat:orbit_state": {
"eq": "descending"
}
},
"query_config": {
"max_matches": 12
},
"time_offset": "-180d"
},
"type": "raster"
},
"sentinel2": {
"band_sets": [
{
"bands": [
"B02",
"B03",
"B04",
"B08"
],
"dtype": "uint16"
},
{
"bands": [
"B05",
"B06",
"B07",
"B8A",
"B11",
"B12"
],
"dtype": "uint16",
"zoom_offset": -1
},
{
"bands": [
"B01",
"B09"
],
"dtype": "uint16",
"zoom_offset": -2
}
],
"data_source": {
"cache_dir": "cache/planetary_computer",
"duration": "366d",
"harmonize": true,
"ingest": false,
"max_cloud_cover": 50,
"name": "rslp.satlas.data_sources.MonthlyAzureSentinel2",
"query_config": {
"max_matches": 12
},
"sort_by": "eo:cloud_cover",
"time_offset": "-180d"
},
"type": "raster"
}
}
}
271 changes: 271 additions & 0 deletions data/helios/togo_2020/finetune_12_months.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
model:
class_path: rslearn.train.lightning_module.RslearnLightningModule
init_args:
model:
class_path: rslearn.models.multitask.MultiTaskModel
init_args:
encoder:
- class_path: rslp.helios.model.Helios
init_args:
checkpoint_path: "{CHECKPOINT_PATH}"
selector: ["encoder"]
forward_kwargs:
patch_size: {PATCH_SIZE}
decoders:
crop_type_classification:
- class_path: rslearn.models.pooling_decoder.PoolingDecoder
init_args:
in_channels: {ENCODER_EMBEDDING_SIZE}
out_channels: 2
- class_path: rslearn.train.tasks.classification.ClassificationHead
lr: 0.0001
plateau: true
plateau_factor: 0.2
plateau_patience: 2
plateau_min_lr: 0
plateau_cooldown: 10
data:
class_path: rslearn.train.data_module.RslearnDataModule
init_args:
path: weka://dfive-default/rslearn-eai/datasets/crop/togo_2020/20250701
inputs:
sentinel2_0:
data_type: "raster"
layers: ["sentinel2"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_1:
data_type: "raster"
layers: ["sentinel2.1"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_2:
data_type: "raster"
layers: ["sentinel2.2"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_3:
data_type: "raster"
layers: ["sentinel2.3"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_4:
data_type: "raster"
layers: ["sentinel2.4"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_5:
data_type: "raster"
layers: ["sentinel2.5"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_6:
data_type: "raster"
layers: ["sentinel2.6"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_7:
data_type: "raster"
layers: ["sentinel2.7"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_8:
data_type: "raster"
layers: ["sentinel2.8"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_9:
data_type: "raster"
layers: ["sentinel2.9"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_10:
data_type: "raster"
layers: ["sentinel2.10"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel2_11:
data_type: "raster"
layers: ["sentinel2.11"]
bands: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
passthrough: true
dtype: FLOAT32
sentinel1_0:
data_type: "raster"
layers: ["sentinel1_ascending"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_1:
data_type: "raster"
layers: ["sentinel1_ascending.1"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_2:
data_type: "raster"
layers: ["sentinel1_ascending.2"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_3:
data_type: "raster"
layers: ["sentinel1_ascending.3"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_4:
data_type: "raster"
layers: ["sentinel1_ascending.4"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_5:
data_type: "raster"
layers: ["sentinel1_ascending.5"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_6:
data_type: "raster"
layers: ["sentinel1_ascending.6"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_7:
data_type: "raster"
layers: ["sentinel1_ascending.7"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_8:
data_type: "raster"
layers: ["sentinel1_ascending.8"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_9:
data_type: "raster"
layers: ["sentinel1_ascending.9"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_10:
data_type: "raster"
layers: ["sentinel1_ascending.10"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
sentinel1_11:
data_type: "raster"
layers: ["sentinel1_ascending.11"]
bands: ["vv", "vh"]
passthrough: true
dtype: FLOAT32
label:
data_type: "vector"
layers: ["label"]
is_target: true
task:
class_path: rslearn.train.tasks.multi_task.MultiTask
init_args:
tasks:
crop_type_classification:
class_path: rslearn.train.tasks.classification.ClassificationTask
init_args:
property_name: "category"
classes: [1, 0]
enable_f1_metric: true
metric_kwargs:
average: "micro"
input_mapping:
crop_type_classification:
label: "targets"
batch_size: 8
num_workers: 32
default_config:
transforms:
- class_path: rslearn.train.transforms.concatenate.Concatenate
init_args:
selections:
sentinel2_0: []
sentinel2_1: []
sentinel2_2: []
sentinel2_3: []
sentinel2_4: []
sentinel2_5: []
sentinel2_6: []
sentinel2_7: []
sentinel2_8: []
sentinel2_9: []
sentinel2_10: []
sentinel2_11: []
output_selector: sentinel2_l2a
- class_path: rslearn.train.transforms.concatenate.Concatenate
init_args:
selections:
sentinel1_0: []
sentinel1_1: []
sentinel1_2: []
sentinel1_3: []
sentinel1_4: []
sentinel1_5: []
sentinel1_6: []
sentinel1_7: []
sentinel1_8: []
sentinel1_9: []
sentinel1_10: []
sentinel1_11: []
output_selector: sentinel1
- class_path: rslp.helios.norm.HeliosNormalize
init_args:
config_fname: "/opt/helios/data/norm_configs/computed.json"
band_names:
sentinel2_l2a: ["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B8A", "B11", "B12", "B01", "B09"]
sentinel1: ["vv", "vh"]
- class_path: rslearn.train.transforms.pad.Pad
init_args:
size: 8
mode: "center"
image_selectors: ["sentinel2_l2a", "sentinel1"]
train_config:
groups: ["groundtruth_window_32"]
tags:
split: "train"
val_config:
groups: ["groundtruth_window_32"]
tags:
split: "val"
test_config:
groups: ["groundtruth_window_32"]
tags:
split: "test"
trainer:
max_epochs: 100
callbacks:
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: "epoch"
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
save_top_k: 1
save_last: true
monitor: val_loss
mode: min
- class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze
init_args:
module_selector: ["model", "encoder", 0]
unfreeze_at_epoch: 100
rslp_project: placeholder
rslp_experiment: placeholder
Loading
Loading