0% found this document useful (0 votes)
28 views7 pages

Diabetic Retinopathy Detection Using Machine Learn

ratena pradiction using python

Uploaded by

Atchyuth Bommala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views7 pages

Diabetic Retinopathy Detection Using Machine Learn

ratena pradiction using python

Uploaded by

Atchyuth Bommala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Published by : International Journal of Engineering Research & Technology (IJERT)

http://www.ijert.org ISSN: 2278-0181


Vol. 9 Issue 06, June-2020

Diabetic Retinopathy Detection using Machine


Learning
Revathy R1, Nithya B S2 , Reshma J J3 , Ragendhu S S4 ,5 Sumithra M D
1,2,3,4,5
Dept of Computer Science and Engineering
1,2,3,4,5
LBS Institute Of technology For Women, Thiruvananthapuram, Kerala.

Abstract: - Retina screening plays a crucial role in can prevent serious visual impairment and blindness.6 7 While
early detection and management of various ocular retinal screening is essential for patients with diabetes, it
conditions. With the advent of machine learning requires a specialised eye exam which is often inaccessible for
patients. A large percentage of individuals with diabetes forego
techniques, automated systems have shown promise retinal exams and present late in the course of the disease.8–11
in classifying retinal images into different severity Early intervention is the key to mitigation of DR risk factors and
levels of conditions. In this study, we propose a novel damage. As such, early detection is the most promising way of
approach, termed CNN, for the classification of mitigating the damages of DR.
retina screening conditions into moderate, good, and
Artificial Intelligence (AI) and machine learning have recently
average categories. Leveraging deep learning been successfully applied to the autonomous diagnosis of
architectures and extensive dataset training, CNN referable (more than mild) DR. One FDA-approved AI system
demonstrates robust performance in accurately reported sensitivity of 87% and specificity of 90%.12 More
categorizing retinal images.Our method incorporates recently, we reported results of a Pivotal FDA study with 93%
advanced feature extraction mechanisms, enabling sensitivity and 91% specificity for referable DR on images
obtained by a desktop device, and 92% and 94% sensitivity and
precise identification of subtle patterns indicative of specificity, respectively, on images obtained by a portable
different condition severities. Through rigorous camera.13 Additionally, we presented strong efficacy for DR
evaluation on diverse datasets, CNN showcases detection using a portable camera on a separate data set.14
superior performance metrics, including high
accuracy,sensitivity, and specificity. Moreover, its Recent work has shown that otherwise ‘normal’ fundus images
can be informative and predictive when presented to a machine
computational efficiency facilitates seamless learning algorithm.15–17 AI algorithms can interpret subclinical
integration into existing healthcare systems for real- information of the retinal anatomy and make predictions about
time screening applications. The proposed CNN diseases, even those unrelated to the eye—such as chronic
framework represents a significant advancement in kidney disease,15 diabetes,16 and cardiovascular risk factors.17
automated retina screening, offering a reliable tool An additional algorithm was shown effective in predicting
progression to wet age-related macular degeneration (AMD) in
for early diagnosis and management of ocular previously healthy eyes of patients with wet AMD in one eye.18
conditions. Furthermore, machine learning algorithms have been trained to
predict gender information with high accuracy from mere
fundus photography—something previously unattainable with
Keywords:Macula,Retina,Diagnostic tests/Investigation. the standard clinical exam.

I. INTRODUCTION II . LITERATURE REVIEW

Diabetic retinopathy (DR) is a common retinal vascular MD.Prof Paul Mitchel


complication of diabetes mellitus, which is characterised by
retinal microaneurisms, haemorrhages, neovascularisation, and Diabetic retinopathy is a common and specific microvascular
oedema in the retina.1 DR can advance to blindness and is the complication of diabetes, and remains the leading cause of
leading cause of vision loss at the working age. While over 80% preventable blindness in working-aged people. It is identified in
of diabetics develop retinopathy of some degree after 20 years a third of people with diabetes and associated with increased
of the disease,2 more than 90% of the sight-threatening cases risk of life-threatening systemic vascular complications,
can be treated, if found early, in time to prevent loss of sight.3 including stroke, coronary heart disease, and heart failure.
Optimum control of blood glucose, blood pressure, and possibly
Current public health guidelines for individuals with diabetes blood lipids remains the foundation for reduction of risk of
prescribe screening every 12–24 months for the presence of retinopathy development and progression. Timely laser therapy
DR.4 5 Clinical studies have demonstrated that screening can is effective for preservation of sight in proliferative retinopathy
lead to early detection and timely treatment, which ultimately and macular oedema, but its ability to reverse visual loss is poor.
Vitrectomy surgery might occasionally be needed for advanced
IJERTV9IS060170 www.ijert.org 1
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 06, June-2020
retinopathy. New therapies, such as intraocular injection of less convenient method to screen patients so that efficacy in
destructive to the retina than are older therapies, and could be detection of referral diabetic retinopathy is sufficient while
useful in patients who respond poorly to conventional therapy. integration with the flow of care is smooth, easy, simple, and
The outlook for future treatment modalities, such as inhibition cost-efficient. In this research, we described a screening process
of other angiogenic factors, regenerative therapy, and topical for more-than-mild retinopathy through the application of
therapy, is promising. artificial intelligence (AI) algorithms on images obtained by a
portable, handheld fundus camera.
Petri Huhtine, Ph.D
David A Eichenbaum
According to estimations of the World Health Organization
(WHO), there are almost 500M people in the world that suffer To evaluate diabetic retinopathy (DR) outcomes with
from diabetes. Projections suggest this number will surpass ranibizumab (Lucentis, Genentech, Inc., South San Francisco,
700M by 2045 with global prevalence surpassing 7%. This huge CA) treatment in patients with DR and diabetic macular edema
population, alongside people with pre-diabetics, is prone to (DME) at high risk of progression to proliferative disease.
develop diabetic retinopathy, the leading cause of vision loss in Design: Post hoc analysis of the phase 3 RIDE
the working age. While early screening can help prevent most (ClinicalTrials.gov identifier, NCT00473382) and RISE
cases of vision loss caused by diabetic retinopathy, the vast (ClinicalTrials.gov identifier, NCT00473330) clinical trials of
majority of patients are not being screened periodically as the ranibizumab for the treatment of DME.
guidelines instruct. The challenge is to find a reliable steroids Participants: Seven hundred forty-six patients with baseline
and antivascular endothelial growth-factor agents, are and fundus photographs and randomized for treatment.

IJERTV9IS060170 www.ijert.org 2
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 06, June-2020

Fig 1. Normal image and an image with exudates, hemorrhages and


microaneurysms
B. Steps

Input Image

Pre processing

Image Segmentation

Feature Extraction

Classification

Normal Abnormal

Fig 1c) Flow chart of proposed model

III. DATASET AND METHODS a. Pre-processing


In image pre-processing, to find exudates, initially
A. Dataset image from dataset is converted to HSV image. Colour space
This study used publicly available Kaggle Dataset for conversion is converting an image that is represented in one
Diabetic Retinopathy Detection. The database was created colour space to another colour space, the goal being to make
with images taken from publicly available retinopathy the translated image look as similar as possible to the original.
detection datasets. The Kaggle dataset contain 1000 images Red, Blue, Green channels in the given image to Hue,
with diabetic retinopathy and 1000 images without diabetic Saturation, Value. It is useful to extract yellow coloured
retinopathy. From the total images we have chosen 122 images exudates from RGB image when we convert RGB to HSV.
with diabetic retinopathy and 122 normal images. Chosen Then edge zero padding, median filtering and adaptive
abnormal images contains exudates, hemorhages, and histogram equalization is done. Fig 2 shows image before pre-
microaneurysms. processing ang Fig.3 shows image after pre-processing.
The presence of diabetic retinopathy is based on the
appearance, number, spread and size, area of exudates,
microaneurysms, and hemorrhages as shown in
Fig.1.Exudates are the bright areas with the yellowish Colour Space Conversion
appearance which has colour variance from colour of optic
disc in slight range. The ruptured blood vessel contains lipid
causes the occurrence of exudates. The ruptured Edge Zero Padding
microaneurysms in the blood vessels causes the formation of
hemorrhages. Spread of exudates and hemorrhages appear in
severe diabetic retinopathy images which is the last stage of Median Filtering
diabetic retinopathy.

Adaptive Histogram Equalisation

IJERTV9IS060170 www.ijert.org 3
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 06, June-2020

method in which we define a small 'image piece' and use it to


modify a larger image. Here we are masking yellow coloured
([60,255,255]) exudates and optic disc in smoothed image
with blue ([0,0,0255]) colour.
Bitwise AND operations are used in image manipulation and
used for extracting essential parts in the image. Bitwise
operations help in image masking. Image creation can be
enabled with the help of these operations. These operations
can be helpful in enhancing the properties of the input images.
Here we are combining input image with masked image there
by eliminate portions other than optic disc and exudates from
Fig 2 a) Abnormal image before pre-processing original image. Fig 4. Represents abnormal and normal
images after exudate segmentation
Smoothing

Masking

Bitwise-AND
Fig: Flowchart of exudate segmentation
b) Normal image before pre-processing To segment hemorrhages and microaneurysms median
blurring, thresholding, image erosion and image dilation are
performed. Image erosion and dilation are the morphological
operations performed on image. Thresholding partitions an
image into foreground and background. This image analysis
technique is a type of image segmentation that isolates objects
by converting grayscale images into binary images.
Morphological Opening is defined as an erosion followed by a
dilation. Opening can remove small bright spots and connect
small dark cracks. This tends to open up gaps between
features. Morphological erosion sets a pixel to the minimum
over all pixels in the neighbourhood. Morphological dilation
sets a pixel to the maximum over all pixels in the
neighbourhood. Fig
Fig 3 a) Abnormal image after pre-processing 5. represents abnormal and normal images after hemorrhages
and micro aneurysms segmentation. He segmented images are
represented in binary images where white spots in the images
represents the feature vectors or parameters. These parameters
are counted for further classification processes.

Green Channel Extraction

Morphological Opening

Image Compliment
b) Normal image after pre-processing

b. Image Segmentation
After image pre-processing, to segment exudates we Smoothing
have done smoothing, masking and bitwise AND. Smoothing
is employed to remove high spatial frequency noise from
image. Image blurring is achieved by convolving the image Thresholding
with a low-pass filter kernel. Masking is an image processing
Fig: Flowchart of hemorrhages and micro aneurysms segmentation

IJERTV9IS060170 www.ijert.org 4
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 06, June-2020

Fig 5. c) Abnormal images with segmented hemorrhages and


Fig 4. a) Abnormal images with segmented exudates
micro aneurysms

d) Normal images after segmentation.

b) Normal images without exudates c. Feature Extraction


For binary classification, here we are using 2 features, ie,
number of exudates as first parameter and number of
hemorrhages and micro aneurysms as second parameter. That
is, we are counting number of white pixels from the
segmented images and divide it by total number of pixels in
the image.

d. Classification
The k-nearest neighbors (KNN) algorithm is a simple and it is
easy-to-implement focused on supervised machine learning
algorithm. It is mainly used to solve both classification and
regression problems. A supervised machine learning
Fig.5 a) Abnormal images with hemorrhages and micro aneurysms algorithm is one that pointed on labelled input data from user

dataset, directed to learn a function. The function produces an


appropriate output when a new unlabelled data is feed on the
algorithm. KNN captures the idea of similarity which is often
called distance / proximity / closeness. Here we are calculating
the distance between points on a graph. This distance is used to
classify the given data. That is less distance with data point
suggests that higher similarity.
Random Forest: Random forest implies it consists of a large
number of individual decision trees. Decision trees are drawn
upside down with its root at the top. In a decision tree, it
b) Normal images without hemorrhages ang micro contains condition/internal node, based on which the tree splits
aneurysms into branches/ edges. The end of the branch that doesn’t split
anymore is the decision/leaf. The fundamental principle behind
random forest is the wisdom of crowds ie a large number of
relatively uncorrelated models (trees) operating as a
committee will outperform any of the individual constituent
models.
Voting: It is the simplest method of combining the outputs
IJERTV9IS060170 www.ijert.org 5
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 06, June-2020
from multiple machine learning algorithms. Initially we create
two or more standalone machine learning models with our
training dataset. Then a voting classifier can then be used to
combine our standalone models and average the predictions
of the standalone sub-models when a new data is given to the
model for predictions. The predictions of the sub-models can
be weighted by providing weight for each models manually or
heuristically.

IJERTV9IS060170 www.ijert.org 6
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 9 Issue 06, June-2020

dataset, directed to learn a function. The function produces an the condition of image. Then features are calculated and feed
appropriate output when a new unlabelled data is feed on the to both SVM, KNN, Random Forest classifier. Voting of three
algorithm. KNN captures the idea of similarity which is often classifiers are chosen as final prediction . So from the
called distance / proximity / closeness. Here we are extracted feature it directly concludes the disease grade as
calculating the distance between points on a graph. This normal or abnormal. So earlier detection and diagnosis of
distance is used to classify the given data. That is less distance diabetic retinopathy help the patients from blindness and also
with data point suggests that higher similarity. the severe effects of disease can be decreases.
Random Forest: Random forest implies it consists of a large
number of individual decision trees. Decision trees are drawn REFERENCES
upside down with its root at the top. In a decision tree, it
contains condition/internal node, based on which the tree [1] Farrikh Alzami, Abdussalam, Rama Arya Megantara and Ahmad
splits into branches/ edges. The end of the branch that doesn’t Zainul Fanani, “Diabetic Retinopathy Grade Classification based on
split anymore is the decision/leaf. The fundamental principle Fractal Analysis and Random Forest”, International Seminar on
Application for Technology of Information and Communication, 2019.
behind random forest is the wisdom of crowds ie a large [2] Dinial Utami Nurul Qomariah, Handayani Tjandrasa and Chastine
number of relatively uncorrelated models (trees) operating as Fatichah, “Classification of Diabetic Retinopathy and Normal Retinal
a committee will outperform any of the individual constituent Images using CNN and SVM”, 12th International Conference on
models. Information and Communication Technology and System, 2019.
[3] Shailesh Kumar and Basant Kumar “Diabetic Retinopathy Detection
Voting: It is the simplest method of combining the outputs by Extracting Area and Number of Microaneurysms from Colour
from multiple machine learning algorithms. Initially we create Fundus Images”, 5th International Conference on Signal Processing
two or more standalone machine learning models with our and Integrated Networks, 2018.
training dataset. Then a voting classifier can then be used to [4] Mohamed Chetoui, Moulay A Akhloufi, Mustapha Kardoucha ,
“Diabetic Retinopathy Detection using Machine Learning and Texture
combine our standalone models and average the predictions of Features”, IEEE Canadian Conference on Electrical and Computer
the standalone sub-models when a new data is given to the Engineering, 2018.
model for predictions. The predictions of the sub-models can [5] S Choudhury, S Bandyopadhyay, SK Latib, DK Kole, C Giri, “Fuzzy
be weighted by providing weight for each models manually or C Means based Feature Extraction and Classifiaction of Diabetic
Retinopathy using Support Vector Machines”, International Conference
heuristically. on Communication and Signal Processing, April 2016.
[6] Surbhi Sangwan, Vishal Sharma, Misha Kakkar, “Identification of
IV. RESULTS AND DISCUSSION Different Stages of Diabetic Retinopathy” International Conference on
Computer and Computational Sciences, 2015.
[7] Morium Akter, Mohammed Shorif Uddin, Mahmudul Hasan Khan,
Sensitivity is defined as the ability of a test to detect correctly “Morphology based Exudate Detection from Colour Fundus Images in
people with disease. Diabetic Retinopathy” International Conference on Electrical
Sensitivity = TP / (TP + FN) Engineering and Information and Communication Technology, 2014.
Specificity is defined as the ability of a test to exclude [8] Handayani Tjandrasa, Ricky Eka Putra Arya Yudhi Wijaya, Isye
Arieshanti, “Classification of Non-Proliferative Diabetic Retinopathy
properly people without disease condition. based on Hard Exudates using Soft Margin SVM, IEEE International
Specificity = TN / (TN + FP) Conference on Control System, Computing and Engineering,
True positive (TP) is the condition when a test result is November 2013.
positive and individual can detect the disease. True negative [9] V Saravanan, B Venkatalakshmi, Vithiya Rajendran, “Automated Red
Lesion detection in Diabetic Retinopathy” IEEE Conference on
(TN) is the condition when the result is negative and Information and Communication Technologies, 2013.
individual is not diagnosed with the disease. False positive [10] Prof B Venkatalakshmi, V Saravanan, G Jenny Niveditha, “Graphical
(FP) is the condition when a test result is positive and User Interface for Enhanced Retinal Image Analysis for Diagnosing
individual cannot express it. False negative (FN) is the case Diabetic Retinopathy”, 2013.
[11] V. Gulshan, L. Peng, M. Coram, M. C. Stumpe, D. Wu, A.
when the result is negative and individual can have it. SVM Narayanaswamy, S. Venugopalan, K. Widner, T. Madams, and J.
results in 68% accuracy. KNN classifier results in 76% and Cuadros, “Development and validation of a deep learning algorithm
random forest results in 90% accuracy. After voting of three for detection of diabetic retinopathy in retinal fundus photographs.”
Jama, vol. 316, no. 22, p. 2402, 2016.
classifiers, the testing set results in 82% accuracy. Hybrid
[12] R.GargeyaandT.Leng,“Automated identification of diabetic retinopathy
approach produced a precision score of 0.8619,Recall score of using deep learning,” Ophthalmology, vol. 124, no. 7, pp. 962–969,
0.8116 and f-measure score of 0.8028. That is out of 49 test 2017.
samples 36 produced correct prediction. [13] B. Graham, “Kaggle diabetic retinopathy detection competition
report,” https://kaggle2.blob.core.windows.net/forum-
messageattachments/88655/2795/competitionreport.pdf/,August6,2015
V. CONCLUSION ,accessed May 20, 2018.
In this proposed method hemorrhages, exudates and [14] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna,
microaneurysms are detected. For exudate detection green “Rethinking
theinceptionarchitectureforcomputervision,”inProceedingsoftheIEEE
channel extraction, masking, smoothing, bitwise AND are conference on computer vision and pattern recognition, 2016, pp.
done which results in better calculation and extraction of 2818– 2826.
exudates. For detection of hemorrhages and micro aneurysms, [15] M. Lin, Q. Chen, and S. Yan, “Network in network,” arXiv preprint
morphological operations are performed like opening. arXiv:1312.4400, 2013.
[16] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D.
Dilation and erosion operators are performed here. For Erhan, V. Vanhoucke, and A. Rabinovich, “Going deeper with
diabetic retinopathy detection, count the number for MA convolutions,” in Proceedings of the IEEE conference on computer
occurred, count the number of hemorrhages occurred and vision and pattern recognition, 2015, pp. 1–9.
count the number of exudates occurred in the image so we
can decide

IJERTV9IS060170 www.ijert.org 7
(This work is licensed under a Creative Commons Attribution 4.0 International License.)

You might also like