Skip to content

Welcome to the Fruit Ripeness and Disease Detection System! This application utilizes advanced YOLOV8 models to detect various fruits and diagnose diseases in bananas, mangoes, and pomegranates. Built with Flask, the web application allows users to either upload images for analysis or use a live video feed for real-time detection.

License

Notifications You must be signed in to change notification settings

AshishTukaral/Fruit-Ripeness-and-Disease-Detection

Repository files navigation

Fruit Ripeness and Disease Detection System

Introduction

Welcome to the Fruit Ripeness and Disease Detection System! This application utilizes advanced YOLO (You Only Look Once) models to detect various fruits and diagnose diseases in bananas, mangoes, and pomegranates. Built with Flask, the web application allows users to either upload images for analysis or use a live video feed for real-time detection and diagnosis.

Datasets

The models were trained using specialized datasets, which can be accessed here:

Project Structure

The project is organized as follows:

Fruit-and-Disease-Detection/
│
├── templates/
│   ├── index.html
│   ├── fruit_detection.html
│   ├── disease_detection.html
│   ├── banana_detection.html
│   ├── mango_detection.html
│   ├── pomogranate_detection.html
│   ├── uploaded_image.html
│
├── static/
│   ├── css/
│   ├── js/
│   ├── images/
│
├── app.py
├── requirements.txt
└── README.md

Installation

To set up the project locally, follow these steps:

  1. Clone the repository:
git clone https://github.com/AshishTukaral/Fruit-Ripeness-and-Disease-Detection.git
cd fruit-and-disease-detection
  1. Install the required dependencies:
pip install -r requirements.txt

Running the Application

Start the Flask application by running:

python app.py

Access the application in your browser at http://0.0.0.0:5000.

Features

Home Page

The main landing page, accessible at /, provides links to various functionalities of the application.

Fruit Detection

  • Page: /fruit_detection
  • Live Video Feed: /video_feed
  • Image Detection Endpoint: /detect_objects

This feature allows users to use a live video feed for real-time fruit detection or upload images for analysis.

Disease Detection

  • Main Page: /disease_detection
  • Banana Disease Detection: /banana_detection
  • Mango Disease Detection: /mango_detection
  • Pomegranate Disease Detection: /pomogranate_detection

Users can upload images of specific fruits to detect diseases. Each fruit type has its dedicated YOLO model.

Uploaded Images

  • Endpoint: /uploads/<filename>

This endpoint displays the uploaded images along with the detection results.

YOLO Models

The application utilizes several YOLO models for different detection tasks:

  • Fruit Detection Model: weights_3/best.pt
  • Banana Disease Detection Model: train2/weights/best.pt
  • Mango Disease Detection Model: train/weights/best.pt
  • Pomegranate Disease Detection Model: train4/weights/best.pt

API Endpoints

The application provides several API endpoints:

  • Home: GET /
  • Fruit Detection: GET /fruit_detection
  • Video Feed: GET /video_feed
  • Detect Objects: POST /detect_objects
  • Disease Detection: GET /disease_detection
  • Banana Detection: GET, POST /banana_detection
  • Mango Detection: GET, POST /mango_detection
  • Pomegranate Detection: GET, POST /pomogranate_detection
  • Uploaded Image: GET /uploads/<filename>

Output

Here are some example outputs generated by the system:

Fruit Ripeness and Disease Detection System

Contribution

We welcome contributions! Feel free to fork the repository, make your changes, and submit a pull request. For issues or feature requests, open an issue on the repository.

About

Welcome to the Fruit Ripeness and Disease Detection System! This application utilizes advanced YOLOV8 models to detect various fruits and diagnose diseases in bananas, mangoes, and pomegranates. Built with Flask, the web application allows users to either upload images for analysis or use a live video feed for real-time detection.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published