DeepGlobe Land Cover#
- class torchgeo.datasets.DeepGlobeLandCover(root='data', split='train', transforms=None, checksum=False)[source]#
Bases:
NonGeoDatasetDeepGlobe Land Cover Classification Challenge dataset.
The DeepGlobe Land Cover Classification Challenge dataset offers high-resolution sub-meter satellite imagery focusing for the task of semantic segmentation to detect areas of urban, agriculture, rangeland, forest, water, barren, and unknown. It contains 1,146 satellite images of size 2448 x 2448 pixels in total, split into training/validation/test sets, the original dataset can be downloaded from Kaggle. However, we only use the training dataset with 803 images since the original test and valid dataset are not accompanied by labels. The dataset that we use with a custom train/test split can be downloaded from Kaggle (created as a part of Computer Vision by Deep Learning (CS4245) course offered at TU Delft).
Dataset format:
images are RGB data
masks are RGB image with with unique RGB values representing the class
Dataset classes:
Urban land
Agriculture land
Rangeland
Forest land
Water
Barren land
Unknown
File names for satellite images and the corresponding mask image are id_sat.jpg and id_mask.png, where id is an integer assigned to every image.
If you use this dataset in your research, please cite the following paper:
Note
This dataset can be downloaded using:
$ pip install kaggle # place api key at ~/.kaggle/kaggle.json $ kaggle datasets download -d geoap96/deepglobe2018-landcover-segmentation-traindataset $ unzip deepglobe2018-landcover-segmentation-traindataset.zip
Added in version 0.3.
- __init__(root='data', split='train', transforms=None, checksum=False)[source]#
Initialize a new DeepGlobeLandCover dataset instance.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
split (Literal['train', 'test']) – one of “train” or “test”
transforms (Callable[[dict[str, Any]], dict[str, Any]] | None) – a function/transform that takes input sample and its target as entry and returns a transformed version
checksum (bool) – if True, check the MD5 of the downloaded files (may be slow)
- Raises:
DatasetNotFoundError – If dataset is not found.
- __len__()[source]#
Return the number of data points in the dataset.
- Returns:
length of the dataset
- Return type: