Skip to content

Commit

Permalink
Support stratified sampling for change detection (#96)
Browse files Browse the repository at this point in the history
* added change detection

* turned off dataset multiplier
  • Loading branch information
SebastianHafner authored Oct 17, 2024
1 parent 9ee5bc3 commit fc3a63f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configs/dataset/spacenet7cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ j_split: 512
multi_temporal: 2
multi_modal: False

dataset_multiplier: 5 # multiplies sample in dataset during training
dataset_multiplier: 1 # multiplies sample in dataset during training
minimum_temporal_gap: 5

# classes
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/spacenet7cd_domainshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ j_split: 512
multi_temporal: 2
multi_modal: False

dataset_multiplier: 5 # multiplies sample in dataset during training
dataset_multiplier: 1 # multiplies sample in dataset during training
minimum_temporal_gap: 5

# classes
Expand Down
2 changes: 1 addition & 1 deletion pangaea/utils/subset_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get_subset_indices(dataset: GeoFMDataset,
)
return indices

elif task == "segmentation":
elif task == "segmentation" or task == "change_detection":
indices, _ = balance_seg_indices(
dataset, strategy=strategy, label_fraction=label_fraction, num_bins=num_bins, logger=logger
)
Expand Down

0 comments on commit fc3a63f

Please sign in to comment.