A Vision Transformer that sorts plant photographs by the kind of subject they show: a plant in the field, a hand or person in frame, a microscope or macro view, or something manmade. It is google/vit-base-patch16-224-in21k fine-tuned on blambert/ne_plant_classes.
It was built to do cheaply what a vision language model did for that dataset: separate usable field photos from the rest before assembling a plant dataset such as blambert/ne_plant_photos. It does not identify species.
| label | meaning |
|---|---|
| nature | a plant in the field |
| human | a hand or person in frame |
| magnified | a microscope or macro view |
| manmade | rulers, tags, labs, fences, herbarium sheets |
The source dataset has a fifth label, other, with only 26 examples; it was
dropped before training, so the model never predicts it.
from transformers import pipeline
classify = pipeline("image-classification", model="blambert/ne_plant_classes_vit")
classify("photo.jpg")
151,919 photographs from the iNaturalist open data archive inside a New England bounding box (latitude 41 to 48, longitude -74 to -67), split by label:
| label | count | share |
|---|---|---|
| nature | 114,192 | 75.2% |
| human | 33,702 | 22.2% |
| manmade | 2,310 | 1.5% |
| magnified | 1,715 | 1.1% |
The labels are the output of Qwen/Qwen3.5-9B, not human annotation, and have not been checked against a hand-labelled sample. The model learns to agree with Qwen, mistakes included.
nature, which alone scores 75%.Training code is train_classifier.py in
plant-pics.
Scores on the 30,384-photo test split. The best checkpoint came from epoch 3 (step 4,278 of 14,250), with a validation macro F1 of 0.887.
| metric | score |
|---|---|
| accuracy | 0.984 |
| macro F1 | 0.902 |
| macro precision | 0.913 |
| macro recall | 0.891 |
| loss | 0.081 |
Per label:
| label | precision | recall | F1 | support |
|---|---|---|---|---|
| nature | 0.990 | 0.991 | 0.990 | 22,839 |
| human | 0.982 | 0.985 | 0.984 | 6,740 |
| manmade | 0.744 | 0.686 | 0.714 | 462 |
| magnified | 0.936 | 0.901 | 0.918 | 343 |
Confusion matrix, with true labels as rows and predictions as columns:
| true \ predicted | nature | human | manmade | magnified |
|---|---|---|---|---|
| nature | 22,629 | 103 | 87 | 20 |
| human | 78 | 6,642 | 20 | 0 |
| manmade | 129 | 15 | 317 | 1 |
| magnified | 30 | 2 | 2 | 309 |
Most errors involve nature. Over a quarter of manmade photos (129 of 462)
are predicted as nature, and nature photos account for 87 of the 109 false
manmade predictions.
The scores above measure agreement with Qwen's labels, and those labels are
themselves often wrong. Reviewing 160 of the 487 test disagreements suggested
that in about two thirds of them the model was right and the label was wrong -
fingers plainly holding a plant labelled nature, a ruler in frame labelled
nature, a plain field photo labelled human. So:
manmade F1 of 0.714 is the least trustworthy number here. 31% of
manmade-labelled test photos are disputed, and the label itself is fuzzy:
a plant in a sidewalk crack is sometimes manmade and sometimes nature.This is still good enough for some purposes. For coarse filtering - keeping
field photographs and dropping shots of hands, rulers and microscope views -
it agrees with the labeller on 98% of photos and is often right where it
disagrees. It is not good enough when a specific label, especially manmade,
has to be correct on a given photo.
manmade and magnified have under 2,500 examples each. manmade is by
far the weakest class (F1 0.714), and roughly 3 in 10 manmade photos slip
through as nature.The weights are released under Apache 2.0, matching the base model. The training photographs keep their iNaturalist licenses - mostly CC-BY-NC, with CC-BY, CC0, CC-BY-NC-SA and CC-BY-SA making up the rest - and are not redistributed here.