pufanyi/cassava-leaf-disease-classification
Viewer • Updated • 48.2k • 39 • 2
How to use nexusbert/resnet50-cassava-finetuned with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="nexusbert/resnet50-cassava-finetuned")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png") # Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("nexusbert/resnet50-cassava-finetuned")
model = AutoModelForImageClassification.from_pretrained("nexusbert/resnet50-cassava-finetuned")This model is a fine-tuned version of mesabo/agri-plant-disease-resnet50 on the Cassava Leaf Disease dataset. It is specifically designed to detect 5 common states of Cassava leaves, vital for food security in West Africa.
from transformers import pipeline
classifier = pipeline("image-classification", model="nexusbert/resnet50-cassava-finetuned")
results = classifier("path_to_leaf_image.jpg")
print(results)