You are on page 1of 9

Diabetic Retinopathy Using Deep Learning

Yenugonda Prathyusha Ravi Kakarla


Dept. Of Computer Science and Engineering Dept. Of Computer Science and Engineering
Hindustan Institute of Technology and Science Hindustan Institute of Technology and Science
Chennai, India Chennai, India
prathyushayenugonda@gmail.com prathyushayenugonda@gmail.com

J. Swarnalakshmi
Department of Computer Science and Engineering
Hindustan Institute of Technology and Science
Chennai, India
swarnalakshmijr@gmail.com

I. INTRODUCTION
Abstract: Deep learning (DL) enables the creation of
computational models comprising multiple processing
Diabetes is a long-term blood sugar disorder that
layers that learn data representations at multiple levels
of abstraction. In the recent past, the use of deep impairs an individual/s body's capacity to use blood
learning has been proliferating, yielding promising
sugar efficiently. This is primarily due to a decrease
results in applications across a growing number of
fields, most notably in image processing, medical image in insulin synthesis in the body. When the cells stop
analysis, data analysis, and bioinformatics. DL responding to insulin, too much blood sugar is
algorithms have also had a significant positive impact
through yielding improvements in screening, present in the person's bloodstream. This further
recognition, segmentation, prediction, and classification causes health issues such as cardiovascular disease,
applications across different domains of healthcare,
such as those concerning the abdomen, cardiac, loss of eyesight, and renal disease. Hence, the early
pathology, and retina. Given the extensive body of detection of diabetes is crucial as medical
recent scientific contributions in this discipline, a
comprehensive review of deep learning developments in intervention can avert significant repercussions.
the domain of diabetic retinopathy (DR) analysis, viz., Diabetes is classified into Type 1, Type 2 and
screening, segmentation, prediction, classification, and
"Gestational diabetes".
validation, is presented here. A critical analysis of the
relevant reported techniques is carried out, and the Diabetes type 1: Children and teens are most
associated advantages and limitations highlighted,
typically diagnosed with type 1 diabetes. When an
culminating in the identification of research gaps and
future challenges that help to inform the research individual has diabetes type 1, their immune system
community to develop more efficient, robust, and targets the pancreatic cells that produce insulin.
accurate DL models for the various challenges in the
monitoring and diagnosis of DR. Diabetes type 2: Type 2 diabetes is caused when an
individual's body stops reacting to the insulin
keyword: Dataset of retinal images, CNN
produced by the pancreas. The pancreas eventually
quits making enough insulin. It's usually caused by a
mix of hereditary and environmental factors.
fluids. It is important to seek medical help
immediately as if left untreated, it might cause
scarring in the eye. Furthermore, the leaking of these
blood vessels might worsen. Early detection of the
disease can slow down its impact of the disease and
the development of DR into a more advanced
eyesight-threatening form can be prevented.
There are two main stages of DR based on the extent
of damage, these are:

A. NPDR (non-proliferative diabetic retinopathy):


The retinal blood vessels begin to deteriorate during

Gestational Diabetes: also known as Diabetes that is this stage of DR, and minute bulges occasionally

caused during pregnancy. This kind of diabetes is erupt from the smaller arteries, which leads to fluid

caused by hormonal changes that occur during and blood being leaked into the retina. The diameter

pregnancy. of larger retinal vessels might also start to enlarge

Placental hormones can reduce the body's sensitivity and change. NPDR can worsen when more blood

to insulin. This can lead to elevated blood sugar vessels are blocked, going from mild to severe. There

levels during pregnancy. may occasionally be the accumulation of oedema in


the macular region of the retina because of retinal
A. DIABETIC RETINOPATHY blood vessel injury. Treatment is needed if macular
Individuals with diabetes are prone to Diabetic oedema impairs vision to prevent irreversible vision
retinopathy, which is an eye disorder. When this loss. There may occasionally be an accumulation of
happens, elevated blood sugar levels harm the retina's fluid (oedema) in the macular region of the retina
blood vessels. They have the potential to expand and because of retinal blood vessel injury. Treatment is
leak. Alternatively, they could close, preventing needed if macular oedema impairs vision to prevent
blood flow. On the retina, abnormally new blood irreversible vision loss.
vessels can occasionally form. These various changes B. PDR (proliferative diabetic retinopathy):
can adversely affect the eyesight of the person, for a PDR is a serious form of diabetic retinopathy as
visual understanding. Early stages of Diabetic compared to NPDR. It causes the development of
Retinopathy show no significant symptoms. Some new blood vessels in the retina. As these new blood
individuals, however, experience changes in vision. vessels are feeble, the blood fluid might leak from
During the later stages of DR, the retinal blood them into the vitreous that makes up the internal parts
vessels start to leak into the vitreous, which is a gel- of the eye.
like fluid that fills an eye, this leads to the These new blood vessels produce scar tissue, which
development of cobweb like black streaks which is eventually leads to the retina being separated from
mainly caused due to blood clots and other blood the back of the eye. The eyeball may become
pressurized if the new blood vessels obstruct the convolutional neural networks. Starting with
usual drainage of fluid from the eye. Glaucoma can extracting the statistical features of the RGB and then
develop because of this accumulation harming the converting the RGB image to grayscale for image
optic nerve, which delivers images from your eye to filtering, feature extraction by applying edge
your brain. detection and finally, binary conversion of the image
so that the features are highlighted. The statistical
Risk Factors: Factors that can increase the risk of data was taken into consideration for image
developing DR in an individual is: classification with FNN.
a. Poor control of blood sugar level
b. High BP The same is done for DNN and the results were

c. Pregnancy compared. Similarly, the results were also compared

d. Inflated Cholesterol with FNN and DNN for image classification. They

e. The use of Tobacco. achieved 62.7%, 89.6% and 76.4% accuracies in


training and 42%, 86.3% and 78.3% in testing
DR can also lead to various complications, some of accuracies employing neural network
which are: backpropagation methods, deep neural networks, and
1) Vitreous hemorrhage: Vitreous is a clear fluid that convolutional neural networks, respectively, in
is present at the center of the eye. This complication accuracy testing.
occurs when the newly developed blood vessels bleed
2. Revathy et al. presented an ML method which
into the vitreous. An individual might end up seeing a
extracts three features, namely, exudates,
few dark spots if the bleeding is minimal.
hemorrhages and microaneurysms. It classifies DR
2) Retinal detachment: These new blood vessels
using a hybrid classifier which is nothing but a
produce scar tissue, which eventually leads to the
combination of SVM, KNN, Random Forest, Logistic
retina being separated from the back of the eye. This
Regression and Multilayer Perceptron network. It is
leads to vision loss, flashes of light etc.
inferred that the Random Forest Classifier gives an
3) Glaucoma: The pressure in the eye increases when
accuracy of 90% and it is noticed that it shows the
the new blood vessels end up interfering with the
most accuracy when compared to SVM (68%
flow of fluid out of the eye. The optic nerve can
accuracy) and KNN (76% Accuracy). 36 of the 49
result in being damaged due to this pressure.
test samples made the right predictions. The authors
4) Blindness: Conditions such as Diabetic
of this paper [8] have proposed two methods, in the
retinopathy, macular oedema, and glaucoma can lead
first method, they use a shallow neural network
to vision loss.
architecture. For most frequent classes, this model
does well for classification however, it fails to
II. LITERATURE SURVEY
classify the infrequent classes. For the next approach,

1. Suvajit et al., used 1000 retinal pictures which they use transfer learning, which is used to retrain the

were subjected to the back propagation technique in rearmost layer of a deep neural network. The Shallow

neural networks, deep neural networks, and neural network method has an accuracy of 72.35%,
67.05%, and 69.03% on the train, validation, and test
sets respectively. The transferred learning method has
an accuracy of 80.85%, 80.60%, 77.87% for the train
set, validation set and test set respectively. According
to the accuracies that were obtained during the
experimentation we can observe that the second
method gave a better accuracy even for the less Developing a Deep Learning model for Diabetic
frequent classes. Retinopathy involves several steps, from data
collection to model evaluation. Here’s a general
workflow:

3. Khalid et al, collected data from 327 patients using Data Collection:

a random sampling technique with proportional Gather a dataset of retinal images labeled with
allocation. They have used a 10-fold cross-validation diabetic retinopathy stages. Myelinated nerve fiber,

resampling technique that was repeated 100 times. In Preretinal hemorrhage, Normal, VKH disease. This

the end, the accuracy of the respective classifier from dataset should be sufficiently large and diverse to

each iteration is averaged for that specific run. DR capture various manifestations of the disease. dataset

was classified using different methods such as SVM, containing retinal images labeled with diabetic

LDA, KNN, RF and RRF. RRF outperformed the retinopathy stages, as well as other conditions like

other classifiers by achieving an accuracy of 86%. myelinated nerve fiber, Preretinal hemorrhage, and

The algorithm also identified HbA1c and duration of VKH disease, one may embark on a quest through the

diabetes as the most discriminating interpretable vast realm of online data repositories, with Kaggle

features for classifying DR. being a prominent kingdom to explore. Within the
vast corridors of Kaggle's repositories lie datasets that

III. WORK FLOW: may hold the visual tapestry of retinal images
adorned with the intricate patterns of diabetic
retinopathy and its varying stages, alongside the
peculiar manifestations of myelinated nerve fiber,
Preretinal hemorrhage, and VKH disease.

Data Preprocessing:

Preprocess and augment your diabetic retinopathy


dataset. Split the data into training, validation, and
test sets. Preprocessing is done through resize method
and grayscale image.

Preprocessing entails the harmonization of disparate


elements within the dataset to foster uniformity and
clarity, akin to refining raw ore into gleaming gold. dividing the pixel values by the maximum intensity
In the context of retinal images, preprocessing may value (e.g., 255 for 8-bit images) or by using
involve several transformative steps, including statistical properties of the dataset, such as mean and
Grayscale conversion standard deviation.

Resizing images ensures uniformity in Grayscale conversion is relevant when working with
dimensionality, akin to sculpting raw marble into color images. In some cases, color information may
uniform blocks. This process not only conserves not be necessary for the task at hand, or using
computational resources but also facilitates seamless grayscale images can reduce computational
integration into machine learning frameworks. complexity.

Preprocessing in Convolutional Neural Networks


(CNNs) is a critical step that prepares raw input data,
Grayscale Conversion
such as images, for effective training and inference.
In the realm of CNNs, preprocessing serves to Grayscale conversion involves converting RGB
enhance the network's ability to extract meaningful images to single-channel grayscale representations.
features from the data while mitigating potential This simplifies the input data while preserving
sources of noise and variance. essential image features, making it suitable for tasks
where color information is not critical.
Resizing is a fundamental preprocessing step aimed
at ensuring uniformity in the dimensions of input Using two algorithms can provide diverse
images. In CNNs, input images often need to have perspectives and potentially enhance the overall
consistent sizes to facilitate efficient computation and performance of your model. For example, let's
parameter sharing across layers. Resizing also helps consider utilizing a Convolutional Neural Network
prevent computational inefficiencies and memory (CNN) and a pre-trained model like VGG16 in
constraints. Typically, images are resized to a tandem for image classification tasks. Here's how you
predetermined fixed size, such as 224x224 pixels or can approach it:
256x256 pixels, depending on the requirements of the
CNN architecture being used. Design and implement a custom CNN architecture
tailored to your specific task and dataset. You can
Normalization: define multiple convolutional layers, pooling layers,
and fully connected layers based on the complexity of
Normalization standardizes the pixel values of input
your data and the target classes.
images to a common scale, usually within the range
of [0, 1] or [-1, 1]. This step aids in stabilizing the Convolutional neural network
training process by ensuring that input features have
similar magnitudes, which helps prevent issues such Custom CNN architecture

as vanishing or exploding gradients during back


Design and implement a custom CNN architecture
propagation. Normalization can be performed by
tailored to your specific task and dataset. You can
define multiple convolutional layers, pooling layers,
and fully connected layers based on the complexity of
your data and the target classes.

Freezing Pretrained Layers

Freezing pretrained layers in a CNN involves


retaining the knowledge learned from a large dataset
during transfer learning. After loading a pretrained
model, new task-specific layers are added on top. To
prevent altering the pretrained layers, their weights
are set to be non-trainable, ensuring that only the
newly added layers are adjusted during training. This
Collecting a dataset of retinal images involves
practice helps prevent overfitting to the limited data
gathering a large set of high-quality images of the
of the new task, leveraging the general features
human retina for various purposes, such as medical
already captured. The frozen layers act as powerful
research, diagnostic tool development, or training
feature extractors, maintaining their ability to
machine learning models.
recognize patterns and structures from the original
Converting RGB (Red, Green, Blue) images to
training. This approach is particularly beneficial
grayscale is a common preprocessing step, especially
when working with smaller datasets, as it maximizes
in image analysis tasks.
the utilization of the pretrained model's learned
K-means clustering is a popular unsupervised
representations. The frozen layers serve as a robust
machine learning algorithm used for image
foundation, enhancing model performance and
segmentation and grouping similar data points. In the
speeding up convergence during training. The frozen
context of retinal images, K-means clustering can be
layers are typically chosen based on their position in
applied to group pixels or regions with similar
the network, considering whether they capture
characteristics.
generic or task-specific features. Overall, freezing
Fuzzy C-means (FCM) is a clustering algorithm that
pretrained layers is a strategic technique in transfer
is particularly useful for image segmentation tasks.
learning that strikes a balance between utilizing
Unlike the traditional K-means algorithm, Fuzzy C-
existing knowledge and adapting to a new task.
means allows each data point (in this case, pixels in a

classification retinal image) to belong to multiple clusters with


varying degrees of membership. FCM assigns a
classification is done through the GUI (Graphical membership value to each pixel for each cluster,
user interface) load the image and preprocess the indicating the degree to which the pixel belongs to
image and segmentation and classify the retinal that cluster.
image. Predicting diabetic retinopathy from retinal images
using Convolutional Neural Networks (CNNs)
CNN Architecture:
involves leveraging the power of deep learning to
automatically identify pathological changes meticulously annotated for accurate labeling.
associated with diabetes in the retina. Diabetic Subsequently, extensive data preprocessing
retinopathy is a common complication of diabetes techniques are applied to standardize image sizes,
and can lead to vision impairment or blindness if not normalize pixel values, and augment the dataset to
detected and treated early. CNNs excel in learning enhance variability and robustness. These preparatory
hierarchical features from images, making them well- steps ensure that the CNN model receives high-
suited for tasks like image classification. In this quality input data representative of real-world
context, the CNN is trained on a dataset of labeled scenarios. Following data preparation, a suitable
retinal images, where each image is categorized CNN architecture is selected based on factors like
according to the severity of diabetic retinopathy. The model complexity, performance, and computational
network learns to recognize distinctive patterns, such efficiency. with pre-trained models. This
as microaneurysms, hemorrhages, or exudates, initialization provides the model with a strong
allowing it to make predictions based on unseen foundation of learned features, which can be fine-
images during the testing phase. tuned to adapt to the specifics of diabetic retinopathy
During the training process, the CNN optimizes its classification. Through iterative training iterations,
internal parameters to accurately map retinal image the CNN learns to extract discriminative features
features to diabetic retinopathy severity levels. The from retinal images, enabling accurate classification
model's ability to generalize to new, unseen data is of diabetic retinopathy severity levels.
crucial for its effectiveness in clinical applications. Once the CNN architecture is defined and initialized,
Once trained and validated, the CNN can be the model undergoes training using the prepared
employed to predict the severity of diabetic dataset. During training, optimization algorithms
retinopathy in new retinal images, aiding healthcare such as stochastic gradient descent (SGD) or Adam
professionals in early diagnosis and timely are employed to minimize a chosen loss function,
intervention. This approach holds the potential to typically categorical cross-entropy, which quantifies
enhance the efficiency of diabetic retinopathy the disparity between predicted and ground-truth
screening programs, particularly in resource- labels. Regularization techniques, including dropout
constrained environments, by providing a computer- and batch normalization, may also be applied to
aided tool for identifying and prioritizing cases that prevent overfitting and improve generalization
may require further examination by medical experts. performance. The training process is carefully
monitored using a separate validation dataset,
Methodology allowing for early detection of overfitting and fine-
In developing a deep learning model for Diabetic tuning of hyperparameters as necessary. Finally, the
Retinopathy (DR) using Convolutional Neural trained CNN model is evaluated on an independent
Networks (CNNs), the methodology involves several test set to assess its performance metrics, such as
critical steps. Firstly, a robust dataset comprising accuracy. Ethical considerations regarding patient
diverse retinal images, encompassing both normal privacy and data security are paramount throughout
and diabetic retinopathy cases, is collected and the entire methodology, ensuring compliance with
regulatory standards and guidelines governing retinopathy.” Diabet Med, vol. 36, no. 4, pp.424-433,
medical data usage. 2019.
Output [4] W.W. Pan, F. Lin, and P.E. Fort, “The innate
immune system in diabetic retinopathy,” Prog Retin
Eye Res, vol. 84, pp. 100940, 2021.
[5] R. Simó et al., “Non-traditional systemic
treatments for diabetic retinopathy: an evidence-
based review,” Curr Med Chem, vol.22, no.21, pp.
2580-2589, 2015.
[6] Suvajit Dutta, Bonthala Manideep, Muzamil
Basha, Ronnie Caytiles, and N. C. S. N Iyengar,
“Classification of Diabetic Retinopathy Images by
Using Deep Learning Models.” International Journal
of Grid and Distributed Computing, vol. 11, no.1, pp.
89-106.2018.
[7] R, Revathy, “Diabetic Retinopathy Detection
using Machine Learning.” International Journal of
Engineering Research, vol 9. N. pag., 2020.
[8] Z. Hangwei, E. Nabil,“Classification of Diabetic
Retinopathy via Fundus Photography: Utilization of
Deep Learning Approaches to Speed up Disease
Detection.”,arXiv preprint arXiv:2007.09478. 2020.
[9] K. M. Alabdulwahhab, W. Sami, T. Mehmood, S.
A. Meo, T. A. Alasbali, and F. A. Alwadani,
“Automated Detection of Diabetic Retinopathy Using
Machine Learning Classifiers.” European Review for
Reference Medical and Pharmacological Sciences, vol. 25, no.
[1] A.T. Kharroubi and H. M. Darwish. “Diabetes 2, pp. 583-
mellitus: The epidemic of the century.” World J 590, 2021.
Diabetes, vol 6 no 6, pp.850-67, 2015. [10] Asia-Pacific Tele-Ophthalmology Society
[2] A.B. Olokoba, O. A. Obateru and L.B. (APTOS) blindness dataset Aravind Eye Hospital &
Olokoba,“Type 2 diabetes mellitus: a review of PG Institute of Ophthalmology Aug. 2019, Available
current trends.” Oman Med J., vol. 4, pp.269-73, at: https://www.kaggle.com/competitions/aptos2019-
2012. blindness-detection/data
[3] Sivaprasad S, Pearce E. “The unmet need for [11] Tan, Mingxing and Qu oc V. Le. “EfficientNet:
better risk stratification of non-proliferative diabetic Rethinking Model Scaling for Convolutional Neural
Networks.” ArXiv abs/1905.11946 (2019): n. pag.
[12] M.W. Nadeem, H.G. Goh, M. Hussain, S.Y.
Liew, I. Andonovic, M. A. Khan, “Deep Learning for
Diabetic Retinopathy Analysis: A Review, Research
Challenges, and Future Directions,” Sensors, vol. 22,
no. 18, pp. 6780-6780, 2022.
[13] Parul Dubey and Pushkar Dubey,“Expand
Patient Care with AWS Cloud for Remote Medical
Monitoring” in Next Generation Healthcare Systems
Using Soft Computing Techniques: CRC Press2022,
pp. 137-148.
[14] R. Patel, A. Chaware, “Transfer Learning with
Fine-Tuned MobileNetV2 for Diabetic Retinopathy.”
in Proc. of the 2020 International Conference for
Emerging Technology (INCET). Belgaum,
India,2020, pp. 1–4.

You might also like