PlantNet-300K-v2 Models
Collection
DINOv3 ConvNexts and ViTs fine-tuned on Pl@ntNet-300K-v2 • 6 items • Updated
How to use PlantNet/plantnet-300k-v2-cnxt with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="PlantNet/plantnet-300k-v2-cnxt")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("PlantNet/plantnet-300k-v2-cnxt", device_map="auto")This is a 1,000-species plant classifier obtained by fine-tuning facebook/dinov3-convnext-tiny-pretrain-lvd1689m on Pl@ntNet-300K-v2.
| Property | Value |
|---|---|
| Architecture | DINOv3 ConvNeXt-Tiny |
| Classes | 1,000 |
| Embedding dimension | 768 |
| Best validation accuracy | 0.8248 |
| Test accuracy | 0.8216 |
| Input size | 224 × 224 RGB |
The repository stores the fine-tuned encoder and classifier in model.pth.
The included loader returns both image embeddings and classifier logits.
import sys
import pandas as pd
import torch
from huggingface_hub import snapshot_download
from PIL import Image
model_id = "PlantNet/plantnet-300k-v2-cnxt"
model_dir = snapshot_download(model_id)
sys.path.insert(0, model_dir)
from model import load_model
from transforms import ValTransform
device = "cuda" if torch.cuda.is_available() else "cpu"
model = load_model("cnxt", f"{model_dir}/model.pth", device=device)
transform = ValTransform()
image = transform(Image.open(f"{model_dir}/example.jpg").convert("RGB"))
with torch.inference_mode():
embeddings, logits = model(image.unsqueeze(0).to(device))
species_id = logits.argmax(dim=1).item()
metadata = pd.read_csv(f"{model_dir}/species_metadata.csv")
species_name = metadata.loc[
metadata["species_id"] == species_id, "full_species"
].item()
print(species_name, embeddings.shape)
The DINOv3 base model is license-gated. Accept its license and authenticate with Hugging Face before the first load.
Images are resized/cropped to 224 × 224 and normalized with the Pl@ntNet statistics used during fine-tuning:
mean = (0.4425, 0.4695, 0.3266)
std = (0.2353, 0.2219, 0.2325)
@inproceedings{plantnet-300k,
author = {Garcin, Camille and Joly, Alexis and Bonnet, Pierre and
Lombardo, Jean-Christophe and Affouard, Antoine and
Chouet, Mathias and Servajean, Maximilien and
Lorieul, Titouan and Salmon, Joseph},
booktitle = {NeurIPS Datasets and Benchmarks 2021},
title = {{Pl@ntNet-300K}: a plant image dataset with high label
ambiguity and a long-tailed distribution},
year = {2021}
}
@misc{moummad2026,
title = {Energy-Efficient Plant Monitoring via Knowledge Distillation},
author = {Ilyass Moummad and Reda Bensaid and Kawtar Zaher and
Hervé Goëau and Jean-Christophe Lombardo and Joseph Salmon and
Pierre Bonnet and Alexis Joly},
year = {2026},
eprint = {2604.27178},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2604.27178}
}
Base model
facebook/dinov3-vit7b16-pretrain-lvd1689m