VrukshaVed - 80 Ayurvedic Plant Leaf Classifier (ConvNeXt-Small)
VrukshaVed is a deep learning model for identifying 80 distinct species of Ayurvedic medicinal plants from leaf images.
Model Summary
- Architecture:
convnext_small(transfer learning with dropout 0.4) - Input Size: 224x224 RGB images
- Classes: 80 Ayurvedic plant species
- Inference Strategy: Test-Time Augmentation (TTA with 5 transforms) for high accuracy.
Files Included
leaf80_best_convnext_small.pth: PyTorch model state dictionary.leaf80_label_to_class.json: Mapping from class index (0..79) to plant label.
Supported Plant Species (Sample)
Aloevera, Amla, Neem, Tulsi, Turmeric, Ginger, Mint, Curry, Guava, Hibiscus, Lemon, Papaya, Jasmine, Drumstick, Tamarind, Tomato, Coriander, Lemongrass, Eucalyptus, Rose, Henna, Marigold, Bamboo, Pepper, Coffee, Pumpkin, Onion, Pomegranate, Pea, Insulin plant, Malabar Nut, and 49 more!
Usage Example (PyTorch)
import json
import torch
import torchvision.models as models
import torchvision.transforms as T
from PIL import Image
from huggingface_hub import hf_hub_download
# Download files from Hugging Face Hub
repo_id = "omkhk/vrukshaved-ayurvedic-plant-convnext"
model_path = hf_hub_download(repo_id=repo_id, filename="leaf80_best_convnext_small.pth")
labels_path = hf_hub_download(repo_id=repo_id, filename="leaf80_label_to_class.json")
# Load labels
with open(labels_path) as f:
label_to_class = json.load(f)
# Load model
model = models.convnext_small(weights=None)
in_f = model.classifier[2].in_features
model.classifier[2] = torch.nn.Sequential(
torch.nn.Dropout(p=0.4),
torch.nn.Linear(in_f, 80)
)
model.load_state_dict(torch.load(model_path, map_location="cpu"))
model.eval()