NBUDataset#
- class deepinv.datasets.NBUDataset(root_dir: str | Path, satellite: str = 'gaofen-1', return_pan: bool = False, transform_ms: Callable | None = None, transform_pan: Callable | None = None, download: bool = False)[source]#
Bases:
Dataset
NBU remote sensing multispectral satellite imagery dataset.
Returns
Cx256x256
multispectral (MS) satellite images of urban scenes from 6 different satellites. withC=4
for"gaofen-1"
andC=8
for the rest.For pan-sharpening problems, you can return pan-sharpening measurements by using
return_pan=True
, outputting adeepinv.utils.TensorList
of(MS, PAN)
wherePAN
are 1024x1024 panchromatic images.This dataset was compiled in A Large-Scale Benchmark Data Set for Evaluating Pansharpening Performance and downloaded from this drive. We perform no other processing other than to take the “Urban” subset and provide each satellite’s data separately, which you can choose using the
satellite
argument:"gaofen-1"
: 5 images"ikonos"
: 60 images"quickbird"
: 150 images"worldview-2"
: 150 images"worldview-3"
: 55 images"worldview-4"
: 90 images
Note
Returns images as
torch.Tensor
normalised to 0-1 over the whole dataset.
- Examples:
Instantiate dataset and download raw data from the Internet
from deepinv.datasets import NBUDataset dataset = NBUDataset( root_dir=".", # root directory satellite="worldview-2", # choose satellite download=True, # download dataset return_pan=True # return panchromatic image too as pair (MS, PAN) ) print(dataset.check_dataset_exists()) print(len(dataset))
- Parameters:
root_dir (str, Path) – NBU dataset root directory
satellite (str) – satellite name, choose from the options above, defaults to “gaofen-1”.
return_pan (bool) – if
True
, return panchromatic images as TensorList of (MS, PAN), ifFalse
, just return multispectral images.transform_ms (Callable) – optional transform for multispectral images
transform_pan (Callable) – optional transform for panchromatic images
download (bool) – whether to download dataset
Examples using NBUDataset
:#
Remote sensing with satellite images