Downloads · 30 days
7
39% of all-time downloads
jancarloonce/gecko-classifier-model
gecko-classifier-model is a machine learning model from jancarloonce. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a fine-tuned Vision Transformer (ViT) model that classifies geckos into:
Downloads · 30 days
7
39% of all-time downloads
All-time downloads
18
Public
Parameters
85.8M
4.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt2.1 GB · 55%
From the Hugging Face model README
This is a fine-tuned Vision Transformer (ViT) model that classifies geckos into:
google/vit-base-patch16-224transformers and datasets on a custom dataset hosted herefrom transformers import AutoImageProcessor, ViTForImageClassification
from PIL import Image
import torch
model = ViTForImageClassification.from_pretrained("jancarloonce/gecko-classifier-model")
processor = AutoImageProcessor.from_pretrained("jancarloonce/gecko-classifier-model")
image = Image.open("your_image.jpg")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
pred = outputs.logits.argmax(-1).item()
label = model.config.id2label[pred]
print(f"Predicted: {label}")