Depth Estimation
Transformers
Safetensors
English
chmv2
dinov3
canopy-height
chm
Eval Results (legacy)
Instructions to use WEO-SAS/chm-meta-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WEO-SAS/chm-meta-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="WEO-SAS/chm-meta-v2")# Load model directly from transformers import AutoModelForDepthEstimation model = AutoModelForDepthEstimation.from_pretrained("WEO-SAS/chm-meta-v2", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| from abc import ABC, abstractmethod | |
| from typing import List, Optional | |
| import numpy as np | |
| class BaseModel(ABC): | |
| def predict(self, image: np.ndarray) -> np.ndarray: | |
| """ | |
| Run CHM inference on a single image. | |
| Args: | |
| image: (3, H, W) float32 numpy array, values in [0, 1] | |
| Returns: | |
| (H, W) float32 numpy array — canopy height in metres | |
| """ | |
| pass | |
| def predict_tif( | |
| self, | |
| input_path: str, | |
| output_path: str, | |
| bands: Optional[List[int]] = None, | |
| ) -> None: | |
| """ | |
| Full GeoTIFF CHM pipeline. | |
| Args: | |
| input_path : path to input RGB or multi-band GeoTIFF | |
| output_path : output path for CHM GeoTIFF (1 band, metres) | |
| bands : 0-based band indices to use as RGB (default: [0,1,2]) | |
| """ | |
| pass | |