A dataset and Python toolkit for automated tree ring detection and analysis in Pinus Taeda cross-sections.
Paper • Dataset (Zenodo) • Project Page
- 📊 Public dataset of tree ring images
- 🔍 Automated detection & segmentation
- 📏 Evaluation metrics
- 🎨 Annotation visualization
- 🤖 Deep learning background removal (U2-Net)
Install uv if you don’t have it:
pip install uvCreate a fast, isolated environment and install all dependencies:
uv venv .venv
source .venv/bin/activate
uv pip install -r requirements.txt
pip install -e .Note: The U2-Net model file (
u2net.pth) must be inurudendro/. If you cloned with git-lfs:sudo apt-get install git-lfs git lfs pull
Download dataset:
import urudendro
urudendro.download_dataset('/absolute/path/to/dataset')Visualize annotations:
import urudendro
urudendro.visualize_annotation('annotation.json', 'image.png', 'output_dir/')Evaluate detection:
import urudendro
precision, recall, f_score, rmse, tp, fp, tn, fn = urudendro.compute_metrics(
'detection.json', 'ground_truth.json', 'image.png',
cx=512, cy=512, threshold=0.5, output_dir='results/'
)Remove background:
import urudendro
urudendro.remove_salient_object('input.jpg', 'output.jpg')- Python ≥ 3.8
- PyTorch ≥ 2.4.1
- OpenCV ≥ 4.8.1
- NumPy ≥ 1.26.1
- See
requirements.txtfor full list
If you use UruDendro, please cite:
@article{marichal2025uruDendro,
title={UruDendro: a public dataset of cross-section images of Pinus taeda},
author={Marichal, Henry and Passarella, Diego and Lucas, Christine and Profumo, Ludmila and Casaravilla, Verónica and Rocha Galli, María Noel and Ambite, Serrana and Randall, Gregory},
journal={Annals of Forest Science},
volume={82}, number={1}, pages={1--21}, year={2025},
publisher={Springer},
doi={10.1186/s13595-024-01267-6},
url={https://rdcu.be/euo3F}
}Dataset: https://doi.org/10.5281/zenodo.15110646
You may also use pip or conda if preferred:
pip install git+https://github.com/hmarichal93/uruDendro.git
# or
conda env create -f environment.yml
conda activate uruDendro
pip install -e .