All projects
FINAL YEAR PROJECT / FYP 2

AI-Based Fruit Ripeness Detection and Automated Sorting System.

An intelligent fruit ripeness detection and automated sorting prototype developed using YOLOv8n deep learning and Raspberry Pi 4. The system uses computer vision to identify fruit ripeness conditions and classify detected fruit into three categories: Unripe, Ripe, and Overripe. The project explores edge AI, real-time image processing, and automated sorting to support more consistent fruit quality classification.

PROJECT STATUSPrototype Development — Real-Time AI Detection Implemented
MY ROLEAI Model Development, Raspberry Pi Integration and System Prototyping
YOLOv8nComputer VisionArtificial IntelligenceDeep LearningPythonRaspberry Pi 4OpenCVONNX RuntimeImage ProcessingAutomated Sorting
ENGINEERING CASE STUDY / FYP 2

The problem

Fruit ripeness identification is traditionally performed through manual visual inspection, which can be time-consuming and affected by differences in human judgment. This project investigates an intelligent classification approach using machine learning and computer vision to identify ripeness levels. The main engineering challenge is integrating an AI detection model with an embedded processing platform while preparing the system for an automated sorting mechanism.

What I built / worked on

  • Developed and tested a YOLOv8n object detection model for fruit ripeness classification.
  • Organized and evaluated fruit image datasets containing different ripeness conditions.
  • Implemented three-class classification: Unripe, Ripe, and Overripe.
  • Tested model predictions using fruit images, including banana, apple, and mango samples.
  • Exported the trained YOLOv8 model to ONNX format for deployment on Raspberry Pi 4.
  • Integrated ONNX Runtime and OpenCV for image processing and AI inference.
  • Configured camera capture for real-time fruit detection on Raspberry Pi.
  • Developed a Python and Flask-based live detection interface.
  • Implemented prediction stabilization logic to reduce repeated fruit counting and inconsistent classifications.
  • Displayed detected ripeness categories, prediction results, and fruit counters through a live monitoring interface.
  • Explored integration of the AI detection system with a future servo motor-based automated sorting mechanism.

Outcome and status

The prototype has demonstrated fruit ripeness classification using a trained YOLOv8n model. Initial image tests produced confidence scores of approximately 86% for a ripe banana, 71% for an unripe apple, and 61% for an overripe mango. The model was exported to ONNX and tested on Raspberry Pi 4 using camera-based inference. Live detection, ripeness counters, and prediction stabilization were implemented. These confidence scores represent individual predictions rather than overall model accuracy. Full physical sorting integration and end-to-end system validation remain future development activities.

Current development focuses on AI detection, Raspberry Pi deployment, camera integration, and prototype testing. Planned improvements include additional dataset collection, model evaluation, physical sorting integration, and testing of sorting reliability. Final system performance should be confirmed through controlled testing.

Project photos.

A visual look at the hardware, development process and technical implementation.

YOLOv8n Fruit Detection

YOLOv8n Fruit Detection

Computer vision detection and fruit ripeness classification.

Raspberry Pi Integration

Raspberry Pi Integration

Edge computing platform for camera-based AI inference.

System Prototype

System Prototype

Hardware development, integration and prototype testing.

Explore other projects