File Exchange

image thumbnail

Plant Disease Classification

version 1.0.0.0 (263 KB) by Manu BN
A Matlab code to classify the type of disease using SVM

46 Downloads

Updated 26 Jan 2016

View License

A Matlab code is written to classify the type of disease affected leaf. Here I have considered two different types of diseases, i.e 'Anthranose' & 'Blackspot'. Segmentation of the disease affected area was performed by K means clustering. Over 13 different statistical and texture based features are extracted. Classification is done by SVM.
How to run??
1. Place the 'Disease Analysis' folder in your path
2. Run Classify.m
3. Select a leaf from the 'Disease Dataset' folder.
4. Observe the results of K means clustering.
5. In the dialogue box enter the cluster no containing the disease affected part. (1 or 2 or 3).
6. Observe the results on command window.
Note: This is a semi automatic approach for classification. Suggestion for improvement are always welcome.
A multiclass approach to the same is available in the following link:
https://in.mathworks.com/matlabcentral/fileexchange/55098-plant-leaf-disease-detection-and-classification-using-multiclass-svm-classifier
Thanks,
Manu B.N

Cite As

Manu BN (2019). Plant Disease Classification (https://www.mathworks.com/matlabcentral/fileexchange/50624-plant-disease-classification), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (22)

Tqu so much .....😍😍😍

i have an error in classify, in this code svmStructDisease = svmtrain(diseasefeat,diseasetype);. how to solve it?

how to load N no of image feature extraction value in mat-file or trained image feature extraction value to save

amruta naik

Chen Xiao

Thanks for our code.
From where we can get the data set of leaves images with various diseases?

Azeem Iqbal

I guess everyone is still looking for the procedure to create the dataset of .mat format! Please respond to this very important tutorial. How can I use my own image to create the Accuracy and Training data set using MATLAB?

safa makni

j'ai utilisé je code , je n'ai pas su comment corriger cet erreur , pouvez vous m'aider et merci

Error using kmeans/loopBody (line 418)
An empty cluster error occurred in every replicate.

Error in internal.stats.parallel.smartForReduce (line 128)
reduce = loopbody(iter, S);

Error in kmeans (line 295)
ClusterBest = internal.stats.parallel.smartForReduce(...

Error in Classify (line 30)
[cluster_idx cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', ...

Nicolas Yu

I am not sure how to extract these features?

Manu BN

@ selim: Follow the multiclass approach which uses the same features set

some one could tell me that what is the fist feature in this diseasefeat dataset.

Nice work

split range

Manu BN

Use Matlab 2013 or higher versions.
Firstly you need to train a multiclass SVM with features from more than 3 classes of leaves.

priya y

i have tried with multisvm code but the following error is occuring. Matlab verson i am using is R2008a.Do i have to install any additional software for this?
??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.

Error in ==> multisvm

Manu BN

My code is a sample one only. It works on 2 types of diseses only.
For more than 2 classes you need to use a multiclass SVM. The code is available on net. Plz search.

priya y

Thank you sir.
But i am working on classifying more than 2 disease.I have tried your code,its working for only 2 types of diseases.So to classify more than 2 diseases,please can u suggest which classifier to use and how to code it.

Manu BN

@ Priya Y: Use the save command in Matlab

priya y

from where do we have to get/download plant disease dataset in.mat form.?

need help for this programe

good

A K

hey by using which database software u did Diseaseset mat file.

Updates

1.0.0.0

Links to a multiclass approach of the same are added

1.0.0.0

A multiclass approach to the same is available in the following link:
https://in.mathworks.com/matlabcentral/fileexchange/55098-plant-leaf-disease-detection-and-classification-using-multiclass-svm-classifier

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Disease Analysis/