Fruit Freshness Classifier (ConvNeXt-Tiny)

Fine-tuned from facebook/convnext-tiny-224 on the Project-AgML/fresh_rotten_fruit_classification dataset (raw config, 3,200 images). It predicts both the fruit type and whether it is fresh or rotten (16 classes).

Results (held-out test set, 15% of data)

  • Accuracy: 0.9938
  • Macro F1: 0.9937

Classes

fresh_apple, fresh_banana, fresh_grape, fresh_guava, fresh_jujube, fresh_orange, fresh_pomegranate, fresh_strawberry, rotten_apple, rotten_banana, rotten_grape, rotten_guava, rotten_jujube, rotten_orange, rotten_pomegranate, rotten_strawberry

Usage

from transformers import pipeline
clf = pipeline('image-classification', model='hafeezaismail/fruit-freshness-convnext')
print(clf('my_fruit.jpg'))

Limitations

Trained on a small dataset with clean backgrounds. It only knows the fruits listed above and may be unreliable on other fruits, cluttered scenes or unusual lighting. Not a food-safety tool.

Downloads last month
23
Safetensors
Model size
27.8M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for hafeezaismail/fruit-freshness-convnext

Finetuned
(61)
this model

Dataset used to train hafeezaismail/fruit-freshness-convnext