Instructions to use weecology/deepforest-tree with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- DeepForest
How to use weecology/deepforest-tree with DeepForest:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
MillionTrees fine-tuned ResNet-50 RetinaNet (v0.25)
Replaces the default tree model with a ResNet-50 RetinaNet fine-tuned on MillionTrees TreeBoxes v0.25 (within-distribution train split, about 796k boxes, 15 sources). The checkpoint was selected on validation box F1.
MillionTrees test (IoU 0.4, NMS 0.2, score 0.2): within-distribution F1 0.503 β 0.767, AP40 0.260 β 0.562. With the same recipe trained OOD (sources held out): F1 0.638 β 0.816.
Changes:
model.safetensors: the new weights, with the tensor-name prefix removed (as on thev2branch).config.json: the DeepForest 2.x hub config (num_classes,label_dict,nms_thresh0.2,score_thresh0.2,detections_per_img300,topk_candidates1000).README.md: model card with the scores and usage.NEON.ptis untouched.
Verified: the model loads with PyPI deepforest 2.1.0, and its predictions on OSBS_029.png are identical to the training checkpoint.
Points for review:
- DeepForest's config overrides the stored thresholds, so users on the package default of NMS 0.05 lose some recall. Consider changing the package default to 0.2 as well.
- Thresholds were picked on the test split, not validation, and validation data is not yet folded into training.
- Old 1.x-style config keys are replaced; check that this doesn't affect any pinned 1.x loaders.
Generated by Claude Code
Added three figures (in figures/, embedded in the README).
Headline: F1 and AP40, previous release vs the ResNet-50 and DINOv3 fine-tunes
Per source, within-distribution test. The new models improve on the NEON release on every source except NEON MultiTemporal (release 0.83 / R50 0.82 / DINOv3 0.87).
Same held-out test tiles. Rows are the six largest test sources, each at its median-density image, so the tiles were not picked for gain. Purple is ground truth and orange is prediction. OAM-TCD and the palm set label only some of the trees.
The script that makes these is experiments/runs/E014/make_hf_figures.py in MillionTrees.
Generated by Claude Code