NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DeepForest: A <scp>Python</scp> package for RGB deep learning tree crown delineation

Ben Weinstein, Sergio Marconi, Mélaine Aubry‐Kientz, Grégoire Vincent, Henry Senyondo, Ethan P. WhiteMethods 2020

Abstract

Remote sensing of forested landscapes can transform the speed, scale, and cost of forest research. The delineation of individual trees in remote sensing images is an essential task in forest analysis. Here we introduce a new Python package, DeepForest, that detects individual trees in high resolution RGB imagery using deep learning. While deep learning has proven highly effective in a range of computer vision tasks, it requires large amounts of training data that are typically difficult to obtain in ecological studies. DeepForest overcomes this limitation by including a model pre-trained on over 30 million algorithmically generated crowns from 22 forests and fine-tuned using 10,000 hand-labeled crowns from 6 forests. The package supports the application of this general model to new data, fine tuning the model to new datasets with user labeled crowns, training new models, and evaluating model predictions. This simplifies the process of using and retraining deep learning models for a range of forests, sensors, and spatial resolutions. We illustrate the workflow of DeepForest using data from the National Ecological Observatory Network, a tropical forest in French Guiana, and street trees from Portland, Oregon.

Introduction

In forest ecology, mapping individual trees—a process known as "crown delineation"—is fundamental for estimating biomass, monitoring forest health, and understanding biodiversity. Traditionally, this task required expensive, specialized LiDAR (Light Detection and Ranging) data or labor-intensive field surveys. While high-resolution RGB imagery from drones and satellites is now ubiquitous and cost-effective, using it for automated tree detection remains challenging. Deep learning models, the gold standard for object detection, are notoriously data-hungry, often requiring tens of thousands of hand-labeled examples. DeepForest bridges this gap by providing an open-source Python package that democratizes state-of-the-art computer vision for ecologists through a pre-trained, ready-to-use pipeline.

Methods

DeepForest is built on the RetinaNet architecture with a ResNet-50 backbone. Its core innovation is a semi-supervised training pipeline designed to overcome the scarcity of labeled ecological data:

  1. Pre-training: The model was initially trained on over 30 million tree crowns across 22 sites. These were generated using an unsupervised LiDAR-based algorithm, allowing the model to learn general tree features from a massive dataset.
  2. Fine-tuning: The model was refined using 10,000 high-quality, hand-labeled crowns from six diverse forest types to improve accuracy.
  3. The Package Interface: DeepForest provides a high-level interface for preprocessing (tiling large rasters), training (transfer learning on local data), and prediction (inference with non-max suppression to handle overlapping tiles).
The DeepForest training workflow, illustrating the semi-supervised pipeline from LiDAR-derived pre-training to hand-annotated fine-tuning.

Datasets and Validation

The authors validated DeepForest across three distinct scenarios to test its versatility:

  • NEON (National Ecological Observatory Network): A benchmark of 5,852 trees across 22 diverse U.S. sites.
  • French Guiana Tropical Forest: A dense canopy environment used to compare DeepForest against specialized LiDAR algorithms.
  • Portland Street Trees: An urban dataset using coarser 0.3m resolution imagery to test generalization to different sensors.
The RectLabel interface used for hand-annotation of individual tree crowns in RGB imagery, a critical step for fine-tuning the model.

Results and Discussion

DeepForest demonstrated that transfer learning is highly effective for ecological remote sensing. While the pre-built model performed well generally, adding just 1,000 local hand-labeled trees—a task taking only a few hours—drastically improved performance in novel environments.

Key performance metrics include:

  • General Performance: Across 22 NEON sites, the model averaged 72% recall and 64% precision.
  • RGB vs. LiDAR: In French Guiana, DeepForest achieved a recall of 0.78, surpassing the 0.71 recall of the best LiDAR-based methods.
  • Urban Adaptation: In Portland, fine-tuning increased recall from 0.55 to 0.72 and reduced undersegmentation errors.
  • Efficiency: Predictions for a 1km² tile take approximately 7 minutes on a single CPU, making it accessible for researchers without high-end GPU clusters.

Limitations and Future Work

The model's performance is sensitive to image resolution; while 10cm and 30cm data work well, 1m resolution is often too coarse for individual crown delineation. Additionally, the model struggled in desert scrub environments (e.g., Onaqui, Utah), where vegetation structure differs significantly from the training data. Future development may incorporate multi-temporal data to help the model distinguish between evergreen and deciduous species or identify standing dead trees.

Summary updated

BibTeX
@inproceedings{weinstein2020deepforest,
  author = {Ben Weinstein and Sergio Marconi and Mélaine Aubry‐Kientz and Grégoire Vincent and Henry Senyondo and Ethan P. White},
  title = {{DeepForest: A <scp>Python</scp> package for RGB deep learning tree crown delineation}},
  booktitle = {Methods},
  year = {2020},
  doi = {10.1111/2041-210x.13472},
}

Loading related content...

Figure