πŸ”¬ ArogyaDrishti β€” Crop Disease Detection Model

Part of the KissanSahyog agritech platform.

ArogyaDrishti (Sanskrit: ΰ€†ΰ€°ΰ₯‹ΰ€—ΰ₯ΰ€―ΰ€¦ΰ₯ƒΰ€·ΰ₯ΰ€Ÿΰ€Ώ) means "healthy vision / disease sight".

Architecture

  • Backbone 1: ResNet50
  • Backbone 2: DenseNet121
  • Attention: SE (Squeeze-and-Excitation) Block
  • Head: MLP Classifier

Model Files

File Description
hybrid_resnet_densenet_checkpoint.pth Training checkpoint
best_hybrid_resnet_densenet.pth Best validation accuracy weights βœ… (use this)

Inputs

  • Leaf image (RGB, resized to 224Γ—224)

Output

  • Top-K disease class predictions with confidence scores

Usage

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}")
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