Retinal Disease Classification Using Transfer Learning
Retinal Disease Classification Using Transfer Learning
Abstract—Retinal disease classification of Color Fundus compute the output. In order to improve the accuracy, new
Images using Computational Imaging has been widely accepted. data should be fed to the system, but in case the system has a
This paper proposes a transfer learning approach for Retinal huge dataset, high processing power, and time commitment is
Disease Classification using Deep Learning. Deep learning required to get decent accuracy. In this paper we propose a
methods are widely used due to higher performance and accuracy
but at the cost of time. A large amount of time and processing
system that transfers its knowledge from a relatively pre-
power is required to train a dataset and achieve considerable trained model and implements this on our dataset, to update
accuracy. Transfer learning reduces a load of using huge data-sets, the weights and biases. This knowledge transfer between
thereby reducing the time complexity of the training data. We have machine learning algorithms is known as Transfer Learning.
selected VGG19 model to fine-tune the network for the extraction of The profit of using this methodology is it retains most of the
knowledge. The VGG19 model is fine-tuned with a retinal database. neural architecture of the pre-trained model and tunes the
The results contain accuracy the network on changing various architecture to minimize the loss for the un-trained model.
hyper-parameters like learning rate, number of epochs, optimizer Hence it requires less computing and is much faster as
algorithm to find a suitable set of parameters for higher accuracy. compared to the traditional CNN and Machine Learning
The motivation for using Deep Neural network is the fact that it has
algorithms.
multi-fold benefits like better performance compared to traditional
machine learning techniques, higher accuracy, automated feature II. LITERATURE REVIEW
extraction and easier to design and process.
In a very few decades, biomedical imaging and retinal image
Keywords— Cognitive Intelligence, Deep Neural Networks, computing have gathered the attention of various researcher as
Eye, Knowledge Transfer, Medical Imaging the output of the computation system is considered better than
verbal dictation of the system or other traditional
I. INTRODUCTION methodologies. Prior works in this field are done by [1], [2]
Retina is the photosensitive portion of our eyes which is have used machine learning methods to generate an accuracy
delicate, crucial and responsible for the vision. Even minor of 81-86%, [3] compared popular algorithms to produce and
damage to these tissues can result in symptoms like distorted increase the accuracy in classification, while [4] uses simple
vision, blurry vision and even loss of sight. These symptoms if image processing for detection of defects. This paper uses
left unattended can result in serious diseases like vision transfer learning as it is suitable for small scale data set [5].
impairment or even temporary or permanent loss of sight. The motivation of the proposed system was from [6],
Hence it is very crucial to detect and attend to these diseases according to which VGG19 [7] model showed a decent
to the earliest. There are various different diseases that can be accuracy as compared to other models.
caused due to effects in the retina like Glaucoma, Diabetic III. SYSTEM SPECIFICATION AND OVERVIEW
Retinopathy, Retinal Tear, Retinal Detachment, Macular
Degeneration etc., The rectification of these diseases is A. Hardware Specification
necessary as early as possible. In order to rectify the disease, it When designing a prototype, the performance always depends
is necessary to figure out the type of disease. This paper upon the hardware specifications, the better the hardware, the
provides a solution to this problem by detecting the disease less is the execution time and higher is the processing power
through transfer learning, a deep learning method. Deep there by increasing the overall performance. This section of
Learning requires a lot of data to train and it may require a lot the paper provides a detailed outline of the hardware
of time and memory as well but this is an efficient method specifications that we used to get to the result of this paper.
once the neural network model is trained of the data set The neural net model was designed and deployed on a system
completely. It effectively detects the retinal disease and even with the following specifications.
classifies them, making it easier to cure. The issue that usually
occurs in traditional machine learning models and the neural
network is the time and processing power which is required to
TABLE 1: HARDWARE SPECIFICATIONS The proposed system involves 3x3 convolution layers planted
Sl. No. Specifications one above another in respect of the increasing depth followed
Name Value by two fully connected layers with 4096 nodes in each layer
and one fully connected layer with 1000 nodes which is again
1. Processor Intel Core i5-8300H
followed by a soft-max layer for image classification.
Processor
2. RAM 8 GB DDR4
2666MHz
3. GPU NVIDIA
GEFORCE GTX
1050 Ti
(4GB GDDR5)
B. Software Specifications
PyTorch is a python based neural network computing frame
work. We have used PyTorch to design and execute the neural
network model. PyTorch is completely python based and
hence it is preferred by us as it is very friendly with the native
python based packages like Numpy, Scipy, Python Imaging
Library (PIL) etc., VGG-19 is a pre-trained deep neural model
which is 19 layers deep. We have preferred this model for
fine-tuning our custom dataset and to transfer knowledge as it
is faster and more efficient [8].
The GPU used (Refer table 1) supports Cuda 9.0, which IV. METHODOLOGY
increases efficiency of the model [9].
This section of the paper explains the architecture of the
proposed system and the method incorporated to reach to the
C. Pre-trained Model – VGG19 conclusion.
VGG network was designed in [10], which proposed simple
and effective network architecture for efficient accuracy and
was trained on a million images.
The dataset contains three types of images, healthy, glaucoma C. Identifying the images
and diabetic (Refer to Fig. 5). These images are segregated After getting the desired accuracy, we have saved the trained
into different folders. Here VGG network (Visual Geometric model into a dictionary format which we use for inference on
Group) [11] is used. First we go through preprocessing the required data. In order to predict, we pass the retinal color
followed by extraction of features and then finally fundus image through the model which identifies the features
identification of images. from the image and predicts the retinal disease. The results for
the experimentations are discussed in the next section.
A. Preprocessing of images
V. RESULTS AND DISCUSSION
Since the dataset [12] has less number of images, more images
needs to be created because this helps in increasing accuracy In order to figure out the best preferred hyper parameters,
of the model. We went through the process of data or the optimum hyper parameters, we have used a brute force
augmentation for this purpose. The process of data approach by plotting the epoch vs. accuracy curve at different
augmentation involves rotation, flipping and cropping of frequently used learning rates. The accuracy of the model is
images. This helps in creating more number of images [13]. changed by changing the number of epochs keeping a constant
Not only does it just increase the number of images but also it learning rate. It is observed that greater than 90% (Refer to
increases the overall robustness of the model there by making Table 3) of the accuracy is reached in most cases. The model
it more accurate. successfully classifies the images into healthy, glaucoma and
diabetic (Refer to Fig.8).
B. Extraction of features from image
This step involves extracting specific features from the images TABLE 3: SOFTWARE SPECIFICATIONS
which later will be used in identifying and segregating the
images into healthy, glaucoma and diabetic. For this processes
Epochs Learning Accuracy Loss
VGG-19 [14] network is used, it was created by Oxford. VGG
Rate (%) (%)
can contain 11-19 layers but here all 19 layers are used. This
convolution network is built using layers having size of 3*3. 25 0.1 54.24 20.8
The diagram below gives the description of layers in VGG 50 0.1 65.39 13
[11]. 75 0.1 78.56 8
100 0.1 88.20 7
125 0.1 90.34 6.8
150 0.1 87.64 6.66
REFERENCES
[8] Ananthakrishnan, A., Kanakiva, V., Ved, D., & Sharma, G.
[1] Dong, Y., Zhang, Q., Qiao, Z., & Yang, J.-J. (2018). (2018). Automated Gait Generation for Simulated Bodies
Classification of cataract fundus image based on deep Using Deep Reinforcement Learning. 2018 Second
learning. 2017 IEEE International Conference on Imaging International Conference on Inventive Communication and
Systems and Techniques (IST), 1–5. Computational Technologies (ICICCT), 90–95.
doi:10.1109/ist.2017.8261463 doi:10.1109/icicct.2018.8473310
[2] Triwijoyo, B. K., Heryadi, Y., Lukas, Ahmad, A. S., [9] Liang Deng, Hanli Bai, Dan Zhao, Fang Wang (2016).
Sabarguna, B. S., Budiharto, W., & Abdurachman, E. (2018). Evaluating Multi-core and Many-Core Architectures through
Retina disease classification based on colour fundus images Parallelizing a High-Order WENO Solver. 2016 IEEE
using convolutional neural networks. 2017 International Trustcom/BigDataSE/ISPA , 2167 - 2174. DOI:
Conference on Innovative and Creative Information 10.1109/TrustCom.2016.0333
Technology (ICITech), 1–4.
doi:10.1109/innocit.2017.8319141
[10] Liu, X., Chi, M., Zhang, Y., & Qin, Y. (2018). Classifying
[3] Khalaf, A. F., Yassine, I. A., & Fahmy, A. S. (2016). High Resolution Remote Sensing Images by Fine-Tuned
Convolutional neural networks for deep feature learning in VGG Deep Networks. IGARSS 2018 - 2018 IEEE
retinal vessel segmentation. 2016 IEEE International International Geoscience and Remote Sensing Symposium,
Conference on Image Processing (ICIP), 385–388. 7137–7140. doi:10.1109/igarss.2018.8518078
doi:10.1109/icip.2016.7532384
[4] Raghu Raj P., Gurudatha Pai K., S. S. Shylaja. (2007). [11] Nistor, S. C., Marina, A.-C., Darabant, A. S., & Borza, D.
Algorithmic Approach for Prediction and Early Detection of (2017). Automatic gender recognition for “in the wild” facial
Diseases Using Retinal Images. Computer Graphics, Imaging images using convolutional neural networks. 2017 13th IEEE
and Visualisation (CGIV 2007), 501 - 505. DOI: International Conference on Intelligent Computer
10.1109/CGIV.2007.16 Communication and Processing (ICCP).
doi:10.1109/iccp.2017.8117018
[5] Ling Shao, Fan Zhu, Xuelong Li. (2015). Transfer Learning
for Visual Categorization: A Survey. IEEE Transactions on [12] A.Budai, R. Bock, A. Maier, J. Hornegger, and G.
Neural Networks and Learning Systems, 1019 - 1034. DOI: Michelson, “Robust Vessel Segmentation in Fundus
10.1109/TNNLS.2014.2330900 Images,” International Journal of Biomedical Imaging,
vol. 2013, 2013.
[6] Zhang, Y., Wang, L., Wu, Z., Zeng, J., Chen, Y., Tian, R., …
Zhang, G. (2018). Development of an Automated Screening [13] Sun, T., Wang, Y., Yang, J., & Hu, X. (2017). Convolution
System for Retinopathy of Prematurity Using a Deep Neural Neural Networks With Two Pathways for Image Style
Network for Wide-angle Retinal Images. IEEE Access, 1–1. Recognition. IEEE Transactions on Image Processing, 26(9),
doi:10.1109/access.2018.2881042 4102–4113. doi:10.1109/tip.2017.2710631
[7] Manali Shaha, Meenakshi Pawar. (2018). Transfer Learning [14] Xu, M., Cheng, J., Li, A., Lee, J. A., Wong, D. W. K., Taruya,
for Image Classification. 2018 Second International
A., Wong, P. (2017). Fibroatheroma identification in
Conference on Electronics, Communication and Aerospace Intravascular Optical Coherence Tomography images using
Technology (ICECA), 656 - 660. DOI: deep features. 2017 39th Annual International Conference of
10.1109/ICECA.2018.8474802 the IEEE Engineering in Medicine and Biology Society
(EMBC). doi:10.1109/embc.2017.8037120