Downloads · 30 days
29
15% of all-time downloads
Ayushnangia/protovit-deit_small_patch16_224-cub
protovit-deit_small_patch16_224-cub is a image classification model from Ayushnangia. Use it when you need a label for an image. The card lists the license as mit.
This is a fine-tuned deitsmallpatch16224 model trained on CUB-200-2011 from the paper "Interpretable Image Classification with Adaptive Prototype-based Vision Transformers".
Downloads · 30 days
29
15% of all-time downloads
All-time downloads
193
Public
Repo size
115 MB
Likes
1
Public
Click a slice to open those files.
.bin115 MB · 100%
From the Hugging Face model README
This is a fine-tuned deit_small_patch16_224 model trained on CUB-200-2011 from the paper "Interpretable Image Classification with Adaptive Prototype-based Vision Transformers".
14finetuned0.8576Fine-grained bird species classification dataset with 200 different bird species Dataset link: https://www.vision.caltech.edu/datasets/cub_200_2011/
from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
# Load model and processor
model = AutoModelForImageClassification.from_pretrained("Ayushnangia/protovit-deit_small_patch16_224-cub")
processor = AutoImageProcessor.from_pretrained("Ayushnangia/protovit-deit_small_patch16_224-cub")
# Prepare image
image = Image.open("path_to_your_image.jpg")
inputs = processor(images=image, return_tensors="pt")
# Make prediction
outputs = model(**inputs)
predicted_label = outputs.logits.argmax(-1).item()
Github repo by authors of the paper ![GitHub repository][https://github.com/Henrymachiyu/ProtoViT]
For more details about the implementation and training process, please visit the my fork of ProtoVit ![GitHub repository][https://github.com/ayushnangia/ProtoViT].