IBBI DINOv3 ViT-L/16 hierarchical classifier
Names a specimen crop at subfamily, tribe, genus and species, each with a calibrated probability and a
"known / unsure" decision, and reports the deepest level it is confident about: a species, "Genus sp. (species
undetermined)", "Tribe (genus undetermined)", "Subfamily (tribe undetermined)" or "unrecognised". Stage 2 of the
ibbi identification pipeline.
import ibbi
clf = ibbi.create_model("dinov3_hierarchical_classifier")
rec = clf.predict("specimen_crop.jpg")
print(rec["reported"], rec["species"]["prob"], rec["genus"]["known"])
pipe = ibbi.create_pipeline(classifier="dinov3_hierarchical_classifier") # arthropod detector + this classifier
Model
| Backbone | DINOv3 ViT-L/16, fine-tuned end to end (336 px, letterboxed crop of the box + 5%) |
| Head | LayerNorm + one linear layer giving a conditional logit per taxonomy node; P(node | parent) is a softmax over siblings, so the four levels are always consistent |
| Parameters | 303.3 M |
| Label space | 65 species, 38 genera, 17 tribes, 2 subfamilies (benchmark trainable species) |
| Training data | benchmark train crops (51,564) minus a validation set of whole specimen groups (1,475 crops) |
| Training | hierarchical cross-entropy with logit adjustment, square-root class sampler, 30 epochs × 40000 samples, AdamW (lr 4e-05, layer decay 0.8), EMA 0.999; non-beetle outlier exposure (weight 0.5); synthetic outliers (NPOS, weight 0.5); hierarchical supervised contrastive loss (weight 0.1); seed 0 |
| Calibration | one temperature per level, fitted on the validation set |
| Novelty score | per level, percentile among the validation (known) beetles of: max calibrated probability (subfamily, tribe, genus); mean of that and the cosine similarity to the 5th nearest training embedding (species) |
| Operating points | gallery (default: accept 99% of known validation beetles at subfamily, 95% below), 0.90, 0.95, 0.99 |
| Unknown data | no real unknown beetles were used to train the model or to set any threshold |
Files: model.safetensors (weights), deploy.safetensors (kNN reference bank, validation score distributions),
config.json (backbone, taxonomy, temperatures, thresholds).
Benchmark results (ground-truth specimen crops, through ibbi.Evaluator, operating point gallery)
Accuracy and ECE are over specimens whose taxon at that level is known to the classifier. Over-commit = reporting a taxon below the deepest level that could be right (e.g. naming a species for a held-out species).
| Split | n | subfamily acc. | tribe acc. | genus acc. | species acc. | species ECE | over-commit rate | right depth and taxon |
|---|---|---|---|---|---|---|---|---|
| iid_test | 650 | 0.989 | 0.949 | 0.891 | 0.835 | 0.043 | 0.000 | 0.718 |
| inat_test | 80 | 0.925 | 0.562 | 0.487 | 0.362 | 0.210 | 0.000 | 0.200 |
| semantic_ood | 46924 | 0.979 | 0.619 | 0.515 | – | – | 0.497 | 0.102 |
Novelty separation (known at that level vs unknown at that level, all splits pooled):
| Level | novelty AUROC | FPR at 95% TPR |
|---|---|---|
| tribe | 0.772 | 0.834 |
| genus | 0.561 | 0.881 |
| species | 0.739 | 0.925 |
| Held-out band | n | ideal depth | mean reported depth | over-commit rate |
|---|---|---|---|---|
| far_tribe | 6034 | 1.00 | 1.96 | 0.326 |
| mid_tribe | 17099 | 2.00 | 2.37 | 0.449 |
| near_genus | 23791 | 3.00 | 2.88 | 0.575 |
Embeddings (iid_test specimens): Mantel correlation between between-species embedding distance and taxonomic distance r = 0.542.
Intended use and limitations
- Input is one specimen per crop, e.g. from the arthropod detector; curated specimen photos work best.
- New genera are the hard case: no score separates an unseen genus from known ones well (see the novelty table), so unseen species and genera are still named at an impossible depth a large share of the time. Read the depth and the per-level flags, not only the top label.
- Field photographs are a weak domain and are more often answered "unrecognised".
- "Unrecognised" means "not confidently a trained lineage", not "not a beetle".
Licence
Weights: DINOv3 License (Meta). These weights are a fine-tuned derivative of DINOv3 ViT-L/16 (LVD-1689M) and are distributed under the terms of the DINOv3 License, a copy of which is in LICENSE.md. Publications that use this model must acknowledge the use of DINOv3 (section 1.b.ii of the licence).
The training images come from the Bark and Ambrosia Beetle Detection Benchmark v2.0.1, whose images carry mixed Creative Commons licences; about 60% of the training images are CC BY-NC (non-commercial). Whether model weights inherit the terms of their training images is legally unsettled; we recommend non-commercial research and education use, and checking image_licences.csv of the dataset before any commercial use. Outlier exposure used non-beetle arthropod crops from the IBBI arthropod detection corpus, including iNaturalist 2017 and IP102 crops (non-commercial / academic-use terms).
Citation
@dataset{marais_bark_ambrosia_benchmark_2026,
title = {Bark and Ambrosia Beetle Detection Benchmark},
author = {Marais, G. Christopher and Schuster, Layla A. and Johnson, Andrew J. and Kuo, Eric and Dias, Raquel and Hulcr, Jiri},
year = {2026},
publisher = {Zenodo},
version = {2.0.1},
doi = {10.5281/zenodo.22695714}
}
The ibbi package: https://github.com/ChristopherMarais/IBBI