Computer vision project for plant leaf diseases.
This project implements a Convolutional Neural Networks (CNN) model to detect and classify leaf diseases from images. The pipeline includes data processing, class balancing, feature extraction and training of a classification model.
The first step is to analyze the dataset, particularly to determine the distribution of the classes present. This is accomplished using the Distribution.py program.
As seen above, the dataset is clearly unbalanced. To address this, we apply data augmentation techniques such as flipping, rotating, blurring, adjusting contrast, and more. This is handled by the Augmentation.py program.
After balancing the dataset, the images must be transformed to facilitate feature extraction. This is the role of the Transformation.py program. It leverages the PlantCV and OpenCV libraries.
Filters such as Gaussian Blur, Region of Interest (ROI), and Canny Edge Detection are applied directly to the images to create the final dataset.

Once the final dataset has been generated, we need to use it to train our model. It will use the augmented and filtered images to learn the characteristics of specified leaf diseases using Convolutional Neural Networks with Tensorflow library. This is achieved by the train.py program.
After having trained our model, we can use it to make predictions
The predict.py program take a leaf image as input, applies transformations, and identifies the type of disease present
To check the accuracy of the model, we can obtain the confusion matrix for directory path passed as parameter



