NBUDataset#
- class deepinv.datasets.NBUDataset(root_dir, satellite='gaofen-1', return_pan=False, transform_ms=None, transform_pan=None, download=False)[source]#
Bases:
ImageDatasetNBU remote sensing multispectral satellite imagery dataset.
Returns
Cx256x256multispectral (MS) satellite images of urban scenes from 6 different satellites. withC=4for"gaofen-1"andC=8for the rest.For pan-sharpening problems, you can return pan-sharpening measurements by using
return_pan=True, outputting adeepinv.utils.TensorListof(MS, PAN)wherePANare 1024x1024 panchromatic images.This dataset was compiled in Meng et al.[1] 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
satelliteargument:"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.Tensornormalized to 0-1 over the whole dataset.See Remote sensing with satellite images for example using this dataset with remote sensing inverse problems.
- 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, pathlib.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
- References: