Skip to content

Repository files navigation

Rotten Fruit Detection Application

This project presents an end-to-end system for detecting whether a fruit is fresh or rotten using image-based classification, integrated into a real-time Android application.


Overview

The project focuses on building a practical system that combines data collection, model development, and deployment into a usable application. The objective is not only to develop a classification model but also to ensure that it works reliably under real-world conditions.

The application allows users to capture or upload images of fruits and receive classification results directly on a mobile device.


Problem Statement

Manual inspection of fruit quality is often time-consuming, subjective, and inconsistent. This project aims to develop an automated system that can assist in identifying fruit quality using image data, with a focus on usability and efficiency.


System Architecture

The system follows a complete pipeline:

  1. Data Collection A self-curated dataset was created by collecting fruit images from local markets under varying lighting conditions, backgrounds, and stages of decay.

  2. Data Preprocessing Images were resized, normalized, and augmented using techniques such as rotation, scaling, and flipping to improve generalization.

  3. Model Development A Convolutional Neural Network (CNN) was implemented using TensorFlow and Keras to extract features and perform classification.

  4. Model Optimization The trained model was converted into TensorFlow Lite format to enable efficient deployment on mobile devices.

  5. Mobile Application An Android application was developed using Java to integrate the model and perform real-time inference.


Key Features

  • Real-time image capture using the device camera
  • Support for image upload from gallery
  • On-device inference using TensorFlow Lite
  • Fast and lightweight execution
  • Simple and user-friendly interface

Tech Stack

  • Languages: Python, Java
  • Frameworks: TensorFlow, Keras, TensorFlow Lite
  • Tools: Android Studio
  • Domain: Computer Vision, Mobile Systems

Model Details

  • Model Type: Convolutional Neural Network (CNN)
  • Input Size: 128 × 128
  • Training Accuracy: ~95%
  • Validation Accuracy: ~92%
  • Evaluation Metrics: Accuracy, F1-score

Working

  1. The user captures or uploads an image.
  2. The image is preprocessed within the application.
  3. The TensorFlow Lite model performs inference on the device.
  4. The output is displayed as either "Fresh" or "Rotten" along with a confidence score.

Results

The system performs well on both controlled and real-world inputs. It demonstrates good generalization across different lighting conditions and backgrounds, with minor limitations in visually ambiguous cases.


Limitations

  • Performance may degrade under extreme lighting conditions
  • Difficulty handling multiple fruits in a single image
  • Classification is based only on visible features

Future Work

  • Support for multiple fruit detection in a single frame
  • Expansion to additional fruit categories
  • Integration with cloud-based models for improved accuracy
  • Extension to supply chain or quality monitoring systems

Author

Devashish Dixit B.Tech Computer Science


Note

This project was developed as part of a final-year undergraduate project, with a focus on building a complete and deployable system rather than only a standalone model.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages