AI-Lab-Makerere/beans
Viewer • Updated • 1.3k • 7.79k • 46
This model was trained in Google Colab using a T4 GPU and tracked with MLflow.
Dataset: Beans
Classes:
Validation Accuracy: 0.9398
Overfitting Prevention Techniques:
Hyperparameters:
resnet18_beans.pth - PyTorch model weightsper_class_metrics.csv - Detailed per-class metricsconfusion_matrix.png - Confusion matrix visualizationDownload and load the model:
from huggingface_hub import hf_hub_download
import torch
from torchvision import models
from torch import nn
model_path = hf_hub_download(
repo_id="vGiacomov/image-classifier-beans",
filename="resnet18_beans.pth"
)
model = models.resnet18()
model.fc = nn.Sequential(
nn.Dropout(0.3),
nn.Linear(model.fc.in_features, 3)
)
model.load_state_dict(torch.load(model_path, map_location="cpu"))
model.eval()
Apache 2.0