MobileNetV4-Conv-S for southwestern European flora
This is a compact image-classification model for identifying 7,806 plant
species from the flora of southwestern Europe. It was fine-tuned on the
Pl@ntCLEF2024 training set using knowledge distillation from the Pl@ntCLEF
ViT-B teacher
PlantNet/vit_base_patch14_reg4_dinov2_lvd142m.pc24_all.
This MobileNetV4-Conv-S model makes plant recognition more accessible on mobile and edge hardware, where the ViT-B model can be too computationally expensive.
Performance
Evaluation on the Pl@ntCLEF2026 single-species test split.
| Model | Architecture | Parameters | Image resolution | Top-1 | Top-5 |
|---|---|---|---|---|---|
| Pl@ntCLEF teacher | ViT-B/14 | 92.58M | 518 × 518 | 75.59% | 92.81% |
| Distilled Conv-S student | MobileNetV4-Conv-S | 12.49M | 512 × 512 | 62.50% | 84.08% |
| Distilled Hybrid-M student | MobileNetV4-Hybrid-M | 19.79M | 512 × 512 | 71.40% | 90.60% |
The student model was trained for 50 epochs on the Pl@ntCLEF2024 training set using the images resized to a maximum side of 800 pixels provided for PlantCLEF2026, by distilling the knowledge from the teacher model following the method Energy-Efficient Plant Monitoring via Knowledge Distillation, cited below.
Load with timm
pip install "timm>=1.0.12" huggingface_hub safetensors pillow
import timm
import torch
import json
from PIL import Image
from huggingface_hub import hf_hub_download
from timm.data import create_transform, resolve_data_config
model_id = "PlantNet/mobilenetv4-conv-s-plantclef2024"
model = timm.create_model(f"hf-hub:{model_id}", pretrained=True).eval()
transform = create_transform(**resolve_data_config(model.pretrained_cfg, model=model))
labels_path = hf_hub_download(model_id, "labels.json")
image_path = hf_hub_download(model_id, "example.jpg")
with open(labels_path, encoding="utf-8") as handle:
labels = json.load(handle)
image = Image.open(image_path).convert("RGB")
with torch.inference_mode():
probabilities = model(transform(image).unsqueeze(0)).softmax(dim=-1)[0]
for probability, class_id in zip(*probabilities.topk(5)):
taxon = labels[class_id.item()]
print(taxon["species"], probability.item())
labels.json contains the ordered species ID, scientific name,
genus, and family. Entry i describes output logit i.
ONNX Runtime
The equivalent FP32 ONNX graph is available at
onnx/model.onnx. It has a dynamic batch dimension and a
fixed spatial input size of 512 × 512.
pip install "onnxruntime>=1.18" "huggingface_hub>=0.25" "Pillow>=10" "numpy>=1.26"
hf download PlantNet/mobilenetv4-conv-s-plantclef2024 onnx/inference.py --local-dir .
python onnx/inference.py
The complete ONNX-only example is provided in
onnx/inference.py; it does not require PyTorch or
timm. The graph interface is:
| Name | Shape | Type | Description |
|---|---|---|---|
pixel_values | (batch, 3, 512, 512) | float32 | RGB values scaled to [0, 1] and normalized with the mean/std below |
logits | (batch, 7806) | float32 | Unnormalized species scores |
onnx/metadata.json records the ONNX opset,
preprocessing, numerical-parity result, and SHA-256 hashes of both the source
weights and ONNX graph.
Model details
- Model: MobileNetV4-Conv-S fine-tuned for Pl@ntCLEF2024
- Initialization: ImageNet-1K weights from
timm/mobilenetv4_conv_small.e2400_r224_in1k - Distillation teacher:
PlantNet/vit_base_patch14_reg4_dinov2_lvd142m.pc24_all - Training data: Pl@ntCLEF2024 training split
- Training duration: 50 epochs
- Geographic and taxonomic scope: 7,806 species from the flora of southwestern Europe
- Input: 512 × 512 RGB
- Normalization: ImageNet mean
(0.485, 0.456, 0.406)and standard deviation(0.229, 0.224, 0.225)
Intended use
The model expects a photograph of a single plant observation and returns a probability distribution over its 7,806 southwestern European training species. Images containing several species, including vegetation plots, require a separate multi-label method such as tiled inference, score aggregation, and calibrated thresholds.
Citations
Method
@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}
}
Teacher Model
@misc{goeau2024plantclef,
author = {Goëau, Hervé and Lombardo, Jean-Christophe and Affouard, Antoine and Espitalier, Vincent and Bonnet, Pierre and Joly, Alexis},
title = {PlantCLEF 2024 pretrained models on the flora of the south western Europe based on a subset of Pl@ntNet collaborative images and a ViT base patch 14 dinoV2},
year = {2024},
publisher = {Zenodo},
doi = {10.5281/zenodo.10848263},
url = {https://doi.org/10.5281/zenodo.10848263},
note = {Figure}
}
Dataset and challenge
@article{plantclef2024overview,
title = {Overview of {PlantCLEF} 2024: multi-species plant identification in vegetation plot images},
author = {Goëau, Hervé and Espitalier, Vincent and Bonnet, Pierre and Joly, Alexis},
journal = {Working Notes of CLEF 2024 - Conference and Labs of the Evaluation Forum},
year = {2024}
}
License
This model is released under the Apache License 2.0.