Downloads · 30 days
0
yturkunov/cifar10_vit16_lora
cifar10_vit16_lora is a image classification model from yturkunov. 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.
An adapter for the google/vit-base-patch16-224 ViT trained on CIFAR10 classification task
Downloads · 30 days
0
Access
Public
Updated Jun 10, 2024
Repo size
2.4 MB
Likes
0
Public
Click a slice to open those files.
.safetensors2.4 MB · 99%
From the Hugging Face model README
An adapter for the google/vit-base-patch16-224 ViT trained on CIFAR10 classification task
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")

The model expects an image that has went through the following preprocessing stages:
