Toward an Optimal Configuration for Tree Species Classification from Bark Images: A Leakage-Safe Ablation Study
Organizations: Independent researcher, Montréal, Canada
Abstract
Background: The automatic identification of tree species from bark photographs is of practical interest for forestry inventory and the wood-processing industry, yet the design choices that govern the accuracy of deep-learning approaches have not been studied systematically, and some prior results may be inflated by leakage of images of the same trunk across training and test partitions. Methods: A systematic ablation study is conducted on the public BarkNet 1.0 dataset (20 species) under the established tree-level, leakage-safe partitioning scheme. Using ConvNeXt-V2 backbones, the following factors are varied in turn and evaluated by five-fold cross-validation: patch size, the strategy by which per-patch predictions are aggregated into an image-level decision, the training regime (single- versus two-stage), backbone capacity, the whole-image baseline, and the number of patches available at inference. Results: Per-patch accuracy rises monotonically with patch size (from 75.6% at 160 px to 89.6% at 512 px), and image-level accuracy rises in step, plateauing near 94.9% around 512 px. Learned aggregation exceeds majority voting by at most 0.7 pp, an advantage that shrinks as patches grow and attention becomes near-uniform. Backbone capacity (pico to tiny) alters accuracy by less than a point, and two-stage training offers no advantage over one-stage. Whole-image classification (91.9%) trails patch-based aggregation, since it admits no bag to average over; accuracy increases with the number of patches at inference, saturating around 64. Conclusions: The study yields a simple recommended configuration: patches as large as possible while leaving enough to average over (around 512 px here), with a nano backbone. It also quantifies the second-order role of learned aggregation and model capacity, providing a reproducible reference point for practitioners and future research
Figures & tables
| Code | Species (Latin) | Trees | Images | Patches | Patches/img |
|---|---|---|---|---|---|
| MEL | Larix laricina | 77 | 1,874 | 574,385 | 306.5 |
| CHR | Quercus rubra | 109 | 2,724 | 395,026 | 145.0 |
| ERS | Acer saccharum | 81 | 1,911 | 332,432 | 174.0 |
| PET | Populus tremuloides | 58 | 1,037 | 314,582 | 303.4 |
| FRA | Fraxinus americana | 61 | 1,472 | 282,180 | 191.7 |
| ERR | Acer rubrum | 64 | 1,676 | 264,115 | 157.6 |
| Hyperparameter | Stage 1 | Stage 2 |
|---|---|---|
| Backbone | ConvNeXt-V2 (pico, nano, tiny) | |
| Base learning rate | 1.0e-4 | 1.0e-5 |
| Weight decay | 1.0e-3 | 6.4e-4 |
| Drop-path rate | 0.15, 0.25, 0.35 | |
| Instance-loss weight | – | 0.65 |
| Differential-LR multiplier | – | 15 |
| Regime | AMIL acc. (%) | AMIL macro- | (AMIL AMIL-vote) pp | Eff. frac. (%) |
|---|---|---|---|---|
| Two-stage | 91.5 2.7 | 91.7 | 89.3 | |
| Single-stage | 92.8 2.2 | 92.7 | 50.6 |
| Backbone | Params (M) | Per-patch (%) | Voting (%) | AMIL (%) | AMIL macro- | pp |
|---|---|---|---|---|---|---|
| ConvNeXt-V2 pico | 9.1 | 80.4 4.8 | 90.1 3.0 | 90.8 2.9 | 90.9 | |
| ConvNeXt-V2 nano | 15.6 | 81.2 4.6 | 90.8 2.8 | 91.5 2.7 | 91.7 | |
| ConvNeXt-V2 tiny | 28.6 | 81.6 4.8 | 91.1 2.9 | 91.3 2.8 | 91.2 |
| Method | Split | Aggregation | Acc. (%) |
|---|---|---|---|
| Carpentier et al. [ 6 ] | tree | single crop | 87.0 |
| Carpentier et al. [ 6 ] | tree | vote (image) | 93.88 |
| Carpentier et al. [ 6 ] | tree | vote (tree) | 97.81 |
| Cui et al. [ 4 ] a | image a | single image | 97.61 |
| This work: per-patch | tree | single patch | 89.6 |
| This work: image | tree | vote | 94.7 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Patch size (px) | 160 | 224 | 288 | 384 | 512 |
|---|---|---|---|---|---|
| Per-patch accuracy (%) | 75.6 4.9 | 81.2 4.6 | 84.8 4.3 | 87.8 3.6 | 89.6 3.3 |
| Patch size (px) | 160 | 224 | 288 | 384 | 512 |
|---|---|---|---|---|---|
| Mean bag size (patches) | 347 | 181 | 113 | 64 | 38 |
| Voting accuracy (%) | 87.6 2.8 | 90.8 2.8 | 92.5 2.9 | 94.3 2.2 | 94.7 2.1 |
| AMIL-vote accuracy (%) | 87.5 3.2 | 91.0 2.5 | 92.7 2.6 | 94.5 2.1 | 94.8 2.0 |
| AMIL accuracy (%) | 88.3 2.7 | 91.5 2.7 | 93.0 2.6 | 94.7 1.9 | 94.9 2.2 |
| (AMIL voting) pp | |||||
| Effective attention fraction (%) | 70.7 6.2 | 89.3 7.5 | 95.4 3.0 | 97.5 1.0 | 99.0 1.1 |
| Patches per bag | 4 | 8 | 16 | 32 | 64 | 128 | 256 |
| Voting accuracy (%) | 87.5 | 89.0 | 90.0 | 90.4 | 90.6 | 90.7 | 90.8 |
| AMIL accuracy (%) | 88.8 | 90.1 | 91.0 | 91.1 | 91.3 | 91.4 | 91.5 |
| (AMIL voting) pp |
| Species | Precision | Recall | ||
|---|---|---|---|---|
| BOJ | 97.0 | 91.4 | 94.1 | 1255 |
| BOP | 94.0 | 97.4 | 95.7 | 1285 |
| ERS | 89.0 | 90.1 | 89.5 | 1911 |
| ERR | 88.0 | 85.3 | 86.6 | 1676 |
| EPN | 95.0 | 99.3 | 97.1 | 885 |
| EPB | 96.9 | 94.6 | 95.8 | 596 |
Tree Species Classification
Tree species classification identifies tree taxa from images, spectral measurements, 3D structure, and satellite or aerial observations.
See all 20 papers