Bean Leaf Disease Classifier

Model klasifikasi penyakit daun kacang (bean) menggunakan transfer learning dari ResNet18 (backbone dibekukan, hanya fc layer terakhir yang dilatih).

  • Dataset: beans
  • Kelas: ['angular_leaf_spot', 'bean_rust', 'healthy']
  • Akurasi test set: 0.8125

Cara memuat model

import torch
import torch.nn as nn
from torchvision.models import resnet18
from huggingface_hub import hf_hub_download

model_path = hf_hub_download(repo_id="abdillah-me/bean-leaf-disease-classifier", filename="bean_classifier_resnet18.pth")
checkpoint = torch.load(model_path, map_location="cpu", weights_only=False)

model = resnet18(weights=None)
model.fc = nn.Linear(model.fc.in_features, len(checkpoint["class_names"]))
model.load_state_dict(checkpoint["model_state_dict"])
model.eval()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support