Model Trained Using AutoTrain
- Problem type: Image Classification
Image Classification Model Results (AutoTrain)
Validation Metrics
Metric |
Value |
Loss |
0.5462 |
Accuracy |
0.7371 |
F1 Scores
Type |
Value |
Macro |
0.3900 |
Micro |
0.7371 |
Weighted |
0.6628 |
Precision
Type |
Value |
Macro |
0.3468 |
Micro |
0.7371 |
Weighted |
0.6320 |
Recall
Type |
Value |
Macro |
0.4972 |
Micro |
0.7371 |
Weighted |
0.7371 |
How to use
This model is designed for image classification. Here's how you can use it:
from transformers import AutoImageProcessor, AutoModelForImageClassification
import torch
from PIL import Image
model_name = "eligapris/v-mdd-2000"
processor = AutoImageProcessor.from_pretrained(model_name)
model = AutoModelForImageClassification.from_pretrained(model_name)
image = Image.open("path_to_your_image.jpg")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_class_idx = logits.argmax(-1).item()
print("Predicted class:", model.config.id2label[predicted_class_idx])