In this study, a model was developed for the classification of plant leaf diseases from the leaf images using EfficientNet B3 deep learning architecture. The datasets having 60930 images was used to train the models using transfer learning approach. The results of the study showed that the model achieved 99.875%, 99.871% and 99.874% accuracy, recall and precision, respectively. A web application was developed where the user can upload the leaf image and predict the disease. (Try out: https://gauthamsree.github.io/Plant-Leaf-Disease-Classification, [Expect delay: since backend is deployed on Render(free tier)])
Running locally with docker-compose, instant respose from the backend is possible(rather than waiting in case of Render (free tier)). Make sure you have installed Docker, docker-compose, and started docker engine.
Step 1:
- Clone this Repo and
cd
into the folder - Code:
git clone https://github.com/GauthamSree/Plant-Leaf-Disease-Classification.git
Step 2:
- Run the following command to build the frontend and backend images run the web app with Docker Compose
- Code:
docker-compose up --build -d
Step 3:
- Goto http://localhost:3000/Plant-Leaf-Disease-Classification in your browser for interacting with the web app
Step 4:
- Run the following command to stop the docker containers
- Code:
docker-compose down
For deleting the Whole Web App
Step 1:
- Deleting the docker containers
- Code:
docker rmi $(docker ps -a | grep "plant-leaf-disease-classification_" | awk '{print $1}')
Step 2:
- Deleting the docker images
- Code:
docker rmi $(docker images -a | grep "plant-leaf-disease-classification_" | awk '{print $3}')
Step 3:
- Delete the cloned folder.
PlantVillage dataset contains 38 classes and 70295 images of 14 different plant species in total, 12 of which are healthy, 26 of which are diseased. In the present study, dataset of 9 plant species which have both healthy and diseased leaf images was used for training the model with transfer learning technique. The total number of images was 60930 for training and 15231 for validation. Augmentation method was applied to the dataset while training, to obtain different images for the diseases in each epoch.
The classifer can classify on the following 33 classes:
- Apple -- Apple Scab
- Apple -- Black Rot
- Apple -- Cedar Apple Rust
- Apple -- Healthy
- Cherry -- Powdery Mildew
- Cherry -- Healthy
- Corn -- Gray Leaf Spot (Cercospora Leaf Spot)
- Corn -- Common Rust
- Corn -- Northern Leaf Blight
- Corn -- Healthy
- Grape -- Black Rot
- Grape -- Esca (Black Measles)
- Grape -- Leaf Blight (Isariopsis Leaf Spot)
- Grape -- Healthy
- Peach -- Bacterial_spot
- Peach -- Healthy
- Pepper Bell -- Bacterial Spot
- Pepper Bell -- Healthy
- Potato -- Early Blight
- Potato -- Late Blight
- Potato -- Healthy
- Strawberry -- Leaf Scorch
- Strawberry -- Healthy
- Tomato -- Bacterial Spot
- Tomato -- Early Blight
- Tomato -- Late Blight
- Tomato -- Leaf Mold
- Tomato -- Septoria Leaf Spot
- Tomato -- Two-spotted Spider Mites
- Tomato -- Target Spot
- Tomato -- Yellow Leaf Curl Virus
- Tomato -- Mosaic Virus
- Tomato -- Healthy
- Pytorch
- ReactJS
- FastAPI
- Render
- GitHub Pages
- Docker & Docker Compose
A model was developed for the classification of plant leaf diseases using EfficientNet B3 deep learning architecture. The results of the study showed that the model achieved 99.875%, 99.871% and 99.874% accuracy, recall and precision, respectively.
The user can upload leaf images on the website to predict the plant disease using this model. Sample image can also be viewed and predicted.Dataset: https://www.kaggle.com/vipoooool/new-plant-diseases-dataset