Skip to content

96ibman/potato_disease_classification_CNN

Repository files navigation

Potato Disease Classification using CNN

This is a python tensorflow project on detecting disease in a potato leaf.

Dataset

The dataset used for this project is obtained from Kaggle using the potato folders.

The dataset contains (256 x 256) RGB images of healthy, early blight, and late blight leaves

Examples Screenshot

The overall samples are 2152, distributed as 1000 late blight, 1000 early blight, and 152 healthy. Those images were split into 70% for training, 20% for validation, and 10% for testing.

Setup

Libraries

from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten, Conv2D
from keras.layers.convolutional import MaxPooling2D
from keras.preprocessing.image import ImageDataGenerator
import pandas as pd
import numpy as np

Configuration

IMAGE_SIZE = 256
CHANNELS = 3
BATCH_SIZE = 32
EPOCHS = 15

train = ImageDataGenerator(rescale = 1./255)
validation = ImageDataGenerator(rescale = 1./255)

Importing Data

train_data = train.flow_from_directory(TRAIN_PATH, 
                                       target_size=(IMAGE_SIZE,IMAGE_SIZE), 
                                       batch_size=BATCH_SIZE, 
                                       class_mode="categorical",
                                       seed=2022)

val_data = validation.flow_from_directory(VAL_PATH, 
                                       target_size=(IMAGE_SIZE,IMAGE_SIZE), 
                                       batch_size=BATCH_SIZE, 
                                       class_mode="categorical",
                                       seed=2022)

Model Architecture

Screenshot

Authors

Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published