Professional Documents
Culture Documents
Authorized licensed use limited to: Government College University Faisalabad. Downloaded on August 01,2022 at 08:19:51 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
pre-trained ResNet 50 architecture with 50 layers is used. In the plant leaf by using ten-layer CNN. In this system, a ten-layer
first 49 layers, all the activations of the network are kept as such CNN was created for the classification of the plant leaf. The
and only the last layer is modified for the proposed system. This results on a dataset of Flavia leaf with 4,800 images and 32 kinds
model presents satisfying results with less time for training and gave the overall 87.92% accuracy. Neural network leads to
tuning parameters. The system specification used for this model is automatic feature extraction which aids the classification of the
Intel(R) Core(TM) i7-8750 processor clocked at 2.2GHz, 16GB input dataset leaf image into its respective independent classes
RAM with a dedicated 4 GB NVIDIA GeForce GTX 1050 Ti with an accuracy of 94-95%.
graphics card and 250GB of SSD. A good model is the one which Peng Jiang Jiang et.al. [6] implemented a real-time
is small in size, has low errors, and also less CPU and GPU detection model of an apple leaf disease using an improved deep
inference time. In comparison to various models like VGG-19, convolutional neural network. GoogLeNet Inception structure and
AlexNet, ResNet25, GoogleNet, ResNet18, etc., ResNet50 is Rainbow concatenation introduced as a training model. In real-
powerful and has the quality of a good pretrained model as time, this approach can automatically extract features and be able
mentioned above. to identify five types of disease classes with high accuracy.
The paper is briefed in the remaining sections as follows. Hoo-Chang Shin [7], the study of this paper gave three
Section I states about the introduction. Section II elaborates important steps of implementing deep convolutional neural
related work addressed by various researchers. Section III reviews networks by introducing a computer-aided detection system that
concepts such as CNN, resnet, and data augmentation. Section IV solves the lung disease such as thoraco-abdominal lymph node
describes the methodology. Section V deals with results and and interstitial lung disease. This system studies and evaluates
discussions. Section VI talks about future work. References are different models of CNN architectures. The next step is to
given in section VII. evaluate the dataset scale and performance of the spatial image.
The last step is to introduce transfer learning from pretrained
II.RELATED WORKS ImageNet by using fine-tuning. The result of this study shows that
Melike Sardogan [1], designed a CNN for automatic feature it achieves 85% accuracy at 3 false positives per patient in the
extraction as well as classification. They used a learning vector mediastinal LN detection.
Quantization (LVQ) for plant disease detection where the data set Fatih Ertam and Galip AydÕn [8], compared the effects
Contained 500 images of diseased tomatoes. Supervised learning of multiple activation functions such as tanH, ReLu, sigmoid,
neural networks are used as an algorithm that uses a competitive soft plus on classification. ReLu activation function has a high
learning strategy. To improve accuracy, a slight change in the accurate classification rate and this has achieved 98.43%
CNN model called LeNet is used to detect and classify different accuracy. This experiment results show that an increase in the
diseases in tomato leaves. number of iterations or epochs leads to an increase in the
Transfer learning which is a machine learning technique accuracy values.
is used for pre-training the model where new classes are The Automated Image capturing system is studied and
classified. When the pre-trained models of AlexNet and VGG16 implemented by [9] Robert G. de Luna. to identify the Tomato
net were put to test with a dataset of approximately 13,000 images, leaf diseases such as Phoma Rot, Target Spot, Leaf Miner, and
the accuracy obtained was 97.29% for VGG16 and 97.49% for
healthy leaves with 4,923 dataset images. By using Transfer
AlexNet. These models classify objects into 1000 categories with the
provided augmented data sets [2]. learning this model has achieved 95.75% accuracy whereas,
Image processing which on top of deep learning has another system of automated capturing of images has achieved
numerous intakes of data, raising the stakes of time and cost. This 91.67% accuracy in identifying different diseases of the tomato
process is exhausting and in some cases unfeasible. Kenichi plant leaf.
Kobayashi et.al [3] clarified the relationship between Frechet Santhana Hari [10], proposed a new model of CNN
inception distance (FID) and diagnostic accuracy. Studies show called the Plant Disease Detection Neural Network ( PDDNN).
that the method of rotation gets the connection between FID and This model was used to extract certain features from the leaf
diagnostic accuracy. images of different crops. The 16-layered CNN network with
S.Veni et.al. [4], proposed a Computer-Aided model that 32*32 filters, dropout, and max pool layers have achieved an
can detect and classify diseased brinjal leaves from the healthy overall higher accuracy. With a dataset of augmented 14810
leaves. For thermal and visible light images they used image images, the accuracy achieved was 86%. The results were
processing techniques to classify between healthy leaves and a compared with a Mobilenet 50 network where the PDDNN model
diseased Solanum Melongena (brinjal) leaves. Datasets are had increased accuracy by nearly 7%.
collected using Thermal and RGB cameras. With colour and A deep learning approach on MRI images of brain
temperature as features, they obtained 90.9% accuracy with SVM cancer using residual networks was implemented by Sarah Ali
and 89.1% with ANN. From this experiment, they have proved Abdelaziz Ismael [11] and he has proposed an approach for
that SVM has high accuracy when compared to ANN. classifying different types of brain tumors using Residual
Jiachun Liu [5], proposed an idea of classification of
Authorized licensed use limited to: Government College University Faisalabad. Downloaded on August 01,2022 at 08:19:51 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
Networks. This approach has achieved 99% accuracy and was III. OVERVIEW
considered to be an excellent result compared to all other previous A.Data Augmentation
works. Data augmentation is a technique used to artificially
Skip-connections in residual networks are explained by amplify the proportions of Training datasets. Large datasets are
Vinit Bodhwani in [12]. This paper explained the methodology important for imposing a deep learning model. However, the
and implementation of deep learning using residual networks. A
version can be enhanced with the aid of augmentation with the
50-layer popularly known as ResNet-50 was used as a deep
residual framework consisting of a total of five stages, which has available data. It will not be wrong to state that artificial
been implemented for the large-scale classification of plants. intelligence (AI) has emerged again only due to the provision of
Skip-connections in residual networks help in the Vanishing massive computing power (GPUs) and significant quantities of
Gradient problem and this leads to 93% accuracy. facts on the Internet [4]. Some of the frequently used
The work by Arpan Jain et.al [13] provides an accurate augmentation strategies are scaling, flipping, cropping, rotating,
idea of the characteristics of performances in Deep Learning padding, and translation [10][3]. Different types of augmentation
Networks such as ResNet and DNN. Comparisons were made
strategies improve performance since accuracy is increased due to
between the CPU configuration such as V100 GPUs, NVIDIA
the above process. Therefore, it is valuable to understand these
K80, and P100. Difference between GPU vs CPU helps to
overcome handling large datasets. functions that can alter the model’s performance. Among the
Aravinth J et.al. [14], implemented a python-based various augmentation techniques available, shear, scale, translate,
project on the classification of the urban objects from HSR-HTIR and rotate have a high degree of performance. The augmentation
data using CNN and Random Forest Classifier. Random Forest methods in ascending order of improvements are as follows [3]:
Classifiers have been evaluated on the standard of classification (1) Equalize, Auto Contrast, Invert, Color balance, (2) Rotate, (3)
accuracies. CNN shows high accurate results with a 10% training Translate, Scale and Shear.
dataset and Random Forest classifiers reduced the number of
misclassified pixels. This study shows the performance of B.CNN
different classifiers based on the dataset and its classification
Deep Learning, a subgroup of machine learning, works
algorithms.
through a sequence of layers. Each layer’s input is the output of
Transfer learning was done using the ResNet 50 model the preceding layer. The advantages of a deep learning model are
[15] for the classification of different types of malware. They use predominantly due to automatic feature extraction and
byte plot grayscale images and have used the pre-trained model classification which takes place as a single process. Important
which has been trained on the ImageNet dataset. The weights features are acquired through its multi-layered network [1][5][16]
have been frozen for the initial layers and the final fully which are the convolutional layer, pooling, activation function
connected layer has been fine-tuned to adapt to the malware layer, and fully connected(FC) layer. Convolution layer performs
classification. The model which they built could successfully a series of mathematical operations to extract these required
classify with the accuracy of 98.62%. features from the input image. By using filters, a new reduced
Dr. T. Vijayakumar [16] compares the working and image is created by the summation of input image values
efficiency of capsule neural networks with convolutional neural multiplied by filter values. A new matrix is generated by using the
networks. input image. Using several pooling functions the output image
Capsule neural network recognizes low-quality images by size is reduced. Some of the pooling functions include Max
hierarchically classifying into subsections compared to CNN. pooling, Average pooling, and L2 norm pooling. The activation
CNN gives no importance for reconstructing damaged structures layer acts as a link between the input and the output layers. The
presence of the activation layer affects the overall performance of
that are effectively done by capsule networks. Though with all
the network. ReLU activation function has the most accurate rate
these advantages CNN is preferred over capsule neural networks
of classification [8] and through this function, negative values are
due to its effective handling capacity of large datasets routing to taken as zero and positive values are taken as one. The fully
higher accuracy. connected layer takes the matrix as an input which is the total
From the above studies, it was observed that CNN with output process of convolution, pooling, and activation layers.
the ResNet model was found to be better among other existing
models. Hence, the ResNet model is used to help in training and C.Residual Network
to enhance the quality of the result. Also, to improve the result as
In recent days, CNN has reached the real-time level of
close to the actual prevailing disease, data augmentation has been
classification of images. Deep networks extract multi-level
implemented.
features ranging from low to high and can classify as different
classes. As the number of layers increases the quality of features
also increases. When a neural network tends to converge, issues
Authorized licensed use limited to: Government College University Faisalabad. Downloaded on August 01,2022 at 08:19:51 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
Authorized licensed use limited to: Government College University Faisalabad. Downloaded on August 01,2022 at 08:19:51 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
(i) Dataset:
Datasets are required for all processes in the project. A
higher number of images available helps in training the model
finer and better at predicting diseases. A data set of 12,206
images are collected from the vast repository of
PlantVillage.Tomato diseases which are used as datasets are
Bacterial spot, Early blight, Septoria leaf spot, Tomato yellow
leaf curl virus, Tomato mosaic virus (Fig. 3). The healthy leaf is
also included as one of the classes in the five classes of disease.
The image datasets are divided into 80% and 20% for training and
validation respectively.
Fig. 4 Leaf images after data augmentation for Bacterial Spot
(ii) Data augmentation:
This paper’s most important factor is to train the model (iii) Transfer learning using ResNet-50(Model Creation)
of the network by extracting features that can differentiate In this model, the concept of transfer learning using the
between classes. Therefore, Data augmentation has been applied pretrained model known as Resnet-50 is implemented [12] and
to images that result in a higher chance of extracting appropriate
modified it. There are two different ways of implementing
features [10]. Pytorch [13] provides a very useful library called
(torchvision.transforms) that contains many methods that help in transfer learning on CNN. Fine-tuning a CNN or by using CNN
the process of data augmentation. This helps in expanding the size as a fixed feature extractor. The feature extractor approach was
of the dataset by creating images that are modified versions of the used by maintaining all the default weights of CNN except those
originals. Due to this variation, the model will be able to in the final layer.
generalize what they have learned and perform better.
9801 images which belong to the training set of data are ResNet-50 is incorporated into our image datasets as follows:
taken for augmentation. In this proposed work, three methods
1. The pre-trained model has been introduced as an initial
have been implemented which are, RandomRotation,
RandomResizedCrop, and combining the above two which is step.
RandomRotation and ResizedCrop(Fig 4).RandomRotation 2. Reshaping the final layer of the ResNet-50 model which
function transforms the images either left or right by 30 degrees. is the fully connected layers and replacing it by 6 fully
Authorized licensed use limited to: Government College University Faisalabad. Downloaded on August 01,2022 at 08:19:51 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
connected SoftMax layers to have the outputs as the the numeric real value logits into probabilities by taking the
same quantity of classes in our dataset. exponents of each output and normalizing each output number by
3. The weights and other parameters are frozen in the the sum of those exponent value. The non-positive values are
convolutional layers and training is done on the model to taken as positive by the exponential function where the
classify the different types of tomato diseases. probability values are taken between zero and one. The sum of the
4. Initialize the optimization algorithm whose parameters probability values must be equal to one. In the given function
are to be updated during the training process (Equation 1) Zi is the input logit value from ith class and 𝜎(𝑍)i
The main purpose of using transfer learning is to reduce the
gives the probability of the particular class and K is the total
redundancy for creating a new model each time for different
purposes. So, to overcome this problem, a pretrained model is number of classes. The soft-max layer outputs a value of
used which has already been trained over thousands of images probability distribution which sums to 1. The class carrying the
[15]. Since the concept of image classification, the ResNet model highest probability can become the resultant class. Here class
also known as the base network would have already extracted refers to anyone's disease among the others.
some features of images such as corners, edges, and shapes. So,
the feature extraction part is done in the bottleneck block and only 𝑒 𝑧𝑖
the classification part is left. When the model is imported, the σ(𝐳)𝑖 = 𝑧𝑗 𝑓𝑜𝑟 𝑖 = 1, … , 𝐾 𝑎𝑛𝑑 𝐳 = (𝓏1 , … . , 𝓏𝐾 ) ∈ ℝ𝐾
∑𝐾
𝑗=1 𝑒
weights remain freeze, bias, and other hyper parameters since our
classification tasks are different. The last layers in the model are -------------------- (1)
modified which are the fully connected layers [11]. V.RESULTS AND DISCUSSIONS.
(iv) Training the model
The proposed model described in section IV is
The ResNet model’s final channel output before the fully
implemented and its performance is evaluated using quantitative
connected layers is 2048. Based on this, a sequential is defined,
metrics such as accuracy and F1-score. Based on the measures,
which consists of fully connected layers with the ReLU activation
the ROC curve is plotted as an observation of the results. At the
function [8], Dropout with 20% probability, and an output Log
first level, the model will classify between a healthy and
SoftMax function. The features obtained in the bottleneck block
unhealthy leaf. If first-level classification results in an unhealthy
are given as an input to the 6 fully connected layers since it has
leaf, the second level of classification will predict the type of
six different classes. Now, the 6 fully connected SoftMax layers
disease among five diseases elaborated in Figure 3. Data
are trained to replace the existing fully-connected layers by the
augmentation has been applied to increase the number of images
one trained by us. Gradients have been turned off for all layers
in the training dataset which could make the model more
except the last newly added layer. So, backpropagation will occur
powerful. The model’s accuracy has also been improved due to
only for these last layers, and weights will be updated. The
the increase in the diversity of the data without collecting more
optimizer used is Adam optimizer and it trained the model for 20
data.
epochs. The learning rate is set initially at 0.001 and momentum
At the time of training the model, after each iteration,
is 0.1. The loss criterion used here is NLLLoss and pass this as an
the loss occurred is calculated, gradients are backpropagated
output to correct existing labels.
concerning the loss and model parameters, and at last, the
(v) Classification using CNN
required parameters are updated with the optimizer (Adam). The
The softmax function is the last stage of operation in a
default value of the torch deep learning library for the learning
network since it takes unnormalized log probabilities as inputs
rate (𝛼) is 0.001. After fixing the default learning rate, the value
and it returns the probability distribution over the target classes. It
has been adjusted from high to low and to slow down the rate
is an activation function used for multiclass-classification since
while getting closer to an optimal solution. At the final layer, the
our system classifies five different kinds of tomato leaves disease.
ResNet-50 outputs the value which was taken as an input to the
Hence, it is used in a logistic regression model. The logits layer is
softmax function. Fig.5 gives the log-probabilities of each class as
known as the last neuron layer of the neural network for
compared with the targets. The log-probability distribution is
classification which outputs raw data of real numbers. In our
compared concerning each class and the largest probability
model, these six classes have their respective logits values from
accounts to be a resultant class of an input training image.
the logits layer. To identify the correct class, probabilities must be
calculated using the softmax function. A discrete probability
distribution function is used to calculate each outcome. It turns
Authorized licensed use limited to: Government College University Faisalabad. Downloaded on August 01,2022 at 08:19:51 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
Table 2 Overall Confusion Matrix for all Six (6) Classes before and after
Fig. 6 Plot of training and validation loss against epochs before and after
data augmentation. data augmentation.
Authorized licensed use limited to: Government College University Faisalabad. Downloaded on August 01,2022 at 08:19:51 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Communication and Electronics Systems (ICCES 2020)
IEEE Conference Record # 48766; IEEE Xplore ISBN: 978-1-7281-5371-1
[4] S.Veni, Aishwarya Mala, P.M. Vishnu Priya, R. Anusha and Ashwini
Kayartaya. “Computer Aided System For Detection and Classification Of
Brinjal Leaf Diseases Using Thermal and Visible Light Images.” Journal
of Theoretical and Applied Information Technology, JATIT, Department
of Electronics and Communication Engineering, Amrita Vishwa
Vidyapeetham, 2017.
[5] Jiachun Liu, Shuqin Yang,Yunling Cheng and Zhizhuang Song,
“Plant Leaf Classification Based on Deep Learning.” Proceedings 2018
Chinese Automation Congress (CAC 2018), IEEE, pp.3165-3169, 2018.
[6] Peng Jiang, Yuehan Chen, Bin Liu, Dongjian He and Chunquan
Liang. “Real-Time Detection of Apple Leaf Diseases Using Deep
Learning Approach Based on Improved Convolutional Neural
Networks.”, IEEE, pp.59069-59080, 2019.
[7]Hoo-Chang Shin, Mingchen Gao, Holger R. Roth, Le Lu, Ziyue Xu,
Jianhua Yao, Isabella Nogues, Ronald M. Summers and Daniel Mollura.
“Deep Convolutional Neural Networks for Computer-Aided Detection:
CNN Architectures, Dataset Characteristics and Transfer Learning.”,
IEEE Transactions on Medical Imaging, IEEE, pp.1285-1298, 2016.
VI. CONCLUSIONS AND FUTURE WORK [8] Fatih Ertam and Galip Aydonn. “Data Classification with Deep
Learning using Tensorflow.” 2rd International Conference on computer
science and engineering, UBMK 2017, IEEE, pp.775-758, 2017.
A tomato leaf disease detection model has been [9] Robert G. de Luna, Elmer P. Dadios and Argel A. Bandala.
developed using PyTorch that uses deep-CNNs. A deep learning “Automated Image Capturing System for Deep Learning-based Tomato
Plant Leaf Disease Detection and Recognition.” Proceedings of
technique with transform and augmentation was used to overcome
TENCON 2018, IEEE, pp.1414-1419, 2018.
the overfitting problem and also improved the model’s [10]S.SanthanaHari, M.Sivakumar, P.Renuga, S.karthikeyan, S.Suriya,
performance. Besides, transfer learning was also used which adds “Detection Of Plant Disease By Leaf Image Using Convolutional Neural
extra benefit to the model i.e., it also has more optimization network”, International Conference on Vision Towards Emerging Trends
options available that fit the model to the required target. The in Communication and Networking (ViTECoN), IEEE, 2019
proposed model yields 97% accuracy after fine-tuning the weights [11] Sarah Ali Abdelaziz Ismael, Ammar Mohammed, Hesham Hefny.
“An Enhanced Deep Learning Approach For Brain Cancer MRI Images
for the ResNet model. Thus, the above model can be used as a
classification Using Residual Networks.”, Department of Computer
tool for farmers to identify the diseases that are present in the Science, Volume 102, January 2020.
leaves of tomato plants. Gaining an accuracy of 96-97%, this [12] Vinit Bodhwania , Umesh Bodhwania, D. P. Acharjya.
model can detect leaf diseases accurately within the shortest “Deep Residual Networks for Plant Identification.”,International
period. However, the training of the model requires high Conference on Pervasive Computing Advances and Applications
configuration hardware due to the number of layers present in the (PerCAA)2019, Procedia Computer Science, pp.186–194, 2019.
[13] Arpan Jain, Quentin Anthony, Ammar Ahmad Awan, Dhabaleswar
ResNet 50 model. So, the training of the model for a new dataset
Panda and Hari Subramoni.“Performance Characterization of DNN
will take more time. These are the major drawbacks of the Training Using Tensorflow and Pytorch on Modern Clusters.”, IEEE
proposed system. To reduce the training time, it is necessary to International Conference on Cluster Computing, ICCC, 2019.
tune the parameters which can be the future scope of the research [14] Aravinth J, Harikrishna K, Anush Bharadwaj and Natarajan
work. Also, the model can be applied for identifying diseases in Vignajeeth. “Classification of Urban Objects from HSR-HTIR data using
other plants like Apple, Potato, Cucumber, Brinjal, etc. CNN and Random Forest Classifier”, International Conference on
Communication and Electronics Systems (ICCES 2018), Department of
Electronics and Communication Engineering, Amrita Vishwa
VII. REFERENCES Vidyapeetham, 2018.
[1] Melike Sardogan, Adem Tuncer, Yunus Ozen. “Plant Disease [15] E. Rezende, G. Ruppert, T. Carvalho, F. Ramos and P. d. Geus,
Detection and Classification Based On CNN with LVQ Algorithm.” 3rd “Malicious Software Classification using Transfer Learning of ResNet-
international Conference on computer science and engineering, pp. 382- 50 Deep Neural Network,” in 16th IEEE International Conference on
385, IEEE, 2018. Machine Learning and Applications, 2017.
[2 ] Aravind Krishnaswamy Rangarajan, Aniirudh Ramesh and Raja [16]. T. Vijayakumar, “Comparative Study of Capsule Neural Network in
Purushothaman, “Tomato crop disease classification using pre-trained Various Applications,” Journal of Artificial Intelligence and Capsule
deep learning algorithm ”, International Conference on Robotics and Networks, Volume 1, pp. 19-27, 2019.
Smart Manufacturing (RoSMa2018), SASTRA Deemed University, pp.
1040–1047,2018.
[3] Kenichi Kobayashi, Masato Noto and Junpei Tsuji. “Evaluation of
Data Augmentation for Image-Based Plant-Disease Detection.”
International Conference on Systems, Man, and Cybernetics, IEEE,
2018.
Authorized licensed use limited to: Government College University Faisalabad. Downloaded on August 01,2022 at 08:19:51 UTC from IEEE Xplore. Restrictions apply.