meganariley's picture
meganariley HF Staff
Upload README.md
1301f26 verified
|
Raw History Blame Contribute Delete
3.23 kB
metadata
license: apache-2.0
base_model: google/vit-base-patch16-224
datasets:
  - meganariley/inat-wildflowers-25
tags:
  - image-classification
  - wildflowers
  - plants
  - inaturalist
  - vit
  - vision
metrics:
  - accuracy
pipeline_tag: image-classification
model-index:
  - name: wildflower-classifier-vit
    results:
      - task:
          type: image-classification
          name: Image Classification
        dataset:
          name: inat-wildflowers-25
          type: meganariley/inat-wildflowers-25
          split: test
        metrics:
          - name: Accuracy
            type: accuracy
            value: 0.979

🌸 Wildflower Classifier — ViT Base

A Vision Transformer (ViT) fine-tuned to identify 25 North American wildflower species from photographs, achieving 97.9% test accuracy.

Model Details

Performance

Split Accuracy Loss
Validation 97.1% 0.098
Test 97.9% 0.082

Per-Class Test Accuracy

Species Accuracy Species Accuracy
Blazing Star 95.0% Marsh Marigold 97.5%
Blue Flag Iris 100.0% Ox-eye Daisy 95.0%
California Poppy 97.5% Queen Anne's Lace 95.0%
Canada Goldenrod 100.0% Spring Beauty 100.0%
Cardinal Flower 100.0% Trout Lily 100.0%
Colorado Columbine 97.5% Virginia Bluebells 97.5%
Common Milkweed 97.5% White Trillium 97.5%
Common Yarrow 100.0% Wild Bergamot 97.5%
Dutchman's Breeches 100.0% Wild Columbine 100.0%
Fireweed 95.0% Wild Lupine 100.0%
Indian Blanket 97.5% Wild Rose 100.0%
Indian Paintbrush 95.0% Joe-Pye Weed 95.0%
Jack-in-the-Pulpit 97.5%

10 species at 100% accuracy · All species ≥ 95%

Training

  • Epochs: 5
  • Optimizer: AdamW (lr=5e-5, weight_decay=0.01)
  • Batch size: 16 × 4 gradient accumulation = effective 64
  • Warmup: 10% linear
  • Augmentation: RandomResizedCrop, HorizontalFlip, ColorJitter
  • Hardware: CPU (8 vCPU / 32GB RAM)
  • Training time: ~2 hours

Training Curve

Epoch Val Accuracy Val Loss
1 93.5% 0.255
2 95.2% 0.146
3 96.3% 0.114
4 97.0% 0.104
5 97.1% 0.098

Usage

from transformers import pipeline

classifier = pipeline("image-classification", model="meganariley/wildflower-classifier-vit")
results = classifier("path/to/wildflower.jpg", top_k=5)
for r in results:
    print(f"{r['label']}: {r['score']:.3f}")

Demo

Try it live: 🌸 Wildflower Identifier Space

License

Apache 2.0 (base model license). Training data from iNaturalist under CC BY-NC 4.0.