Downloads · 30 days
0
abdillah-me/bean-leaf-disease-classifier
bean-leaf-disease-classifier is a image classification model from abdillah-me. Use it when you need a label for an image. The card lists the license as mit.
Model klasifikasi penyakit daun kacang (bean) menggunakan transfer learning dari ResNet18 (backbone dibekukan, hanya fc layer terakhir yang dilatih).
Downloads · 30 days
0
Access
Public
Updated Aug 8, 2026
Repo size
44.8 MB
Likes
1
Public
Click a slice to open those files.
.pth44.8 MB · 100%
From the Hugging Face model README
Model klasifikasi penyakit daun kacang (bean) menggunakan transfer learning dari ResNet18 (backbone dibekukan, hanya fc layer terakhir yang dilatih).
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()