diff --git a/tests/conf/ssl4eo_l_benchmark_cdl.yaml b/tests/conf/ssl4eo_l_benchmark_cdl.yaml new file mode 100644 index 00000000000..a6390d9e392 --- /dev/null +++ b/tests/conf/ssl4eo_l_benchmark_cdl.yaml @@ -0,0 +1,20 @@ +module: + _target_: torchgeo.trainers.SemanticSegmentationTask + loss: "ce" + model: "unet" + backbone: "resnet18" + weights: null + learning_rate: 1e-3 + learning_rate_schedule_patience: 6 + in_channels: 7 + num_classes: 134 + num_filters: 1 + ignore_index: 0 + +datamodule: + _target_: torchgeo.datamodules.SSL4EOLBenchmarkDataModule + root: "tests/data/ssl4eo_benchmark_landsat" + input_sensor: "tm_toa" + mask_product: "cdl" + batch_size: 2 + num_workers: 0 diff --git a/tests/conf/ssl4eo_l_benchmark_nlcd.yaml b/tests/conf/ssl4eo_l_benchmark_nlcd.yaml new file mode 100644 index 00000000000..94cc899b535 --- /dev/null +++ b/tests/conf/ssl4eo_l_benchmark_nlcd.yaml @@ -0,0 +1,20 @@ +module: + _target_: torchgeo.trainers.SemanticSegmentationTask + loss: "ce" + model: "unet" + backbone: "resnet18" + weights: null + learning_rate: 1e-3 + learning_rate_schedule_patience: 6 + in_channels: 6 + num_classes: 17 + num_filters: 1 + ignore_index: 0 + +datamodule: + _target_: torchgeo.datamodules.SSL4EOLBenchmarkDataModule + root: "tests/data/ssl4eo_benchmark_landsat" + input_sensor: "etm_sr" + mask_product: "nlcd" + batch_size: 2 + num_workers: 0 diff --git a/tests/data/ssl4eo_benchmark_landsat/data.py b/tests/data/ssl4eo_benchmark_landsat/data.py new file mode 100644 index 00000000000..646208943b4 --- /dev/null +++ b/tests/data/ssl4eo_benchmark_landsat/data.py @@ -0,0 +1,218 @@ +#!/usr/bin/env python3 + +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import hashlib +import os +import shutil +from typing import Union + +import numpy as np +import rasterio +from rasterio import Affine +from rasterio.crs import CRS + +SIZE = 264 + +np.random.seed(0) + +FILENAME_HIERARCHY = Union[dict[str, "FILENAME_HIERARCHY"], list[str]] + +filenames: FILENAME_HIERARCHY = { + "tm_toa": { + "0000001": {"LT05_172030_20010526": ["all_bands.tif"]}, + "0000002": {"LT05_223084_20010413": ["all_bands.tif"]}, + "0000003": {"LT05_172034_20020902": ["all_bands.tif"]}, + "0000004": {"LT05_172034_20020903": ["all_bands.tif"]}, + "0000005": {"LT05_172034_20020904": ["all_bands.tif"]}, + "0000006": {"LT05_172034_20020905": ["all_bands.tif"]}, + "0000007": {"LT05_172034_20020906": ["all_bands.tif"]}, + "0000008": {"LT05_172034_20020907": ["all_bands.tif"]}, + "0000009": {"LT05_172034_20020908": ["all_bands.tif"]}, + "0000010": {"LT05_172034_20020909": ["all_bands.tif"]}, + }, + "etm_sr": { + "0000001": {"LE07_172030_20010526": ["all_bands.tif"]}, + "0000002": {"LE07_223084_20010413": ["all_bands.tif"]}, + "0000003": {"LE07_172034_20020902": ["all_bands.tif"]}, + "0000004": {"LE07_172034_20020903": ["all_bands.tif"]}, + "0000005": {"LE07_172034_20020904": ["all_bands.tif"]}, + "0000006": {"LE07_172034_20020905": ["all_bands.tif"]}, + "0000007": {"LE07_172034_20020906": ["all_bands.tif"]}, + "0000008": {"LE07_172034_20020907": ["all_bands.tif"]}, + "0000009": {"LE07_172034_20020908": ["all_bands.tif"]}, + "0000010": {"LE07_172034_20020909": ["all_bands.tif"]}, + }, + "etm_toa": { + "0000001": {"LE07_172030_20010526": ["all_bands.tif"]}, + "0000002": {"LE07_223084_20010413": ["all_bands.tif"]}, + "0000003": {"LE07_172034_20020902": ["all_bands.tif"]}, + "0000004": {"LE07_172034_20020903": ["all_bands.tif"]}, + "0000005": {"LE07_172034_20020904": ["all_bands.tif"]}, + "0000006": {"LE07_172034_20020905": ["all_bands.tif"]}, + "0000007": {"LE07_172034_20020906": ["all_bands.tif"]}, + "0000008": {"LE07_172034_20020907": ["all_bands.tif"]}, + "0000009": {"LE07_172034_20020908": ["all_bands.tif"]}, + "0000010": {"LE07_172034_20020909": ["all_bands.tif"]}, + }, + "oli_tirs_toa": { + "0000001": {"LC08_172030_20010526": ["all_bands.tif"]}, + "0000002": {"LC08_223084_20010413": ["all_bands.tif"]}, + "0000003": {"LC08_172034_20020902": ["all_bands.tif"]}, + "0000004": {"LC08_172034_20020903": ["all_bands.tif"]}, + "0000005": {"LC08_172034_20020904": ["all_bands.tif"]}, + "0000006": {"LC08_172034_20020905": ["all_bands.tif"]}, + "0000007": {"LC08_172034_20020906": ["all_bands.tif"]}, + "0000008": {"LC08_172034_20020907": ["all_bands.tif"]}, + "0000009": {"LC08_172034_20020908": ["all_bands.tif"]}, + "0000010": {"LC08_172034_20020909": ["all_bands.tif"]}, + }, + "oli_sr": { + "0000001": {"LC08_172030_20010526": ["all_bands.tif"]}, + "0000002": {"LC08_223084_20010413": ["all_bands.tif"]}, + "0000003": {"LC08_172034_20020902": ["all_bands.tif"]}, + "0000004": {"LC08_172034_20020903": ["all_bands.tif"]}, + "0000005": {"LC08_172034_20020904": ["all_bands.tif"]}, + "0000006": {"LC08_172034_20020905": ["all_bands.tif"]}, + "0000007": {"LC08_172034_20020906": ["all_bands.tif"]}, + "0000008": {"LC08_172034_20020907": ["all_bands.tif"]}, + "0000009": {"LC08_172034_20020908": ["all_bands.tif"]}, + "0000010": {"LC08_172034_20020909": ["all_bands.tif"]}, + }, +} + +num_bands = {"tm_toa": 7, "etm_sr": 6, "etm_toa": 9, "oli_tirs_toa": 11, "oli_sr": 7} +years = {"tm": 2011, "etm": 2019, "oli": 2019} + + +def create_image(path: str) -> None: + profile = { + "driver": "GTiff", + "dtype": "uint8", + "nodata": None, + "width": SIZE, + "height": SIZE, + "count": num_bands["_".join(path.split(os.sep)[1].split("_")[2:][:-1])], + "crs": CRS.from_epsg(4326), + "transform": Affine( + 0.00037672803497508636, + 0.0, + -109.07063613660262, + 0.0, + -0.0002554026278261721, + 47.49838726154881, + ), + "blockysize": 1, + "tiled": False, + "compress": "lzw", + "interleave": "pixel", + } + + Z = np.random.randint(low=0, high=255, size=(SIZE, SIZE)) + + with rasterio.open(path, "w", **profile) as src: + for i in src.indexes: + src.write(Z, i) + + +def create_mask(path: str) -> None: + profile = { + "driver": "GTiff", + "dtype": "uint8", + "nodata": None, + "width": SIZE, + "height": SIZE, + "count": 1, + "crs": CRS.from_epsg(4326), + "transform": Affine( + 0.00037672803497508636, + 0.0, + -109.07063613660262, + 0.0, + -0.0002554026278261721, + 47.49838726154881, + ), + "blockysize": 1, + "tiled": False, + "compress": "lzw", + "interleave": "band", + } + + Z = np.random.randint(low=0, high=10, size=(1, SIZE, SIZE)) + + with rasterio.open(path, "w", **profile) as src: + src.write(Z) + + +def create_img_directory(directory: str, hierarchy: FILENAME_HIERARCHY) -> None: + if isinstance(hierarchy, dict): + # Recursive case + for key, value in hierarchy.items(): + if any([x in key for x in filenames.keys()]): + key = f"ssl4eo_l_{key}_benchmark" + path = os.path.join(directory, key) + os.makedirs(path, exist_ok=True) + create_img_directory(path, value) + else: + # Base case + for value in hierarchy: + path = os.path.join(directory, value) + create_image(path) + + +def create_mask_directory( + directory: str, hierarchy: FILENAME_HIERARCHY, mask_product: str +) -> None: + if isinstance(hierarchy, dict): + # Recursive case + for key, value in hierarchy.items(): + path = os.path.join(directory, key) + os.makedirs(path, exist_ok=True) + create_mask_directory(path, value, mask_product) + else: + # Base case + for value in hierarchy: + path = os.path.join(directory, value) + year = years[path.split(os.sep)[1].split("_")[2]] + create_mask(path.replace("all_bands", f"{mask_product}_{year}")) + + +def create_tarballs(directories) -> None: + for directory in directories: + # Create tarballs + shutil.make_archive(directory, "gztar", ".", directory) + + # Compute checksums + with open(f"{directory}.tar.gz", "rb") as f: + md5 = hashlib.md5(f.read()).hexdigest() + print(directory, md5) + + +if __name__ == "__main__": + # image directories + create_img_directory(".", filenames) + directories = filenames.keys() + directories = [f"ssl4eo_l_{key}_benchmark" for key in directories] + create_tarballs(directories) + + # mask directory cdl + mask_keep = ["tm_toa", "etm_sr", "oli_sr"] + mask_filenames = { + f"ssl4eo_l_{key.split('_')[0]}_cdl": val + for key, val in filenames.items() + if key in mask_keep + } + create_mask_directory(".", mask_filenames, "cdl") + directories = mask_filenames.keys() + create_tarballs(directories) + + # mask directory nlcd + mask_filenames = { + f"ssl4eo_l_{key.split('_')[0]}_nlcd": val + for key, val in filenames.items() + if key in mask_keep + } + create_mask_directory(".", mask_filenames, "nlcd") + directories = mask_filenames.keys() + create_tarballs(directories) diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl.tar.gz new file mode 100644 index 00000000000..db71500d101 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000001/LE07_172030_20010526/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000001/LE07_172030_20010526/cdl_2019.tif new file mode 100644 index 00000000000..5824e1a0ad5 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000001/LE07_172030_20010526/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000002/LE07_223084_20010413/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000002/LE07_223084_20010413/cdl_2019.tif new file mode 100644 index 00000000000..cc9725c634c Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000002/LE07_223084_20010413/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000003/LE07_172034_20020902/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000003/LE07_172034_20020902/cdl_2019.tif new file mode 100644 index 00000000000..511fa2ce7fa Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000003/LE07_172034_20020902/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000004/LE07_172034_20020903/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000004/LE07_172034_20020903/cdl_2019.tif new file mode 100644 index 00000000000..b20374004d3 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000004/LE07_172034_20020903/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000005/LE07_172034_20020904/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000005/LE07_172034_20020904/cdl_2019.tif new file mode 100644 index 00000000000..e7440898b6d Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000005/LE07_172034_20020904/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000006/LE07_172034_20020905/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000006/LE07_172034_20020905/cdl_2019.tif new file mode 100644 index 00000000000..16515f3e4f0 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000006/LE07_172034_20020905/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000007/LE07_172034_20020906/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000007/LE07_172034_20020906/cdl_2019.tif new file mode 100644 index 00000000000..57dd976c22f Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000007/LE07_172034_20020906/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000008/LE07_172034_20020907/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000008/LE07_172034_20020907/cdl_2019.tif new file mode 100644 index 00000000000..6f9a632b02a Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000008/LE07_172034_20020907/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000009/LE07_172034_20020908/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000009/LE07_172034_20020908/cdl_2019.tif new file mode 100644 index 00000000000..a69d7ec7217 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000009/LE07_172034_20020908/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000010/LE07_172034_20020909/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000010/LE07_172034_20020909/cdl_2019.tif new file mode 100644 index 00000000000..b6a317bcdaa Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_cdl/0000010/LE07_172034_20020909/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd.tar.gz new file mode 100644 index 00000000000..7321ddffb43 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000001/LE07_172030_20010526/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000001/LE07_172030_20010526/nlcd_2019.tif new file mode 100644 index 00000000000..9cae7c31a4b Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000001/LE07_172030_20010526/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000002/LE07_223084_20010413/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000002/LE07_223084_20010413/nlcd_2019.tif new file mode 100644 index 00000000000..b71356702fd Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000002/LE07_223084_20010413/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000003/LE07_172034_20020902/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000003/LE07_172034_20020902/nlcd_2019.tif new file mode 100644 index 00000000000..02ccca2b3f3 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000003/LE07_172034_20020902/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000004/LE07_172034_20020903/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000004/LE07_172034_20020903/nlcd_2019.tif new file mode 100644 index 00000000000..ca116a9e56c Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000004/LE07_172034_20020903/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000005/LE07_172034_20020904/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000005/LE07_172034_20020904/nlcd_2019.tif new file mode 100644 index 00000000000..067da4ccefc Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000005/LE07_172034_20020904/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000006/LE07_172034_20020905/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000006/LE07_172034_20020905/nlcd_2019.tif new file mode 100644 index 00000000000..33c2e49829b Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000006/LE07_172034_20020905/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000007/LE07_172034_20020906/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000007/LE07_172034_20020906/nlcd_2019.tif new file mode 100644 index 00000000000..603ebe43df9 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000007/LE07_172034_20020906/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000008/LE07_172034_20020907/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000008/LE07_172034_20020907/nlcd_2019.tif new file mode 100644 index 00000000000..5b5f5e3d1df Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000008/LE07_172034_20020907/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000009/LE07_172034_20020908/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000009/LE07_172034_20020908/nlcd_2019.tif new file mode 100644 index 00000000000..4461106dad9 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000009/LE07_172034_20020908/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000010/LE07_172034_20020909/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000010/LE07_172034_20020909/nlcd_2019.tif new file mode 100644 index 00000000000..8e1460a9b8c Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_nlcd/0000010/LE07_172034_20020909/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark.tar.gz new file mode 100644 index 00000000000..9c5ad40b047 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000001/LE07_172030_20010526/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000001/LE07_172030_20010526/all_bands.tif new file mode 100644 index 00000000000..153a079a090 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000001/LE07_172030_20010526/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000002/LE07_223084_20010413/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000002/LE07_223084_20010413/all_bands.tif new file mode 100644 index 00000000000..f377f7fca15 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000002/LE07_223084_20010413/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000003/LE07_172034_20020902/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000003/LE07_172034_20020902/all_bands.tif new file mode 100644 index 00000000000..671df987a46 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000003/LE07_172034_20020902/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000004/LE07_172034_20020903/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000004/LE07_172034_20020903/all_bands.tif new file mode 100644 index 00000000000..5acd2f67809 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000004/LE07_172034_20020903/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000005/LE07_172034_20020904/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000005/LE07_172034_20020904/all_bands.tif new file mode 100644 index 00000000000..3bea38ca5ef Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000005/LE07_172034_20020904/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000006/LE07_172034_20020905/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000006/LE07_172034_20020905/all_bands.tif new file mode 100644 index 00000000000..f60928e7929 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000006/LE07_172034_20020905/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000007/LE07_172034_20020906/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000007/LE07_172034_20020906/all_bands.tif new file mode 100644 index 00000000000..9c5011c5734 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000007/LE07_172034_20020906/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000008/LE07_172034_20020907/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000008/LE07_172034_20020907/all_bands.tif new file mode 100644 index 00000000000..abf07ca47d2 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000008/LE07_172034_20020907/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000009/LE07_172034_20020908/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000009/LE07_172034_20020908/all_bands.tif new file mode 100644 index 00000000000..64420e64d17 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000009/LE07_172034_20020908/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000010/LE07_172034_20020909/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000010/LE07_172034_20020909/all_bands.tif new file mode 100644 index 00000000000..e2f57311086 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_sr_benchmark/0000010/LE07_172034_20020909/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark.tar.gz new file mode 100644 index 00000000000..014831525f2 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000001/LE07_172030_20010526/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000001/LE07_172030_20010526/all_bands.tif new file mode 100644 index 00000000000..9caada33851 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000001/LE07_172030_20010526/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000002/LE07_223084_20010413/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000002/LE07_223084_20010413/all_bands.tif new file mode 100644 index 00000000000..264034285a8 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000002/LE07_223084_20010413/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000003/LE07_172034_20020902/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000003/LE07_172034_20020902/all_bands.tif new file mode 100644 index 00000000000..9d12ba28af2 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000003/LE07_172034_20020902/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000004/LE07_172034_20020903/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000004/LE07_172034_20020903/all_bands.tif new file mode 100644 index 00000000000..1091ed891e2 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000004/LE07_172034_20020903/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000005/LE07_172034_20020904/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000005/LE07_172034_20020904/all_bands.tif new file mode 100644 index 00000000000..395a88b18be Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000005/LE07_172034_20020904/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000006/LE07_172034_20020905/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000006/LE07_172034_20020905/all_bands.tif new file mode 100644 index 00000000000..30ca20e4c3b Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000006/LE07_172034_20020905/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000007/LE07_172034_20020906/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000007/LE07_172034_20020906/all_bands.tif new file mode 100644 index 00000000000..829b961f74b Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000007/LE07_172034_20020906/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000008/LE07_172034_20020907/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000008/LE07_172034_20020907/all_bands.tif new file mode 100644 index 00000000000..2fbc4e6cddb Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000008/LE07_172034_20020907/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000009/LE07_172034_20020908/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000009/LE07_172034_20020908/all_bands.tif new file mode 100644 index 00000000000..020cdfdfe3c Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000009/LE07_172034_20020908/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000010/LE07_172034_20020909/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000010/LE07_172034_20020909/all_bands.tif new file mode 100644 index 00000000000..6a8ab88eceb Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_etm_toa_benchmark/0000010/LE07_172034_20020909/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl.tar.gz new file mode 100644 index 00000000000..b0e6514ec9a Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000001/LC08_172030_20010526/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000001/LC08_172030_20010526/cdl_2019.tif new file mode 100644 index 00000000000..ffba2dc5083 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000001/LC08_172030_20010526/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000002/LC08_223084_20010413/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000002/LC08_223084_20010413/cdl_2019.tif new file mode 100644 index 00000000000..22b2b6682ba Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000002/LC08_223084_20010413/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000003/LC08_172034_20020902/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000003/LC08_172034_20020902/cdl_2019.tif new file mode 100644 index 00000000000..693e3edaa80 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000003/LC08_172034_20020902/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000004/LC08_172034_20020903/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000004/LC08_172034_20020903/cdl_2019.tif new file mode 100644 index 00000000000..8a885330764 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000004/LC08_172034_20020903/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000005/LC08_172034_20020904/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000005/LC08_172034_20020904/cdl_2019.tif new file mode 100644 index 00000000000..5245c0273a5 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000005/LC08_172034_20020904/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000006/LC08_172034_20020905/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000006/LC08_172034_20020905/cdl_2019.tif new file mode 100644 index 00000000000..aa596fe6e10 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000006/LC08_172034_20020905/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000007/LC08_172034_20020906/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000007/LC08_172034_20020906/cdl_2019.tif new file mode 100644 index 00000000000..d7323c722b6 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000007/LC08_172034_20020906/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000008/LC08_172034_20020907/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000008/LC08_172034_20020907/cdl_2019.tif new file mode 100644 index 00000000000..aad3e53fa88 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000008/LC08_172034_20020907/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000009/LC08_172034_20020908/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000009/LC08_172034_20020908/cdl_2019.tif new file mode 100644 index 00000000000..cb87251f552 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000009/LC08_172034_20020908/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000010/LC08_172034_20020909/cdl_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000010/LC08_172034_20020909/cdl_2019.tif new file mode 100644 index 00000000000..55c8bb5dc1a Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_cdl/0000010/LC08_172034_20020909/cdl_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd.tar.gz new file mode 100644 index 00000000000..a7d557d56d7 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000001/LC08_172030_20010526/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000001/LC08_172030_20010526/nlcd_2019.tif new file mode 100644 index 00000000000..4e4eabaa555 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000001/LC08_172030_20010526/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000002/LC08_223084_20010413/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000002/LC08_223084_20010413/nlcd_2019.tif new file mode 100644 index 00000000000..50f90d5d278 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000002/LC08_223084_20010413/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000003/LC08_172034_20020902/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000003/LC08_172034_20020902/nlcd_2019.tif new file mode 100644 index 00000000000..06e3752f024 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000003/LC08_172034_20020902/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000004/LC08_172034_20020903/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000004/LC08_172034_20020903/nlcd_2019.tif new file mode 100644 index 00000000000..b75ddce9e75 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000004/LC08_172034_20020903/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000005/LC08_172034_20020904/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000005/LC08_172034_20020904/nlcd_2019.tif new file mode 100644 index 00000000000..50f8af33639 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000005/LC08_172034_20020904/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000006/LC08_172034_20020905/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000006/LC08_172034_20020905/nlcd_2019.tif new file mode 100644 index 00000000000..7debaa36ad1 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000006/LC08_172034_20020905/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000007/LC08_172034_20020906/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000007/LC08_172034_20020906/nlcd_2019.tif new file mode 100644 index 00000000000..e24f4cc7415 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000007/LC08_172034_20020906/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000008/LC08_172034_20020907/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000008/LC08_172034_20020907/nlcd_2019.tif new file mode 100644 index 00000000000..750750d60f7 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000008/LC08_172034_20020907/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000009/LC08_172034_20020908/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000009/LC08_172034_20020908/nlcd_2019.tif new file mode 100644 index 00000000000..8595686515c Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000009/LC08_172034_20020908/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000010/LC08_172034_20020909/nlcd_2019.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000010/LC08_172034_20020909/nlcd_2019.tif new file mode 100644 index 00000000000..c75363d1a66 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_nlcd/0000010/LC08_172034_20020909/nlcd_2019.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark.tar.gz new file mode 100644 index 00000000000..3e7c30372c5 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000001/LC08_172030_20010526/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000001/LC08_172030_20010526/all_bands.tif new file mode 100644 index 00000000000..61ca439f430 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000001/LC08_172030_20010526/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000002/LC08_223084_20010413/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000002/LC08_223084_20010413/all_bands.tif new file mode 100644 index 00000000000..ba6fbab50f5 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000002/LC08_223084_20010413/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000003/LC08_172034_20020902/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000003/LC08_172034_20020902/all_bands.tif new file mode 100644 index 00000000000..b7251a76cc1 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000003/LC08_172034_20020902/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000004/LC08_172034_20020903/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000004/LC08_172034_20020903/all_bands.tif new file mode 100644 index 00000000000..edc03caec51 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000004/LC08_172034_20020903/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000005/LC08_172034_20020904/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000005/LC08_172034_20020904/all_bands.tif new file mode 100644 index 00000000000..8866057f347 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000005/LC08_172034_20020904/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000006/LC08_172034_20020905/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000006/LC08_172034_20020905/all_bands.tif new file mode 100644 index 00000000000..9ea106ed8db Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000006/LC08_172034_20020905/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000007/LC08_172034_20020906/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000007/LC08_172034_20020906/all_bands.tif new file mode 100644 index 00000000000..ad157cacc6e Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000007/LC08_172034_20020906/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000008/LC08_172034_20020907/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000008/LC08_172034_20020907/all_bands.tif new file mode 100644 index 00000000000..2f13e4b4df6 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000008/LC08_172034_20020907/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000009/LC08_172034_20020908/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000009/LC08_172034_20020908/all_bands.tif new file mode 100644 index 00000000000..5229276be34 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000009/LC08_172034_20020908/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000010/LC08_172034_20020909/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000010/LC08_172034_20020909/all_bands.tif new file mode 100644 index 00000000000..0268db7f1b7 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_sr_benchmark/0000010/LC08_172034_20020909/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark.tar.gz new file mode 100644 index 00000000000..e28c2637333 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000001/LC08_172030_20010526/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000001/LC08_172030_20010526/all_bands.tif new file mode 100644 index 00000000000..b3230ee4dd0 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000001/LC08_172030_20010526/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000002/LC08_223084_20010413/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000002/LC08_223084_20010413/all_bands.tif new file mode 100644 index 00000000000..e928fca2ff3 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000002/LC08_223084_20010413/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000003/LC08_172034_20020902/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000003/LC08_172034_20020902/all_bands.tif new file mode 100644 index 00000000000..e417f592c17 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000003/LC08_172034_20020902/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000004/LC08_172034_20020903/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000004/LC08_172034_20020903/all_bands.tif new file mode 100644 index 00000000000..e849db4bb83 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000004/LC08_172034_20020903/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000005/LC08_172034_20020904/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000005/LC08_172034_20020904/all_bands.tif new file mode 100644 index 00000000000..3b62c7054db Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000005/LC08_172034_20020904/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000006/LC08_172034_20020905/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000006/LC08_172034_20020905/all_bands.tif new file mode 100644 index 00000000000..b1206ea2f98 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000006/LC08_172034_20020905/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000007/LC08_172034_20020906/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000007/LC08_172034_20020906/all_bands.tif new file mode 100644 index 00000000000..210a0957c5f Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000007/LC08_172034_20020906/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000008/LC08_172034_20020907/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000008/LC08_172034_20020907/all_bands.tif new file mode 100644 index 00000000000..b3964ddbaf8 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000008/LC08_172034_20020907/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000009/LC08_172034_20020908/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000009/LC08_172034_20020908/all_bands.tif new file mode 100644 index 00000000000..a7ceb25af97 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000009/LC08_172034_20020908/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000010/LC08_172034_20020909/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000010/LC08_172034_20020909/all_bands.tif new file mode 100644 index 00000000000..89a85923b48 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_oli_tirs_toa_benchmark/0000010/LC08_172034_20020909/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl.tar.gz new file mode 100644 index 00000000000..05268004ad2 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000001/LT05_172030_20010526/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000001/LT05_172030_20010526/cdl_2011.tif new file mode 100644 index 00000000000..a7123e00c88 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000001/LT05_172030_20010526/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000002/LT05_223084_20010413/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000002/LT05_223084_20010413/cdl_2011.tif new file mode 100644 index 00000000000..d3104ec9222 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000002/LT05_223084_20010413/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000003/LT05_172034_20020902/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000003/LT05_172034_20020902/cdl_2011.tif new file mode 100644 index 00000000000..22b5e866239 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000003/LT05_172034_20020902/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000004/LT05_172034_20020903/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000004/LT05_172034_20020903/cdl_2011.tif new file mode 100644 index 00000000000..775a1da9d8b Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000004/LT05_172034_20020903/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000005/LT05_172034_20020904/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000005/LT05_172034_20020904/cdl_2011.tif new file mode 100644 index 00000000000..ce7a0ae3286 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000005/LT05_172034_20020904/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000006/LT05_172034_20020905/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000006/LT05_172034_20020905/cdl_2011.tif new file mode 100644 index 00000000000..d78efe51d2c Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000006/LT05_172034_20020905/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000007/LT05_172034_20020906/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000007/LT05_172034_20020906/cdl_2011.tif new file mode 100644 index 00000000000..2628da31692 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000007/LT05_172034_20020906/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000008/LT05_172034_20020907/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000008/LT05_172034_20020907/cdl_2011.tif new file mode 100644 index 00000000000..3ac628132e8 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000008/LT05_172034_20020907/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000009/LT05_172034_20020908/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000009/LT05_172034_20020908/cdl_2011.tif new file mode 100644 index 00000000000..f178bfb9af2 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000009/LT05_172034_20020908/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000010/LT05_172034_20020909/cdl_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000010/LT05_172034_20020909/cdl_2011.tif new file mode 100644 index 00000000000..d2ad62f924c Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_cdl/0000010/LT05_172034_20020909/cdl_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd.tar.gz new file mode 100644 index 00000000000..01b73c8f94f Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000001/LT05_172030_20010526/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000001/LT05_172030_20010526/nlcd_2011.tif new file mode 100644 index 00000000000..48f3c52a0f2 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000001/LT05_172030_20010526/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000002/LT05_223084_20010413/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000002/LT05_223084_20010413/nlcd_2011.tif new file mode 100644 index 00000000000..41594469187 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000002/LT05_223084_20010413/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000003/LT05_172034_20020902/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000003/LT05_172034_20020902/nlcd_2011.tif new file mode 100644 index 00000000000..254e6ee31a6 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000003/LT05_172034_20020902/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000004/LT05_172034_20020903/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000004/LT05_172034_20020903/nlcd_2011.tif new file mode 100644 index 00000000000..db60fe9539a Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000004/LT05_172034_20020903/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000005/LT05_172034_20020904/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000005/LT05_172034_20020904/nlcd_2011.tif new file mode 100644 index 00000000000..5aa4d329b97 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000005/LT05_172034_20020904/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000006/LT05_172034_20020905/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000006/LT05_172034_20020905/nlcd_2011.tif new file mode 100644 index 00000000000..faafd194d87 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000006/LT05_172034_20020905/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000007/LT05_172034_20020906/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000007/LT05_172034_20020906/nlcd_2011.tif new file mode 100644 index 00000000000..d72f571556b Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000007/LT05_172034_20020906/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000008/LT05_172034_20020907/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000008/LT05_172034_20020907/nlcd_2011.tif new file mode 100644 index 00000000000..a52cabd823a Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000008/LT05_172034_20020907/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000009/LT05_172034_20020908/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000009/LT05_172034_20020908/nlcd_2011.tif new file mode 100644 index 00000000000..6a6b3042d4b Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000009/LT05_172034_20020908/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000010/LT05_172034_20020909/nlcd_2011.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000010/LT05_172034_20020909/nlcd_2011.tif new file mode 100644 index 00000000000..f56795e1c6c Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_nlcd/0000010/LT05_172034_20020909/nlcd_2011.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark.tar.gz b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark.tar.gz new file mode 100644 index 00000000000..24507642650 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark.tar.gz differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000001/LT05_172030_20010526/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000001/LT05_172030_20010526/all_bands.tif new file mode 100644 index 00000000000..d9984528428 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000001/LT05_172030_20010526/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000002/LT05_223084_20010413/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000002/LT05_223084_20010413/all_bands.tif new file mode 100644 index 00000000000..a6107e30011 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000002/LT05_223084_20010413/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000003/LT05_172034_20020902/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000003/LT05_172034_20020902/all_bands.tif new file mode 100644 index 00000000000..79e775652a2 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000003/LT05_172034_20020902/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000004/LT05_172034_20020903/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000004/LT05_172034_20020903/all_bands.tif new file mode 100644 index 00000000000..c2823bdc829 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000004/LT05_172034_20020903/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000005/LT05_172034_20020904/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000005/LT05_172034_20020904/all_bands.tif new file mode 100644 index 00000000000..040104ebb86 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000005/LT05_172034_20020904/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000006/LT05_172034_20020905/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000006/LT05_172034_20020905/all_bands.tif new file mode 100644 index 00000000000..1b7a68a6cd5 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000006/LT05_172034_20020905/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000007/LT05_172034_20020906/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000007/LT05_172034_20020906/all_bands.tif new file mode 100644 index 00000000000..63bdefa02a3 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000007/LT05_172034_20020906/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000008/LT05_172034_20020907/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000008/LT05_172034_20020907/all_bands.tif new file mode 100644 index 00000000000..0994bad25fb Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000008/LT05_172034_20020907/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000009/LT05_172034_20020908/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000009/LT05_172034_20020908/all_bands.tif new file mode 100644 index 00000000000..cf2eaa37313 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000009/LT05_172034_20020908/all_bands.tif differ diff --git a/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000010/LT05_172034_20020909/all_bands.tif b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000010/LT05_172034_20020909/all_bands.tif new file mode 100644 index 00000000000..c65e635be71 Binary files /dev/null and b/tests/data/ssl4eo_benchmark_landsat/ssl4eo_l_tm_toa_benchmark/0000010/LT05_172034_20020909/all_bands.tif differ diff --git a/tests/datasets/test_ssl4eo_benchmark.py b/tests/datasets/test_ssl4eo_benchmark.py new file mode 100644 index 00000000000..513687b95e4 --- /dev/null +++ b/tests/datasets/test_ssl4eo_benchmark.py @@ -0,0 +1,135 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import glob +import os +import shutil +from itertools import product +from pathlib import Path + +import matplotlib.pyplot as plt +import pytest +import torch +import torch.nn as nn +from _pytest.fixtures import SubRequest +from pytest import MonkeyPatch +from torch.utils.data import ConcatDataset + +import torchgeo.datasets.utils +from torchgeo.datasets import SSL4EOLBenchmark + + +def download_url(url: str, root: str, *args: str, **kwargs: str) -> None: + shutil.copy(url, root) + + +class TestSSL4EOLBenchmark: + @pytest.fixture( + params=product( + ["tm_toa", "etm_toa", "etm_sr", "oli_tirs_toa", "oli_sr"], + ["cdl", "nlcd"], + ["train", "val", "test"], + ) + ) + def dataset( + self, monkeypatch: MonkeyPatch, tmp_path: Path, request: SubRequest + ) -> SSL4EOLBenchmark: + monkeypatch.setattr( + torchgeo.datasets.ssl4eo_benchmark, "download_url", download_url + ) + root = str(tmp_path) + + url = os.path.join("tests", "data", "ssl4eo_benchmark_landsat", "{}.tar.gz") + monkeypatch.setattr(SSL4EOLBenchmark, "url", url) + + input_sensor, mask_product, split = request.param + monkeypatch.setattr( + SSL4EOLBenchmark, "split_percentages", [1 / 3, 1 / 3, 1 / 3] + ) + + img_md5s = { + "tm_toa": "ecfdd3dcbc812c5e7cf272a5cddb33e9", + "etm_sr": "3e598245948eb7d072d5b83c95f22422", + "etm_toa": "e24ff11f6aedb3930380b53cb6f780b6", + "oli_tirs_toa": "490baa1eedd5032277e2a07f45dd8c2b", + "oli_sr": "884f6e28a23a1b7d464eff39abd7667d", + } + monkeypatch.setattr(SSL4EOLBenchmark, "img_md5s", img_md5s) + + mask_md5s = { + "tm": { + "cdl": "43f30648e0f7c8dba78fa729b6db9ffe", + "nlcd": "4272958acb32cc3b83f593684bc3e63c", + }, + "etm": { + "cdl": "b215b7e3b65b18a6d52ce9a35c90a16f", + "nlcd": "f823fc69965d7f6215f52bea2141df41", + }, + "oli": { + "cdl": "aaa956d7aa985e8de2c565858c9ac4e8", + "nlcd": "cc49207df010a4f358fb16a46772e9ae", + }, + } + monkeypatch.setattr(SSL4EOLBenchmark, "mask_md5s", mask_md5s) + + transforms = nn.Identity() + return SSL4EOLBenchmark( + root=root, + input_sensor=input_sensor, + mask_product=mask_product, + split=split, + transforms=transforms, + download=True, + checksum=True, + ) + + def test_getitem(self, dataset: SSL4EOLBenchmark) -> None: + x = dataset[0] + assert isinstance(x, dict) + assert isinstance(x["image"], torch.Tensor) + assert isinstance(x["mask"], torch.Tensor) + + def test_invalid_split(self) -> None: + with pytest.raises(AssertionError): + SSL4EOLBenchmark(split="foo") + + def test_invalid_input_sensor(self) -> None: + with pytest.raises(AssertionError): + SSL4EOLBenchmark(input_sensor="foo") + + def test_invalid_mask_product(self) -> None: + with pytest.raises(AssertionError): + SSL4EOLBenchmark(mask_product="foo") + + def test_add(self, dataset: SSL4EOLBenchmark) -> None: + ds = dataset + dataset + assert isinstance(ds, ConcatDataset) + + def test_already_extracted(self, dataset: SSL4EOLBenchmark) -> None: + SSL4EOLBenchmark( + root=dataset.root, + input_sensor=dataset.input_sensor, + mask_product=dataset.mask_product, + download=True, + ) + + def test_already_downloaded(self, tmp_path: Path) -> None: + pathname = os.path.join("tests", "data", "ssl4eo_benchmark_landsat", "*.tar.gz") + root = str(tmp_path) + for tarfile in glob.iglob(pathname): + shutil.copy(tarfile, root) + SSL4EOLBenchmark(root) + + def test_not_downloaded(self, tmp_path: Path) -> None: + with pytest.raises(RuntimeError, match="Dataset not found"): + SSL4EOLBenchmark(str(tmp_path)) + + def test_plot(self, dataset: SSL4EOLBenchmark) -> None: + sample = dataset[0] + dataset.plot(sample, suptitle="Test") + plt.close() + dataset.plot(sample, show_titles=False) + plt.close() + sample["prediction"] = sample["mask"].clone() + dataset.plot(sample) + plt.close() diff --git a/tests/trainers/test_segmentation.py b/tests/trainers/test_segmentation.py index bc7f5e5b3ca..29ddf2dcadb 100644 --- a/tests/trainers/test_segmentation.py +++ b/tests/trainers/test_segmentation.py @@ -70,6 +70,8 @@ class TestSemanticSegmentationTask: "sen12ms_s2_all", "sen12ms_s2_reduced", "spacenet1", + "ssl4eo_l_benchmark_cdl", + "ssl4eo_l_benchmark_nlcd", "vaihingen2d", ], ) diff --git a/torchgeo/datamodules/__init__.py b/torchgeo/datamodules/__init__.py index ba902b0cd61..8761e850e18 100644 --- a/torchgeo/datamodules/__init__.py +++ b/torchgeo/datamodules/__init__.py @@ -30,6 +30,7 @@ from .so2sat import So2SatDataModule from .spacenet import SpaceNet1DataModule from .ssl4eo import SSL4EOLDataModule, SSL4EOS12DataModule +from .ssl4eo_benchmark import SSL4EOLBenchmarkDataModule from .sustainbench_crop_yield import SustainBenchCropYieldDataModule from .ucmerced import UCMercedDataModule from .usavars import USAVarsDataModule @@ -65,6 +66,7 @@ "SKIPPDDataModule", "So2SatDataModule", "SpaceNet1DataModule", + "SSL4EOLBenchmarkDataModule", "SSL4EOLDataModule", "SSL4EOS12DataModule", "SustainBenchCropYieldDataModule", diff --git a/torchgeo/datamodules/ssl4eo_benchmark.py b/torchgeo/datamodules/ssl4eo_benchmark.py new file mode 100644 index 00000000000..40da15a4cde --- /dev/null +++ b/torchgeo/datamodules/ssl4eo_benchmark.py @@ -0,0 +1,50 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +"""SSL4EO datamodule.""" + +from typing import Any + +import kornia.augmentation as K + +from ..datasets import SSL4EOLBenchmark +from ..transforms import AugmentationSequential +from .geo import NonGeoDataModule + + +class SSL4EOLBenchmarkDataModule(NonGeoDataModule): + """LightningDataModule implementation for the SSL4EO-L Benchmark dataset. + + .. versionadded:: 0.5 + """ + + crop_size = 224 + + def __init__( + self, batch_size: int = 64, num_workers: int = 0, **kwargs: Any + ) -> None: + """Initialize a new SSL4EOLBenchmarkDataModule instance. + + Args: + batch_size: Size of each mini-batch. + num_workers: Number of workers for parallel data loading. + **kwargs: Additional keyword arguments passed to + :class:`~torchgeo.datasets.SSL4EOLBenchmark`. + """ + super().__init__(SSL4EOLBenchmark, batch_size, num_workers, **kwargs) + + self.train_aug = AugmentationSequential( + K.Normalize(mean=self.mean, std=self.std), + K.CenterCrop(self.crop_size), + data_keys=["image", "mask"], + ) + self.val_aug = AugmentationSequential( + K.Normalize(mean=self.mean, std=self.std), + K.CenterCrop(self.crop_size), + data_keys=["image", "mask"], + ) + self.test_aug = AugmentationSequential( + K.Normalize(mean=self.mean, std=self.std), + K.CenterCrop(self.crop_size), + data_keys=["image", "mask"], + ) diff --git a/torchgeo/datasets/__init__.py b/torchgeo/datasets/__init__.py index 92734304a48..ae0efe90ea6 100644 --- a/torchgeo/datasets/__init__.py +++ b/torchgeo/datasets/__init__.py @@ -105,6 +105,7 @@ time_series_split, ) from .ssl4eo import SSL4EO, SSL4EOL, SSL4EOS12 +from .ssl4eo_benchmark import SSL4EOLBenchmark from .sustainbench_crop_yield import SustainBenchCropYield from .ucmerced import UCMerced from .usavars import USAVars @@ -210,6 +211,7 @@ "SpaceNet6", "SpaceNet7", "SSL4EO", + "SSL4EOLBenchmark", "SSL4EOL", "SSL4EOS12", "SustainBenchCropYield", diff --git a/torchgeo/datasets/ssl4eo_benchmark.py b/torchgeo/datasets/ssl4eo_benchmark.py new file mode 100644 index 00000000000..d80254d913e --- /dev/null +++ b/torchgeo/datasets/ssl4eo_benchmark.py @@ -0,0 +1,366 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +"""Self-Supervised Learning for Earth Observation Benchmark Datasets.""" + +import glob +import os +from typing import Callable, Optional + +import matplotlib.pyplot as plt +import numpy as np +import rasterio +import torch +from matplotlib.colors import ListedColormap +from torch import Tensor + +from .cdl import CDL +from .geo import NonGeoDataset +from .nlcd import NLCD +from .utils import download_url, extract_archive + + +class SSL4EOLBenchmark(NonGeoDataset): + """SSL4EO Landsat Benchmark Evaluation Dataset. + + Dataset is intended to be used for evaluation of SSL techniques. Each + benchmark dataset consists of 25,000 images with corresponding land + cover classification masks. + + Dataset format: + + * Input landsat image and single channel mask + * 25,000 total samples split into train, val, test (70%, 15%, 15%) + * NLCD dataset version has 17 classes + * CDL dataset version has 134 classes + + Each patch has the following properties: + + * 264 x 264 pixels + * Resampled to 30 m resolution (7920 x 7920 m) + * Single multispectral GeoTIFF file + + .. versionadded:: 0.5 + """ + + url = "https://huggingface.co/datasets/torchgeo/{}/resolve/main/{}.tar.gz" + + valid_input_sensors = ["tm_toa", "etm_toa", "etm_sr", "oli_tirs_toa", "oli_sr"] + valid_mask_products = ["cdl", "nlcd"] + valid_splits = ["train", "val", "test"] + + image_root = "ssl4eo_l_{}_benchmark" + img_md5s = { + "tm_toa": "8e3c5bcd56d3780a442f1332013b8d15", + "etm_toa": "1b051c7fe4d61c581b341370c9e76f1f", + "etm_sr": "a33d5e3b9c309980ef15d453235843ed", + "oli_tirs_toa": "6e9d7cf0392e1de2cbdb39962ba591aa", + "oli_sr": "0700cd15cc2366fe68c2f8c02fa09a15", + } + + mask_dir_dict = { + "tm_toa": "ssl4eo_l_tm_{}", + "etm_toa": "ssl4eo_l_etm_{}", + "etm_sr": "ssl4eo_l_etm_{}", + "oli_tirs_toa": "ssl4eo_l_oli_{}", + "oli_sr": "ssl4eo_l_oli_{}", + } + mask_md5s = { + "tm": { + "cdl": "3d676770ffb56c7e222a7192a652a846", + "nlcd": "261149d7614fcfdcb3be368eefa825c7", + }, + "etm": { + "cdl": "dd2560b18b89dfe7f0e867fcf7217bd0", + "nlcd": "916f4a433df6c8abca15b45b60d005d3", + }, + "oli": { + "cdl": "1cb057de6eafeca975deb35cb9fb036f", + "nlcd": "9de0d6d4d0b94313b80450f650813922", + }, + } + + year_dict = { + "tm_toa": 2011, + "etm_toa": 2019, + "etm_sr": 2019, + "oli_tirs_toa": 2019, + "oli_sr": 2019, + } + + rgb_indices = { + "tm_toa": [2, 1, 0], + "etm_toa": [2, 1, 0], + "etm_sr": [2, 1, 0], + "oli_tirs_toa": [3, 2, 1], + "oli_sr": [3, 2, 1], + } + + split_percentages = [0.7, 0.15, 0.15] + + ordinal_label_map = {"nlcd": NLCD.ordinal_label_map, "cdl": CDL.ordinal_label_map} + + cmaps = {"nlcd": NLCD.cmap, "cdl": CDL.cmap} + + def __init__( + self, + root: str = "data", + input_sensor: str = "oli_sr", + mask_product: str = "cdl", + split: str = "train", + transforms: Optional[Callable[[dict[str, Tensor]], dict[str, Tensor]]] = None, + download: bool = False, + checksum: bool = False, + ) -> None: + """Initialize a new SSL4EO Landsat Benchmark instance. + + Args: + root: root directory where dataset can be found + input_sensor: one of ['etm_toa', 'etm_sr', 'oli_tirs_toa, 'oli_sr'] + mask_product: mask target one of ['cdl', 'nlcd'] + split: dataset split, one of ['train', 'val', 'test'] + transforms: a function/transform that takes input sample and its target as + entry and returns a transformed version + download: if True, download dataset and store it in the root directory + checksum: if True, check the MD5 after downloading files (may be slow) + + Raises: + AssertionError: if any arguments are invalid + """ + assert ( + input_sensor in self.valid_input_sensors + ), f"Only supports one of {self.valid_input_sensors}, but found {input_sensor}." + self.input_sensor = input_sensor + assert ( + mask_product in self.valid_mask_products + ), f"Only supports one of {self.valid_mask_products}, but found {mask_product}." + self.mask_product = mask_product + assert ( + split in self.valid_splits + ), f"Only supports one of {self.valid_splits}, but found {split}." + self.split = split + + self.root = root + self.transforms = transforms + self.download = download + self.checksum = checksum + self.img_dir_name = self.image_root.format(self.input_sensor) + self.mask_dir_name = self.mask_dir_dict[self.input_sensor].format( + self.mask_product + ) + + self._verify() + + self.sample_collection = self.retrieve_sample_collection() + + # train, val, test split + np.random.seed(0) + sizes = (np.array(self.split_percentages) * len(self.sample_collection)).astype( + int + ) + cutoffs = np.cumsum(sizes)[:-1] + sample_indices = np.arange(len(self.sample_collection)) + np.random.shuffle(sample_indices) + groups = np.split(sample_indices, cutoffs) + split_indices = {"train": groups[0], "val": groups[1], "test": groups[2]}[ + self.split + ] + + self.sample_collection = [self.sample_collection[idx] for idx in split_indices] + + def _verify(self) -> None: + """Verify the integrity of the dataset. + + Raises: + RuntimeError: if ``download=False`` but dataset is missing or checksum fails + """ + # Check if the extracted files already exist + img_pathname = os.path.join(self.root, self.img_dir_name, "**", "all_bands.tif") + exists = [] + exists.append(bool(glob.glob(img_pathname, recursive=True))) + mask_pathname = os.path.join( + self.root, + self.mask_dir_name, + "**", + f"{self.mask_product}_{self.year_dict[self.input_sensor]}.tif", + ) + exists.append(bool(glob.glob(mask_pathname, recursive=True))) + + if all(exists): + return + # Check if the tar.gz files have already been downloaded + exists = [] + img_pathname = os.path.join(self.root, f"{self.img_dir_name}.tar.gz") + exists.append(os.path.exists(img_pathname)) + + mask_pathname = os.path.join(self.root, f"{self.mask_dir_name}.tar.gz") + exists.append(os.path.exists(mask_pathname)) + + if all(exists): + self._extract() + return + + # Check if the user requested to download the dataset + if not self.download: + raise RuntimeError( + f"Dataset not found in `root={self.root}` and `download=False`, " + "either specify a different `root` directory or use `download=True` " + "to automatically download the dataset." + ) + + # Download the dataset + self._download() + self._extract() + + def _download(self) -> None: + """Download the dataset.""" + # download imagery + download_url( + self.url.format(self.img_dir_name, self.img_dir_name), + self.root, + md5=self.img_md5s[self.input_sensor] if self.checksum else None, + ) + # download mask + download_url( + self.url.format(self.mask_dir_name, self.mask_dir_name), + self.root, + md5=self.mask_md5s[self.input_sensor.split("_")[0]][self.mask_product] + if self.checksum + else None, + ) + + def _extract(self) -> None: + """Extract the dataset.""" + img_pathname = os.path.join(self.root, f"{self.img_dir_name}.tar.gz") + extract_archive(img_pathname) + + mask_pathname = os.path.join(self.root, f"{self.mask_dir_name}.tar.gz") + extract_archive(mask_pathname) + + def __getitem__(self, index: int) -> dict[str, Tensor]: + """Return an index within the dataset. + + Args: + index: index to return + + Returns: + image and sample + """ + img_path, mask_path = self.sample_collection[index] + + sample = { + "image": self._load_image(img_path), + "mask": self._load_mask(mask_path), + } + + if self.transforms is not None: + sample = self.transforms(sample) + + return sample + + def __len__(self) -> int: + """Return the number of data points in the dataset. + + Returns: + length of the dataset + """ + return len(self.sample_collection) + + def retrieve_sample_collection(self) -> list[tuple[str, str]]: + """Retrieve paths to samples in data directory.""" + img_paths = glob.glob( + os.path.join(self.root, self.img_dir_name, "**", "all_bands.tif"), + recursive=True, + ) + img_paths = sorted(img_paths) + sample_collection: list[tuple[str, str]] = [] + for img_path in img_paths: + mask_path = img_path.replace(self.img_dir_name, self.mask_dir_name).replace( + "all_bands.tif", + f"{self.mask_product}_{self.year_dict[self.input_sensor]}.tif", + ) + sample_collection.append((img_path, mask_path)) + return sample_collection + + def _load_image(self, path: str) -> Tensor: + """Load the input image. + + Args: + path: path to input image + + Returns: + image + """ + with rasterio.open(path) as src: + image = src.read().astype(np.float32) + return torch.from_numpy(image) + + def _load_mask(self, path: str) -> Tensor: + """Load the mask. + + Args: + path: path to mask + + Retuns: + mask + """ + with rasterio.open(path) as src: + mask = src.read() + + for k, v in self.ordinal_label_map[self.mask_product].items(): + mask[mask == k] = v + + return torch.from_numpy(mask).long() + + def plot( + self, + sample: dict[str, Tensor], + show_titles: bool = True, + suptitle: Optional[str] = None, + ) -> plt.Figure: + """Plot a sample from the dataset. + + Args: + sample: a sample returned by :meth:`__getitem__` + show_titles: flag indicating whether to show titles above each panel + suptitle: optional string to use as a suptitle + + Returns: + a matplotlib Figure with the rendered sample + """ + ncols = 2 + image = sample["image"][self.rgb_indices[self.input_sensor]].permute(1, 2, 0) + image = image.numpy() / 255 + + plt_cmap = ListedColormap( + np.stack( + [np.array(val) / 255 for val in self.cmaps[self.mask_product].values()], + axis=0, + ) + ) + + mask = sample["mask"].squeeze(0) + + showing_predictions = "prediction" in sample + if showing_predictions: + prediction_mask = sample["prediction"].squeeze(0).numpy() + ncols = 3 + + fig, ax = plt.subplots(ncols=ncols, figsize=(4 * ncols, 4)) + ax[0].imshow(image) + ax[0].axis("off") + ax[1].imshow(mask, cmap=plt_cmap) + ax[1].axis("off") + if show_titles: + ax[0].set_title("Image") + ax[1].set_title("Mask") + + if showing_predictions: + ax[2].imshow(prediction_mask, cmap=plt_cmap) + if show_titles: + ax[2].set_title("Prediction") + + if suptitle is not None: + plt.suptitle(suptitle) + + return fig