Sakshi053 / Cotton-Plant-Disease-Classification-Web-Application

Deploying a Cotton Plant Disease Classification Flask application Using DenseNet121

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cotton Plant Disease Classification Web Application 🌿

This repository is about an end to end implementation of deep learning cotton plant disease classification web application using flask.

Dataset

The dataset is downloaded from Kaggle. and total size is 152 MB. The dataset contains 3 folders with 1951 train images, 106 test images and 253 validation images. Each folder is divided into four classes: diseased cotton plant (Fusarium Wilt), diseased cotton leaf (Leaf Curl Disease), fresh cotton plant (Healthy Plant) and fresh cotton leaf (Healthy Leaf). Each image has a size of 694x694 pixels in JPG format. Here are the sample images of the dataset...

DenseNet Model

Pretrained DenseNet121 model on ImageNet dataset is used. With the help of transfer learning, the last 8 layers of the model are tuned to solve the problem. The model is trained for 20 epoches and the accuracy is 97% on test data.

Training Accuracy and Loss

Confusion Matrix

Demo

Usage

Cmds to run file

  • Installing dependencies
pip install -r requirements.txt
  • Model Training
densenet121cottondisease.ipynb
  • Inference

Model weight available at - DenseNet121.h5 and store inside /model folder.

To run Flask, use:

python app.py

Docker cmds

To build docker image, run:

docker build -t cotton .

Run docker image, using:

docker run --name cotton-app cotton

Stop docker, using:

docker stop cotton-app

Credits

Thanks to my teammates Myat Myint Zu Thin and Prachi Gupta

About

Deploying a Cotton Plant Disease Classification Flask application Using DenseNet121


Languages

Language:Jupyter Notebook 83.0%Language:HTML 6.7%Language:JavaScript 4.1%Language:CSS 3.0%Language:Python 2.9%Language:Dockerfile 0.2%