Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new preprocessor and only fix known bugs #89

Closed
wants to merge 11 commits into from
Closed
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ pretrained_models/
work-dir/
wandb/
data/*
data
pretrained_models
# Scenes for mados tiny
# Wow gitignore pattern mathcing is a mess
!data/mados
Expand Down
16 changes: 12 additions & 4 deletions configs/dataset/dynamicen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ distribution:
- 0.28
- 0.08

sample_dates:
- 1
- 5
- 10
- 15
- 20
- 25

# data stats
bands:
optical:
Expand All @@ -36,15 +44,15 @@ bands:

data_mean:
optical:
- 1042.59240722656
- 915.618408203125
- 671.260559082031
- 915.618408203125
- 1042.59240722656
- 2605.20922851562
data_std:
optical:
- 957.958435058593
- 715.548767089843
- 596.943908691406
- 715.548767089843
- 957.958435058593
- 1059.90319824218

data_min:
Expand Down
2 changes: 2 additions & 0 deletions configs/encoder/croma_joint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ output_layers:
- 5
- 7
- 11

output_dim: 1024
2 changes: 2 additions & 0 deletions configs/encoder/croma_optical.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ output_layers:
- 5
- 7
- 11

output_dim: 1024
4 changes: 3 additions & 1 deletion configs/encoder/croma_sar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ output_layers:
- 3
- 5
- 7
- 11
- 11

output_dim: 1024
2 changes: 2 additions & 0 deletions configs/encoder/dofa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ output_layers:
- 5
- 7
- 11

output_dim: 768
6 changes: 5 additions & 1 deletion configs/encoder/gfmswin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ in_chans: 3
t_patch_size: 3
depth: 12
embed_dim: 128
output_dim: 1024
img_size: 192 # fixed to 192 to avoid interpolation in checkpoints which leads to drop in performance
depths: [ 2, 2, 18, 2 ]
num_heads: [ 4, 8, 16, 32 ]
Expand All @@ -28,3 +27,8 @@ output_layers:
- 2
- 3

output_dim:
- 256
- 512
- 1024
- 1024
2 changes: 2 additions & 0 deletions configs/encoder/prithvi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ output_layers:
- 5
- 7
- 11

output_dim: 768
4 changes: 3 additions & 1 deletion configs/encoder/remoteclip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ output_layers:
- 3
- 5
- 7
- 11
- 11

output_dim: 768
13 changes: 12 additions & 1 deletion configs/encoder/satlasnet_mi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ download_url: null
model_identifier: Sentinel2_SwinB_MI_MS # Multi-Image Multi-Spectral
fpn: False
input_size: 128
output_dim: 1024

input_bands:
optical:
Expand All @@ -23,3 +22,15 @@ input_bands:
- B8
- B11
- B12

output_layers:
- 0
- 1
- 2
- 3

output_dim:
- 128
- 256
- 512
- 1024
13 changes: 12 additions & 1 deletion configs/encoder/satlasnet_si.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ download_url: null
model_identifier: Sentinel2_SwinB_SI_MS # Single Image Multi-Spectral
fpn: False
input_size: 128
output_dim: 1024

input_bands:
optical:
Expand All @@ -23,3 +22,15 @@ input_bands:
- B8
- B11
- B12

output_layers:
- 0
- 1
- 2
- 3

output_dim:
- 128
- 256
- 512
- 1024
2 changes: 2 additions & 0 deletions configs/encoder/scalemae.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ output_layers:
- 11
- 15
- 23

output_dim: 1024
3 changes: 2 additions & 1 deletion configs/encoder/spectralgpt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ encoder_weights: ./pretrained_models/SpectralGPT+.pth
download_url: https://zenodo.org/records/8412455/files/SpectralGPT+.pth

input_size: 128
output_dim: 3072 # 768 * (in_chans / t_patch_size)

in_chans: 12 # number of spectral bands
t_patch_size: 3
depth: 12
Expand Down Expand Up @@ -34,4 +34,5 @@ output_layers:
- 7
- 11

output_dim: 3072 # 768 * (in_chans / t_patch_size)

2 changes: 2 additions & 0 deletions configs/encoder/ssl4eo_data2vec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ output_layers:
- 5
- 7
- 11

output_dim: 384
2 changes: 2 additions & 0 deletions configs/encoder/ssl4eo_dino.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ output_layers:
- 5
- 7
- 11

output_dim: 384
4 changes: 3 additions & 1 deletion configs/encoder/ssl4eo_mae_optical.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ output_layers:
- 3
- 5
- 7
- 11
- 11

output_dim: 384
4 changes: 3 additions & 1 deletion configs/encoder/ssl4eo_mae_sar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ output_layers:
- 3
- 5
- 7
- 11
- 11

output_dim: 384
2 changes: 2 additions & 0 deletions configs/encoder/ssl4eo_moco.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ output_layers:
- 5
- 7
- 11

output_dim: 384
6 changes: 6 additions & 0 deletions configs/encoder/unet_encoder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ topology: [64, 128, 256, 512,]

input_bands: ${dataset.bands}

output_dim:
- 64
- 128
- 256
- 512

52 changes: 19 additions & 33 deletions configs/preprocessing/reg_default.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
train:
- _target_: pangaea.engine.data_preprocessor.RegPreprocessor
# overwritten in run
dataset: null
encoder: null
train:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.RandomCropToEncoder
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding

- _target_: pangaea.engine.data_preprocessor.NormalizeMinMax
# overwritten in run
dataset: null
encoder: null
data_min: -1
data_max: 1
val:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding

- _target_: pangaea.engine.data_preprocessor.RandomCropToEncoder
# overwritten in run
dataset: null
encoder: null

test:
- _target_: pangaea.engine.data_preprocessor.RegPreprocessor
# overwritten in run
dataset: null
encoder: null

- _target_: pangaea.engine.data_preprocessor.NormalizeMinMax
# overwritten in run
dataset: null
encoder: null
data_min: -1
data_max: 1

- _target_: pangaea.engine.data_preprocessor.Tile
# overwritten in run
dataset: null
encoder: null
test:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding
48 changes: 19 additions & 29 deletions configs/preprocessing/seg_default.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
train:
- _target_: pangaea.engine.data_preprocessor.SegPreprocessor
# overwritten in run
dataset: null
encoder: null
train:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.RandomCropToEncoder
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding

- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
# overwritten in run
dataset: null
encoder: null
val:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding

- _target_: pangaea.engine.data_preprocessor.RandomCropToEncoder
# overwritten in run
dataset: null
encoder: null

test:
- _target_: pangaea.engine.data_preprocessor.SegPreprocessor
# overwritten in run
dataset: null
encoder: null

- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
# overwritten in run
dataset: null
encoder: null

- _target_: pangaea.engine.data_preprocessor.Tile
# overwritten in run
dataset: null
encoder: null
test:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding
48 changes: 19 additions & 29 deletions configs/preprocessing/seg_importance_crop.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
train:
- _target_: pangaea.engine.data_preprocessor.SegPreprocessor
# overwritten in run
dataset: null
encoder: null
train:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.ImportanceRandomCropToEncoder
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding

- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
# overwritten in run
dataset: null
encoder: null
val:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding

- _target_: pangaea.engine.data_preprocessor.ImportanceRandomCropToEncoder
# overwritten in run
dataset: null
encoder: null

test:
- _target_: pangaea.engine.data_preprocessor.SegPreprocessor
# overwritten in run
dataset: null
encoder: null

- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
# overwritten in run
dataset: null
encoder: null

- _target_: pangaea.engine.data_preprocessor.Tile
# overwritten in run
dataset: null
encoder: null
test:
_target_: pangaea.engine.data_preprocessor.Preprocessor
preprocessor_cfg:
- _target_: pangaea.engine.data_preprocessor.BandFilter
- _target_: pangaea.engine.data_preprocessor.NormalizeMeanStd
- _target_: pangaea.engine.data_preprocessor.BandPadding
Loading