Views
No views yet
model.py / predictor.py interface used by chm-meta (v1).pip install -r requirements.txt1from huggingface_hub import snapshot_download
2import sys
3
4local_dir = snapshot_download("WEO-SAS/chm-meta-v2")
5sys.path.insert(0, local_dir)
6from model import Model
7
8model = Model(local_dir=local_dir)
9
10# Array inference: (3, H, W) float32 in [0, 1] → (H, W) metres
11chm = model.predict(image)
12
13# GeoTIFF pipeline
14model.predict_tif("input.tif", "chm_output.tif")model = Model(local_dir=local_dir, patch_size=448, stride=224)model.safetensors), converted from Meta's original dinov3_vitl16_chmv2_dpt_head-3703d643.pth checkpoint.--model-artifact-uri:1--model-artifact-uri=WEO-SAS/chm-meta-v2
2# or
3--model-artifact-uri=hf://WEO-SAS/chm-meta-v2huggingface_hub installed) will download the model and weights at runtime. No need to pre-upload weights to GCS.| Metric | Value |
|---|---|
| RMSE | 11.05 m |
| MAE | 9.05 m |
| Bias | −0.39 m |
| R² | −0.40 |
| Pearson r | 0.173 |
Note on performance: Compared to v1 (bias −14.65 m), v2's near-zero bias (−0.39 m) shows the DINOv3 backbone corrects the systematic under-prediction seen in v1. R² remains negative, however — the same temporal mismatch (2019–2020 CHM vs. 2022–2024 imagery, including bushfire regrowth) and domain-shift factors noted for v1 still limit per-pixel agreement on this test set even though average error dropped substantially.
evaluate.py) and can be run with uv:uv run evaluate.py --n-tiles 50 --output eval_results.jsonfacebook/dinov3-vitl16-chmv2-dpt-head) and is distributed under the DINOv3 License. See LICENSE.md in this repository for the full terms.