File size: 2,150 Bytes
e734256 9068a65 e734256 9068a65 f43cb71 e734256 0ba273b e734256 0ba273b f4d3e30 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
---
tags:
- image-classification
- climate
- biology
base_model: microsoft/resnet-50
widget:
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
example_title: Tiger
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
example_title: Teapot
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
example_title: Palace
license: apache-2.0
metrics:
- accuracy
- bertscore
pipeline_tag: image-classification
library_name: transformers
---
# Model Trained Using AutoTrain
- Problem type: Image Classification
<!-- ## Validation Metrics
loss: 0.5462027192115784
f1_macro: 0.38996247906197656
f1_micro: 0.737093690248566
f1_weighted: 0.6627689294144399
precision_macro: 0.3467645553924699
precision_micro: 0.737093690248566
precision_weighted: 0.6320379754980795
recall_macro: 0.49719101123595505
recall_micro: 0.737093690248566
recall_weighted: 0.737093690248566
accuracy: 0.737093690248566 -->
# 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:
```python
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]) |