CoolFace
Modelpublic

santi9462/durian-ripeness-vit

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes4downloads
Model Card

Durian Ripeness Classifier 🥭

This model is a MobileNetV2 fine-tuned to classify durian ripeness into 4 levels.

  • —0 → สุกงอม
  • —1 → อ่อน
  • —2 → แก่พร้อมรับประทาน
  • —3 → แก่รอสักระยะ

Usage Example

from transformers import AutoImageProcessor, MobileNetV2ForImageClassification from PIL import Image import torch

repo = "santi9462/durian-ripeness-vit" processor = AutoImageProcessor.frompretrained(repo) model = MobileNetV2ForImageClassification.frompretrained(repo).eval()

img = Image.open("durian.jpg").convert("RGB") inputs = processor(images=img, return_tensors="pt")

with torch.no_grad(): probs = model(**inputs).logits.softmax(-1)[0]

pred = int(probs.argmax()) print("Predicted:", model.config.id2label[str(pred)])