Views
No views yet
# Food Detection Model
## Model Özeti
Bu model, gıda ve gıda dışı nesneleri sınıflandırmak için eğitilmiştir. Model, **270 farklı yemek kategorisini** algılayabilir.
## Kullanım
Bu modeli kullanmak için aşağıdaki kodu çalıştırabilirsiniz:
```python
from transformers import CLIPModel, CLIPProcessor
model = CLIPModel.from_pretrained("mertcan81/food-detection-model")
processor = CLIPProcessor.from_pretrained("mertcan81/food-detection-model")
# Görsel üzerinde tahmin
from PIL import Image
image = Image.open("example.jpg")
inputs = processor(images=image, text=["food", "non-food"], return_tensors="pt")
outputs = model(**inputs)
logits_per_image = outputs.logits_per_image
probs = logits_per_image.softmax(dim=1)
print("Tahmin:", probs)
```
## Veri Kümesi
Model, [Food-101](https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101/) veri seti ile eğitilmiştir.
## Lisans
MIT Lisansı altında sunulmuştur.