Downloads · 30 days
4
8% of all-time downloads
jnmrr/ds3-img-classification
ds3-img-classification is a image classification model from jnmrr. Use it when you need a label for an image. It is set up for transformers. The card lists the license as mit.
This model is trained for document classification using vision transformers (DiT).
Downloads · 30 days
4
8% of all-time downloads
All-time downloads
49
Public
Parameters
303M
13.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors7.3 GB · 100%
From the Hugging Face model README
This model is trained for document classification using vision transformers (DiT).
from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
# Load model and processor
processor = AutoImageProcessor.from_pretrained("jnmrr/ds3-img-classification")
model = AutoModelForImageClassification.from_pretrained("jnmrr/ds3-img-classification")
# Process an image
image = Image.open("document.png")
inputs = processor(image, return_tensors="pt")
# Make prediction
outputs = model(**inputs)
predicted_label = outputs.logits.argmax(-1).item()