VSM cg11fpjr weights, config and model card (vsm_model 1.0.0)
Browse filesFiles changed (3)
- README.md+87
- config.jsonAdded+97
- model.safetensorsAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990---license: mitlibrary_name: pytorchtags:- remote-sensing- sentinel-2- gedi- vegetation-structure- canopy-height---
# VSM: a vertical vegetation structure model of the Earth
VSM predicts the vertical structure of vegetation at 10 m resolution from Sentinel-2 images:the GEDI relative-height metrics RH0 to RH100 of every pixel, each with three predictivequantiles, plus a land-cover class. It was trained on Sentinel-2 L2A images and GEDIfootprints. Paper: [A vertical vegetation structure model of the Earth](https://doi.org/10.31223/X5M22F).Code: [huizhml/global-vegetation-structure](https://github.com/huizhml/global-vegetation-structure).
## Usage
```bashpip install "git+https://github.com/huizhml/global-vegetation-structure@vsm-model-v1.0.0"```
```pythonimport vsm_model
model = vsm_model.load("HuiZ/vsm", device="cuda")out = model.predict(s2, x, y, crs="EPSG:32632", variables=["RH25_Q1", "RH98_Q1"])out["rh"] # float32 (n_images, 2, h, w), metresout["land_cover"] # int8 (n_images, h, w)```
`predict()` normalises the images, adds the latitude / longitude channels and runs the imagein tiles. The values it uses (band mean / std, encoding, tile size) are read from `config.json`in this repo, so they always belong to these weights.
## Input
- `s2`: `(n_images, 12, h, w)` or `(12, h, w)`. Sentinel-2 L2A digital numbers (reflectance x 10000) at 10 m, on the scale used before processing baseline 04.00: for products with baseline >= 04.00 clip at 1000 and subtract 1000 (BOA_ADD_OFFSET) first. Nodata is 0.- Band order: B01, B04, B03, B02, B05, B06, B07, B08, B8A, B09, B11, B12.- `x`, `y`: projected coordinates of the pixel centres (`x` per column, `y` per row) and their `crs`. `predict()` derives latitude (in degrees) and longitude from them.
Images of different dates are predicted one by one; each needs its own cloud mask.
## Latitude
The latitude channel is in degrees, as in the training data. The published global VSM maps were predicted with latitude in radians, so this model does not reproduce their values; the difference grows with latitude (one boreal tile at 61.7°N, 2020: median RH98 of vegetated pixels 3.6 m with degrees, 6.1 m with radians).
The GEDI footprints used for training lie between 51.6°S and 51.6°N. Outside this range the model extrapolates: on the same boreal tile the predicted land cover became unreliable north of about 53°N (cloudy and snowy pixels predicted as water).
## Output
- `rh`: 303 channels named `RH<n>_Q<q>`, n = 0 to 100, in metres. `Q0` is the 0.95 quantile. `Q1` is the 0.5 quantile. `Q2` is the 0.05 quantile.- `land_cover`: index of the most likely class in 0 unknown, 1 Tree cover, 2 Shrubland, 3 Grassland, 4 Cropland, 5 Built-up, 6 Bare / sparse vegetation, 7 Snow and ice, 8 Permanent water bodies, 9 Herbaceous wetland and mangroves, 10 Moss and lichen, 11 unused.
Nothing is masked: clouds, water and nodata pixels get a prediction like any other pixel.
For the global VSM maps, up to 20 images of the growing season were predicted per Sentinel-2tile. Per image, pixels with scene classification (SCL) 0, 1, 3, 8, 9, 10, 11 or predicted snowwere dropped; the map is the per-pixel median of the remaining images. Pixels that are water(SCL or predicted class) or built-up (predicted class) in most images are nodata. The mapsstore decimetres as int16, nodata 32767.
## Weights
- Training run `cg11fpjr`. The bias of the last layer is corrected by the mean error on the training set (`me_gradual_slope_veg`), as in the global prediction.- A pixel's prediction depends on its 15 x 15 pixel neighbourhood.
| Weights | Code ||---|---|| this version | `vsm_model` 1.0.0 (git tag `vsm-model-v1.0.0`) |
## Citation
```bibtex@misc{zhang2026vertical, title = {A vertical vegetation structure model of the {Earth}}, author = {Zhang, Hui and Lang, Nico and Mazurczyk, Mikolaj and Oehmcke, Stefan and Huang, Ke and Brandt, Martin and Fensholt, Rasmus and Kariryaa, Ankit and Igel, Christian}, year = {2026}, publisher = {EarthArXiv}, note = {Preprint}, doi = {10.31223/X5M22F}, url = {https://doi.org/10.31223/X5M22F}}```12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697{ "format_version": 1, "architecture": { "in_channels": 15, "out_channels": 315, "entry_block_filters": [ 128, 256 ], "num_filters": 512, "num_sepconv_blocks": 3 }, "input": { "s2_bands": [ "B01", "B04", "B03", "B02", "B05", "B06", "B07", "B08", "B8A", "B09", "B11", "B12" ], "s2_scale": "Sentinel-2 L2A digital numbers (reflectance x 10000) at 10 m, on the scale used before processing baseline 04.00: for products with baseline >= 04.00 clip at 1000 and subtract 1000 (BOA_ADD_OFFSET) first. Nodata is 0.", "s2_mean": [ 587.0255, 1361.4782, 1091.5225, 739.6226, 1772.4885, 2550.3611, 2870.9454, 2952.2076, 3080.6981, 3086.7147, 2886.7224, 2175.1265 ], "s2_std": [ 529.5716, 1314.4954, 846.1677, 635.8849, 1293.3423, 1078.87, 1119.9127, 1133.3539, 1116.3337, 1100.1368, 1651.381, 1718.6127 ], "latitude_unit": "degrees", "lat_mean": 12.7596, "lat_std": 25.6075, "lon_sin_mean": 0.1098, "lon_sin_std": 0.7536, "lon_cos_mean": 0.3072, "lon_cos_std": 0.5706 }, "tiling": { "tile_size": 544, "border": 16 }, "output": { "n_rh_channels": 303, "rh_unit": "m", "quantiles": { "Q0": 0.95, "Q1": 0.5, "Q2": 0.05 }, "land_cover_classes": [ "unknown", "Tree cover", "Shrubland", "Grassland", "Cropland", "Built-up", "Bare / sparse vegetation", "Snow and ice", "Permanent water bodies", "Herbaceous wetland and mangroves", "Moss and lichen", "unused" ] }, "provenance": { "wandb_run": "cg11fpjr", "bias_correction_column": "me_gradual_slope_veg", "code_version": "1.0.0" }}123version https://git-lfs.github.com/spec/v1oid sha256:c905229b714ccfce8ac386c9f6dbe758744b9d970a5031417cf083b2e1065095size 17362292README.md+87
config.jsonAdded+97
model.safetensorsAdded+3