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

Adding padding at the input when necessary #342

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open

Conversation

Joao-L-S-Almeida
Copy link
Member

  • Should we add negative padding ? Could we remove some lines/rows instead of adding multiple lines/rows of zeroes ?
  • Are we interested in choosing the kind of padding or 'constant' is good enough ?

Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
@Joao-L-S-Almeida Joao-L-S-Almeida marked this pull request as ready for review January 3, 2025 18:26
@Joao-L-S-Almeida Joao-L-S-Almeida changed the title [WIP] Adding padding at the input when necessary Adding padding at the input when necessary Jan 3, 2025
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
@romeokienzler
Copy link
Collaborator

@Joao-L-S-Almeida on my side the tests are failing, can you please have a look?

==================================================================================== 30 failed, 530 passed, 6 skipped, 327 warnings in 1352.63s (0:22:32) ====================================================================================

Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
@Joao-L-S-Almeida
Copy link
Member Author

Are the errors looking like this ?

FAILED tests/test_backbones.py::test_out_indices_non_divisible[prithvi_eo_v1_100] - assert [2, 4, 8, 10] == (2, 4, 8, 10)
FAILED tests/test_backbones.py::test_out_indices_non_divisible[prithvi_eo_v2_300] - assert [2, 4, 8, 10] == (2, 4, 8, 10)
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_resnet[False-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_resnet[True-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_dofa[False-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_dofa[True-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-FCNDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-FCNDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-IdentityDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-IdentityDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-smp_Unet-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-smp_Unet-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-FCNDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-FCNDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-IdentityDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-IdentityDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-smp_Unet-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-smp_Unet-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-FCNDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-FCNDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-UperNetDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-UperNetDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-IdentityDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-IdentityDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-FCNDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-FCNDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-UperNetDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-UperNetDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-IdentityDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-IdentityDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_finetune.py::test_finetune_multiple_backbones[fit-prithvi_vit_100] - SystemExit: 2
FAILED tests/test_finetune.py::test_finetune_multiple_backbones[test-prithvi_vit_100] - SystemExit: 2
FAILED tests/test_finetune.py::test_finetune_multiple_backbones[validate-prithvi_vit_100] - SystemExit: 2
============================================================ 33 failed, 527 passed, 6 skipped, 166 warnings in 1536.95s (0:25:36) ============================================================
(terratorch) 

Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
@@ -1,8 +1,8 @@
# Copyright contributors to the Terratorch project


from typing import List
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use the types like list instead of the typing package. It's an old python package

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
@Joao-L-S-Almeida
Copy link
Member Author

@blumenstiel The argument output_size was removed.

backbone: prithvi_eo_v2_300
# backbone_pretrained_cfg_overlay:
# file: tests/prithvi_vit_300.pt
backbone_drop_path_rate: 0.3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this parameter is called backbone_drop_path for prithvi ViT (following the name of the parameter in the ViT block). backbone_drop_path_rate is only working for prithvi swin.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is prithvi_eo_v2_300 ViT or swin? @blumenstiel

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@romeokienzler Yes, all public pretrained models are ViT.

@@ -108,6 +109,7 @@ def build_model(

# Path for accessing the model source code.
self.syspath_kwarg = "model_sys_path"
backbone_kwargs, kwargs = extract_prefix_keys(kwargs, "backbone_")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Joao-L-S-Almeida can you please update the docstring to explain the padding?

@@ -128,6 +130,17 @@ def build_model(
backbone_kwargs, kwargs = extract_prefix_keys(kwargs, "backbone_")
backbone = _get_backbone(backbone, **backbone_kwargs)

# If patch size is not provided in the config or by the model, it might lead to errors due to irregular images.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Joao-L-S-Almeida can you please update the docstring to explain the padding?

@romeokienzler
Copy link
Collaborator

Are the errors looking like this ?

FAILED tests/test_backbones.py::test_out_indices_non_divisible[prithvi_eo_v1_100] - assert [2, 4, 8, 10] == (2, 4, 8, 10)
FAILED tests/test_backbones.py::test_out_indices_non_divisible[prithvi_eo_v2_300] - assert [2, 4, 8, 10] == (2, 4, 8, 10)
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_resnet[False-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_resnet[True-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_dofa[False-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_dofa[True-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-FCNDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-FCNDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-IdentityDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-IdentityDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-smp_Unet-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-smp_Unet-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-FCNDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-FCNDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-IdentityDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-IdentityDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-smp_Unet-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-smp_Unet-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-FCNDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-FCNDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-UperNetDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-UperNetDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-IdentityDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[False-IdentityDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-FCNDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-FCNDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-UperNetDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-UperNetDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-IdentityDecoder-regression-expected0-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_dofa[True-IdentityDecoder-segmentation-expected1-dofa_large_patch16_224] - AttributeError: 'DOFA' object has no attribute 'embed_dim'
FAILED tests/test_finetune.py::test_finetune_multiple_backbones[fit-prithvi_vit_100] - SystemExit: 2
FAILED tests/test_finetune.py::test_finetune_multiple_backbones[test-prithvi_vit_100] - SystemExit: 2
FAILED tests/test_finetune.py::test_finetune_multiple_backbones[validate-prithvi_vit_100] - SystemExit: 2
============================================================ 33 failed, 527 passed, 6 skipped, 166 warnings in 1536.95s (0:25:36) ============================================================
(terratorch) 

@Joao-L-S-Almeida

/home/romeokienzler/gitco/terratorch/.venv/lib64/python3.12/site-packages/lightning/pytorch/cli.py:526: LightningCLI's args parameter is intended to run from within Python like if it were from the command line. To prevent mistakes it is not recommended to provide both args and command line arguments, got: sys.argv[1:]=['tests/'], args=['test', '-c', 'tests/resources/configs/manufactured-finetune_prithvi_pixelwise_pad.yaml'].

tests/test_finetune.py::test_finetune_pad[validate-prithvi_eo_v2_300]
/home/romeokienzler/gitco/terratorch/.venv/lib64/python3.12/site-packages/lightning/pytorch/cli.py:526: LightningCLI's args parameter is intended to run from within Python like if it were from the command line. To prevent mistakes it is not recommended to provide both args and command line arguments, got: sys.argv[1:]=['tests/'], args=['validate', '-c', 'tests/resources/configs/manufactured-finetune_prithvi_pixelwise_pad.yaml'].

tests/test_finetune.py::test_finetune_metrics_from_file[prithvi_swin_B]
/home/romeokienzler/gitco/terratorch/.venv/lib64/python3.12/site-packages/lightning/pytorch/cli.py:526: LightningCLI's args parameter is intended to run from within Python like if it were from the command line. To prevent mistakes it is not recommended to provide both args and command line arguments, got: sys.argv[1:]=['tests/'], args=['fit', '-c', 'tests/resources/configs/manufactured-finetune_prithvi_swin_B_metrics_from_file.yaml'].

tests/test_generic_dataset.py::TestGenericSegmentationDataset::test_data_type_regression_float_long
tests/test_generic_dataset.py::TestGenericSegmentationDataset::test_data_type_regression_float_long
/home/romeokienzler/gitco/terratorch/.venv/lib64/python3.12/site-packages/rioxarray/_io.py:1136: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned.
warnings.warn(str(rio_warning.message), type(rio_warning.message)) # type: ignore

tests/test_prithvi_model_factory.py::test_create_pixelwise_model[UperNetDecoder-regression-expected0-prithvi_eo_v1_100]
tests/test_prithvi_model_factory.py::test_create_pixelwise_model[UperNetDecoder-segmentation-expected1-prithvi_eo_v1_100]
tests/test_prithvi_model_factory.py::test_create_pixelwise_model_no_in_channels[UperNetDecoder-regression-expected0-prithvi_eo_v1_100]
tests/test_prithvi_model_factory.py::test_create_pixelwise_model_no_in_channels[UperNetDecoder-segmentation-expected1-prithvi_eo_v1_100]
tests/test_prithvi_model_factory.py::test_create_pixelwise_model_with_aux_heads[UperNetDecoder-regression-expected0-prithvi_eo_v1_100]
tests/test_prithvi_model_factory.py::test_create_pixelwise_model_with_aux_heads[UperNetDecoder-segmentation-expected1-prithvi_eo_v1_100]
tests/test_prithvi_model_factory.py::test_create_pixelwise_model_with_extra_bands[UperNetDecoder-regression-expected0-prithvi_eo_v1_100]
tests/test_prithvi_model_factory.py::test_create_pixelwise_model_with_extra_bands[UperNetDecoder-segmentation-expected1-prithvi_eo_v1_100]
/home/romeokienzler/gitco/terratorch/terratorch/models/decoders/upernet_decoder.py:37: UserWarning: DeprecationWarning: scale_modules is deprecated and will be removed in future versions. Use LearnedInterpolateToPyramidal neck instead.
warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================================== short test summary info ===========================================================================================================
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_resnet[False-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_classification_model_resnet[True-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-FCNDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-FCNDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-IdentityDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-IdentityDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-smp_Unet-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[False-smp_Unet-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-FCNDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-FCNDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-IdentityDecoder-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-IdentityDecoder-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-smp_Unet-regression-expected0-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
FAILED tests/test_encoder_decoder_torchgeo_models.py::test_create_pixelwise_model_resnet[True-smp_Unet-segmentation-expected1-ssl4eos12_resnet50_sentinel2_all_decur] - AttributeError: 'ResNet' object has no attribute 'forward_intermediates'
==================================================================================== 14 failed, 532 passed, 6 skipped, 327 warnings in 757.23s (0:12:37) =====================================================================================

@Joao-L-S-Almeida
Copy link
Member Author

@romeokienzler It seems to be torchgeo version trickery. It just works with the version from the requirements: https://github.com/microsoft/torchgeo.git@fedf99375535f801565856cd774bfa9e5a251d55.

Signed-off-by: Joao Lucas de Sousa Almeida <[email protected]>
@romeokienzler
Copy link
Collaborator

@Joao-L-S-Almeida sorry for the late reply, my build/test queue is fill with other branches, but will test before your morning...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add padding while evaluating on the original mask size
3 participants