finetuned from https://huggingface.co./google/vit-base-patch16-224-in21k
dataset:26k images (train:21k valid:5k)
accuracy of validation dataset is 95%
from transformers import ViTFeatureExtractor, ViTForImageClassification
from PIL import Image
path = 'image_path'
image = Image.open(path)
feature_extractor = ViTFeatureExtractor.from_pretrained('furusu/umamusume-classifier')
model = ViTForImageClassification.from_pretrained('furusu/umamusume-classifier')
inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)
predicted_class_idx = outputs.logits.argmax(-1).item()
print("Predicted class:", model.config.id2label[predicted_class_idx])
- Downloads last month
- 19
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.