Image Classification
Transformers
TensorBoard
Safetensors
vit
Generated from Trainer
Eval Results (legacy)
Run this model with HF Jobs
Run nashirab/vit-base-beans on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/nashirab/vit-base-beans. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/nashirab/vit-base-beans on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use nashirab/vit-base-beans with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nashirab/vit-base-beans with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nashirab/vit-base-beans") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("nashirab/vit-base-beans") model = AutoModelForImageClassification.from_pretrained("nashirab/vit-base-beans", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from nashirab/vit-base-beans: direct link, hf CLI and curl.
- Browser
- Download file 2.61 kB
-
https://huggingface.co/nashirab/vit-base-beans/resolve/main/README.md
- Command line
-
hf download hf://nashirab/vit-base-beans/README.md
-
curl -L -o README.md https://huggingface.co/nashirab/vit-base-beans/resolve/main/README.md
2.61 kB
metadata
license: apache-2.0
base_model: google/vit-base-patch16-224
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: vit-base-beans
results:
- task:
name: Image Classification
type: image-classification
dataset:
name: imagefolder
type: imagefolder
config: default
split: train
args: default
metrics:
- name: Accuracy
type: accuracy
value: 0.49375
vit-base-beans
This model is a fine-tuned version of google/vit-base-patch16-224 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 1.2658
- Accuracy: 0.4938
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: 0.0002
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 4
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 4.7295 | 0.25 | 10 | 2.7467 | 0.1875 |
| 2.3133 | 0.5 | 20 | 2.1258 | 0.2437 |
| 2.031 | 0.75 | 30 | 1.9442 | 0.3187 |
| 1.8773 | 1.0 | 40 | 1.6159 | 0.375 |
| 1.4132 | 1.25 | 50 | 1.5585 | 0.4188 |
| 1.4581 | 1.5 | 60 | 1.5269 | 0.35 |
| 1.4697 | 1.75 | 70 | 1.5535 | 0.3625 |
| 1.3575 | 2.0 | 80 | 1.3056 | 0.4375 |
| 1.0615 | 2.25 | 90 | 1.4774 | 0.4 |
| 1.1895 | 2.5 | 100 | 1.2384 | 0.45 |
| 1.0659 | 2.75 | 110 | 1.3315 | 0.4938 |
| 1.1517 | 3.0 | 120 | 1.1040 | 0.575 |
| 0.7957 | 3.25 | 130 | 1.3480 | 0.4375 |
| 0.8037 | 3.5 | 140 | 1.2879 | 0.525 |
| 1.0157 | 3.75 | 150 | 1.1900 | 0.5 |
| 0.7665 | 4.0 | 160 | 1.2039 | 0.4938 |
Framework versions
- Transformers 4.35.2
- Pytorch 2.1.0+cu121
- Datasets 2.17.0
- Tokenizers 0.15.1