Darknet-19 Based Decision Algorithm For The Diagnosis of Ophthalmic Disorders

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

DarkNet-19 based Decision Algorithm for the

Diagnosis of Ophthalmic Disorders


Zainoor Ahmad Choudhry Hira Shahid Syed Zohaib Hassan Naqvi
Department of Biomedical Engineering Department of Biomedical Engineering Department of Electronics
Technology Technology Engineering, University of Engineering
University of Engineering and University of Engineering and and Technology Taxila
Technology, Taxila Technology, Taxila Taxila, Pakistan
Taxila, Pakistan Taxila, Pakistan zohaib.naqvi@uettaxila.edu.pk
zainoorah15@gmail.com ihiramalik170@gmail.com

Sumair Aziz Muhammad Umar Khan


Department of Electronics Engineering Department of Electronics Engineering
University of Engineering and University of Engineering and
Technology, Taxila Technology, Taxila
Taxila, Pakistan Taxila, Pakistan
sumair.aziz@uettaxila.edu.pk sa.umarkhan@gmail.com

Abstract— Retinal diseases are identified by conducting In recent years, a considerable amount of work has been
different medical examinations primarily of which are visual done in the field of Artificial Intelligence-based
examinations. One of the key issues in the visual diagnosis of Ophthalmology. In [3], a deep transfer learning method was
diseases is the human error due to poor decision making, for used to classify OCT images of age-related macular
that, an upcoming interdisciplinary technology named degeneration (AMD)and diabetic macular edema (DME).
computer-aided medical diagnostic system provides precise The system yielded an accuracy of 98.6%. In [4], a system
detection and prediction of disease. In our proposed was designed to classify fundus images of diabetic
methodology, images were treated with Contrast Limited retinopathy (DR) Glaucomatous optic neuropathy (GON)
Adaptive Histogram Equalization, and deep features were then
using CNN.V. Bellemo et al. [5] used an ensemble AI model
extracted from the enhanced images. ADASYN was also
applied to acquire a balanced dataset. Support Vector Machine
consisting of a combination of two convolutional neural
classifier was used which yielded a mean accuracy of 93.8%. networks to classify DR and DME and the accuracy obtained
was 97.3% and 94.2% DR and DME respectively. In [6],
Keywords—Artificial intelligence, retinal diseases, deep age-related macular degeneration (AMD) was diagnosed
features, CLAHE, CNN, ADASYN using deep convolutional neural networks yielding an
accuracy of approximately 89%.G. Lim et al. [7] designed a
I. INTRODUCTION system to recognize Ischemic stroke prediction using a 19-
layer VGGNet architecture and yielding an accuracy of
Over the past few years, researchers have turned their
96.6%. In [8], an asymmetric keratoconus (AKC) detecting
attention to improving automatic disease recognition.
system from OCT images with an accuracy of 100% was
Automatic detection is a technology with a broad range of
designed. H. Takahashi et al. [9] proposed a system for
applications, and as such has attracted considerable attention
diagnosing DR from colored fundus images using
from researchers in the last few years. A fully automated
GoogLeNet deep learning neural network Fleiss’ kappa
artificial intelligence approach using deep learning
(PABAK) and yielding an accuracy of 81% and 96%
techniques for automated classification of medical images
respectively. U. Schmidt-Erfurth et al. [10] devised a system
has been utilized in this project. AI incorporates minimal
for detecting age-related macular degeneration (AMD)
human being involvement to accomplish a task. We can say
neovascularization (CNV) or the dry type with geographic
that AI is the kind of human intelligence simulated in a
atrophy (GA) using OCT images and imaging, demographic,
machine. When exposed to a dataset of interest, the system
and genetic input features. This system showed a
first learns and then trains itself to classify disease thus
performance of 0.68 and 0.80 for CNV and GA. In [11], a
possessing cognitive abilities. The system becomes more
Diabetic Retinopathy detecting system using fundus images
efficient and accurate upon improving. The widespread
was presented. This system deployed CNN and yielded a
presence of blindness and vision impairment among all
specificity of 92% and the positive predictive value was
ethnic and racial groups is increasing rapidly with age,
12%. E. Long et al.[12] presented a system for diagnosing
specifically beyond the age of 75 [1]. The pervasiveness of
congenital cataracts using a deep convolutional neural
ocular disorders is posing a consequential economic
network and deep-learning algorithms to create CC-Cruiser.
affliction to healthcare systems and patients. Vision
The system showed an accuracy of 98.87%.In [13], A total of
impairment is now considered a major worldwide health
75 137 publicly available fundus images from diabetic
concern accounting for a loss of normal vision and hence
patients were used to train and test an artificial intelligence
sinking life quality. Eye diseases like diabetic retinopathy,
model to differentiate healthy fundi from those with DR.
Cataract, glaucoma, and age-related macular degeneration
learned features from the global average pooling layer are
are common among people aged 40 years and older [2]. As
extracted, yielding 1024 features. These features were used
these diseases get worse over time, a vision of the human eye
to construct a visualization heatmap and to generate a final
gradually decays. Early diagnosis is obligatory to avoid
image diagnosis through second-level classification models.
complete blindness.
The proposed methodology requires a clear photograph of
eye from which the chromatic and spatial property of the

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE


sclera and iris is extracted. We used various classifiers of A. Data Acquisition
which adaboost classifier which was found to give a The dataset used in this project is called Ocular Disease
substantially high accuracy i.e., about 95% accuracy when Intelligent Recognition (ODIR-5k). It is a publicly available
compared to others k-NN and naive-Bayes [14]. This dataset of colored fundus images collected at different
research will focus on applying novel machine learning hospitals in China. The dataset contains fundus images of
algorithms to automatic analysis of both digital fundus both eyes of 5000 patients with eight different labels as
photographs and OCT in Moorfields Eye Hospital NHS Normal (N), diabetes (D), Glaucoma (G), Cataract (C), Age-
Foundation Trust patients. All patients attending Moorfields related Macular Degeneration (A), Hypertension (H),
Eye Hospital NHS Foundation Trust sites between Myopia (M) And Other Diseases/Abnormalities (O). The
01/01/2007 and 31/01/2017, and who had digital retinal images are taken using a fundus camera that is used to take
imaging (including fundus digital photographs and OCT) as images of the retina of the eye. It has a built-in camera,
part of their routine clinical care, will be eligible for magnifier, and a light source and the images taken can be
inclusion in this study [15]. The experiment conducted viewed on any display device. In our proposed system, a total
employing the top two pretrained convolutional neural of seven classes were used. The other diseases/abnormalities
network (CNN) models on ImageNet. Furthermore, various (O) class was excluded as it included all sorts of images of
performance improvement techniques were employed, i.e., different diseases and images that had noise [20].
fine-tune, optimization, and contrast enhancement.
Maximum accuracy of 88.3% was obtained on the VGG16 B. Preprocessing
model [16]. CNN, VGG16, and InceptionV3 neural network After the acquisition of the publicly available data, the
structures are compared singly and together using a bagging next step was to perform preprocessing of the images to
ensemble, to diagnose eye diseases. All experiments were make the most suitable for further experimentation and to
applied and the result was obtained. It has been shown that obtain the best results. Image enhancement was done to
using a bagging ensemble yields better predictive efficiency amplify the regions of interest of the images which were to
than can be obtained using learning algorithms alone [17]. act as the classifying factors for each class. Hence the
[18] devised an ophthalmic disease recognition system using enhancement of images directly affected the results and
a Convolutional neural network (CNN) after the dataset has efficiency of the system. Contrast Limited Adaptive
been enhanced by Contrast-limited adaptive histogram Histogram Equalization (CLAHE) was applied to the raw
equalization (CLAHE), labeled and augmented. The images and the output showed much-enhanced images. In
accuracy of this system was 80.5%. In [19], and ocular global histogram equalization, the grayscales of the whole
disease detecting system using AUBNet and ResNet for image are re-mapped to obtain a uniform histogram. This
feature extraction is proposed. Feature fusion is performed by process is performed with the assumption that the image has
either Summation, Concatenation, or Multiplication and the a uniform quality. But in many cases, this assumption does
highest accuracy of 93.4% is yielded using ResNet-101.In not hold. For such cases, Adaptive Histogram equalization is
the proposed method, the ODIR-5k dataset was used, used, which divides up the image into several regions and
preprocessing included image enhancement using CLAHE. histogram equalization is applied on each region based on its
Feature extraction was done using DarkNet-19 and the neighboring grayscale values. CLAHE is also a type of
features extracted were then fed into k-Nearest Neighbors adaptive histogram equalization most suitable for fundus
(KNN) classifier after doing class balancing by ADASYN retinal images. The image is divided into corner regions,
which yielded an accuracy of 86.1% and Area Under Curve border regions, and inner regions and then a clip limit is set
(AUC) equal to 98%. so that the resultant histogram does not exceed a specific
height. The resultant pixel of each region is the linear result
II. METHODS AND MATERIALS of a combination of its four nearest regions [21]. Fundus
Figure 1 shows the overview of our system. The first retinal images when treated with CLAHE, the features are
stage is the acquisition of the publicly available ODIR-5K enhanced and the noise due to uneven illumination is reduced
dataset and training the dataset of the images. Based on [22]. In our system, the image was divided into 8 rows and 8
distinctive features of images, different diseases are columns, and the clip limit was set at 0.005. The above-
identified. The foremost requirement for this system was to selected parameters yielded the best results as shown in
design it in a way so that it classifies a maximum number of Figure 2.
eye-related diseases with the least complex methodology. We
were successful in achieving this objective. After extensive
experimentation, the best results were obtained by first
enhancing the original raw images so that the regions of
interest were more prominent and visible. This task was
performed by using one of the most effective image
enhancement tools, Contrast Limited Adaptive Histogram
Equalization (CLAHE). After the images were preprocessed
and enhanced by the above-mentioned technique, the next
step involved feature extraction. In our proposed system,
deep features were extracted using the Neural Network,
DarkNet-19. To balance out the classes, the Adaptive
Synthetic (ADASYN) algorithm was applied to the feature
file. This feature file was then fed into a machine learning C. Feature Extraction
classifier, Cubic SVM classifier, and 10-fold cross-validation For feature extraction, a convolutional neural network
was applied. This proposed system yielded the best accuracy (CNN) called DarkNet-19 was used. A CNN consists of a
and Area Under Curve (AUC) values. combination of convolution layers, pooling layers, fully
connected layers and softmax layers. When a CNN is used as
a feature extractor, as in our case, the convolution layers and
pooling layers are of utmost importance [23]. DarkNet-19 is classifying features using pre-trained CNN DarkNet-19.
a pre-trained CNN consisting of a total of 64 layers. In our These features were fed into a Machine learning classifier
proposed method, the ‘pool5’ layer, which is a pooling layer, and an accuracy of 93.8% and an error rate of 6.2% was
was used for feature extraction. It is the 45th layer of the obtained using Cubic SVM classifier. The area under the
deep network and yielded a total of 512 deep features. curve was also obtained which came out to be 100%. Other
classifiers were also experimented with but they yielded less
D. Adaptive Synthetic (ADASYN) algorithm satisfactory results. These classifiers and their resulting
After feature extraction, the next task was to have a accuracies and error rates are shown in Figure 3. The best
perfectly balanced dataset. Originally, there was a large results were obtained using the ‘pool5’ layer of Darknet19.
difference between different classes with Diabetic However, the ‘conv17’ layer was also experimented with and
retinopathy having a total of 1551 samples and Hypertensive an accuracy of 92.6% was obtained. Some experimentation
retinopathy having the minimum number of classes i.e., 126. was also done by using the fusion of deep features and time
Diabetic Retinopathy acted as the majority class and the rest and frequency domain features and the maximum accuracy
of the classes were minority classes. The minority class was obtained through this was 93.4% with 522 features. A
brought on a level with the majority class to avoid any biased number of validation techniques were used during
classification ass the classifier tends to become more experimentation. The method used for the validation of our
sensitive towards the majority class [24]. For this purpose, results was 10-fold cross-validation. In this technique, the
ADASYN was used. This algorithm works by first dataset is divided into 10 subsets, 9 of which are used for
calculating the degree of imbalance and then calculating the training, and 1 is used for testing. The final results were
amount of synthetic data that needs to be generated for the obtained using 512 deep features on 7 classes and using a 10-
minority class. The synthetic data is generated until the fold cross-validation technique. The confusion matrix is
minority data comes at par with the majority data so that no shown below to give a detailed view of true positive and true
bias occurs during the classification stage [25]. negative classes in Figure 4.

E. Classification:
After feature extraction and application of ADASYN, the
feature dataset was fed to different classifiers and using 10-
fold cross validation in which the dataset is divided into 10
subsets, 9 of which are used for training and 1 is used for
testing. Different classifiers were used but the highest
accuracy was yielded by Cubic SVM. Support vector
machine (SVM) is widely used for biomedical imaging
classification and is considered as a most effective and
efficient method in machine learning [26] Kernel-based
SVM classifier works in way of segmenting data into
different groups that are equal to the number of classes in a
dataset by finding hyperplane that differentiates between
various data points and maximizing variance for multi-class
distinction [27]. Linear SVM and SVM with other kernels
were being experimented however, based on results
computed cubic SVM(C-SVM) outperformed others with an
accuracy of 93.8%, an error rate of 6.2%, and an area under
curve AUC value of 100% was achieved. This technique
showed the best results as compared to all the previous
researches.
III. RESULTS AND DISCUSSIONS
The suggested architecture of the AI-based ocular disease
recognition system first performs preprocessing and image
enhancement using the CLAHE technique and extract
IV. CONCLUSION Deep learning for improved staging of diabetic retinopathy,"
vol. 12, no. 6, p. e0179790, 2017.
The fundamental objective of this project was to design [10] U. Schmidt-Erfurth et al., "Prediction of individual disease
an intelligent system capable of the identification of eye conversion in early AMD using artificial intelligence," vol. 59,
disorders early so that treatment can be done and blindness no. 8, pp. 3199-3208, 2018.
caused by it can be avoided due to delayed detection and [11] Y. Kanagasingam, D. Xiao, J. Vignarajan, A. Preetham, M.-L.
Tay-Kearney, and A. J. J. n. o. Mehrotra, "Evaluation of
analysis. Our motive was to make a system that could artificial intelligence–based grading of diabetic retinopathy in
classify and diagnose a maximum number of ophthalmic primary care," vol. 1, no. 5, pp. e182665-e182665, 2018.
diseases. For this purpose, a publicly available dataset called [12] E. Long et al., "An artificial intelligence platform for the
ODIR-5k was used that had data of six diseases i.e., Diabetic multihospital collaborative management of congenital
Retinopathy, Glaucoma, Cataract, Age-related Macular cataracts," vol. 1, no. 2, pp. 1-8, 2017.
[13] R. Gargeya and T. J. O. Leng, "Automated identification of
Degeneration, Hypertensive Retinopathy, Myopia, and diabetic retinopathy using deep learning," vol. 124, no. 7, pp.
normal retinal fundus images. Preprocessing was done using 962-969, 2017.
CLAHE and deep features were extracted using the DarkNet- [14] M. Prashasthi, K. Shravya, A. Deepak, M. Mulimani, and K. G.
19 neural network. These features were then fed into the Shashidhar, "Image processing approach to diagnose eye
SVM-C classifier which yielded an accuracy of 93.8% and diseases," in Asian Conference on Intelligent Information and
Database Systems, 2017, pp. 245-254: Springer.
an AUC of 100%. Our proposed system provided efficient [15] J. De Fauw et al., "Automated analysis of retinal imaging using
results in detecting a total of seven classes as compared to machine learning techniques for computer vision," vol. 5, 2016.
preciously presented works which had either a smaller [16] A. AKRAM, R. J. T. J. o. E. E. Debnath, and C. Science, "An
number of classes or lower results. This system cannot be automated eye disease recognition system from visual content of
regarded as a fully advanced system as the technology is facial images using machine learning techniques," vol. 28, no. 2,
pp. 917-932, 2020.
ever-growing and changing. Like every system, our system
[17] M. Smaida and S. Yaroshchak, "Bagging of Convolutional
also has space and potential future improvement and Neural Networks for Diagnostic of Eye Diseases," in COLINS,
development. A raspberry pi-based hardware system can be 2020, pp. 715-729.
designed that receives the fundus retinal images and after [18] M. T. Islam, S. A. Imran, A. Arefeen, M. Hasan, and C.
preprocessing and feature extraction, classifies the sample. Shahnaz, "Source and Camera Independent Ophthalmic Disease
Now a day’s wireless technology is rapidly developing. A Recognition from Fundus Image Using Neural Network," in
2019 IEEE International Conference on Signal Processing,
further improvement in this system can be done by using a Information, Communication & Systems (SPICSCON), 2019, pp.
Wi-Fi module through which the fundus images are directly 59-63: IEEE.
transferred from the fundus camera setup to the ophthalmic [19] J. He, C. Li, J. Ye, S. Wang, Y. Qiao, and L. Gu, "Classification
disease classifying system. All these developments can help of Ocular Diseases Employing Attention-Based Unilateral and
us achieve an embedded system that can efficiently classify a Bilateral Feature Weighting and Fusion," in 2020 IEEE 17th
International Symposium on Biomedical Imaging (ISBI), 2020,
maximum number of ophthalmic diseases and reduce the pp. 1258-1261: IEEE.
chance of permanent blindness in people due to late or [20] (2021, February 17). Ocular Disease Recognition Available:
inaccurate diagnoses. https://www.kaggle.com/andrewmvd/ocular-disease-
recognition-odir5k.
REFERENCES [21] A. M. J. J. o. V. s. p. s. f. s. Reza, image and v. technology,
"Realization of the contrast limited adaptive histogram
equalization (CLAHE) for real-time image enhancement," vol.
[1] P. B. America. (2012). Vision Problems in the U.S. Available: 38, no. 1, pp. 35-44, 2004.
http://www.visionproblemsus.org/ [22] A. W. Setiawan, T. R. Mengko, O. S. Santoso, and A. B.
[2] W. H. Organization. (2021). Blindness and vision impairment Suksmono, "Color retinal image enhancement using CLAHE,"
(26 February 2021 ed.). Available: https://www.who.int/news- in International Conference on ICT for Smart Society, 2013, pp.
room/fact-sheets/detail/blindness-and-visual-impairment 1-3: IEEE.
[3] F. Li, H. Chen, Z. Liu, X. Zhang, Z. J. G. s. A. f. C. Wu, and E. [23] Z. Lai, H. J. C. i. Deng, and neuroscience, "Medical image
Ophthalmology, "Fully automated detection of retinal disorders classification based on deep features extracted by deep model
by image-based deep learning," vol. 257, no. 3, pp. 495-505, and statistic feature fusion with multilayer perceptron," vol.
2019. 2018, 2018.
[4] S. Keel, J. Wu, P. Y. Lee, J. Scheetz, and M. J. J. o. He, [24] J. Peng et al., "Evaluation of electrohysterogram measured from
"Visualizing deep learning models for the detection of referable different gestational weeks for recognizing preterm delivery: a
diabetic retinopathy and glaucoma," vol. 137, no. 3, pp. 288- preliminary study using random Forest," vol. 40, no. 1, pp. 352-
292, 2019. 362, 2020.
[5] V. Bellemo et al., "Artificial intelligence using deep learning to [25] J. E. Koh et al., "Diagnosis of retinal health in digital fundus
screen for referable and vision-threatening diabetic retinopathy images using continuous wavelet transform (CWT) and
in Africa: a clinical validation study," vol. 1, no. 1, pp. e35-e44, entropies," vol. 84, pp. 89-97, 2017.
2019. [26] A. R. Bagasta, Z. Rustam, J. Pandelaki, and W. A. Nugroho,
[6] P. M. Burlina, N. Joshi, K. D. Pacheco, T. A. Liu, and N. M. J. "Comparison of cubic SVM with Gaussian SVM: classification
J. o. Bressler, "Assessment of deep generative models for high- of infarction for detecting ischemic stroke," in IOP Conference
resolution synthetic retinal image generation of age-related Series: Materials Science and Engineering, 2019, vol. 546, no.
macular degeneration," vol. 137, no. 3, pp. 258-264, 2019. 5, p. 052016: IOP Publishing.
[7] G. Lim et al., "Feature isolation for hypothesis testing in retinal [27] I. Bibi, J. Mir, G. J. P. Raja, and E. S. i. Medicine, "Automated
imaging: an ischemic stroke prediction case study," in detection of diabetic retinopathy in fundus images using fused
Proceedings of the AAAI Conference on Artificial Intelligence, features," vol. 43, no. 4, pp. 1253-1264, 2020.
2019, vol. 33, pp. 9510-9515.
[8] E. S. Hwang, C. E. Perez-Straziota, S. W. Kim, M. R.
Santhiago, and J. B. J. O. Randleman, "Distinguishing highly
asymmetric keratoconus eyes using combined Scheimpflug and
spectral-domain OCT analysis," vol. 125, no. 12, pp. 1862-1871,
2018.
[9] H. Takahashi, H. Tampo, Y. Arai, Y. Inoue, and H. J. P. o.
Kawashima, "Applying artificial intelligence to disease staging:

You might also like