YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
π² CHM Model Builder
Generate Canopy Height Models (CHM) directly from LiDAR point clouds (LAS/LAZ).
What it does
- Reads any LAS/LAZ point cloud file
- Classifies ground points (via LAS classification codes, percentile thresholds, or lowest-returns)
- Rasterizes a Digital Surface Model (DSM = max elevation per pixel)
- Rasterizes a Digital Terrain Model (DTM = ground elevation per pixel)
- Produces CHM = DSM β DTM as a GeoTIFF
Usage
Python API
from chm_builder import CHMBuilder, CHMConfig
builder = CHMBuilder(CHMConfig(resolution=1.0, ground_method="las_class"))
meta = builder.build("input.laz", "output_chm.tif")
print(meta)
Command Line
python chm_builder.py input.laz output_chm.tif --resolution 0.5 --ground-method las_class
Dependencies
pip install laspy[lazrs] rasterio scipy numpy
Methods
| Ground Method | Description |
|---|---|
las_class |
Uses LAS classification code 2 (standard ground) |
percentile |
Points below a global elevation percentile |
lowest |
Lowest return in each raster cell |
csf |
Cloth Simulation Filter (requires cloth-simulation-filter) |
Output
- GeoTIFF (
GTiff) with CHM heights - Metadata JSON with bounds, resolution, and statistics (min, max, mean, median, std)
Gradio Demo
Try the live demo: https://huggingface.co/spaces/forestinvlab/chm-model-builder
License
MIT
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support