Skip to content

The project developed a highly accurate CNN-based model for plant disease detection, achieving perfect performance metrics (1.0 accuracy, precision, recall, F1-score), offering significant benefits for early diagnosis and sustainable agriculture.

Notifications You must be signed in to change notification settings

Lakhvinder15/Computer-Vision_Aggriculture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Advanced Image Classification for Automated Disease Diagnosis Using Computer Vision

Project Overview

This project focuses on developing a deep learning-based image classification model to identify plant diseases in farm crops. The model utilizes a Convolutional Neural Network (CNN) trained on a dataset of plant images with various diseases. The goal is to enable early disease detection, reduce crop loss, and promote sustainable agricultural practices through automation.

Dataset

The dataset consists of images of healthy and diseased plants, including crops like tomatoes, potatoes, and peppers. Images are labeled with specific disease identifiers (e.g., Tomato_Late_blight, Potato_Early_blight) and organized into directories by class. The dataset includes variations in lighting, background, and plant growth stages to enhance model robustness.

Dataset Source: Kaggle - Plant Disease Dataset

Methodology

Neural Network Architecture

The CNN model is designed with the following layers:

  • Convolutional Layers: Extract features from input images.
  • Max-Pooling Layers: Reduce spatial dimensions and retain important features.
  • Fully Connected Layers: Combine features for classification.
  • SoftMax Output Layer: Produces probability distributions over disease classes.

Tools and Frameworks

  • TensorFlow: Used for building and training the CNN.
  • Scikit-learn: Employed for dataset splitting and evaluation.
  • Matplotlib: Utilized for visualizing results and dataset characteristics.

Implementation

Key Steps

  1. Dataset Preparation: Load and preprocess images, resize to 128x128 pixels, and assign labels.
  2. Exploratory Analysis: Visualize sample images and analyze class distribution to address imbalances.
  3. Model Training: Train the CNN using 80% of the dataset for training and 20% for testing.
  4. Evaluation: Assess model performance using accuracy, precision, recall, and F1-score.

Code Structure

  • load_images_from_folder(): Loads and preprocesses images.
  • train_test_split(): Splits the dataset into training and testing sets.
  • CNN model built using TensorFlow's Sequential API.

Results

  • Accuracy: Achieved 100% accuracy on both training and test sets.
  • Classification Metrics: Precision, recall, and F1-score of 1.0 for all classes.
  • Visualizations: Training/validation accuracy and loss curves demonstrate effective learning and generalization.

Conclusion

The developed CNN model successfully classifies plant diseases with high accuracy, demonstrating its potential for real-world agricultural applications. Early disease detection can significantly reduce crop loss and improve farming efficiency. Future work may include expanding the dataset and deploying the model in mobile applications for field use.

About

The project developed a highly accurate CNN-based model for plant disease detection, achieving perfect performance metrics (1.0 accuracy, precision, recall, F1-score), offering significant benefits for early diagnosis and sustainable agriculture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published