SAVRN
Search Contact SAVRN

Open-weight model · Image classification

PlantNet-300K-ResNet18-LiteRT

by LiteRT Community (FKA TFLite) litert-community/PlantNet-300K-ResNet18-LiteRT

PlantNet-300K-ResNet18-LiteRT is an open-weight model for image classification from LiteRT Community (FKA TFLite), released under Apache License 2.0. Its published files total 47.3 MB. It draws 154 downloads a month.

Measured on device (edge-compat): Raspberry Pi 5 · LiteRT 2.2.0.dev20260804 · CPU/XNNPACK, 4 threads · 34.1 ms p50 (2026-08-31); browser · Chromium 151 (2026-08-11).

Parameters—
Context—
Weights46.9 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads154

Model Card

By LiteRT Community (FKA TFLite), published under apache-2.0, revision 54f7b14eda04.

Measured on device (edge-compat): Raspberry Pi 5 · LiteRT 2.2.0.dev20260804 · CPU/XNNPACK, 4 threads · 34.1 ms p50 (2026-08-31); browser · Chromium 151 (2026-08-11). Record: https://github.com/john-rocky/edge-compat/blob/main/cards/plantnet-300k-resnet18/CARD.md On-device fine-grained plant species identification — 1081 species — running fully on the LiteRT CompiledModel GPU delegate (no CPU fallback). A PlantNet-300K (NeurIPS 2021) ResNet18. ~16 ms/frame on a Pixel 8a. (mean [0.485,0.456,0.406], std [0.229,0.224,0.225]; center-crop then resize 224). Labels: class index i maps to the i-th species when the PlantNet-300K species-id strings are sorted (torchvision ImageFolder order); names…

Read LiteRT Community (FKA TFLite)'s full model card

Measured on device (edge-compat): Raspberry Pi 5 · LiteRT 2.2.0.dev20260804 · CPU/XNNPACK, 4 threads · 34.1 ms p50 (2026-08-31); browser · Chromium 151 on M4 Max · LiteRT.js 2.5.3 · WebGPU · 2.67 ms p50 · output matches CPU (2026-08-11). Record: https://github.com/john-rocky/edge-compat/blob/main/cards/plantnet-300k-resnet18/CARD.md

PlantNet-300K ResNet18 — LiteRT (plant species ID, GPU)

On-device fine-grained plant species identification — 1081 species — running fully on the LiteRT CompiledModel GPU delegate (no CPU fallback). A PlantNet-300K (NeurIPS 2021) ResNet18. ~16 ms/frame on a Pixel 8a.

  • Architecture: torchvision ResNet18 (pure CNN).
  • Weights: cpoisson/plantnet300k-resnet18 · Apache-2.0.
  • Classes: 1081 plant species (Latin names).
  • Size: 47 MB.

I/O

  • Input: [1, 3, 224, 224] NCHW, RGB, ImageNet-normalized (mean [0.485,0.456,0.406], std [0.229,0.224,0.225]; center-crop then resize 224).
  • Output: [1, 1081] species logits — softmax + top-k for the predicted species.

Labels: class index i maps to the i-th species when the PlantNet-300K species-id strings are sorted (torchvision ImageFolder order); names from plantnet300K_species_id_2_name.json (in this repo, copied from the weights repo, Apache-2.0).

GPU conversion

Plain torchvision ResNet18 — a pure CNN. It converts to a fully GPU-compatible graph (37/37 nodes on the delegate, 1 partition; device corr 0.99999, top-1 match) with one patch: the ResNet stem MaxPool2d(padding=1) lowers to a PADV2 with -inf padding (PADV2: src has wrong size on the Mali delegate), replaced by an explicit 0-pad + unpadded maxpool — exact, since the maxpool input is post-ReLU (≥ 0). CPU-exact vs PyTorch (corr 0.99999999999).

Minimal usage

Kotlin (Android, LiteRT CompiledModel GPU)

val options = CompiledModel.Options(Accelerator.GPU)
val model = CompiledModel.create(context.assets, "plantnet.tflite", options, null)
val inBufs = model.createInputBuffers()
val outBufs = model.createOutputBuffers()

inBufs[0].writeFloat(inputNCHW)          // [1,3,224,224], RGB, ImageNet-norm
model.run(inBufs, outBufs)
val logits = outBufs[0].readFloat()      // [1081]
val top = logits.indices.sortedByDescending { logits[it] }.take(5)  // species indices

Python (LiteRT / ai-edge-litert)

from ai_edge_litert.interpreter import Interpreter
import numpy as np

it = Interpreter(model_path="plantnet.tflite"); it.allocate_tensors()
inp, out = it.get_input_details(), it.get_output_details()
it.set_tensor(inp[0]["index"], x)        # [1,3,224,224] float32, ImageNet-norm
it.invoke()
logits = it.get_tensor(out[0]["index"])[0]   # [1081]
top5 = logits.argsort()[::-1][:5]

Conversion

Converted with litert-torch (build_plantnet.py): loads the Apache-2.0 ResNet18 weights, applies the ZeroPadMaxPool patch, and exports.

Performance

Measured on a Pixel 8a (Tensor G3, Android 16) with the standard TFLite benchmark_model tool — 10 warm-up runs then 50 timed runs, reported as the tool's mean.

Runtime Backend Graph on GPU Latency
LiteRT CompiledModel (LITERT_CL) GPU 37 / 37 ~16 ms
TFLite benchmark_model (TfLiteGpuDelegateV2) GPU (OpenCL) 37 / 37 19.9 ms
TFLite benchmark_model CPU (XNNPACK, 4 threads) — 61.8 ms

The two GPU rows are different runtimes, not a contradiction. The LITERT_CL figure is the one recorded when this model shipped, taken through LiteRT's own CompiledModel accelerator — the path the Kotlin sample app and the LiteRT API use. The TfLiteGpuDelegateV2 figure is the classic TFLite OpenCL delegate, measured with a tool anyone can download and re-run. They agree on how much of the graph the GPU takes; they disagree on speed, and the classic delegate is the slower of the two here. Read the TfLiteGpuDelegateV2 row as a reproducible floor, not as this model's speed on LiteRT.

Snapdragon NPU (Hexagon)

This file runs on the Qualcomm Hexagon NPU as published — no conversion and no pre-compiled artifact. LiteRT compiles it on the device and caches the result.

Measured on a physical Samsung Galaxy S26 (Snapdragon 8 Elite Gen 5 / SM8850, Hexagon v81) with LiteRT CompiledModel 2.2.0 — 5 warm-up runs then 50 timed runs, one accelerator per process, every row taken at device thermal status NONE.

Compute unit Inference (median / min) Load Start headroom
NPU (Hexagon) — first launch 0.90 ms / 0.88 ms 586 ms 0.59
NPU (Hexagon) — cached 0.90 ms / 0.89 ms 110 ms 0.59
GPU (Adreno) 3.49 ms / 3.17 ms 464 ms 0.59

The NPU is 3.9x faster on inference here (0.90 ms against 3.49 ms). The first launch pays once for on-device compilation; every launch after that loads in 110 ms against 464 ms for the GPU (4.2x), because the GPU rebuilds its shaders each time. The file is fp16 and needs no int8 quantization to reach the NPU.

Running it on the NPU

Put these in jniLibs/arm64-v8a/. None of them are distributed from this repository — the first two come from Google, the rest from Qualcomm's own SDK:

Library Source
libLiteRtDispatch_Qualcomm.so, libLiteRtCompilerPlugin_Qualcomm.so litert_npu_runtime_libraries_jit.zip, a release asset of google-ai-edge/LiteRT
libQnnHtp.so, libQnnSystem.so, libQnnHtpV81Stub.so, libQnnHtpV81Skel.so, libQnnHtpPrepare.so, libQnnIr.so, libQnnSaver.so Qualcomm QAIRT — the same zip ships fetch_qualcomm_library.sh, which downloads the SDK and copies them for you

Pick the runtime matching the device's Hexagon version: SM8550 → v73, SM8650 → v75, SM8750 → v79, SM8850 → v81.

val env = Environment.create(
    context,
    mapOf(
        Environment.Option.DispatchLibraryDir to context.applicationInfo.nativeLibraryDir,
        // Required for on-device compilation. Without it the model silently runs on CPU.
        Environment.Option.CompilerPluginLibraryDir to context.applicationInfo.nativeLibraryDir,
    ),
)
val options = CompiledModel.Options(Accelerator.NPU).apply {
    qualcommOptions = CompiledModel.QualcommOptions(
        htpPerformanceMode = CompiledModel.QualcommOptions.HtpPerformanceMode.BURST
    )
}
val model = CompiledModel.create(context.assets, "plantnet.tflite", options, env)

Build settings: useLegacyPackaging = true under packaging { jniLibs { … } }, so the DSP can open the skel from a real path, and Kotlin 2.3+ for LiteRT 2.2.0's metadata.

Every NPU failure here is silent. There is no error when the NPU is unavailable — you get a plausible CPU number instead. Confirm from logcat which delegate took the graph: Replacing 1 out of 1 node(s) with delegate (DispatchDelegate) is the NPU, while ... (TfLiteXNNPackDelegate) is the CPU. A missing library is reported only as a W-level dlopen failed line under a generic No compiler plugin found summary.

On the conditions. Thermal headroom is reported as measured, where 1.0 is the throttling threshold. All rows were taken at a comparable headroom and compare directly; figures taken at a different headroom will differ. Each accelerator ran in its own process, because LiteRT's Environment is shared within one and the first model load fixes the options for every later one.

Raspberry Pi 5 (CPU)

Measured on a Raspberry Pi 5 Model B Rev 1.1 (8 GB, Raspberry Pi OS 64-bit) with the LiteRT benchmark_model tool from litert-cli-nightly 0.2.0.dev20260805: CPU inference (XNNPACK, 4 threads), 3 invocations per file of 10 warm-up plus 50 timed runs (the tool caps a phase at 150 s, so very slow graphs run fewer — the Runs column is the actual timed total). The latency is the median across invocations; the spread is the min–max over all timed runs. No thermal throttling occurred during these runs (vcgencmd get_throttled stayed 0x0).

File Inference (median) Spread (min–max) Runs Peak memory
plantnet.tflite 34.1 ms 33.9–35.0 ms 150 138 MB

License

Apache-2.0 (weights: cpoisson/plantnet300k-resnet18). PlantNet-300K code: BSD-2-Clause (plantnet/PlantNet-300K, NeurIPS 2021).

Identity and Version

Repository
litert-community/PlantNet-300K-ResNet18-LiteRT
Publisher
LiteRT Community (FKA TFLite)
Task
Image classification
Modality
Image
Library
litert
Parameters
Not stated by the source
Languages
on-device, gpu
Revision
54f7b14eda047a73bc1f3c9cacb16b14e2146acc
First published
2026-07-06
Last updated
2026-09-22

Files and Weights

5 files, 47.3 MB in total. The weights are 1 file totalling 46.9 MB in tflite.

Weights1 file · 46.9 MB
Configuration1 file · 47.0 KB
Documentation1 file · 8.9 KB
Other1 file · 292.4 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
plantnet.tfliteWeights46.9 MB 6f59f046c6a8
plantnet300K_species_id_2_name.jsonConfiguration47.0 KB —
README.mdDocumentation8.9 KB —
hero.pngOther292.4 KB ce53fbdc49f1
.gitattributesRepository1.6 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
46.9 MB
Download from LiteRT Community (FKA TFLite)

Released by LiteRT Community (FKA TFLite) through its official repository on Hugging Face. Read the license.

Built From

  • Derived from cpoisson/plantnet300k-resnet18
  • Quantized from cpoisson/plantnet300k-resnet18

Memory Requirements

PrecisionWeights in memory
As published46.9 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About PlantNet-300K-ResNet18-LiteRT

Can I use PlantNet-300K-ResNet18-LiteRT commercially?

Yes. PlantNet-300K-ResNet18-LiteRT is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Image classification

swinv2-tiny-patch4-window16-256

Microsoft

Swin Transformer v2 model pre-trained on ImageNet-1k at resolution 256x256. It was introduced in the paper Swin Transformer V2: Scaling Up Capacity and Resolution by Liu et al. and first released in this repository. Disclaimer: The team releasing Swin Transformer v2 did not write a model card for this model so this model card has been written by the Hugging Face team. The Swin Transformer is a type of Vision Transformer. It builds hierarchical feature maps by merging image patches (shown in gray) in deeper layers and has linear computation complexity to input image size due to computation of self-attention only within each local window (shown in red). It can thus serve as a general-purpose…

Open weights apache-2.0 transformers

Model · Image classification

AI-image-detector

Matthew Maybe

NOTE: Unless you are trying to detect imagery generated using older models such as VQGAN+CLIP, please use the updated version of this detector instead. This model is a proof-of-concept demonstration of using a ViT model to predict whether an artistic image was generated using AI. It was created in October 2022, and as such, the training data did not include any samples generated by Midjourney 5, SDXL, or DALLE-3. It still may be able to correctly identify samples from these more recent models due to being trained on outputs of their predecessors. Furthermore the intended scope of this tool is artistic images; that is to say, it is not a deepfake photo detector, and general computer imagery…

Open weights cc-by-4.0 transformers

Model · Image classification

traffic-sign-adverse-weather

Yy

Official model checkpoints for the solution in the Traffic Sign Recognition under Adverse Weather Competition. See classes.txt for the 25 traffic sign classes. For inference scripts, training code, and in-depth engineering retrospective, visit the GitHub Repository.

Open weights mit timm

Model · Image classification

tinyvit-5m-int8-imagenet

Core Epoch

TinyViT-5M (timm/tinyvit5m224.distin22kftin1k, Apache-2.0) quantized to INT8 with Kenosis — 128-image calibration, no retraining. 80.53% top-1 from a 9.2 MB single file, on ONNX Runtime or OpenVINO, CPU or GPU, no accelerator required. ImageNet-1K validation, 49,872 images (disjoint from the 128 calibration images). Measured on a CPU with AVX-VNNI; on CPUs without VNNI this model's INT8 top-1 sits ~0.9 below FP32 rather than 0.34. Input 1x3x224x224, RGB, /255, ImageNet mean/std. Output logits [1,1000], sorted-synset order. runclassify.py / evalimagenet.py reproduce the demo and table. tinyvit5m224int8kenosis.onnx (9,228,567 B) — SHA-256…

Open weights apache-2.0 onnx

Model · Image classification

mmfm-breast-imaging-checkpoints

NFadlallah

ResNet-18 binary (benign vs. malignant) classification checkpoints, trained per-dataset on eight public breast-imaging sources spanning ultrasound, Full write-up, methodology, and comparison to each source paper's own These are single-modality baselines, not the 3-branch fusion model. Each checkpoint is models.SingleBackboneClassifier (one ResNet-18 backbone, ImageNet-pretrained, first conv adapted for non-RGB inputs where applicable) — see models/backbone.py / training/train.py in the repo for the loading code. For the 5-fold datasets, this is one fold's checkpoint, not an ensemble or the averaged model — reported accuracy is the 5-fold mean from the full report for context, not this…

Open weights cc-by-4.0