How to use from the
Use from the
Transformers library
# Gated model: Login with a HF token with gated access permission
hf auth login
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-classification", model="mostafasmart/vit-base-patch16-224-4class224")
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("mostafasmart/vit-base-patch16-224-4class224")
model = AutoModelForImageClassification.from_pretrained("mostafasmart/vit-base-patch16-224-4class224", device_map="auto")
Quick Links

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

vit-base-patch16-224-4class224

This model is a fine-tuned version of google/vit-base-patch16-224 on an unknown dataset. It achieves the following results on the evaluation set:

  • Train Loss: 0.0136
  • Train Accuracy: 0.9421
  • Train Top-3-accuracy: 0.9958
  • Validation Loss: 0.1390
  • Validation Accuracy: 0.9458
  • Validation Top-3-accuracy: 0.9961
  • Epoch: 6

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:

  • optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 3e-05, 'decay_steps': 455, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}
  • training_precision: float32

Training results

Train Loss Train Accuracy Train Top-3-accuracy Validation Loss Validation Accuracy Validation Top-3-accuracy Epoch
0.7231 0.5836 0.9174 0.3551 0.7352 0.9701 0
0.2208 0.8012 0.9802 0.2265 0.8400 0.9858 1
0.0854 0.8664 0.9886 0.1859 0.8862 0.9907 2
0.0372 0.8996 0.9920 0.1565 0.9111 0.9931 3
0.0212 0.9199 0.9938 0.1411 0.9272 0.9945 4
0.0167 0.9328 0.9950 0.1374 0.9379 0.9954 5
0.0136 0.9421 0.9958 0.1390 0.9458 0.9961 6

Framework versions

  • Transformers 4.41.2
  • TensorFlow 2.15.0
  • Datasets 2.20.0
  • Tokenizers 0.19.1
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mostafasmart/vit-base-patch16-224-4class224

Finetuned
(2067)
this model