Automated Diagnosis of Diverse Coffee Leaf Images through a Triple Deep Convolutional Neural Network.
-
Affiliation: Bangkit Academy
-
E-mail: arsyakaukabi@gmail.com
Fig 1 The stage-wise classification of coffee leaves with the trained backbones
The dataset used for this work came from the following works:
Please cite or credit their work when using it!
Parraga-Alava, Jorge; Cusme, Kevin; Loor, Angélica; Santander, Esneider (2019), “RoCoLe: A robusta coffee leaf images dataset ” Mendeley Data, V2, doi: 10.17632/c5yvn32dzg.2
Inclusion:
- Healthy
- Coffee Leaf Rust (CLR)
- Red Spider Mites (RSM)
Krohling, Renato; esgario, José; Ventura, Jose A. (2019), “BRACOL - A Brazilian Arabica Coffee Leaf images dataset to identification and quantification of coffee diseases and pests” Mendeley Data, V1, doi: 10.17632/yy2k5y8mxg.1
Esgario, J. G., Krohling, R. A., & Ventura, J. A. (2020) "Deep learning for classification and severity estimation of coffee leaf biotic stress" Computers and Electronics in Agriculture 169, 105162. doi:10.1016/j.compag.2019.105162
Inclusion:
- Healthy
- Coffee Leaf Rust (CLR)
- Cercospora Leaf Spots (CLS)
- Phoma Leaf Spots (PLS)
- Coffee Leaf Miner (CLM)
Montalbo, Francis Jesmar Perez; Hernandez, Alexander Arsenio (2020) "Classifying Barako coffee leaf diseases using deep convolutional models" International Journal of Advances in Intelligent Informatics (IJAIN) [S.l.], v. 6, n. 2, p. 197-209, july 2020. ISSN 2548-3161. doi: 10.26555/ijain.v6i2.495
Montalbo, Francis Jesmar Perez "An Optimized Classification Model for Coffea Liberica Disease using Deep Convolutional Neural Networks" n Proc. of the 2020 16th IEEE International Colloquium on Signal Processing & Its Applications (CSPA), Langkawi, Malaysia, 2020, pp. 213-218, doi: 10.1109/CSPA48992.2020.9068683.
Inclusion:
- Healthy
- Coffee Leaf Rust (CLR)
- Sooty Molds (SM)
Table 1 Specification of the curated coffee leaf dataset
For the readily prepared dataset used in this work refer to this link (OPTIONAL) : Google Drive Prepared Dataset
PREPARED DATASET: (7 GB)
NOTE: The following credits for the datasets still goes to their appropriate owners and collectors. please remember to cite their work when using their respective datasets.
Make sure to create a new virtual environment preferably in Anaconda. Use Python 3.5+.
The SWAT-DCNN uses the tensorflow GPU. This may also require at least CUDA 10 and a cuDNN
Clone the repository:
git clone https://github.com/arsyakaukabi/Co-ffee_A.git
Activate and access the folder Co-ffee.A/
with the included requirements.txt
file. Afterwards, simply enter the command in the conda CLI
pip install -r requirements.txt
Once installed, you may either train the models individually with the .ipynb
notebooks found in Co-ffee.A/Models/
inside the stage1
, stage2
, and stage3
folders or make use of the pre-trained weights.
The Co-ffee.A/Models/TDCNN/
files does not need to re-train. However, its a must to compile and aggregate the T-DCNN stages to produce its own respective weights needed by the entire SWAT-DCNN model.
The pre-trained weights are the plug and play weights that can be used to skip the training and compilation of models for the TDCNN (RECOMMENDED).
For an immediate simulation without the hassle of going over the previous instructions, refer to this link. : Pre-Trained Weights
PRE-TRAINED WEIGHTS FILESIZE: (484 MB)
The filenames must not be changed for the .h5
files.
model1.h5
model2.h5
model3.h5
Make sure to extract the pre-trained weights in the given manner 🠊 Co-ffee_A/weights/
Training with the pre-trained weights (RECOMMENDED)
Training from scratch (May take long hours depending on your PC specs)
-
Activate your created virtual environment and enter the main
Co-ffee_A/
folder. -
Save the dataset folder downloaded from LINK inside the
Co-ffee_A/
asCo-ffee_A/dataset/
-
Open the
.ipynb
files from theCo-ffee_A/models
folder and run the following in your preferred order. TheCo-ffee_A/models/tdcnn/
is saved for later. -
Once all models from stage-1 to 3 are trained. You may now open the
Co-ffee_A/models/tdcnn/
folder to build the T-DCNN models. -
After all T-DCNN models are built, you may now run the
testing.py
from the mainCo-ffee_A/
folder. -
Follow through the given instructions and make sure to use the test sample from the provided
/test/
folder
In case of any problems, don't hesitate to contact me. I'll be happy to help.
In Fig. 2, all models successfully trained and validated from their respective datasets, illustrated by the converged train and validation graphs.
Fig 2 The learning progress of the selected models during training and validation
Figure 3 presents the classification results of the individual T-DCNN stages with their respective test datasets visualized
Fig 3 TDCNN confusion matrix results from the test data for each stage
Machine Learning
Cloud Computing
Mobile Development
Thanks to Bangkit Academy. Without its support, this work would not have become possible.
Thanks to Francis Jesmar P. Montalbo for inspires us to create this kind of model.