Replace the 2024 TerraMind stores with versions whose cloud-masked pixels are filled

#7
by QidongYang - opened

Replaces the two 2024 TerraMind stores with versions recomputed from the same chips with the cloud-masked pixels filled, the policy of the 2019 stores proposed in PR #6. Same paths and names, same 11,849 stations in the same order, same layout, encoding and attribute set.

  • node-features/foundation-model-embeddings/TerraMind_v1_base_S2L2A_DEM_LULC_WINDOW_ANNUAL_2024-CONUS.zarr
  • node-features/foundation-model-embeddings/TerraMind_v1_base_S2_RGB_SEASONAL_PATCH_ANNUAL_2024-CONUS.zarr

Why. In the current window store, 5,071 of the 11,849 stations (43%) are all-zero rows: a pixel that is cloudy in every scene of a month is non-finite in the monthly composite, the model turns such a chip into a NaN vector, and those vectors were written as zeros. Those stations are spread evenly over the splits (test set of the quality split: 262 of 555 stations). In the current RGB store, 11 stations have masked pixels in their 16 x 16 crop that the brightness stretch turned into black pixels, and 67 stations hold vectors computed before their seasonal chips were re-downloaded (the original author's local outputs for them differ from the Hub copy by up to 0.09).

What changes. Masked pixels are set to TerraMind's band mean (0 after normalisation; mean colour for the RGB crops) before the model, the rule the CROMA extractor of EarthDataGFMEmbeddingGeneration uses for nodata. Every station now has a vector, and three per-station variables along station_id record what was filled: masked_fraction, masked_months / masked_seasons, blank_months / blank_seasons (see PR #6 for their definitions). In the window store 5,071 stations have filled pixels and 1,172 have at least one month filled everywhere (916 one, 205 two, 45 three, 5 four, 1 five). The history attribute names the filling step.

What stays identical. Window store: all 6,778 stations without masked pixels keep bit-identical vectors (checked row by row against the current store). RGB store: 11,771 of 11,849 rows are bit-identical to the current store; the 78 others are the 11 masked-crop stations and the 67 re-downloaded ones, for which the new vectors equal the original author's local outputs bit for bit. The per-array Zarr metadata is unchanged apart from the three added variables. One small difference: the current stores carry the float32-rounded coordinates used for the Earth Engine requests, the new ones carry the station coordinates of stations/locations.geojson (at most 0.6 m apart), like the 2019 stores and the AlphaEarth stores.

How. Scripts and README in the Marmot repository, Embedding-Generation/TerraMind/; computed on CPU, which reproduces the original outputs bit for bit.

🤖 Generated with Claude Code

Giezi changed pull request status to merged

Sign up or log in to comment