The problem
Grading fruit by hand is slow, subjective and inconsistent — a packing line needs the same decision on every fruit, every shift. Ripeness is fundamentally a vision problem: color distribution, spotting and texture change predictably as fruit ripens. This project trains a MobileNetV3-Small backbone with two output heads — one for fruit type, one for ripeness stage — on Fruits-360 (131 classes) plus a curated set of about 3,600 banana and mango photos labelled unripe/ripe/overripe by two annotators. Students learn multi-task learning, why color augmentation must be handled carefully when color is the signal, and how a lightweight model is chosen for phone deployment. The demo grades sample fruit photos with representative predictions.
How it works
- Fruits-360 images provide fruit-type labels; banana and mango photos are labelled unripe/ripe/overripe by two annotators.
- All images are resized to 224×224 and normalized; disagreements between annotators are dropped from the set.
- A MobileNetV3-Small backbone feeds two classification heads trained with a weighted multi-task loss.
- Augmentation uses rotation and cropping; color jitter is kept mild because color carries the ripeness signal.
- Training runs with AdamW and early stopping on validation loss.
- Both heads are evaluated on a held-out split: accuracy and confusion matrices per head.
- The web demo grades sample fruit photos through the same pipeline with representative predictions.
Tech stack:
- Python 3, TensorFlow/Keras
- MobileNetV3-Small
- Fruits-360 dataset
- NumPy, Matplotlib, scikit-learn
- Jupyter Notebook (training)
- HTML/CSS/JS grading demo
- TFLite export
Dataset & model details
- Dataset: Fruits-360 (H. Mureșan) — 131 fruit classes for the type head; plus a curated ripeness subset of ~3,600 banana and mango photographs labelled unripe / ripe / overripe by two annotators (disagreements dropped), assembled for the build.
- Task: Multi-task classification; input = 224×224×3 fruit photo; outputs = fruit type (12 classes) + ripeness stage (3 classes).
- Model: MobileNetV3-Small backbone (ImageNet pre-trained) → two heads: Dense(12, softmax) for fruit type, Dense(3, softmax) for ripeness; ~2.5M parameters.
- Metrics: Fruit-type accuracy ~97% (design target), ripeness accuracy ~93% (design target), per-head confusion matrices. No accuracy is claimed as measured until the training run is executed for the order.
| Parameter | Value |
|---|---|
| Input format | 224 × 224 RGB, normalized |
| Outputs | Fruit type (12) + ripeness (3) |
| Dataset size | Fruits-360 + ~3,600 ripeness images |
| Model parameters | Approximately 2,500,000 |
| Ripeness accuracy | ~93% (design target, not a measured claim) |
| Training time | Approximately 1–2 h on a free GPU (expected) |
| Inference | Approximately 18 ms on phone CPU (expected) |
| Model file | Approximately 3.4 MB TFLite (expected) |
| Demo | Single-file web app, runs offline after download |
Project features
- Fruit-type + ripeness classifier Multi-task CNN: one head predicts the fruit, a second head predicts unripe / ripe / overripe — both from a single photo.
- Fruits-360 + ripeness subset 131-class published dataset for fruit identity, plus ~3,600 banana/mango photos labelled by ripeness stage.
- Multi-task training notebook Shared MobileNetV3 backbone, weighted task losses, augmentation, and training curves — fully reproducible.
- Phone-ready model MobileNetV3-Small exported to TFLite (~3.4 MB), chosen deliberately for on-device grading apps.
- Interactive grading demo Single-file web app: pick a sample fruit photo and see the predicted type and ripeness with probability bars.
- Per-stage evaluation Confusion matrices for both heads, so the viva can discuss where ripe/overripe boundaries blur.
- Viva kit Report PDF, PPT and Q&A covering CNNs, multi-task learning, augmentation trade-offs and TFLite deployment.
What is included
- Ripeness-labelled banana/mango subset with annotation notes
- Fruits-360 preparation scripts
- Complete multi-task training & evaluation notebook
- Trained model + TFLite export
- Interactive grading web demo with sample photos
- Per-head confusion matrices and training curves
- Project report PDF, PPT presentation
- Viva Q&A preparation document
Limitations & prerequisites
- Ripeness is graded from appearance only — internal quality (sugar, firmness) needs sensors, not photos.
- The ripe/overripe boundary is genuinely ambiguous; annotator disagreements were dropped, which the report discloses.
- 93% ripeness accuracy is a design target, stated honestly — the report documents the actual figure.
- Unusual lighting shifts predictions; the demo notes the controlled-lighting assumption.
- Only the covered fruit types are supported; new fruits need new labelled data.
Frequently Asked Questions
Which datasets are used?
Fruits-360 (131 published fruit classes) for fruit identity, plus a curated set of about 3,600 banana and mango photos labelled unripe/ripe/overripe by two independent annotators, with disagreements dropped.
Why multi-task instead of two models?
One shared backbone learns fruit appearance once and serves both heads — half the parameters, one inference pass. The report shows the weighted-loss setup and why it beats two separate models on this data.
Does color augmentation hurt?
It can — color is the ripeness signal. The notebook keeps color jitter mild and the report includes an ablation discussion, which is a strong viva point.
How does the demo work?
Pick a sample fruit photo, press run, and the app shows the predicted fruit type and ripeness stage with probability bars — representative of the trained model on these samples.
Can it run on a phone?
Yes by design: MobileNetV3-Small exports to a ~3.4 MB TFLite model for on-device grading, with export steps documented.
Is this project suitable for a final-year project?
Yes — for AI & Machine Learning and Computer Science programs. It demonstrates multi-task CNNs, careful dataset labelling, and mobile deployment. Suitable for B.E./B.Tech final-year projects in AI & Machine Learning and Computer Science.
Components & software requirements
- Python 3, TensorFlow/Keras
- MobileNetV3-Small
- Fruits-360 dataset
- NumPy, Matplotlib, scikit-learn
- Jupyter Notebook (training)
- HTML/CSS/JS grading demo
- TFLite export
Dataset & model details
- Dataset: Fruits-360 (H. Mureșan) — 131 fruit classes for the type head; plus a curated ripeness subset of ~3,600 banana and mango photographs labelled unripe / ripe / overripe by two annotators (disagreements dropped), assembled for the build.
- Task: Multi-task classification; input = 224×224×3 fruit photo; outputs = fruit type (12 classes) + ripeness stage (3 classes).
- Model: MobileNetV3-Small backbone (ImageNet pre-trained) → two heads: Dense(12, softmax) for fruit type, Dense(3, softmax) for ripeness; ~2.5M parameters.
- Metrics: Fruit-type accuracy ~97% (design target), ripeness accuracy ~93% (design target), per-head confusion matrices. No accuracy is claimed as measured until the training run is executed for the order.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.