diff --git a/docs/api/datasets/non_geo_datasets.csv b/docs/api/datasets/non_geo_datasets.csv index b437579c370..2f8763d4dc6 100644 --- a/docs/api/datasets/non_geo_datasets.csv +++ b/docs/api/datasets/non_geo_datasets.csv @@ -3,7 +3,7 @@ Dataset,Task,Source,License,# Samples,# Classes,Size (px),Resolution (m),Bands `Benin Cashew Plantations`_,S,Airbus Pléiades,"CC-BY-4.0",70,6,"1,122x1,186",10,MSI `BigEarthNet`_,C,Sentinel-1/2,"CDLA-Permissive-1.0","590,326",19--43,120x120,10,"SAR, MSI" `BioMassters`_,R,Sentinel-1/2 and Lidar,"CC-BY-4.0",,,256x256, 10, "SAR, MSI" -`BRIGHT`_,CD,"MAXAR, NAIP, Capella, Umbra","CC-BY-SA-4.0",3239,4,"0.1-1","RGB,SAR" +`BRIGHTDFC2025`_,CD,"MAXAR, NAIP, Capella, Umbra","CC-BY-SA-4.0",3239,4,"0.1-1","RGB,SAR" `CaBuAr`_,CD,Sentinel-2,"OpenRAIL",424,2,512x512,20,MSI `CaFFe`_,S,"Sentinel-1, TerraSAR-X, TanDEM-X, ENVISAT, ERS-1/2, ALOS PALSAR, and RADARSAT-1","CC-BY-4.0","19092","2 or 4","512x512",6-20,"SAR" `ChaBuD`_,CD,Sentinel-2,"OpenRAIL",356,2,512x512,10,MSI diff --git a/torchgeo/datasets/bright.py b/torchgeo/datasets/bright.py index 249b8f5fe1b..5c408ddbe32 100644 --- a/torchgeo/datasets/bright.py +++ b/torchgeo/datasets/bright.py @@ -20,7 +20,7 @@ from .errors import DatasetNotFoundError from .geo import NonGeoDataset -from .utils import Path, download_url, extract_archive +from .utils import Path, download_url, extract_archive, check_integrity class BRIGHTDFC2025(NonGeoDataset): @@ -147,8 +147,12 @@ def __getitem__(self, index: int) -> dict[str, Tensor]: return sample - def _get_paths(self) -> tuple[list[Path], list[Path], list[Path]]: - """Get paths to the dataset files based on specified splits.""" + def _get_paths(self) -> list[dict[str, str]]: + """Get paths to the dataset files based on specified splits. + + Returns: + a list of dictionaries containing paths to the pre,post and target images + """ split_file = self.split_files[self.split] file_path = os.path.join(self.root, self.data_dir, split_file) @@ -212,7 +216,7 @@ def _verify(self) -> None: exists = [] zip_file_path = os.path.join(self.root, self.data_dir + '.zip') if os.path.exists(zip_file_path): - if self.checksum and not check_integrity(zip_file_path, split_info['md5']): + if self.checksum and not check_integrity(zip_file_path, self.md5): raise RuntimeError('Dataset found, but corrupted.') exists.append(True) extract_archive(zip_file_path, self.root) @@ -257,7 +261,7 @@ def _load_image(self, path: Path) -> Tensor: """ with rasterio.open(path) as src: img = src.read() - tensor = torch.from_numpy(img).float() + tensor: Tensor = torch.from_numpy(img).float() return tensor def plot(