π Fruit Classifier
Custom CNN trained from scratch in PyTorch to classify 10 fruits from images. Achieves 61.3% validation accuracy on just 230 training images.
Usage
from predict import load_model, predict
model = load_model("fc_model_weights.pth")
fruit_name, confidence = predict(model, "your_image.jpg")
print(f"Predicted: {fruit_name} ({(100*confidence):>0.1f}%)")
Supported Fruits
Apple, Banana, Avocado, Cherry, Kiwi, Mango, Orange, Pineapple, Strawberries, Watermelon
Files
fc_model.pthβ full model for inferencefc_model_weights.pthβ weights for resuming trainingfruit_benefits.jsonβ nutritional knowledge basepredict.pyβ inference utility
Full Project
Training pipeline and RAG workflow available on GitHub: GitHub Repository