Downloads · 30 days
0
sanvo/vietnamese-vit-classification
vietnamese-vit-classification is a image classification model from sanvo. Use it when you need a label for an image. It is set up for transformers. The card lists the license as mit.
Fine-tuned google/vit-base-patch16-224 (86M parameters) for Vietnamese scene classification.
Downloads · 30 days
0
Access
Public
Updated Feb 23, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.1 KB · 57%
From the Hugging Face model README
Fine-tuned google/vit-base-patch16-224 (86M parameters) for Vietnamese scene classification.
| English | Vietnamese |
|---|---|
| Beach | Bãi biển |
| City | Thành phố |
| Forest | Rừng |
| Mountain | Núi |
| Rice Field | Ruộng lúa |
| Market | Chợ |
| Temple | Chùa |
| River | Sông |
from transformers import ViTForImageClassification, ViTImageProcessor
from PIL import Image
model = ViTForImageClassification.from_pretrained("sanvo/vietnamese-vit-classification")
processor = ViTImageProcessor.from_pretrained("google/vit-base-patch16-224")
image = Image.open("scene.jpg")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
predicted_class = outputs.logits.argmax(-1).item()
print(model.config.id2label[predicted_class])