There is a newer version of the record available.

Published November 20, 2025 | Version 1.0.0
Model Open

NAIP-CHM: A 0.6-meter resolution canopy height and structure model for the contiguous United States

  • 1. University of Montana

Description

Overview

This repository contains the source code, trained model weights, model validation data, training metadata, and inference tools for NAIP-CHM, a project that generates a 0.6-meter resolution canopy height model (CHM) for the contiguous United States using National Agriculture Imagery Program (NAIP) aerial imagery. This repository supports the published version of the model based on weights dated 2025-10-16.

This codebase constitutes the version of record associated with the upcoming paper: A 0.6-meter resolution canopy height and structure model for the contiguous United States. See the preprint at bioRxiv.

The repository provides:

  • Inference Pipeline: Tools to generate canopy height models from NAIP DOQQs using a pre-trained U-Net model.
  • Training Code: Scripts to train the model on new data, including distributed training support.
  • Pre-trained Model: The final model weights used to generate the CONUS-wide dataset.
  • Conditioning Data: Static environmental raster data required for model inference.
  • Model Validation Data: Validation metrics and tile-level statistics at 0.6m and 1.0m resolutions, plus an evaluation script for custom datasets.

The development repository for this project can be found at https://github.com/smorf-ntsg/naip-chm.

To investigate the model output, see the Google Earth Engine App or download the data from our servers.

Installation

This codebase requires Python 3.11+.

  1. Ensure you have the repository files extracted to your local machine.
  2. Install the required dependencies:
pip install -r requirements.txt

Data Access

1. Training Dataset

The training dataset is not included in this repository due to its size. It contains over 22 million image pairs.
You can download the training data from the University of Montana Rangeland server:

See data/training_dataset/README for more details.

2. Inference Assets

This repository includes the necessary assets to run inference:

  • Pre-trained Model Weights: Located at model/model_20251016.pt
  • Static Conditioning Rasters: Located in data/conditioning_data/ (includes elevation, climate, soil, NLCD, and ecoregion data).

3. Model Validation Data

Validation data for the trained model is provided in the `model_validation_data/` directory. The model has been evaluated at both standard resolutions:
  • 0.6m Resolution: Native model resolution with tile-level statistics in `tilestats_06m.csv`
  • 1.0m Resolution: Resampled predictions with tile-level statistics in `tilestats_10m.csv`
  • Evaluation Report: Comprehensive performance summary 
The scripts/evaluate_model.py script can be used to generate validation results and performance metrics for custom evaluation datasets.

Usage

Running Inference

You can run the model on a standard NAIP DOQQ (Digital Ortho Quarter Quad) using the scripts/inference.py script. A sample NAIP image is provided in data/naip_doqqs/.

Example Command:

python scripts/inference.py \
--naip-quad data/naip_doqqs/m_3812259_nw_10_060_20220519.tif \
--output-dir output/ \
--model-checkpoint model/model_20251016.pt \
--config configs/config.yaml \
--static-rasters-dir data/conditioning_data/

Arguments:

  • --naip-quad: Path to the input 4-band NAIP imagery (R, G, B, NIR).
  • --output-dir: Directory where the output CHM GeoTIFF and report will be saved.
  • --model-checkpoint: Path to the trained model weights.
  • --config: Path to the configuration YAML file.
  • --static-rasters-dir: Directory containing the environmental conditioning rasters.
  • --chip-size: (Optional) Processing chip size (default: 432).
  • --chip-overlap: (Optional) Overlap between chips (default: 0.2).

Training the Model

To train the model from scratch or fine-tune it, use the scripts/train.py script. Ensure you have downloaded the training dataset and updated the configs/config.yaml file to point to the correct data paths.

Command:

python scripts/train.py \
--config configs/config.yaml \
--experiment_name my_experiment

Distributed Training:

The script supports Distributed Data Parallel (DDP) training. To run on multiple GPUs (e.g., 2 GPUs):

torchrun --nproc_per_node=2 scripts/train.py \
--config configs/config.yaml \
--experiment_name my_ddp_experiment

Citation

If you use this dataset or code in your research, please cite the following manuscript:

Morford, S. L., Allred, B. W., Coons, S. P., Marcozzi, A. A., McCord, S. E., Smith, J.T., & Naugle, D. E. 2025. A 0.6-meter resolution canopy height model for the contiguous United States. bioRxiv 2025.12.12.694075; doi: https://doi.org/10.64898/2025.12.12.694075

Files

Files (12.0 GB)

Name Size
md5:d1874e816df56c2a37d9f763c8ad9b71
12.0 GB Download

Additional details

Software

Repository URL
https://github.com/smorf-ntsg/naip-chm
Development Status
Active