Onyx PlantNet-300K β€” Core ML

On-device plant species identification for Onyx: 1,081 species with Latin binomial names, 22 MB compiled at fp16, running entirely offline through Core ML / Vision.

Attribution

This is a derivative of cpoisson/plantnet300k-resnet18 (Apache-2.0), a torchvision ResNet18 trained on PlantNet-300K (Garcin et al., NeurIPS 2021 Datasets and Benchmarks). All modelling credit belongs to those authors; this repository only converts the published weights to Core ML. The species-id β†’ name mapping is plantnet300K_species_id_2_name.json from the same source.

What was changed in conversion

Two things that are silently catastrophic if got wrong, both verified by running the compiled model:

  1. Softmax is folded into the graph. The bare torchvision model emits logits, and Core ML's classifier head reports whatever the last layer produced β€” without this, "confidence" comes back as values like -9918% and the probability mass sums to -173206 instead of 1.0.
  2. Label order follows the source model card's convention β€” class index i maps to the i-th species when the species-id strings are sorted (torchvision ImageFolder order). Sorting them numerically instead mislabels all 1,081 classes with no visible error.

ImageNet normalisation is folded into the Core ML input, so callers hand over raw pixels.

Build script: scripts/build_plant_model.py in the Onyx repo.

Verification

Compiled model on a synthetic yellow-flower image:

 68.75%  Calendula officinalis L.
 20.96%  Papaver somniferum L.
  6.81%  Calendula stellata Cav.
probability mass: 1.000

Honest limits

  • 1,081 species against ~400,000 known plants. This is a narrow slice by construction.
  • PlantNet-300K is European-weighted. Expect good results on garden and Mediterranean flora and weaker ones on, for example, California natives.
  • The source publishes no evaluation metrics for this checkpoint, so no accuracy figure is claimed here either.
  • Onyx pairs it with a per-user learned library precisely because a global classifier is thinnest exactly where a user is densest β€” their own garden and local flora.

Never treat any photo-based identification as authority on edibility, medicinal use or safety. Look-alikes exist; confirm with a local expert or field guide.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for wabibito/Onyx-PlantNet300K-CoreML

Quantized
(2)
this model