metadata
library_name: transformers
tags:
- vit
- cifar10
- image classification
license: apache-2.0
datasets:
- uoft-cs/cifar10
language:
- en
metrics:
- accuracy
- perplexity
pipeline_tag: image-classification
widget:
- src: ./deer_224x224.png
example_title: deer 224x224 image example
Model Details
Model Description
An adapter for the google/vit-base-patch16-224 ViT trained on CIFAR10 classification task
Loading guide
from transformers import AutoModelForImageClassification
labels2title = ['plane', 'car', 'bird', 'cat',
'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
model = AutoModelForImageClassification.from_pretrained(
'google/vit-base-patch16-224-in21k',
num_labels=len(labels2title),
id2label={i: c for i, c in enumerate(labels2title)},
label2id={c: i for i, c in enumerate(labels2title)}
)
model.load_adapter("yturkunov/cifar10_vit16_lora")
Learning curves
Recommendations to input
The model expects an image that has went through the following preprocessing stages:
- Scaling range:
- Normalization parameters:
- Dimensions: 224x224
- Number of channels: 3