Downloads · 30 days
0
14maddy/plant_disease-mobilenetv2
plant_disease-mobilenetv2 is a image classification model from 14maddy. Use it when you need a label for an image. The card lists the license as apache-2.0.
Downloads · 30 days
0
Access
Public
Updated Mar 8, 2026
Repo size
9.3 MB
Likes
0
Public
Click a slice to open those files.
.pth9.3 MB · 100%
From the Hugging Face model README
Author: Daksh Goyal
This repository provides a lightweight, production-ready MobileNetV2 model trained on the PlantVillage augmented dataset for multi-class plant disease classification (38 classes).
The model is optimized for:
✔ Real-time inference ✔ Low-compute environments (mobile/edge devices) ✔ Web apps (Streamlit) ✔ Integration with farm-tech solutions
.pthTry the fully deployed, interactive plant-disease detection app:
👉 Streamlit App: https://agriguard271005.streamlit.app/
Upload a leaf image → get: ✔ Disease name ✔ Confidence score ✔ Health status ✔ Severity level ✔ Recommended action
The pretrained .pth model and configuration files are hosted here:
👉 HuggingFace Model Repo: https://huggingface.co/Daksh159/plant-disease-mobilenetv2
Available assets:
mobilenetv2_plant.pthclass_names.jsonREADME.md (this file)model = models.mobilenet_v2(pretrained=True)
for p in model.features.parameters():
p.requires_grad = False # freeze feature extractor
model.classifier[1] = nn.Sequential(
nn.Dropout(0.2),
nn.Linear(model.classifier[1].in_features, 38)
)
Includes diseases & healthy leaves of:
(Full list of 38 classes included in class_names.json)
import torch
from torchvision import models, transforms
from PIL import Image
model = ... # load your mobilenetv2_plant.pth
model.eval()
tf = transforms.Compose([
transforms.Resize((224,224)),
transforms.ToTensor(),
transforms.Normalize([0.485,0.456,0.406],
[0.229,0.224,0.225])
])
img = Image.open("leaf.jpg").convert("RGB")
x = tf(img).unsqueeze(0)
with torch.no_grad():
preds = model(x)
probs = torch.softmax(preds, dim=1)[0]
index = probs.argmax().item()
print("Predicted Class:", CLASS_NAMES[index])
print("Confidence:", float(probs[index]))
This model can be integrated into:
🌱 Farming mobile apps 🌾 Agri-tech dashboards 💡 Real-time disease monitoring systems 📸 Drone-based crop scanning pipelines 🌍 IoT/edge deployment for field devices
| Platform | Status | Link |
|---|---|---|
| HuggingFace | ✔ Model Hosted | https://huggingface.co/Daksh159/plant-disease-mobilenetv2 |
| Streamlit Cloud | ✔ Web App Live | https://agriguard271005.streamlit.app/ |
Planned enhancements: