Views
No views yet
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 2.7649 | 0.992 | 62 | 2.5733 | 0.831 |
| 1.888 | 2.0 | 125 | 1.7770 | 0.883 |
| 1.6461 | 2.976 | 186 | 1.6262 | 0.896 |
1from datasets import load_dataset
2from transformers import pipeline
3from PIL import Image
4import requests
5from io import BytesIO
6
7# Load a sample image from the internet
8image_url = "https://example.com/path-to-your-image.jpg" # Replace with your image URL
9response = requests.get(image_url)
10image = Image.open(BytesIO(response.content))
11
12# Load the fine-tuned model for image classification
13classifier = pipeline(
14 "image-classification",
15 model="ashaduzzaman/vit-finetuned-food101"
16)
17
18# Run inference
19result = classifier(image)
20print(result)
21@misc{vit_finetuned_food101,
author = {Ashaduzzaman},
title = {ViT Fine-tuned on Food-101},
year = {2024},
url = {https://huggingface.co/ashaduzzaman/vit-finetuned-food101},
}