French trees — Pl@ntNet ViT-B/14 fine-tune (accurate)

Pl@ntNet's PlantCLEF 2024 model (DINOv2 ViT-B/14, 7,806 species of south-western Europe) fine-tuned on 71 common trees of France plus an other plant class. Best single-model accuracy in our tests; use it for photos, and the small sibling model for live video.

Sibling model: Maximaxou2/french-trees-vit-small — a 4× smaller model distilled from this one, for live/mobile use.

Usage

import json, timm, torch
from huggingface_hub import hf_hub_download
from PIL import Image

model = timm.create_model("hf-hub:Maximaxou2/french-trees-plantnet-ft", pretrained=True).eval()
transform = timm.data.create_transform(**timm.data.resolve_data_config({}, model=model))
labels = json.load(open(hf_hub_download("Maximaxou2/french-trees-plantnet-ft", "labels.json"), encoding="utf8"))
temperature = json.load(open(hf_hub_download("Maximaxou2/french-trees-plantnet-ft", "config.json")))["temperature"]

x = transform(Image.open("photo.jpg").convert("RGB")).unsqueeze(0)
with torch.no_grad():
    probs = (model(x) / temperature).softmax(-1)[0]
for p, i in zip(*probs.topk(3)):
    print(f"{p:.1%}  {labels[i]['latin']} ({labels[i]['fr']})")

Divide logits by temperature (fitted on the validation split) for calibrated probabilities. Class 71 (other) means "probably not one of the 71 trees".

ONNX: model.onnx — fp16 weights, fp32 input image [1, 3, 448, 448] (RGB, center square crop, ImageNet mean/std), output logits [1, 72]. Runs with ONNX Runtime, incl. Android (CPU/XNNPACK or Qualcomm NPU via QNN).

Results

Test set: 7,090 photos of the 71 trees (100 iNaturalist observations per species, 90 for Thuja) observed in 2025–2026 by people absent from the training data, so neither the base model nor this one saw them; plus 1,000 photos of other plants, half of them close relatives of the 71 (other oaks, maples, pines, Tilia × europaea, oriental plane…).

Model Top-1 (among the 71) Open-set accuracy on trees Other plants rejected
Pl@ntNet PlantCLEF 2024, zero-shot (original) 89.8 69.0 90.4
This model 95.97 94.89 88.5
  • Top-3 among the 71: 98.67 %. Calibration error (ECE): 0.54 %.
  • When the calibrated confidence is ≥ 90 % (92.3 % of tree photos), it is right 98.66 % of the time.
  • By photo type (auto-tagged, approximate): flower 98.2 · leaf 97.9 · fruit 97.0 · twig or bud 96.6 · needles or cones 96.1 · whole tree 89.2 · bark 88.9.
  • Most frequent confusions: Tilia cordata → Tilia platyphyllos (16), Tilia platyphyllos → Tilia cordata (14), Quercus robur → Quercus petraea (9), Pinus pinea → Pinus pinaster (8), Pinus sylvestris → Pinus nigra (7), Pinus nigra → Pinus pinaster (6). These pairs are hard from a single photo even for botanists, and iNaturalist labels for them are themselves less reliable.

Size and speed: 86 M parameters, 448 px input; ≈ 600 img/s on an RTX 5090 (fp16, batch 64).

Training data

iNaturalist research-grade observations with CC-licensed photos (iNaturalist open-data bucket), France first, the rest of Europe for the less-observed species: up to 700 observations (≤ 2 photos each) per species, plus ~37k photos of ~5,000 other plant species for the other class. Observer-disjoint train / validation / test splits. Licenses of training photos: 81 % CC BY-NC, 12 % CC BY, 4 % CC0, the rest other CC variants.

Full fine-tune at 448 px, 8 epochs (AdamW, layer-wise LR decay 0.75, label smoothing 0.1, class-balanced loss), then 2 more epochs after adding 32k extra other plant photos. The new head was initialised from Pl@ntNet's own classifier rows for these species.

Limitations

  • Only 71 species. Anything else should come out as other, but ~11 % of lookalike plants are still named as one of the 71 — treat low-confidence answers as "check it".
  • Bark-only and whole-tree photos are clearly harder than leaves, flowers or fruits.
  • Platanus × hispanica (London plane) is not in the base Pl@ntNet model; it was learned only during fine-tuning.
  • Built for learning and curiosity, not for decisions that matter (e.g. edibility or toxicity).

License and credits

Weights: CC BY-NC 4.0 — most training photos are CC BY-NC. Base models: Pl@ntNet PlantCLEF 2024 ViT-B/14 (Apache-2.0, trained on Pl@ntNet data), DINOv2 (Meta). Photos: the iNaturalist community. Thank you to every observer.

Species

Latin name French name Test accuracy (%)
Quercus robur Chêne pédonculé 83.0
Quercus petraea Chêne sessile 93.0
Quercus pubescens Chêne pubescent 97.0
Quercus ilex Chêne vert 97.0
Quercus suber Chêne-liège 98.0
Quercus rubra Chêne rouge d'Amérique 99.0
Quercus cerris Chêne chevelu 92.0
Fagus sylvatica Hêtre commun 96.0
Carpinus betulus Charme commun 91.0
Castanea sativa Châtaignier 97.0
Fraxinus excelsior Frêne élevé 96.0
Fraxinus ornus Frêne à fleurs 96.0
Acer pseudoplatanus Érable sycomore 97.0
Acer platanoides Érable plane 97.0
Acer campestre Érable champêtre 97.0
Acer monspessulanum Érable de Montpellier 97.0
Tilia cordata Tilleul à petites feuilles 79.0
Tilia platyphyllos Tilleul à grandes feuilles 85.0
Betula pendula Bouleau verruqueux 94.0
Alnus glutinosa Aulne glutineux 99.0
Corylus avellana Noisetier 100.0
Juglans regia Noyer commun 96.0
Prunus avium Merisier 97.0
Prunus padus Cerisier à grappes 98.0
Prunus mahaleb Cerisier de Sainte-Lucie 99.0
Malus sylvestris Pommier sauvage 99.0
Pyrus communis Poirier commun 97.0
Sorbus aucuparia Sorbier des oiseleurs 98.0
Sorbus domestica Cormier 94.0
Sorbus torminalis Alisier torminal 100.0
Sorbus aria Alisier blanc 99.0
Crataegus monogyna Aubépine monogyne 98.0
Robinia pseudoacacia Robinier faux-acacia 99.0
Gleditsia triacanthos Févier d'Amérique 98.0
Platanus × hispanica Platane commun 99.0
Aesculus hippocastanum Marronnier d'Inde 100.0
Ailanthus altissima Ailante glanduleux 98.0
Celtis australis Micocoulier de Provence 99.0
Populus nigra Peuplier noir 99.0
Populus tremula Peuplier tremble 97.0
Populus alba Peuplier blanc 98.0
Salix alba Saule blanc 100.0
Salix caprea Saule marsault 99.0
Ulmus minor Orme champêtre 94.0
Ulmus glabra Orme de montagne 96.0
Ilex aquifolium Houx 99.0
Buxus sempervirens Buis 100.0
Cornus mas Cornouiller mâle 98.0
Euonymus europaeus Fusain d'Europe 99.0
Sambucus nigra Sureau noir 100.0
Olea europaea Olivier 99.0
Arbutus unedo Arbousier 98.0
Laurus nobilis Laurier-sauce 98.0
Prunus laurocerasus Laurier-cerise 96.0
Ostrya carpinifolia Charme-houblon 99.0
Pinus sylvestris Pin sylvestre 89.0
Pinus pinaster Pin maritime 91.0
Pinus nigra Pin noir 86.0
Pinus halepensis Pin d'Alep 97.0
Pinus pinea Pin parasol 84.0
Pinus cembra Pin cembro 88.0
Pinus uncinata Pin à crochets 94.0
Abies alba Sapin pectiné 97.0
Picea abies Épicéa commun 94.0
Pseudotsuga menziesii Douglas 96.0
Larix decidua Mélèze d'Europe 96.0
Cedrus atlantica Cèdre de l'Atlas 97.0
Taxus baccata If commun 94.0
Juniperus communis Genévrier commun 99.0
Cupressus sempervirens Cyprès de Provence 99.0
Thuja occidentalis Thuya du Canada 95.6
other Autre plante —
Downloads last month
13
Safetensors
Model size
86.4M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Maximaxou2/french-trees-plantnet-ft