File size: 1,007 Bytes
5b1a133
 
 
 
 
 
 
 
 
 
 
6628436
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
language: en
license: mit
tags:
  - image-classification
  - pytorch
  - cnn
  - fruit-classifier
pipeline_tag: image-classification
---

# 🍎 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

```python
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 inference
- `fc_model_weights.pth` — weights for resuming training
- `fruit_benefits.json` — nutritional knowledge base
- `predict.py` — inference utility

## Full Project

Training pipeline and RAG workflow available on GitHub:
[GitHub Repository](https://github.com/tarakaprabhuchinta/fruit-classifier)