Downloads · 30 days
16
10% of all-time downloads
gaglileoo/vit-mushroom-classifier
vit-mushroom-classifier is a image classification model from gaglileoo. Use it when you need a label for an image. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned google/vit-base-patch16-224 image classifier for 16 mushroom species.
Downloads · 30 days
16
10% of all-time downloads
All-time downloads
166
Public
Parameters
85.8M
3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.4 GB · 75%
From the Hugging Face model README
Fine-tuned google/vit-base-patch16-224 image classifier for 16 mushroom species.
This model was trained for an educational mushroom image classification project. It predicts the most likely species among the 16 trained classes and can be used for candidate ranking, demos, and model comparison. It is not suitable for real-world foraging, edibility, or toxicity decisions.
google/vit-base-patch16-224ViTForImageClassification224 x 224models/vit_mushroom_classifier4.57.6Amanita_muscaria
Amanita_phalloides
Armillaria_mellea
Cerioporus_squamosus
Chlorophyllum_brunneum
Clitocybe_nuda
Coprinellus_micaceus
Coprinus_comatus
Flammulina_velutipes
Gliophorus_psittacinus
Hygrophoropsis_aurantiaca
Hypholoma_lateritium
Stereum_hirsutum
Suillus_luteus
Tricholomopsis_rutilans
Tylopilus_felleus
The image dataset combines a Kaggle mushroom image dataset with additional GBIF image records for the selected species.
Final image scope:
The original ImageNet classifier head was replaced with a new 16-class head. Training used two phases:
Main configuration:
3e-42e-50.010.85-1.00.1Validation improved during fine-tuning:
| Fine-tune epoch | Validation loss | Accuracy | Macro F1 | Top-3 accuracy |
|---|---|---|---|---|
| 1 | 0.3553 | 0.8994 | 0.8986 | 0.9762 |
| 2 | 0.2701 | 0.9196 | 0.9195 | 0.9804 |
| 3 | 0.2437 | 0.9250 | 0.9251 | 0.9833 |
| 4 | 0.2325 | 0.9304 | 0.9303 | 0.9845 |
Final test set results:
| Metric | Score |
|---|---|
| Accuracy | 0.9161 |
| Balanced accuracy | 0.9161 |
| Macro F1 | 0.9162 |
| Top-3 accuracy | 0.9780 |
Bootstrap 95% confidence intervals:
| Metric | Mean | 95% CI |
|---|---|---|
| Accuracy | 0.9165 | 0.9036-0.9286 |
| Macro F1 | 0.9162 | 0.9035-0.9282 |
| Top-3 accuracy | 0.9780 | 0.9714-0.9845 |
Lowest per-class F1 scores:
| Class | Precision | Recall | F1 |
|---|---|---|---|
| Flammulina_velutipes | 0.8302 | 0.8381 | 0.8341 |
| Armillaria_mellea | 0.8762 | 0.8762 | 0.8762 |
| Suillus_luteus | 0.9020 | 0.8762 | 0.8889 |
| Gliophorus_psittacinus | 0.8649 | 0.9143 | 0.8889 |
| Hygrophoropsis_aurantiaca | 0.8727 | 0.9143 | 0.8930 |
Common confusion patterns included:
Suillus_luteus predicted as Tylopilus_felleusCoprinus_comatus predicted as Chlorophyllum_brunneumFlammulina_velutipes, Gliophorus_psittacinus, and Hygrophoropsis_aurantiacaSuitable uses:
Unsuitable uses:
The final ViT model achieved strong and stable test performance: about 91.6% macro F1 and 97.8% top-3 accuracy on a balanced 16-class test set. The result is promising for educational candidate prediction, but a deduplicated re-split and re-evaluation would be recommended before treating the score as final.