rainforest canopy layer top view
← Back to blog

Open-Source Tree Crown Detectors Are Starting Points, Not Finished Tools

Technology•12 November 2026•TREEO Indonesia•4 min read

Detecting individual trees in drone or aerial imagery sounds like a solved problem. Free, well-documented packages exist, and a few lines of code produce boxes around crowns. The catch is in what the people who wrote those packages say about them.

What the numbers say

0.57 vs 0.52

F1 for Detectree2 vs DeepForest in one temperate-forest validation

97.28%

F1 for YOLOv3 detecting oil palms, a regular single-species crop

62%

segmentation accuracy for a superpixel crown method on mixed tropical forest

Two free tools, both MIT-licensed

DeepForest is a Python package for training and predicting ecological objects in airborne imagery. It ships single-class tree-crown and bird models and can be extended to species classification. It is released under the MIT licence. Its prebuilt crown model was trained in two steps: millions of moderate-quality annotations generated by an unsupervised LiDAR tree detection algorithm, followed by hand annotation of RGB imagery from selected sites. Its optional species model has 148 species classes trained on about 16,000 deduplicated crown crops, with a genus model of 54 classes. Both use a ResNet-18 backbone and are run as a second step after crown detection. The training data include hand-annotated crowns from 29 NEON sites across the United States.

Detectree2 is a Mask R-CNN based package for delineating tree crowns in aerial RGB and multispectral imagery. It is designed for dense tropical forests, with pretrained models in a "model garden", and is also MIT licensed.

Both are open, which makes them excellent for learning, prototyping and building on. Neither claims to be a finished tool.

What the maintainers say

DeepForest's documentation states that its prebuilt models are intended as starting points for further training, not as general-purpose tools for new imagery. The repository says a prebuilt model is unlikely to predict an image perfectly. The documentation also notes that the online demo handles individual images only.

That is a responsible description. A model trained on temperate US forests, flown at a particular resolution and season, will meet different light, species and canopy structure on a smallholder agroforest in Indonesia.

An independent validation in a temperate forest in Japan scored Detectree2 at an F1 of 0.57 and DeepForest at 0.52. F1 combines how many real crowns were found with how many detections were correct, on a scale from 0 to 1. Neither number is high, and neither comes from a tropical site. The comparison tells you the tools are in the same range, not that either will work for you.

Easy targets and hard targets

How well detection works depends heavily on what you are detecting.

- Oil palm. A paper on large-scale oil palm detection used 56,614 labels over 730 ha at 5 cm per pixel for training, and tested on 17,343 trees across 24 regions. F1 scores were 97.28% for YOLOv3, 97.74% for YOLOv4 and 94.94% for a third, faster model. Palms are planted in regular rows, one species, with similar crowns. That is a favourable case. - Mixed tropical forest. A review of crown delineation reports a superpixel method with 62% segmentation accuracy, and the best individual-crown method in a Brazilian Amazon study at 65%. It says perfect crown delineation in tropical forests is unrealistic, and that raster canopy-height methods are ineffective for lower-storey trees. - Seedlings. A study of seedling detection from drone imagery in Shanxi, China, covered 96 ha with about 25,000 samples at resolutions of 1 to 5 cm. Its authors note that LiDAR and canopy-height methods struggle to separate seedlings from mature trees and need costly high-density point clouds. A Faster R-CNN approach based on texture was sensitive to dense undergrowth and shrubs.

The first case reaches the high nineties. The others do not. A reader who sees only the first number will form the wrong expectation for a young plantation or a mixed forest.

Practical steps before trusting a count

1. Test on your own imagery. Hand-label a few plots and compare, at your resolution and season. 2. Report the metric. Recall, precision and F1 tell different stories. A tool can miss many crowns and still look precise. 3. Separate counting from carbon. A crown count is not a biomass estimate. It still needs size, species and an allometric equation. 4. Keep a field sample. Count a subset on the ground, and publish the difference. 5. Check licences on the data too. Pretrained weights, training data and imagery each have their own terms. MIT code does not make the imagery free.

For how drone photogrammetry and LiDAR differ as inputs, see Photogrammetry or LiDAR for forest mapping. For licences across the wider open geospatial AI stack, see the open-source AI stack for geospatial work in 2026.

Frequently Asked Questions

Both are released under the MIT licence, which permits commercial use. The licence covers the code. Check separately the terms for any pretrained weights, training data and imagery you use.

Counting trees from drone imagery?

Detection quality depends on your imagery, your species and your definition of a tree. If you are scoping a drone-based tree count, we are happy to compare notes.

DeepForest vs Detectree2: Open-Source Crown Detection | TREEO Indonesia