Final-year project. A deep learning model that classifies bananas into four ripeness classes (unripe, ripe, overripe, rotten), then maps the result to a grade (A, B, C or Reject), an estimated shelf life, and a shipping decision.
best_effnetb0.pth: trained on clean augmented imageseffnetb0_noise_aug.pth: fine-tuned with added noise and blurBanana Ripeness Classification Dataset by S.M. Shahriar (Kaggle, Apache 2.0): 13,478 images (train 11,793 / valid 1,123 / test 562). https://www.kaggle.com/datasets/shahriar26s/banana-ripeness-classification-dataset
| Model | Accuracy | Macro F1 |
|---|---|---|
| EfficientNet-B0 (original) | 98.9% | 0.99 |
| ResNet50 (comparison) | 98.9% | 0.99 |
| EfficientNet-B0 (noise fine-tuned) | 99.5% | not recorded |
Robustness (noise fine-tuned model): blur 98.9%, noise (sigma 25) 98.8%, grayscale 83.5%. Before fine-tuning, noise accuracy was 23.8%.
See app.py for the full pipeline (Grad-CAM, grading, PDF report).
Run it with pip install -r requirements.txt and python app.py.
effnetb0_noise_aug.pth 16 MBbest_effnetb0.pth 16 MB