How to use from the
Use from the
Transformers library
# 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")
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
Safetensors
Model size
85.8M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for dima806/vegetable_15_types_image_detection

Finetuned
(2519)
this model