You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of Issue
When attempting to use the Sentinel2 Dataset class, I am receiving an error that no Sentienl2 data was found in the root directory provided. This didn't work in either the parent data directory containing both features and labels, nor the sub-directories for each type.
Upon digging into the source code, the Sentinel2 Dataset class expects the raster filenames to comply with Sentinel2 naming convention:
filename_blob = "T*_*_B02_*m.*"
The files in the dataset I have been provided via the DrivenData.org competition has raster files named with just the {band}.tif, e.g. B02.tif, B03.tif. Therefore no .tif data is found in the root directory and the program throws the FileNotFoundError below:
Traceback (most recent call last):
File "/home/ying/cloud_cover_competition/library_experiment.py", line 15, in <module>
load_dataset(ROOT_PATH, CLOUD_BANDS)
File "/home/ying/cloud_cover_competition/library_experiment.py", line 10, in load_dataset
cloud_dataset = Sentinel2(root=path, bands=bands)
File "/home/ying/anaconda3/envs/torch/lib/python3.9/site-packages/torchgeo/datasets/sentinel.py", line 100, in __init__
super().__init__(root, crs, res, transforms, cache)
File "/home/ying/anaconda3/envs/torch/lib/python3.9/site-packages/torchgeo/datasets/geo.py", line 251, in __init__
raise FileNotFoundError(
FileNotFoundError: No Sentinel2 data was found in '/home/ying/cloud_cover_competition/data/'
Steps to Reproduce
Dataset download instructions accessible through the DrivenData.org portal or directly from AzureBlobStorage, respectively:
Expected Behavior
Sentientl2 Dataset loader should be extensible with unconventional filenames to find GeoTIFF files if the band number is in the filename:
B02.tif
B03.tif
B04.tif
B08.tif
etc...
The text was updated successfully, but these errors were encountered:
I think letting users specify unconventional filenames directly in the Sentinel2 dataset would be messy. Instead, I think the best way to do this is to create a new Dataset that extends Sentinel2 or RasterDataset as illustrated in a new example notebook that @RitwikGupta is creating in #283.
Edit: You are doing exactly that :). If you are feeling extremely motivated / have the time, you could directly add this Dataset to torchgeo as a "benchmark dataset" so that competitors can get it for free with torchgeo.
Description of Issue
When attempting to use the Sentinel2 Dataset class, I am receiving an error that no Sentienl2 data was found in the root directory provided. This didn't work in either the parent data directory containing both features and labels, nor the sub-directories for each type.
Upon digging into the source code, the Sentinel2 Dataset class expects the raster filenames to comply with Sentinel2 naming convention:
filename_blob = "T*_*_B02_*m.*"
The files in the dataset I have been provided via the DrivenData.org competition has raster files named with just the {band}.tif, e.g. B02.tif, B03.tif. Therefore no .tif data is found in the root directory and the program throws the FileNotFoundError below:
Steps to Reproduce
Expected Behavior
Sentientl2 Dataset loader should be extensible with unconventional filenames to find GeoTIFF files if the band number is in the filename:
The text was updated successfully, but these errors were encountered: