How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-classification", model="n1hal/swinv2-plantclef")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification

processor = AutoImageProcessor.from_pretrained("n1hal/swinv2-plantclef")
model = AutoModelForImageClassification.from_pretrained("n1hal/swinv2-plantclef")
Quick Links

swinv2-plantclef

This model is a fine-tuned version of microsoft/swinv2-base-patch4-window16-256 on an unknown dataset. It achieves the following results on the evaluation set:

  • Loss: 1.0548
  • Accuracy: 0.8199
  • F1: 0.8190

Model description

More information needed

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-05
  • train_batch_size: 32
  • eval_batch_size: 32
  • seed: 42
  • optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: linear
  • num_epochs: 16
  • mixed_precision_training: Native AMP

Training results

Training Loss Epoch Step Validation Loss Accuracy F1
1.1414 1.0 897 0.9819 0.7171 0.7046
0.654 2.0 1794 0.7608 0.7694 0.7688
0.394 3.0 2691 0.7461 0.7795 0.7767
0.2437 4.0 3588 0.7369 0.7917 0.7908
0.1428 5.0 4485 0.7939 0.7945 0.7929
0.0878 6.0 5382 0.8352 0.7958 0.7950
0.0621 7.0 6279 0.8802 0.7945 0.7928
0.0353 8.0 7176 0.9028 0.8011 0.8005
0.0241 9.0 8073 0.9592 0.8043 0.8045
0.0241 10.0 8970 1.0075 0.8068 0.8047
0.0129 11.0 9867 1.0254 0.8127 0.8120
0.0058 12.0 10764 1.0340 0.8162 0.8151
0.007 13.0 11661 1.0661 0.8165 0.8159
0.0052 14.0 12558 1.0533 0.8168 0.8166
0.0049 15.0 13455 1.0660 0.8174 0.8164
0.015 16.0 14352 1.0548 0.8199 0.8190

Framework versions

  • Transformers 4.46.2
  • Pytorch 2.5.0
  • Datasets 3.1.0
  • Tokenizers 0.20.1
Downloads last month
4
Safetensors
Model size
87M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for n1hal/swinv2-plantclef

Finetuned
(9)
this model