Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
The dataset viewer is not available for this split.
Server error while post-processing the rows. This occured on row 14. It seems the image can't be loaded with PIL.Image and could be corrupted.
Error code:   RowsPostProcessingError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Earth Compress

EC-prototype-S2L1C

One hundred Sentinel-2 Level-1C products of a single tile, T44PNB in the Bay of Bengal, sensed between 2017 and 2026, each compressed by three lossy codecs at several rates (levels): the learned codec georvq s2-v1 at 3 levels, and the error-bounded scientific codec SZ3 and the image codec JPEG XL at 5 levels each. That makes 13 versions of every product.

Each product appears once per codec, as a .SAFE directory holding the original product's metadata, with the 13 band images replaced by the compressed data of every level of that codec and a small COMPRESSED.json manifest listing the levels and saying how to decode them. clouds-decoded reads these directories directly, at whichever level is asked for, as it would an ESA product, so its cloud mask, cloud height and cloud property retrievals can be run on each codec and rate without decompressing anything to disk first. Each directory is self-contained: it can be downloaded and read on its own.

Layout

georvq/{product}.SAFE     levels 8-8, 8-4, 8-0
sz3/{product}.SAFE        levels abs-45, abs-63, abs-90, abs-125, abs-180
jpegxl/{product}.SAFE     levels d-0.094, d-0.17, d-0.33, d-0.63, d-1.2
ec_prototype_index.parquet

Each product directory has the SAFE format's own structure. The band data is in GRANULE/{granule}/IMG_DATA: for georvq, one store, {product}.georvq.zarr, which serves all three levels; for SZ3 and JPEG XL, a directory per level, IMG_DATA/{level}/, holding one file per resolution (10m.bin, 20m.bin, 60m.bin). Everything else (MTD_MSIL1C.xml, MTD_TL.xml, the QI_DATA masks, AUX_DATA) is copied unchanged from the original product, apart from the true-colour image, which is left out because it is derived from the band images.

The index has one row per product, codec and level: the product directory's path (the same for every level of a codec), product_id, codec, level, the codec parameters (params, JSON), the georvq rung its level was matched to (matched_georvq_rung), the size of its band data in bytes (band_bytes) and that size in bits per 10 m pixel (bits_per_pixel), followed by mgrs_tile, sensing_start, spacecraft, relative_orbit and processing_baseline.

Codecs and rates

georvq s2-v1 codes all 13 bands of each 36 px window together, from learned codebooks, and is progressive: a store holds 8 levels of detail on top of a coarse layer, and a read at rung 8-k fetches only the coarse layer and the first k levels. One store therefore serves all three levels, and its size on disk is that of 8-8; band_bytes gives the bytes a read at each level actually fetches. See earth-compress/georvq-s2-v1-sample for the codec and the store format.

The stores here use georvq's fixed-range statistics channel (bitstream 9273c4698f99587b, georvq PR #15). Each window's 13 band means and 13 standard deviations are sent at fixed precision over the whole DN range, 299 bits per window. They are read with georvq from that release on. The first version of this dataset used the release's original learned channel, which saturated over bright cloud: on the brightest ice-cloud products of this tile it shifted the decoded spectra by up to 0.035 in reflectance, and the cloud properties retrieved from them were badly wrong. That version was replaced on 29 October 2026.

SZ3 is a prediction-based compressor for scientific data, with an absolute error bound: no pixel differs from the original by more than the bound, in DN (abs-45 allows at most 45 DN). Each band is coded on its own.

JPEG XL codes each band on its own as a 16-bit greyscale image, with the Butteraugli distance as its quality setting (d-0.17 is distance 0.17; higher is coarser) at effort 7.

For SZ3 and JPEG XL, each band is cut into 10 by 10 tiles (1098 px at 10 m, 549 px at 20 m, 183 px at 60 m) that are coded independently, so that a crop decodes only the tiles it touches. Lossy codecs do not keep the nodata value (DN 0) at the edge of a product's swath, so the zero mask of every tile that has any is also stored, losslessly, and restored when reading. It is counted in the rate.

The SZ3 and JPEG XL settings were chosen to match georvq's rates at 8-8, 8-4 and 8-0 at the time (3.17, 1.71 and 0.27 bits per 10 m pixel on this tile, before the statistics channel above raised them slightly), with two more settings between the 8-4 and 8-0 matches. The settings were calibrated on 4 of the 100 products and then fixed. georvq is close to a fixed rate per rung, whereas the rate of a fixed SZ3 or JPEG XL setting depends heavily on the scene, so over the 100 products the levels do not line up with georvq's as closely as on the 4 used to calibrate them:

codec level matched georvq rung median bits/px range
georvq 8-8 8-8 3.20 2.08 to 3.22
georvq 8-4 8-4 1.75 1.14 to 1.76
georvq 8-0 8-0 0.30 0.20 to 0.31
SZ3 abs-45 8-8 3.54 0.84 to 10.57
SZ3 abs-63 8-4 2.26 0.36 to 8.53
SZ3 abs-90 1.44 0.17 to 6.66
SZ3 abs-125 0.89 0.06 to 5.15
SZ3 abs-180 8-0 0.54 0.03 to 3.71
JPEG XL d-0.094 8-8 6.86 1.82 to 15.72
JPEG XL d-0.17 8-4 4.09 0.64 to 10.28
JPEG XL d-0.33 2.36 0.16 to 6.11
JPEG XL d-0.63 1.12 0.09 to 3.35
JPEG XL d-1.2 8-0 0.63 0.06 to 2.12

JPEG XL in particular codes at about twice georvq's rate at the same level. Comparisons between codecs should therefore be made against the rate in the index (bits_per_pixel for each product) rather than level by level. For reference, the 13 band images of an original product take about 52 bits per 10 m pixel as lossless JPEG 2000.

Reading a product

# pip install "clouds-decoded @ git+https://github.com/asterisk-labs/clouds-decoded@compressed-readers"
# plus, for the codecs you read:
#   georvq:          pip install "georvq @ git+https://github.com/earth-compress/georvq"
#   SZ3 and JPEG XL: pip install imagecodecs
from clouds_decoded.data import Sentinel2Scene

scene = Sentinel2Scene()
scene.read("sz3/S2A_MSIL1C_20170720T045701_N0500_R119_T44PNB_20230831T180106.SAFE",
           level="abs-63",                          # None reads the finest level
           crop_window=(4992, 4992, 1080, 1080))   # col, row, width, height in 10 m pixels
b02 = scene.bands["B02"]                            # uint16 DN on its native grid
scene.compression                                   # {'reader': 'sz3', 'level': 'abs-63', ...}

The whole clouds-decoded pipeline runs on a compressed product in the same way as on an original one, with the level given by --compression-level:

clouds-decoded full-workflow jpegxl/S2A_MSIL1C_20170720T045701_N0500_R119_T44PNB_20230831T180106.SAFE \
    --compression-level d-0.33 --output-dir out/

A clouds-decoded project reads every scene at one level, set by compression_level in its project.yaml (or clouds-decoded project init --compression-level), so comparing levels over many products takes one project per level. This is because a project identifies a scene by its path, and every level of a product shares one.

Neither georvq nor imagecodecs is a dependency of clouds-decoded. Each is imported only when a product that needs it is read, and a missing one raises an error naming the package to install. georvq decodes on a GPU when one is available, and otherwise on the CPU, which takes about 4 minutes for a whole product rather than 15 seconds. SZ3 decodes a whole product in about 2 seconds and JPEG XL in about 20, both on the CPU.

Known limitations

The products were picked from a single tile, so they cover one stretch of tropical sea and its clouds through ten years, and nothing else. Some products lie at the edge of a swath and cover only part of the tile.

Fixing the statistics channel did not fix everything. On the brightest ice-cloud product (S2B_MSIL1C_20190625T045709_N0500_R119_T44PNB_20230507T155427), the cloud mask, optical thickness, ice/liquid ratio and effective radii retrieved by clouds-decoded from georvq 8-8 agree with those from the original product with R² of 0.97 to 0.996, but cloud height only reaches 0.95, against 0.99 from JPEG XL at a similar rate, and is biased low by about 700 m. The stereo height retrieval relies on the small shifts between bands caused by parallax, and georvq appears to lose part of them.

JPEG XL treats the full 16-bit range as image intensity, and Sentinel-2 DN occupy only its lower part, so it sees a dark image and quantises it accordingly. The distances needed for these rates are therefore far below the values usually used for photographs, and its error depends on brightness in a way that SZ3's does not. Rescaling each band to the full range before coding would probably serve it better, but was not done here.

Licence and attribution

Contains modified Copernicus Sentinel data 2017 to 2026. Each compressed product is a lossy derivative of an ESA Sentinel-2 L1C product and is provided under the Copernicus Sentinel data terms. The georvq codec weights are licensed Apache 2.0.

Development

Developed by Asterisk Laboratories Co-operative Ltd. (Asterisk Labs) as part of the Earth Compress project, a partnership between Asterisk Labs and the National Oceanography Centre.

Asterisk Labs

Funding

This work was funded by the Advanced Research and Invention Agency (ARIA).

Citation

@misc{ec_prototype_s2l1c,
  title  = {{EC-prototype-S2L1C: Sentinel-2 L1C products compressed with georvq, SZ3 and JPEG XL}},
  author = {{Asterisk Laboratories Co-operative Ltd.}},
  year   = {2026},
  url    = {https://huggingface.co/datasets/earth-compress/EC-prototype-S2L1C},
  note   = {Earth Compress project}
}
Downloads last month
1