Downloads · 30 days
0
omkhk/vrukshaved-ayurvedic-plant-convnext
vrukshaved-ayurvedic-plant-convnext is a image classification model from omkhk. Use it when you need a label for an image. It is set up for pytorch. The card lists the license as mit.
VrukshaVed is a deep learning model for identifying 80 distinct species of Ayurvedic medicinal plants from leaf images.
Downloads · 30 days
0
Access
Public
Updated Aug 2, 2026
Repo size
198 MB
Likes
1
Public
Click a slice to open those files.
.pth198 MB · 100%
From the Hugging Face model README
VrukshaVed is a deep learning model for identifying 80 distinct species of Ayurvedic medicinal plants from leaf images.
convnext_small (transfer learning with dropout 0.4)leaf80_best_convnext_small.pth: PyTorch model state dictionary.leaf80_label_to_class.json: Mapping from class index (0..79) to plant label.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!
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()