cpoisson/plantnet300k-resnet18

Model

PlantNet-300K — ResNet18 (45 MB)

1

6 commits

1 linked in READMEs

updated Jun 2, 2026

See the code

README

PlantNet-300K — ResNet18 (45 MB)

Fine-tuned ResNet18 for plant species identification across 1,081 species.

This model serves as the reference / upper-bound in an experiment on small, locally-deployable plant classifiers. It is compared against a much lighter MobileNetV3-Small (10 MB) to assess the accuracy cost of radical size reduction.

👉 Live demo: cpoisson/plantnet300k
👉 Lightweight model (MobileNetV3-Small, 10 MB): cpoisson/plantnet300k-mobilenetv3-small


Model Details

AttributeValue
ArchitectureResNet18
Pretrained backboneImageNet1K_V1 (torchvision)
Parameters~11.7M
Model file size~45 MB
Classes1,081 plant species
Input size224 × 224 RGB
NormalizationImageNet — mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]

Dataset: Pl@ntNet-300K

AttributeValue
SourceZenodo — DOI:10.5281/zenodo.5645731
PaperNeurIPS 2021 Datasets & Benchmarks
Total images306,146
Species1,081
Train243,916 images
Val31,118 images
Test31,112 images
ChallengeLong-tailed: 80% of species account for only 11% of images

Garcin et al., "Pl@ntNet-300K: a plant image dataset with high label ambiguity and a long-tailed distribution", NeurIPS 2021.


Training

Training script: train.py (included in this repo).

HyperparameterValue
FrameworkPyTorch 2.7.0 + CUDA 12.6
OptimizerAdam
Learning rate1e-3 (constant, no scheduler)
Epochs60
Batch size64
Train augmentationResize(256) → RandomResizedCrop(224) → RandomHorizontalFlip → ColorJitter(0.2, 0.2, 0.2)
Val/Test transformResize(256) → CenterCrop(224)
LossCrossEntropyLoss
Data workers8

Hardware

ComponentSpec
GPUNVIDIA GeForce RTX 3070 — 8 GB VRAM
CPUIntel Core i7-8086K @ 4.00 GHz — 12 threads
RAM32 GB
OSUbuntu Linux

Results — Test Set (31,112 images)

MetricScore
Top-1 Accuracy75.82%
Top-5 Accuracy93.98%

Model Comparison

ModelParamsSizeTop-1Top-5Edge-deployable
MobileNetV3-Small3.9M10 MB73.89%91.86%✅
ResNet18 (this)11.7M45 MB75.82%93.98%⚠️

ResNet18 gains +1.93 pp top-1 at 4.5× the size. Whether that trade-off is worth it depends heavily on the deployment target.


How to Replicate

1. Download the dataset

wget https://zenodo.org/records/5645731/files/plantnet_300K_images.tar.gz
tar -xzf plantnet_300K_images.tar.gz

2. Train

# Edit DATA_DIR and set model = models.resnet18(...) in train.py
python train.py

3. Load & infer

import torch
from torchvision import models, transforms
from huggingface_hub import hf_hub_download
from PIL import Image

model = models.resnet18(weights=None, num_classes=1081)
path = hf_hub_download("cpoisson/plantnet300k-resnet18", "plantnet_resnet18.pth")
model.load_state_dict(torch.load(path, map_location="cpu", weights_only=True))
model.eval()

transform = transforms.Compose([
    transforms.Resize(256),
    transforms.CenterCrop(224),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
])

img = Image.open("your_plant.jpg").convert("RGB")
with torch.no_grad():
    logits = model(transform(img).unsqueeze(0))
    probs  = torch.softmax(logits, dim=1)[0]
    top5   = probs.topk(5)

Citation

@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},
}
image-classification
onnx
plant-identification
pytorch
resnet

cpoisson/plantnet300k-resnet18

Model

PlantNet-300K — ResNet18 (45 MB)

1

6 commits

1 linked in READMEs

updated Jun 2, 2026

See the code

README

PlantNet-300K — ResNet18 (45 MB)

Fine-tuned ResNet18 for plant species identification across 1,081 species.

This model serves as the reference / upper-bound in an experiment on small, locally-deployable plant classifiers. It is compared against a much lighter MobileNetV3-Small (10 MB) to assess the accuracy cost of radical size reduction.

👉 Live demo: cpoisson/plantnet300k
👉 Lightweight model (MobileNetV3-Small, 10 MB): cpoisson/plantnet300k-mobilenetv3-small


Model Details

AttributeValue
ArchitectureResNet18
Pretrained backboneImageNet1K_V1 (torchvision)
Parameters~11.7M
Model file size~45 MB
Classes1,081 plant species
Input size224 × 224 RGB
NormalizationImageNet — mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]

Dataset: Pl@ntNet-300K

AttributeValue
SourceZenodo — DOI:10.5281/zenodo.5645731
PaperNeurIPS 2021 Datasets & Benchmarks
Total images306,146
Species1,081
Train243,916 images
Val31,118 images
Test31,112 images
ChallengeLong-tailed: 80% of species account for only 11% of images

Garcin et al., "Pl@ntNet-300K: a plant image dataset with high label ambiguity and a long-tailed distribution", NeurIPS 2021.


Training

Training script: train.py (included in this repo).

HyperparameterValue
FrameworkPyTorch 2.7.0 + CUDA 12.6
OptimizerAdam
Learning rate1e-3 (constant, no scheduler)
Epochs60
Batch size64
Train augmentationResize(256) → RandomResizedCrop(224) → RandomHorizontalFlip → ColorJitter(0.2, 0.2, 0.2)
Val/Test transformResize(256) → CenterCrop(224)
LossCrossEntropyLoss
Data workers8

Hardware

ComponentSpec
GPUNVIDIA GeForce RTX 3070 — 8 GB VRAM
CPUIntel Core i7-8086K @ 4.00 GHz — 12 threads
RAM32 GB
OSUbuntu Linux

Results — Test Set (31,112 images)

MetricScore
Top-1 Accuracy75.82%
Top-5 Accuracy93.98%

Model Comparison

ModelParamsSizeTop-1Top-5Edge-deployable
MobileNetV3-Small3.9M10 MB73.89%91.86%✅
ResNet18 (this)11.7M45 MB75.82%93.98%⚠️

ResNet18 gains +1.93 pp top-1 at 4.5× the size. Whether that trade-off is worth it depends heavily on the deployment target.


How to Replicate

1. Download the dataset

wget https://zenodo.org/records/5645731/files/plantnet_300K_images.tar.gz
tar -xzf plantnet_300K_images.tar.gz

2. Train

# Edit DATA_DIR and set model = models.resnet18(...) in train.py
python train.py

3. Load & infer

import torch
from torchvision import models, transforms
from huggingface_hub import hf_hub_download
from PIL import Image

model = models.resnet18(weights=None, num_classes=1081)
path = hf_hub_download("cpoisson/plantnet300k-resnet18", "plantnet_resnet18.pth")
model.load_state_dict(torch.load(path, map_location="cpu", weights_only=True))
model.eval()

transform = transforms.Compose([
    transforms.Resize(256),
    transforms.CenterCrop(224),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
])

img = Image.open("your_plant.jpg").convert("RGB")
with torch.no_grad():
    logits = model(transform(img).unsqueeze(0))
    probs  = torch.softmax(logits, dim=1)[0]
    top5   = probs.topk(5)

Citation

@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},
}
image-classification
onnx
plant-identification
pytorch
resnet