Instructions to use dima806/vegetable_15_types_image_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dima806/vegetable_15_types_image_detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dima806/vegetable_15_types_image_detection") 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("dima806/vegetable_15_types_image_detection") model = AutoModelForImageClassification.from_pretrained("dima806/vegetable_15_types_image_detection") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("dima806/vegetable_15_types_image_detection")
model = AutoModelForImageClassification.from_pretrained("dima806/vegetable_15_types_image_detection")Quick Links
Returns vegetable type based on image.
See https://www.kaggle.com/code/dima806/vegetable-image-detection-vit for more details.
Classification report:
precision recall f1-score support
Bean 1.0000 1.0000 1.0000 280
Bitter_Gourd 1.0000 1.0000 1.0000 280
Bottle_Gourd 1.0000 1.0000 1.0000 280
Brinjal 1.0000 1.0000 1.0000 280
Broccoli 1.0000 1.0000 1.0000 280
Cabbage 1.0000 0.9964 0.9982 280
Capsicum 1.0000 1.0000 1.0000 280
Carrot 1.0000 1.0000 1.0000 280
Cauliflower 0.9964 1.0000 0.9982 280
Cucumber 1.0000 1.0000 1.0000 280
Papaya 1.0000 1.0000 1.0000 280
Potato 1.0000 1.0000 1.0000 280
Pumpkin 1.0000 1.0000 1.0000 280
Radish 1.0000 1.0000 1.0000 280
Tomato 1.0000 1.0000 1.0000 280
accuracy 0.9998 4200
macro avg 0.9998 0.9998 0.9998 4200
weighted avg 0.9998 0.9998 0.9998 4200
- Downloads last month
- 16
Model tree for dima806/vegetable_15_types_image_detection
Base model
google/vit-base-patch16-224-in21k
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dima806/vegetable_15_types_image_detection") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")