Inversion of Labels

#6
by pmcelroy - opened

Hi, cheers for the extensive cloud dataset.

After doing some QA, I found that some labels (not sure how many are affected) appear to have a sort of mirror-like inversion along the leading diagonal axis. In other words, they have be transformed along that axis, such that they no longer line up with the L1C input.

Please see the example below for datapoint ID ROI_0070__20190708T130251_20190708T130252_T24MUA in the test set.

Screenshot 2024-12-13 at 5.43.01 PM.png
Screenshot 2024-12-13 at 5.43.08 PM.png

Just wanted to give a heads up about this, thanks again.

Image and Signal Processing • ISP org

Hi @pmcelroy ,

Thank you for reporting this issue. We're not entirely sure why it's happening, but we're manually checking all the 2000x2000 images. We strongly suspect it's related to the exportation API we build around IRIS. It seems it only happens to this image. We'll keep you updated and aim to resolve it this week.

Best,
Cesar

No worries, just a heads up I've seen it on a few other datapoints as well, namely ROI_0070__20190708T130251_20190708T130251_T24MUA.

Thanks,
Peter

Image and Signal Processing • ISP org
edited 7 days ago

Hi @pmcelroy

We’ve resolved the issue and released the CloudSen12Plus v1.1, which is available in our internal TACO specification. The TACO specification offers significant improvements in
comparison to MLSTAC. However, you’ll need to download a new package, tacoreader, to access it. We’re truly sorry for any inconvenience this may cause.

MLSTAC vs TACO

  • 3x faster remote access and 1.5x faster local access compared to MLSTAC.
  • Fixes the memory leak issues problems.
  • Fewer dependencies.
  • It's a self-contained, single-file format, which helps portability.

To help you get started, we’ve published a detailed tutorial here:
https://colab.research.google.com/drive/1U9n40rwdnn73bdWruONA3hIs1-H3f74Q#scrollTo=KpAptcCcRgPr
https://huggingface.co/datasets/tacofoundation/cloudsen12

Image and Signal Processing • ISP org
  • Changelog:
    Version 1.1.0:

    • We save all GeoTIFF files with discard_lsb=2 to improve the compression ratio.
    • Fixed 2000x2000 rotated patches. The datapoints are now correctly oriented. Check the patches:
      • ROI_2526__20200709T105031_20200709T105719_T31UDQ
      • ROI_0070__20190708T130251_20190708T130252_T24MUA
      • ROI_4565__20200530T100029_20200530T100502_T32TQP
    • Improved the quality of the following patches:
      • ROI_1098__20200515T190909_20200515T191310_T11WPN
      • ROI_1735__20190814T163849_20190814T164716_T15SXS
      • ROI_0760__20190516T022551_20190516T022553_T56WMD
      • ROI_3696__20200419T075611_20200419T080344_T35MRN
      • ROI_2864__20170529T105621_20170529T110523_T31TCN
    • We removed the following patches due to poor quality:
      • ROI_3980__20190228T005641_20190228T005640_T58WDB
      • ROI_1489__20210228T070831_20210228T070834_T40TDP
  • Consideration:

    • The field roi_id field serves as a unique identifier for the geographical location of each patch. In other words, it is used to link S2 images with
      a specific geographic location. However, the roi_id between the 509x509 and 2000x2000 patches are
      not the same. For example, the roid_id: ROI_0008 in the 509x509 patches is not the same as the
      ROI_0008 in the 2000x2000 patches. In this version, we fixed this issue by summing the max value
      of the 509x509 patches to the 2000x2000 patches. In this way, the roi_id between the 509x509 and
      2000x2000 patches are unique. If users of 2000x2000 patches need to match the original roi_id published
      in the previous version, they can use the following formula:
      • old_roi_id_2000 = old_roi_id_2000 - 12101
        where 12101 is the max value of the 509 patches. We also reported the previous roi as old_roi_id.
import tacoreader
import numpy as np
import rasterio as rio
import matplotlib.pyplot as plt

tacoreader.__version__ # 0.5.2

wrong_id = "ROI_12171__20190708T130251_20190708T130252_T24MUA"
dataset = tacoreader.load("tacofoundation:cloudsen12-l1c")
subset = dataset[dataset["tortilla:id"] == wrong_id].read(0)
s2l1c_str = subset.read(0)
target_str = subset.read(1)


with rio.open(s2l1c_str) as src, rio.open(target_str) as tgt:
    s2l1c_data = src.read([4, 3, 2])
    target_data = tgt.read()


fig, ax = plt.subplots(1, 2, figsize=(10, 5))
ax[0].imshow(s2l1c_data.transpose(1, 2, 0)/ 3000)
ax[1].imshow(target_data[0])
plt.show()

image.png

Sign up or log in to comment