Images with the same s2_id_gee but different ROI are missing in mlstac files

#2
by sblaise - opened

Hello,

I try to download the dataset and noticed that when multiple images with different ROI but the same s2_id_gee are in the same mlstac dataset, only one of these images is present.

As an example, validation_2000_high.mlstac has 74 images, but the metadata shows that there should be 77 images. The following images are absent because they are overwritten by another image with the same s2_id_gee :

  • 20190517T051651_20190517T051654_T46VCN with ROI_3212
  • 20190720T181931_20190720T182301_T12TUL with ROI_4229
  • 20190428T162901_20190428T163646_T16TFN with ROI_3754

For the corresponding test dataset (test_2000_high.mlstac), the ROI information is included within "datapoint_id", such that the issue does not apply.

sblaise changed discussion title from Images with the same s2_id_gee but different ROI are missing in mstac files to Images with the same s2_id_gee but different ROI are missing in mlstac files
Image and Signal Processing β€’ ISP org

Hi @sblaise thank you for reporting this issue.

There was a bug in our uploading pipeline. We're currently reprocessing the MLstac
file and will upload it to HF as soon as it's complete.

Thank you again!!

Image and Signal Processing β€’ ISP org
β€’
edited Aug 22

Hi @sblaise the issue has been fixed. We need to work a bit more in the documentation but
cloudSEN12+ has stream support you can simple run:

import mlstac

# Read the metadata
metadata = mlstac.core.load_metadata('https://huggingface.co/datasets/isp-uv-es/CloudSEN12Plus/resolve/main/validation/validation_2000_high.mlstac')

# Download the data [NUMPY]
dataset = mlstac.core.load_data(metadata[0:4])
dataset

# Download the data (GEOTIFF)
import rasterio as rio
dataset, dataset_metadata = mlstac.core.load_data(metadata[0:1], save_metadata_datapoint=True)[0]
with rio.open('temp.tif', 'w', **dataset_metadata) as dst:
    dst.write(dataset)
csaybar changed discussion status to closed

Sign up or log in to comment