|
| 1 | +model: |
| 2 | + class_path: rslp.maldives_ecosystem_mapping.train.CMLightningModule |
| 3 | + init_args: |
| 4 | + model: |
| 5 | + class_path: rslearn.models.multitask.MultiTaskModel |
| 6 | + init_args: |
| 7 | + encoder: |
| 8 | + - class_path: rslearn.models.simple_time_series.SimpleTimeSeries |
| 9 | + init_args: |
| 10 | + encoder: |
| 11 | + class_path: rslearn.models.swin.Swin |
| 12 | + init_args: |
| 13 | + pretrained: true |
| 14 | + output_layers: [1, 3, 5, 7] |
| 15 | + input_channels: 17 |
| 16 | + image_channels: 17 |
| 17 | + groups: [[0, 1, 2, 3, 4, 5]] |
| 18 | + decoders: |
| 19 | + segment: |
| 20 | + - class_path: rslearn.models.unet.UNetDecoder |
| 21 | + init_args: |
| 22 | + in_channels: [[4, 128], [8, 256], [16, 512], [32, 1024]] |
| 23 | + out_channels: 17 |
| 24 | + conv_layers_per_resolution: 2 |
| 25 | + - class_path: rslearn.train.tasks.segmentation.SegmentationHead |
| 26 | + lr: 0.0001 |
| 27 | + plateau: true |
| 28 | + plateau_factor: 0.2 |
| 29 | + plateau_patience: 2 |
| 30 | + plateau_min_lr: 0 |
| 31 | + plateau_cooldown: 10 |
| 32 | +data: |
| 33 | + class_path: rslearn.train.data_module.RslearnDataModule |
| 34 | + init_args: |
| 35 | + path: gcs://rslearn-eai/datasets/maldives_ecosystem_mapping/dataset_v1/20241017/ |
| 36 | + inputs: |
| 37 | + planetscope: |
| 38 | + data_type: "raster" |
| 39 | + layers: ["planetscope"] |
| 40 | + bands: ["b01", "b02", "b03", "b04", "b05", "b06", "b07", "b08"] |
| 41 | + passthrough: true |
| 42 | + planetscope.1: |
| 43 | + data_type: "raster" |
| 44 | + layers: ["planetscope.1"] |
| 45 | + bands: ["b01", "b02", "b03", "b04", "b05", "b06", "b07", "b08"] |
| 46 | + passthrough: true |
| 47 | + planetscope.2: |
| 48 | + data_type: "raster" |
| 49 | + layers: ["planetscope.2"] |
| 50 | + bands: ["b01", "b02", "b03", "b04", "b05", "b06", "b07", "b08"] |
| 51 | + passthrough: true |
| 52 | + planetscope.3: |
| 53 | + data_type: "raster" |
| 54 | + layers: ["planetscope.3"] |
| 55 | + bands: ["b01", "b02", "b03", "b04", "b05", "b06", "b07", "b08"] |
| 56 | + passthrough: true |
| 57 | + planetscope.4: |
| 58 | + data_type: "raster" |
| 59 | + layers: ["planetscope.4"] |
| 60 | + bands: ["b01", "b02", "b03", "b04", "b05", "b06", "b07", "b08"] |
| 61 | + passthrough: true |
| 62 | + planetscope.5: |
| 63 | + data_type: "raster" |
| 64 | + layers: ["planetscope.5"] |
| 65 | + bands: ["b01", "b02", "b03", "b04", "b05", "b06", "b07", "b08"] |
| 66 | + passthrough: true |
| 67 | + sentinel2_0: |
| 68 | + data_type: "raster" |
| 69 | + layers: ["sentinel2_with_planet"] |
| 70 | + bands: ["B04", "B03", "B02", "B05", "B06", "B07", "B08", "B11", "B12"] |
| 71 | + passthrough: true |
| 72 | + sentinel2_1: |
| 73 | + data_type: "raster" |
| 74 | + layers: ["sentinel2_with_planet.1"] |
| 75 | + bands: ["B04", "B03", "B02", "B05", "B06", "B07", "B08", "B11", "B12"] |
| 76 | + passthrough: true |
| 77 | + sentinel2_2: |
| 78 | + data_type: "raster" |
| 79 | + layers: ["sentinel2_with_planet.2"] |
| 80 | + bands: ["B04", "B03", "B02", "B05", "B06", "B07", "B08", "B11", "B12"] |
| 81 | + passthrough: true |
| 82 | + sentinel2_3: |
| 83 | + data_type: "raster" |
| 84 | + layers: ["sentinel2_with_planet.3"] |
| 85 | + bands: ["B04", "B03", "B02", "B05", "B06", "B07", "B08", "B11", "B12"] |
| 86 | + passthrough: true |
| 87 | + sentinel2_4: |
| 88 | + data_type: "raster" |
| 89 | + layers: ["sentinel2_with_planet.4"] |
| 90 | + bands: ["B04", "B03", "B02", "B05", "B06", "B07", "B08", "B11", "B12"] |
| 91 | + passthrough: true |
| 92 | + sentinel2_5: |
| 93 | + data_type: "raster" |
| 94 | + layers: ["sentinel2_with_planet.5"] |
| 95 | + bands: ["B04", "B03", "B02", "B05", "B06", "B07", "B08", "B11", "B12"] |
| 96 | + passthrough: true |
| 97 | + targets: |
| 98 | + data_type: "raster" |
| 99 | + layers: ["label"] |
| 100 | + bands: ["label"] |
| 101 | + is_target: true |
| 102 | + task: |
| 103 | + class_path: rslearn.train.tasks.multi_task.MultiTask |
| 104 | + init_args: |
| 105 | + tasks: |
| 106 | + segment: |
| 107 | + class_path: rslearn.train.tasks.segmentation.SegmentationTask |
| 108 | + init_args: |
| 109 | + num_classes: 17 |
| 110 | + remap_values: [[0, 1], [0, 255]] |
| 111 | + zero_is_invalid: true |
| 112 | + metric_kwargs: |
| 113 | + average: "micro" |
| 114 | + input_mapping: |
| 115 | + segment: |
| 116 | + targets: "targets" |
| 117 | + batch_size: 8 |
| 118 | + num_workers: 32 |
| 119 | + default_config: |
| 120 | + transforms: |
| 121 | + - class_path: rslearn.train.transforms.concatenate.Concatenate |
| 122 | + init_args: |
| 123 | + selections: |
| 124 | + planetscope: [] |
| 125 | + sentinel2_0: [] |
| 126 | + planetscope.1: [] |
| 127 | + sentinel2_1: [] |
| 128 | + planetscope.2: [] |
| 129 | + sentinel2_2: [] |
| 130 | + planetscope.3: [] |
| 131 | + sentinel2_3: [] |
| 132 | + planetscope.4: [] |
| 133 | + sentinel2_4: [] |
| 134 | + planetscope.5: [] |
| 135 | + sentinel2_5: [] |
| 136 | + output_selector: image |
| 137 | + - class_path: rslearn.train.transforms.normalize.Normalize |
| 138 | + init_args: |
| 139 | + mean: 0 |
| 140 | + std: 255 |
| 141 | + train_config: |
| 142 | + patch_size: 128 |
| 143 | + transforms: |
| 144 | + - class_path: rslearn.train.transforms.concatenate.Concatenate |
| 145 | + init_args: |
| 146 | + selections: |
| 147 | + planetscope: [] |
| 148 | + sentinel2_0: [] |
| 149 | + planetscope.1: [] |
| 150 | + sentinel2_1: [] |
| 151 | + planetscope.2: [] |
| 152 | + sentinel2_2: [] |
| 153 | + planetscope.3: [] |
| 154 | + sentinel2_3: [] |
| 155 | + planetscope.4: [] |
| 156 | + sentinel2_4: [] |
| 157 | + planetscope.5: [] |
| 158 | + sentinel2_5: [] |
| 159 | + output_selector: image |
| 160 | + - class_path: rslearn.train.transforms.normalize.Normalize |
| 161 | + init_args: |
| 162 | + mean: 0 |
| 163 | + std: 255 |
| 164 | + - class_path: rslearn.train.transforms.flip.Flip |
| 165 | + init_args: |
| 166 | + image_selectors: ["image", "target/segment/classes", "target/segment/valid"] |
| 167 | + groups: ["crops_planetscope"] |
| 168 | + tags: |
| 169 | + split: train |
| 170 | + val_config: |
| 171 | + patch_size: 128 |
| 172 | + groups: ["crops_planetscope"] |
| 173 | + tags: |
| 174 | + split: val |
| 175 | + test_config: |
| 176 | + patch_size: 128 |
| 177 | + groups: ["crops_planetscope"] |
| 178 | + tags: |
| 179 | + split: val |
| 180 | + predict_config: |
| 181 | + groups: ["images_planetscope"] |
| 182 | + load_all_patches: true |
| 183 | + skip_targets: true |
| 184 | + patch_size: 512 |
| 185 | +trainer: |
| 186 | + max_epochs: 500 |
| 187 | + callbacks: |
| 188 | + - class_path: lightning.pytorch.callbacks.LearningRateMonitor |
| 189 | + init_args: |
| 190 | + logging_interval: "epoch" |
| 191 | + - class_path: rslearn.train.prediction_writer.RslearnWriter |
| 192 | + init_args: |
| 193 | + path: gcs://rslearn-eai/datasets/maldives_ecosystem_mapping/dataset_v1/20241017/ |
| 194 | + output_layer: output |
| 195 | + selector: ["segment"] |
| 196 | + - class_path: lightning.pytorch.callbacks.ModelCheckpoint |
| 197 | + init_args: |
| 198 | + save_top_k: 1 |
| 199 | + every_n_epochs: 50 |
| 200 | + save_last: true |
| 201 | + monitor: val_segment/accuracy |
| 202 | + mode: max |
| 203 | +rslp_project: maldives_ecosystem_mapping |
| 204 | +rslp_experiment: planetscope_plus_sentinel2_data_20241017_satlaspretrain_flip_crop128_00 |
0 commit comments