-
Notifications
You must be signed in to change notification settings - Fork 379
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
Refactor datamodule/model testing #329
Changes from all commits
a18b382
ad47d27
b6dffe3
5494788
610d0a7
1f9db86
cc73e43
cdb9b69
d3dbaa7
ad2a94a
3fb382f
e013adb
0386c1f
4e2f055
326c43d
3db16f9
8f72642
4ed7954
66c015c
e3811cf
91a585e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
experiment: | ||
task: "bigearthnet" | ||
module: | ||
loss: "bce" | ||
classification_model: "resnet18" | ||
learning_rate: 1e-3 | ||
learning_rate_schedule_patience: 6 | ||
weights: "random" | ||
in_channels: 2 | ||
num_classes: 19 | ||
datamodule: | ||
root_dir: "tests/data/bigearthnet" | ||
bands: "s1" | ||
num_classes: ${experiment.module.num_classes} | ||
batch_size: 1 | ||
num_workers: 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
experiment: | ||
task: "bigearthnet" | ||
module: | ||
loss: "bce" | ||
classification_model: "resnet18" | ||
learning_rate: 1e-3 | ||
learning_rate_schedule_patience: 6 | ||
weights: "random" | ||
in_channels: 12 | ||
num_classes: 19 | ||
datamodule: | ||
root_dir: "tests/data/bigearthnet" | ||
bands: "s2" | ||
num_classes: ${experiment.module.num_classes} | ||
batch_size: 1 | ||
num_workers: 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ experiment: | |
- "de-test" | ||
test_splits: | ||
- "de-test" | ||
batch_size: 64 | ||
batch_size: 1 | ||
num_workers: 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
experiment: | ||
task: "chesapeake_cvpr" | ||
module: | ||
loss: "ce" | ||
segmentation_model: "unet" | ||
encoder_name: "resnet50" | ||
encoder_weights: null | ||
encoder_output_stride: 16 | ||
learning_rate: 1e-3 | ||
learning_rate_schedule_patience: 6 | ||
in_channels: 4 | ||
num_classes: 5 | ||
num_filters: 1 | ||
ignore_zeros: False | ||
imagenet_pretraining: False | ||
datamodule: | ||
root_dir: "tests/data/chesapeake/cvpr" | ||
train_splits: | ||
- "de-test" | ||
val_splits: | ||
- "de-test" | ||
test_splits: | ||
- "de-test" | ||
patches_per_tile: 2 | ||
patch_size: 64 | ||
batch_size: 2 | ||
num_workers: 0 | ||
class_set: ${experiment.module.num_classes} | ||
use_prior_labels: False |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,9 @@ experiment: | |
learning_rate_schedule_patience: 6 | ||
in_channels: 4 | ||
num_classes: 7 | ||
num_filters: 256 | ||
num_filters: 1 | ||
ignore_zeros: False | ||
imagenet_pretraining: False | ||
datamodule: | ||
root_dir: "tests/data/chesapeake/cvpr" | ||
train_splits: | ||
|
@@ -20,8 +21,9 @@ experiment: | |
- "de-test" | ||
test_splits: | ||
- "de-test" | ||
patches_per_tile: 200 | ||
patch_size: 256 | ||
batch_size: 64 | ||
patches_per_tile: 2 | ||
patch_size: 64 | ||
batch_size: 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BYOLTask tests fail with a batch size of 1 and I have no idea why. SemanticSegmentationTask tests work fine with a batch size of 1. Oh, the mysteries of life... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If any preprocessing methods use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should update these to define the only dim that should be squeezed like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just tried this (both dim=0 and dim=1) and as soon as it fixes one issue, it creates another one. I don't think I have the time to debug this any further, but if anyone wants to submit a follow-up PR to fix this I would be very happy. |
||
num_workers: 0 | ||
class_set: ${experiment.module.num_classes} | ||
use_prior_labels: False |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
experiment: | ||
task: "chesapeake_cvpr" | ||
module: | ||
loss: "ce" | ||
segmentation_model: "unet" | ||
encoder_name: "resnet50" | ||
encoder_weights: null | ||
encoder_output_stride: 16 | ||
learning_rate: 1e-3 | ||
learning_rate_schedule_patience: 6 | ||
in_channels: 4 | ||
num_classes: 5 | ||
num_filters: 1 | ||
ignore_zeros: False | ||
imagenet_pretraining: False | ||
datamodule: | ||
root_dir: "tests/data/chesapeake/cvpr" | ||
train_splits: | ||
- "de-test" | ||
val_splits: | ||
- "de-test" | ||
test_splits: | ||
- "de-test" | ||
patches_per_tile: 2 | ||
patch_size: 64 | ||
batch_size: 2 | ||
num_workers: 0 | ||
class_set: ${experiment.module.num_classes} | ||
use_prior_labels: True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These datamodule settings ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what error you're getting but BYOLTask doesn't use the masks so not surprised it passes. The prior labels I believe are soft probabilities so I don't think we've set up the SegmentationTask loss to handle that. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,11 @@ experiment: | |
learning_rate_schedule_patience: 2 | ||
in_channels: 4 | ||
num_classes: 13 | ||
num_filters: 64 | ||
num_filters: 1 | ||
ignore_zeros: False | ||
datamodule: | ||
naip_root_dir: "tests/data/naip" | ||
chesapeake_root_dir: "tests/data/chesapeake/BAYWIDE" | ||
batch_size: 32 | ||
batch_size: 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With a batch size of 1 (what I'm using on all other tests) this breaks and I don't know why. |
||
num_workers: 0 | ||
patch_size: 32 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
experiment: | ||
task: "oscd" | ||
module: | ||
loss: "jaccard" | ||
segmentation_model: "unet" | ||
encoder_name: "resnet18" | ||
encoder_weights: null | ||
learning_rate: 1e-3 | ||
learning_rate_schedule_patience: 6 | ||
verbose: false | ||
in_channels: 6 | ||
num_classes: 2 | ||
num_filters: 1 | ||
ignore_zeros: True | ||
datamodule: | ||
root_dir: "tests/data/oscd" | ||
batch_size: 1 | ||
num_workers: 0 | ||
val_split_pct: 0.5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
bands: "rgb" | ||
num_patches_per_tile: 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
experiment: | ||
task: "sen12ms" | ||
module: | ||
loss: "focal" | ||
segmentation_model: "fcn" | ||
num_filters: 1 | ||
encoder_name: "resnet18" | ||
encoder_weights: null | ||
encoder_output_stride: 16 | ||
learning_rate: 1e-3 | ||
learning_rate_schedule_patience: 2 | ||
in_channels: 2 | ||
num_classes: 11 | ||
ignore_zeros: False | ||
datamodule: | ||
root_dir: "tests/data/sen12ms" | ||
band_set: "s1" | ||
batch_size: 1 | ||
num_workers: 0 | ||
seed: 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
experiment: | ||
task: "sen12ms" | ||
module: | ||
loss: "ce" | ||
segmentation_model: "unet" | ||
encoder_name: "resnet18" | ||
encoder_weights: null | ||
encoder_output_stride: 16 | ||
learning_rate: 1e-3 | ||
learning_rate_schedule_patience: 2 | ||
in_channels: 13 | ||
num_classes: 11 | ||
ignore_zeros: False | ||
datamodule: | ||
root_dir: "tests/data/sen12ms" | ||
band_set: "s2-all" | ||
batch_size: 1 | ||
num_workers: 0 | ||
seed: 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
experiment: | ||
task: "sen12ms" | ||
module: | ||
loss: "ce" | ||
segmentation_model: "unet" | ||
encoder_name: "resnet18" | ||
encoder_weights: null | ||
encoder_output_stride: 16 | ||
learning_rate: 1e-3 | ||
learning_rate_schedule_patience: 2 | ||
in_channels: 6 | ||
num_classes: 11 | ||
ignore_zeros: False | ||
datamodule: | ||
root_dir: "tests/data/sen12ms" | ||
band_set: "s2-reduced" | ||
batch_size: 1 | ||
num_workers: 0 | ||
seed: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many of these defaults have been renamed. The previous values give deprecation warnings. We may want to not hardcode these values and instead let pytorch-lightning assign these values automatically.