From a5c480448b3f0d5b0437dc4740d8deb8935bb11d Mon Sep 17 00:00:00 2001 From: leonard Date: Thu, 19 Dec 2024 09:19:59 +0100 Subject: [PATCH] Fixed the bandorder of EuroSAT dataset, datamodule and within the tutorial to align with [the issue raised in the EuroSAT git repository](https://github.com/phelber/EuroSAT/issues/7) --- docs/tutorials/transforms.ipynb | 2 +- torchgeo/datamodules/eurosat.py | 40 ++++++++++++++++----------------- torchgeo/datasets/eurosat.py | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/tutorials/transforms.ipynb b/docs/tutorials/transforms.ipynb index 42a16e26e24..689b2eebd33 100644 --- a/docs/tutorials/transforms.ipynb +++ b/docs/tutorials/transforms.ipynb @@ -216,11 +216,11 @@ " 'B06': 'Vegetation Red Edge 2',\n", " 'B07': 'Vegetation Red Edge 3',\n", " 'B08': 'NIR 1',\n", - " 'B8A': 'NIR 2',\n", " 'B09': 'Water Vapour',\n", " 'B10': 'SWIR 1',\n", " 'B11': 'SWIR 2',\n", " 'B12': 'SWIR 3',\n", + " 'B8A': 'NIR 2',\n", "}" ] }, diff --git a/torchgeo/datamodules/eurosat.py b/torchgeo/datamodules/eurosat.py index 23e09610968..6b8b9115d1c 100644 --- a/torchgeo/datamodules/eurosat.py +++ b/torchgeo/datamodules/eurosat.py @@ -19,11 +19,11 @@ 'B06': 2130.3491, 'B07': 2524.0549, 'B08': 2454.1938, - 'B8A': 785.4963, - 'B09': 12.4639, - 'B10': 1969.9224, - 'B11': 1206.2421, - 'B12': 2779.4104, + 'B09': 785.4963, + 'B10': 12.4639, + 'B11': 1969.9224, + 'B12': 1206.2421, + 'B8A': 2779.4104, } SPATIAL_STD = { @@ -35,11 +35,11 @@ 'B06': 806.8271, 'B07': 1022.6378, 'B08': 1065.4312, - 'B8A': 410.5831, - 'B09': 4.8878, - 'B10': 958.4751, - 'B11': 740.6196, - 'B12': 1157.2896, + 'B09': 410.5831, + 'B10': 4.8878, + 'B11': 958.4751, + 'B12': 740.6196, + 'B8A': 1157.2896, } MEAN = { @@ -51,11 +51,11 @@ 'B06': 1999.79090914, 'B07': 2369.22292565, 'B08': 2296.82608323, - 'B8A': 732.08340178, - 'B09': 12.11327804, - 'B10': 1819.01027855, - 'B11': 1118.92391149, - 'B12': 2594.14080798, + 'B09': 732.08340178, + 'B10': 12.11327804, + 'B11': 1819.01027855, + 'B12': 1118.92391149, + 'B8A': 2594.14080798, } STD = { @@ -67,11 +67,11 @@ 'B06': 861.18399006, 'B07': 1086.63139075, 'B08': 1117.98170791, - 'B8A': 404.91978886, - 'B09': 4.77584468, - 'B10': 1002.58768311, - 'B11': 761.30323499, - 'B12': 1231.58581042, + 'B09': 404.91978886, + 'B10': 4.77584468, + 'B11': 1002.58768311, + 'B12': 761.30323499, + 'B8A': 1231.58581042, } diff --git a/torchgeo/datasets/eurosat.py b/torchgeo/datasets/eurosat.py index 45c0d708f92..5caef0ee4ee 100644 --- a/torchgeo/datasets/eurosat.py +++ b/torchgeo/datasets/eurosat.py @@ -84,11 +84,11 @@ class EuroSAT(NonGeoClassificationDataset): 'B06', 'B07', 'B08', - 'B8A', 'B09', 'B10', 'B11', 'B12', + 'B8A', ) rgb_bands = ('B04', 'B03', 'B02')