Downloads · 30 days
0
prathamrajbhar11/ArogyaDrishti-crop-disease
ArogyaDrishti-crop-disease is a image classification model from prathamrajbhar11. Use it when you need a label for an image. The card lists the license as mit.
Part of the KissanSahyog agritech platform.
Downloads · 30 days
0
Access
Public
Updated Apr 6, 2026
Repo size
285 MB
Likes
0
Public
Click a slice to open those files.
.pth285 MB · 100%
From the Hugging Face model README
Part of the KissanSahyog agritech platform.
ArogyaDrishti (Sanskrit: आरोग्यदृष्टि) means "healthy vision / disease sight".
| File | Description |
|---|---|
hybrid_resnet_densenet_checkpoint.pth | Training checkpoint |
best_hybrid_resnet_densenet.pth | Best validation accuracy weights ✅ (use this) |
import torch
from torchvision import transforms
from PIL import Image
# Load model (define your HybridModel class first)
model = HybridModel(num_classes=38)
model.load_state_dict(torch.load("best_hybrid_resnet_densenet.pth", map_location="cpu"))
model.eval()
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])
img = transform(Image.open("leaf.jpg")).unsqueeze(0)
with torch.no_grad():
logits = model(img)
probs = torch.softmax(logits, dim=1)[0]
top_p, top_idx = torch.topk(probs, k=3)
for i in range(len(top_p)):
print(f"Class: {top_idx[i].item()}, Confidence: {top_p[i].item():.2f}")