Built to order

Fruit Ripeness Detection using CNN

This project builds a convolutional neural network that looks at a fruit photograph and predicts both the fruit type and its ripeness stage — unripe, ripe or overripe. It combines the published Fruits-360 dataset with a curated, ripeness-labelled banana and mango set, and ships with a multi-task training notebook, the trained model, and an interactive web demo. Suitable for B.E./B.Tech final-year projects in AI & Machine Learning and Computer Science.

Fruit Ripeness Detection using CNN — project thumbnail preview
More project photos (2)

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

  1. Fruits-360 images provide fruit-type labels; banana and mango photos are labelled unripe/ripe/overripe by two annotators.
  2. All images are resized to 224×224 and normalized; disagreements between annotators are dropped from the set.
  3. A MobileNetV3-Small backbone feeds two classification heads trained with a weighted multi-task loss.
  4. Augmentation uses rotation and cropping; color jitter is kept mild because color carries the ripeness signal.
  5. Training runs with AdamW and early stopping on validation loss.
  6. Both heads are evaluated on a held-out split: accuracy and confusion matrices per head.
  7. 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.

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of multiple decision trees voting together into one final predictionStudents with basic Python and pandas skills who want a reliable first classifier for ML coursework and tabular data projects.

Random Forests Explained: Why Decision Trees Vote Better Together

Decision trees are readable but overfit; random forests fix this by training hundreds of varied trees on bootstrapped data with random feature subsets, then letting them vote. This guide explains Gini impurity, bagging, out-of-bag validation and the four hyperparameters that matter, with a complete scikit-learn workflow, honest feature-importance practices, and the mistakes students keep making.

Read guide
Illustration of object tracking showing video frames with bounding boxes and persistent ID labels following people and vehicles, comparing motion prediction and appearance matching.B.E./B.Tech Computer Science and Electronics students building video analytics projects — people counting, vehicle tracking, sports analysis — who have detection working and need

Object Tracking: DeepSORT and ByteTrack Explained

Detection finds objects per frame; tracking keeps their identities across frames. This guide explains tracking-by-detection, Kalman motion models, DeepSORT's appearance embeddings vs ByteTrack's low-confidence box recovery, tracking metrics (HOTA, IDF1, ID switches), and the tuning parameters that determine real-world quality.

Read guide
Illustration of image segmentation showing U-Net's U-shaped encoder-decoder with skip connections producing pixel masks, alongside Mask R-CNN detecting instances with masks.B.E./B.Tech Computer Science and AI/ML students moving from image classification or detection to pixel-level understanding — medical imaging, defect detection, autonomous driving

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide
Get a quotation