Skip to content

Commit f2649e7

Browse files
authored
Merge pull request #26 from allenai/favyen/maldives-20240919
Get Planet data for Maldives Ecosystem Mapping
2 parents 63a8a5c + 3faee29 commit f2649e7

File tree

13 files changed

+1270
-278
lines changed

13 files changed

+1270
-278
lines changed

data/maldives_ecosystem_mapping/config.json

Lines changed: 0 additions & 135 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"layers": {
3+
"label": {
4+
"type": "raster",
5+
"band_sets": [{
6+
"dtype": "uint8",
7+
"bands": ["label"],
8+
"format": {"name": "geotiff"}
9+
}]
10+
},
11+
"output": {
12+
"type": "raster",
13+
"band_sets": [{
14+
"dtype": "uint8",
15+
"bands": ["output"],
16+
"format": {"name": "geotiff"}
17+
}]
18+
},
19+
"mapbox": {
20+
"type": "raster",
21+
"band_sets": [{
22+
"dtype": "uint8",
23+
"bands": ["R", "G", "B"],
24+
"format": {"name": "geotiff", "always_enable_tiling": true}
25+
}],
26+
"data_source": {
27+
"name": "rslearn.data_sources.xyz_tiles.XyzTiles",
28+
"url_templates": ["https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.jpg?access_token=pk.eyJ1Ijoic2t5bGlnaHQtdnVsY2FuIiwiYSI6ImNqejFudGk5bTAxNWIzYm4zNXY3OXZkcmkifQ.6zaWTOP-R-MTKynYpqwvEQ"],
29+
"time_ranges": [["2023-01-01T00:00:00+00:00", "2024-12-31T23:59:59+00:00"]],
30+
"zoom": 18,
31+
"ingest": false
32+
}
33+
}
34+
},
35+
"tile_store": {
36+
"name": "file",
37+
"root_dir": "tiles"
38+
}
39+
}

data/maldives_ecosystem_mapping/config.yaml renamed to data/maldives_ecosystem_mapping/config_maxar.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
model:
2-
class_path: rslearn.train.lightning_module.RslearnLightningModule
2+
class_path: rslp.maldives_ecosystem_mapping.train.CMLightningModule
33
init_args:
44
model:
55
class_path: rslearn.models.multitask.MultiTaskModel
@@ -17,14 +17,15 @@ model:
1717
conv_layers_per_resolution: 2
1818
- class_path: rslearn.train.tasks.segmentation.SegmentationHead
1919
lr: 0.0001
20-
plateau_factor: 0.1
21-
plateau_patience: 10
20+
plateau: true
21+
plateau_factor: 0.2
22+
plateau_patience: 2
2223
plateau_min_lr: 0
23-
plateau_cooldown: 0
24+
plateau_cooldown: 10
2425
data:
2526
class_path: rslearn.train.data_module.RslearnDataModule
2627
init_args:
27-
path: gcs://rslearn-eai/datasets/maldives_ecosystem_mapping/dataset_v1/20240906/
28+
path: gcs://rslearn-eai/datasets/maldives_ecosystem_mapping/dataset_v1/20240924/
2829
inputs:
2930
image:
3031
data_type: "raster"
@@ -95,7 +96,7 @@ trainer:
9596
logging_interval: "epoch"
9697
- class_path: rslearn.train.prediction_writer.RslearnWriter
9798
init_args:
98-
path: gcs://rslearn-eai/datasets/maldives_ecosystem_mapping/dataset_v1/20240906/
99+
path: gcs://rslearn-eai/datasets/maldives_ecosystem_mapping/dataset_v1/20240924/
99100
output_layer: output
100101
selector: ["segment"]
101102
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
@@ -106,4 +107,4 @@ trainer:
106107
monitor: val_segment/accuracy
107108
mode: max
108109
rslp_project: maldives_ecosystem_mapping
109-
rslp_experiment: maxar_data_20240906_satlaspretrain_flip_crop512_00
110+
rslp_experiment: maxar_data_20240924_satlaspretrain_flip_crop512_00
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"layers": {
3+
"maxar": {
4+
"type": "raster",
5+
"band_sets": [{
6+
"dtype": "uint8",
7+
"bands": ["R", "G", "B"],
8+
"format": {"name": "geotiff", "always_enable_tiling": true}
9+
}]
10+
},
11+
"label": {
12+
"type": "raster",
13+
"band_sets": [{
14+
"dtype": "uint8",
15+
"bands": ["label"],
16+
"format": {"name": "geotiff", "always_enable_tiling": true}
17+
}]
18+
},
19+
"output": {
20+
"type": "raster",
21+
"band_sets": [{
22+
"dtype": "uint8",
23+
"bands": ["output"],
24+
"format": {"name": "geotiff", "always_enable_tiling": true}
25+
}]
26+
},
27+
"planetscope": {
28+
"type": "raster",
29+
"band_sets": [{
30+
"dtype": "uint16",
31+
"bands": ["b01", "b02", "b03", "b04", "b05", "b06", "b07", "b08"],
32+
"format": {"name": "geotiff", "always_enable_tiling": true}
33+
}],
34+
"data_source": {
35+
"name": "rslearn.data_sources.planet.Planet",
36+
"sort_by": "-clear_percent",
37+
"time_offset": "-90d",
38+
"duration": "180d",
39+
"item_type_id": "PSScene",
40+
"asset_type_id": "ortho_analytic_8b_sr",
41+
"bands": ["b01", "b02", "b03", "b04", "b05", "b06", "b07", "b08"],
42+
"range_filters": {
43+
"cloud_cover": {
44+
"lt": 0.3
45+
},
46+
"clear_percent": {
47+
"gt": 0.7
48+
}
49+
},
50+
"query_config": {
51+
"max_matches": 6
52+
}
53+
}
54+
}
55+
},
56+
"tile_store": {
57+
"name": "file",
58+
"root_dir": "tiles"
59+
}
60+
}

0 commit comments

Comments
 (0)