L8 Biome#
- class torchgeo.datasets.L8Biome(paths, crs=None, res=None, bands=('B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'B10', 'B11'), transforms=None, cache=True, download=False, checksum=False, time_series=False)[source]#
Bases:
IntersectionDatasetL8 Biome dataset.
The L8 Biome dataset is a validation dataset for cloud cover assessment algorithms, consisting of Pre-Collection Landsat 8 Operational Land Imager (OLI) Thermal Infrared Sensor (TIRS) terrain-corrected (Level-1T) scenes.
Dataset features:
Images evenly divided between 8 unique biomes
96 scenes from Landsat 8 OLI/TIRS sensors
Imagery from global tiles between April 2013–October 2014
11 Level-1 spectral bands with 30 m per pixel resolution
Dataset format:
Images are composed of single multiband geotiffs
Labels are multiclass, stored in single geotiffs
Quality assurance bands, stored in single geotiffs
Level-1 metadata (MTL.txt file)
Landsat 8 OLI/TIRS bands: (B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11)
Dataset classes:
Fill
Cloud Shadow
Clear
Thin Cloud
Cloud
If you use this dataset in your research, please cite the following:
Added in version 0.5.
- __init__(paths, crs=None, res=None, bands=('B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'B10', 'B11'), transforms=None, cache=True, download=False, checksum=False, time_series=False)[source]#
Initialize a new L8Biome instance.
- Parameters:
paths (str | PathLike[str] | Iterable[str | PathLike[str]]) – one or more root directories to search or files to load
crs (CRS | None) – coordinate reference system (CRS) to warp to (defaults to EPSG:3857)
res (float | tuple[float, float] | None) – resolution of the dataset in units of CRS in (xres, yres) format. If a single float is provided, it is used for both the x and y resolution. (defaults to the resolution of the first file found)
bands (Sequence[str]) – bands to return (defaults to all bands)
transforms (Callable[[dict[str, Any]], dict[str, Any]] | None) – a function/transform that takes an input sample and returns a transformed version
cache (bool) – if True, cache file handle to speed up repeated sampling
download (bool) – if True, download dataset and store it in the root directory
checksum (bool) – if True, check the MD5 of the downloaded files (may be slow)
time_series (bool) – if True, stack data along the time series dimension [T, C, H, W]. If False, merge data into a [C, H, W] mosaic.
- Raises:
DatasetNotFoundError – If dataset is not found and download is False.
Added in version 0.9: The time_series parameter.
- plot(sample, show_titles=True, suptitle=None)[source]#
Plot a sample from the dataset.
- Parameters:
- Returns:
a matplotlib Figure with the rendered sample
- Raises:
RGBBandsMissingError – If bands does not include all RGB bands.
- Return type:
- __annotate_func__()#
The type of the None singleton.