diff --git a/pyproject.toml b/pyproject.toml index ad096b8d987..0762fd6dfaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,6 +102,10 @@ filterwarnings = [ "ignore:The dataloader, .*, does not have many workers which may be a bottleneck:UserWarning", # pytorch-lightning warns us about using the CPU when a GPU is available "ignore:GPU available but not used.:UserWarning", + # https://github.com/kornia/kornia/pull/1611 + "ignore:`ColorJitter` is now following Torchvision implementation.:DeprecationWarning:kornia.augmentation._2d.intensity.color_jitter", + # https://github.com/kornia/kornia/pull/1663 + "ignore:`RandomGaussianBlur` has changed its behavior and now randomly sample sigma for both axes.:DeprecationWarning:kornia.augmentation._2d.intensity.gaussian_blur", # Unexpected warnings, worth investigating # pytorch-lightning is having trouble inferring the batch size for ChesapeakeCVPRDataModule and CycloneDataModule for some reason diff --git a/requirements/required.txt b/requirements/required.txt index 660adf05260..d5e0b24e0fd 100644 --- a/requirements/required.txt +++ b/requirements/required.txt @@ -4,7 +4,7 @@ setuptools==67.3.1 # install einops==0.6.0 fiona==1.9.1 -kornia==0.6.9 +kornia==0.6.10 matplotlib==3.7.0 numpy==1.24.2 omegaconf==2.3.0 diff --git a/tests/transforms/test_indices.py b/tests/transforms/test_indices.py index b3c0f8eb7e1..c58cf0887d5 100644 --- a/tests/transforms/test_indices.py +++ b/tests/transforms/test_indices.py @@ -30,7 +30,7 @@ def sample() -> Dict[str, Tensor]: return { "image": torch.arange(3 * 4 * 4, dtype=torch.float).view(3, 4, 4), - "mask": torch.arange(4 * 4, dtype=torch.long).view(4, 4), + "mask": torch.arange(4 * 4, dtype=torch.long).view(1, 4, 4), } @@ -38,7 +38,7 @@ def sample() -> Dict[str, Tensor]: def batch() -> Dict[str, Tensor]: return { "image": torch.arange(2 * 3 * 4 * 4, dtype=torch.float).view(2, 3, 4, 4), - "mask": torch.arange(2 * 4 * 4, dtype=torch.long).view(2, 4, 4), + "mask": torch.arange(2 * 4 * 4, dtype=torch.long).view(2, 1, 4, 4), } diff --git a/torchgeo/datamodules/landcoverai.py b/torchgeo/datamodules/landcoverai.py index 0ac1ec385ac..c6994f99d54 100644 --- a/torchgeo/datamodules/landcoverai.py +++ b/torchgeo/datamodules/landcoverai.py @@ -37,14 +37,7 @@ def __init__( K.RandomHorizontalFlip(p=0.5), K.RandomVerticalFlip(p=0.5), K.RandomSharpness(p=0.5), - K.ColorJitter( - p=0.5, - brightness=0.1, - contrast=0.1, - saturation=0.1, - hue=0.1, - silence_instantiation_warning=True, - ), + K.ColorJitter(p=0.5, brightness=0.1, contrast=0.1, saturation=0.1, hue=0.1), data_keys=["image", "mask"], ) self.aug = AugmentationSequential( diff --git a/torchgeo/datamodules/resisc45.py b/torchgeo/datamodules/resisc45.py index cb1e9553553..564ca07b739 100644 --- a/torchgeo/datamodules/resisc45.py +++ b/torchgeo/datamodules/resisc45.py @@ -42,13 +42,6 @@ def __init__( K.RandomVerticalFlip(p=0.5), K.RandomSharpness(p=0.5), K.RandomErasing(p=0.1), - K.ColorJitter( - p=0.5, - brightness=0.1, - contrast=0.1, - saturation=0.1, - hue=0.1, - silence_instantiation_warning=True, - ), + K.ColorJitter(p=0.5, brightness=0.1, contrast=0.1, saturation=0.1, hue=0.1), data_keys=["image"], ) diff --git a/torchgeo/datamodules/spacenet.py b/torchgeo/datamodules/spacenet.py index 802cc7a26c6..90a6f6f5ac6 100644 --- a/torchgeo/datamodules/spacenet.py +++ b/torchgeo/datamodules/spacenet.py @@ -52,14 +52,7 @@ def __init__( K.RandomHorizontalFlip(p=0.5), K.RandomVerticalFlip(p=0.5), K.RandomSharpness(p=0.5), - K.ColorJitter( - p=0.5, - brightness=0.1, - contrast=0.1, - saturation=0.1, - hue=0.1, - silence_instantiation_warning=True, - ), + K.ColorJitter(p=0.5, brightness=0.1, contrast=0.1, saturation=0.1, hue=0.1), data_keys=["image", "mask"], ) self.aug = AugmentationSequential(