Solar Plants Brazil#
- class torchgeo.datasets.SolarPlantsBrazil(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Bases:
NonGeoDatasetSolar Plants Brazil dataset (semantic segmentation for photovoltaic detection).
The Solar Plants Brazil dataset provides satellite imagery and pixel-level annotations for detecting photovoltaic solar power stations.
Dataset features:
272 RGB+NIR GeoTIFF images (256x256 pixels)
Binary masks indicating presence of solar panels (1 = panel, 0 = background)
Organized into train, val, and test splits
Float32 GeoTIFF files for both input and mask images
Spatial metadata included (CRS, bounding box), but not used directly for training
Folder structure:
root/train/input/img(123).tif root/train/labels/target(123).tif
Access:
Dataset is hosted on Hugging Face: https://huggingface.co/datasets/FederCO23/solar-plants-brazil
Code and preprocessing steps available at: FederCO23/UCSD_MLBootcamp_Capstone
Added in version 0.8.
- __init__(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Initialize a SolarPlantsBrazil dataset split.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
split (Literal['train', 'val', 'test']) – dataset split to use, one of “train”, “val”, or “test”
transforms (Callable[[dict[str, Any]], dict[str, Any]] | None) – a function/transform that takes an input sample and returns a transformed version
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)
- Raises:
DatasetNotFoundError – If dataset is not found and download is False.
- __len__()[source]#
Return the number of samples in the dataset.
- Returns:
The number of image-mask pairs in the dataset.
- Return type: