International Academic Publisher
Serving Researchers Since 2012

DL-ML Based Prediction of Diabe Retinopathy Using Fundus Images

DOI : 10.17577/IJERTV15IS020088
Download Full-Text PDF Cite this Publication

Text Only Version

 

DL-ML Based Prediction of Diabe Retinopathy Using Fundus Images

Dr. R. S. Tambe, S. D. Aware, R. S. Chaudhari, A. A. Kasar, D. D. Kulkarni

Department of Computer Science and Design, Engineering Dr. Vithalrao Vikhe Patil College of Engineering, Ahilyanagar, India – 414111

Abstract-Diabetic Retinopathy (DR) is a serious eye disease caused by diabetes and is one of the main reasons for vision loss across the world. If it is not detected early, it can lead to permanent blindness. Most current screening methods depend on manual examination by eye specialists, which is slow, costly, and difficult to access in rural areas. To overcome these limitations, this paper presents an automated system based on Deep Learning (DL) and Machine Learning (ML) for detecting and classifying DR from retinal fundus images. The system uses a Convolutional Neural Network (CNN) to identify different stages of DR such as mild, moderate, and severe with high accuracy. Along with diagnosis, the platform offers patient-friendly features including separate logins for doctors and patients, secure storage of medical history, and an AI chatbot for instant support and guidance. A simple and user-friendly interface makes the system easy to use. The results show reliable performance, proving that the system can provide fast, accurate, and accessible DR screening.

Index TermsDiabetic Retinopathy (DR), Deep Learning (DL), Convolutional Neural Networks (CNN), Machine Learning (ML), Rectified Linear Unit (ReLU).

  1. INTRODUCTION

    Diabetic Retinopathy (DR) is one of the leading microvas-cular complications of diabetes and remains a major cause of preventable blindness worldwide. It occurs when persistently high glucose levels damage the retinal blood vessels, leading to leakage, formation of abnormal vessels, and progressive deterioration of vision [1][3]. Since DR develops gradually and often remains asymptomatic in the early stages, many patients fail to recognize its severity until substantial vision loss begins. With the rapid rise in global diabetes cases, the burden of DR is also increasing, creating an urgent need for efficient screening and monitoring systems [2], [7], [10]. Re- search suggests that a large proportion of diabetic individuals are likely to show signs of DR during their lifetime, reinforcing the importance of early detection and timely intervention [1], [2], [10].

    Conventional screening for DR traditionally relies on oph- thalmologists manually evaluating retinal fundus images to identify lesions such as microaneurysms, hemorrhages, and lipid exudates [2], [4], [7]. Although expert examination is effective, it is often time-consuming, labor-intensive, and requires skilled specialists who may not be readily available in many regions, especially rural or low- resource areas [2], [4]. Additionally, manual grading can lead to variations between specialists due to subjective interpretation, which may affect diagnostic consistency [3], [10]. These challenges highlight the need for automated, accurate, and scalable DR detection

    solutions that can support large populations and reduce the workload on healthcare providers [1], [2], [5].

    Recent advances in Machine Learning and Deep Learning have significantly transformed medical image analysis. Con-volutional Neural Networks have become a preferred model for DR detection due to their strong ability to automatically extract and learn important patterns from retinal images [1], [3], [5], [11]. Multiple studies have demonstrated that DL algo-rithms can identify DR lesions with high accuracy, surpassing many classical image-processing technique [1], [2], [5], [6],

    [10]. Hybrid architectures that combine different DL models further enhance performance by improving lesion detection and minimizing false-positive or false-negative predictions [1], [6], [8]. Techniques such as segmentation networks, attention-based models, and multi- label classification have also been successfully applied to improve lesion localization and stage classification [1], [6], [10]. Despite significant progress in DR detection research, many existing systems have limitations when applied in real-world healthcare environments. Several models focus exclusively on classification accuracy but do not provide essential practical features such as patient profiles, multi- user access, result history tracking, or communication support between doctors and patients [3], [7], [16].

    To address these limitations, this work proposes a DL/ML-based DR detection system that not only focuses on high diagnostic accuracy but also incorporates patient-centric func-tionalities. The system uses CNN-based deep learning models to classify fundus images into DR severity stages and highlight relevant lesions with improved reliability [1], [2], [5], [11]. A dual-portal interface is provided, offering separate access for doctors and patients to ensure efficient workflow management and personalized dashboards [7], [12]. Doctors can upload and review retinal images, analyze model predictions, and monitor patient progress across multiple visits. Patients can view diagnostic reports, track changes in their retinal health, and receive timely updates or reminders [?], [?], [7].An intelligent AI-based chatbot is integrated into the system to help patients understand DR levels, treatment guidelines, general eye-care tips, and frequently asked questions.

    This application paper describes the Proposed Methodol ogy in section II. Section III provides System Architecture and Mathematical Apporoach. Section IV covers Result and Performance Analysis. Section V provides Conclusion And Future Work.

  2. PROPOSED METHODOLOGY

    The proposed methodology introduce an automated diabetic retinopathy detection and it classifies stages of disease by using deep learning techniques.This system aims to help clinicians for early dignosis which help to minimize human errors and provide reliable real-time predictions,the workflow is illustarted in fig.1.

    Fig. 1: Workflow of the Diabetic Retinopathy Detection and Classification System

    1. Data Acq sition

      The proposed system uses a ready-made dataset of fundus images collected from kaggle source publicly available dataset named diabetic retinopathy dataset which contains hospital-acquired images to ensure medical diversity the dataset con-tains total 2750 fundus images and images are labelled for severaity of disease which are classified into 5 stages as healthy,mild, moderated, proliferative and severe the image classes distribution is shown in fig 2.

      Fig. 2: Classification Of Dataset

    2. Data P processing

      The raw fundus images go through the following prepro- cessing steps to improve quality and get the data ready for processing.

      • Resizing and Intensity Normalization: Resizing, ensur- ing that all images maintain the same dimensions and pixel intensity ranges.
      • Noise Reduction: removes any background noise and improves clarity by applying filters.
      • Contrast Enhancement: improves visibility of impor-tant features by enhancing intensity differences between regions.
      • Data Augmentation: Techniques like scaling, rotation, and flipping are applied to images to increase dataset similarity and reduce over-sizing.
    3. N-Based Diabetic Retinopathy Classification

      The convolutional Neural Network (CNN) is applied for automatic feature extraction and classification. The rchitecture contains:

      1. Input Layer: Accepts retinal fundus images and passes the raw pixel intensity data into the network for feature extraction.
      2. Convolutional Layer: Extracts high-level features such as blood vessels, exudates, and microaneurysms by applying learnable filters to capture spatial patterns.
      3. Activation Layer (ReLU): Introduces non-linearity into the model by replacing all negative pixel values in the feature map with zero, allowing the network to learn complex patterns.
      4. Pooling Layer: Reduces the spatial dimensions of the feature maps through down-sampling (e.g., Max Pool-ing), which decreases computational load and controls overfitting.
      5. Flattening: Transforms the multi-dimensional feature maps into a 1D feature vector to prepare the data for the dense layers.
      6. Fully Connected (Dense) Layer: Integrates the global features extracted by the previous layers to map the learned representations to the target classes.
      7. Softmax/Output Layer: Applies an activation function to generate a probability distribution across the output classes:
        • Binary Classification: DR vs. No DR.
        • Multi-class Classifica- tion:Mild,moderate,severe,No DR.
    4. Model Traning and optimization

      The model is trained using a feed-forward neural net-work implemented in PyTorch. Text input patterns are first transformed into numerical features using a Bag-of-Words representation. During training, the network minimizes clas-sification error using the Cross-Entropy loss function and is optimized with the Adam optimizer. Training is carried out for a fixed number of epochs with a predefined batch size and learning rate. After training is completed, the learned model weights, along with the vocabulary and class labels, are saved for future prediction and deployment.

    5. Evaluation Metri

      The trained model is evaluated using a common evaluation measure to check how well it classifies:

      1. Accuracy: Measures the proportion of total predictions that are correct.
      2. Precision: Represents the ratio of correctly predicted positive observations to the total predicted positives.
      3. Recall: Measures the ratio of correctly predicted positive observations to all observations in the actual class.
      4. F1-Score: The harmonic mean of Precision and Recall, providing a balance between the two.
      5. ROC-AUC: Represents the models ability to discrim- inate between classes across all possible classification thresholds.
  3. System Architecture and Mathematical

    Approach

    1. Sys m Architecture

      The proposed system architecture represents an integrated framework for automated diabetic retinopathy detection and severity classification using retinal fundus images. The system is designed to support both patients and doctors through secure login and registration mechanisms, ensuring role-based access control. All authentication details, uploaded images, and diagnostic results are securely maintained in a SQLite database, which acts as the central repository of the system. This database enables reliable data storage and seamless com-munication between user interfaces and backend processing modules while preserving data integrity and confidentiality.

      Once authenticated, patients are allowed to upload retinal fundus images through the patient interface, while doctors can access and review these images via authorized credentials. The uploaded fundus images are stored in the database and forwarded to the image analysis pipeline as system input. Before analysis, the images undergo a pre-processing stage that includes normalization, resizing, and data augmentation. These operations improve image quality, standardize image dimensions, and increase dataset variability, thereby enhanc-ing the robustness and generalization capability of the deep learning model.

      After pre-processing, the refined fundus images are passed to the feature extraction module based on Convolutional Neu-ral Network layers. The CNN automatically learns discrimi-native retinal features such as microaneurysms, hemorrhages, exudates, and blood vessel patterns that are indicative of diabetic retinopathy. These learned features are subsequently used by the severity classification module to determine the stage of the disease. The classification process enables accu-rate differentiation between various severity levels, supporting early diagnosis and timely medical intervention.

      Finally, the predicted results are presented through a unified patient and doctor dashboard that offers clear visualization of diagnostic outcomes. The system generates a comprehensive report containing the severity classification and relevant di-agnostic insights. Additionally, the chatbot is integrated to assist users with basic queries related to the diagnosis and system usage. Overall, the proposed architecture ensures a secure, scalable, and clinically effective solution by integrat-ing authentication, database management, deep learning-based analysis, and user-centric reporting into a single platform.

    2. Mathematical Approach
      1. System Representation: The proposed system is mathe- matically represented as:

        Fig. 3: System Architecture of the Diabetic Retinopathy De- tection System.

        Where: I Input P Processing (CNN model) O Output

        Where I represents a retinal fundus image. Each image is resized and normalized before processing.

      2. Processing (P): Processing is performed using a Con- volutional Neural Network and can be represented as a function:

      Fig. 4 illustrates the training and validation accuracy and loss curves of the proposed CNN model. The curves indicate

      1. stable learning behavior with consistent improvement across epochs.
        • Softmax Classification

      e i (a) curacy (b) L

      yi = C (10)

      j=1 eZj Fig. 4: Training and validation accuracy and loss curves of the

      proposed CNN model.

      C is the number of classes and yi is probability of class i.

      1. Loss unction: The model minimizes categorical cross- entropy loss:
    3. Confusion Matrix Analys

      The confusion matrix in Fig. X illustrates the models classification behaviour across the fie diabetic retinopathy

      (11) classes. Based on the actual class labels, the confusion matrix shows both accurate and inaccurate predictions.

      1. Evaluation Metrics: The performance of the model is evaluated using standard metrics:

      Accuracy =

      Precision + Recall

      Here,TP, TN, FP, and FN denote the number of true positives, true negatives, false positives, and false negatives, respectively.

  4. esults and Performance Analysis

    A. Dataset O rview

    After preprocessing, normalization, and augmentation, the Diabetic Retinopathy Dataset from Kaggle was divided into training, validation, and testing subsets to support multi-class classification of diabetic retinopathy severity. The dataset included five categories representing severity levels: Healthy, Mild DR, Moderate DR, Severe DR, Proliferative DR.

    Dataset Split Healthy Mild Moderate Severe Prolif. Total
    Training 800 296 720 152 232 2200
    Validation 200 74 180 38 58 275
    Testing 200 74 180 38 58 550

    TABLE I: Dataset Split for Multi-Class Diabetic Retinopathy Classification

    Fig. 5: Confusion matrix of the proposed CNN model on the test dataset.

    Observations:

    1. The dominant diagonal values show that the model performs well in all classes, correctly classifying most of the Healthy, Mild, Moderate, Severe, and Proliferative DR samples.
    2. Due to subtle visual differences and overlapping retinal lesion patterns, there is a limited degree of misclassifica-tion between adjacent severity levels, especially between Moderate, Severe, and Proliferative DR classes.
    3. The models strong ability to correctly differentiate be-tween normal and pathological retinal images is demon-strated by the Healthy (No DR) classs highest recall.

    D. Performance Metri

    Table II presents class-wise evaluation metrics derived from the test

    dataset. The model achieved a macro average F1-score of 97.41% indicating balanced classification performance.

    web dashboard.This method minimises human error, lowers manual labour, and provides clinicians with accurate, real-time predictions, all of which promote early diagnosis and better patient outcomes.To improve robustness and lesion bias.

    Future work might train the model on bigger, multi-institutional

    No DR 100.00 100.00 100.00 300
    Mild 99.66 97.33 98.48 300
    Moderate 100.00 93.33 96.55 300
    Severe 94.79 97.00 95.88 300

     

    Class Precision (%) Recall (%) F1-Score (%) Support datasets. By emphasising pathological areas, ex-plainable AI

    methods like Grad-CAM can enhance clinical interpretability. To improve practical healthcare, the system can be expanded to include

    lightweight model deployment for real-time use, multi-disease retinal

    Proliferative 93.13 99.33 96.13 300 screening, and integration with clinical decision support systems.

    TABLE II: Class-wise Performance Metrics

    E. Com rison with Existing Models

    The proposed models performance was compared with existing CNN-based architectures from previous literature. Table

    III highlights that the proposed CNN achieves superior classification accuracy compared to conventional architectures such as VGG16, ResNet50, and the base CNN reported in the reference paper basepaper.

    ACKNOWLEDGMENT

    We would like to express our sincere gratitude to Dr.R.S.Tambe, our guide, for his continuous guidance, support, and encouragement throughout this project. We also extend our thanks to the faculty and staff of the Department of Computer Science and Design, Dr. Vithalrao Vikhe Patil College of Engineering, Ahmednagar, for providing the resources and environment necessary to carry out this research.

    Model Accuracy (%) Source AlexNet 92.80 Springer (2023)

    VGG16 94.50 Springer (2023) REFERENCES

    ResNet50

    Hybrid

    95.47 Springer (2023)

    94.00 IEEE Access (2024)

    [1] A. Jabbar, H. B. Liaqat,

    A. Akram, M. U. Sana, I. D. Azp´roz, I.

    Vision Transformer (ViT)

    D. L. T. Diez, and I. Ashraf, A Lesion-Based Diabetic Retinopathy

    95.00 Vision Transformer DR Study (2023) Detection Through Hybrid Deep Learning Model, IEEE Access, vol.

    Proposed CNN Model 96.23 Proposed Work 12, pp. 4001940036, Mar. 2024.

    [2] T. M. Usman, Y. K. Saheed, D. Ignace, and A. Nsang, Diabetic

    TABLE III: Performance Comparison with Existing Models

    retinopathy detection using principal component analysis multi-label feature extraction and classification, Int. J. Cognit. Comput. Eng., vol. 4, pp. 7888, Jun. 2023.

    F. ummary of Results [3] S. Bhandari, S. Pathak, and S. A. Jain, A literature review of early

    stage diabetic retinopathy detection using deep learning and evolutionary

    Table IV presents the final summary of experimental out- comes. The model demonstrated consistent performance across

    computing techniques, Arch. Comput. Methods Eng., vol. 30, no. 2, pp. 799810, Mar. 2023.

    training and testing

    phases, achieving high generalization

    [4] A. Fatima et al., Deep learning-based multiclass instance segmentation

    for dental lesion detection, Healthcare, vol. 11, no. 3, p. 347, Jan. 2023.

    capability. [5]

    E. Ozbay, An active deep learning method for diabetic retinopathy

    Metric Achieved Value (%)
    Training Accuracy 96.31
    Test Accuracy 97.41
    Precision (Macro Avg.) 97.51
    Recall (Macro Avg.) 97.40
    F1-Score (Macro Avg.) 97.41

     

    detection in segmented fundus images using artificial bee colony algo- rithm, Artif. Intell. Rev., vol. 56, no. 4, pp. 32913318, Apr. 2023.

    1. B. N. Jagadesh et al., classification of diabetic

      Segmentation using the IC2T model and retinopathy using the rock hyrax swarm-

      TABLE IV: Summary of Overall CNN Performance

      These results confirm that the proposed custom CNN ef- fectively distinguishes between NO DR,Mild DR,Moderate DR,Severe DR and proliferative DR and generalizes well

      across unseen samples.

  5. onclusion and Future Work

The suggested system effectively uses CNN-based deep

learning techniques to demonstrate an automated diabetic retinopathy detection framework. The system correctly pre- dicts DR stages like No DR, Mild DR, Moderate DR, and

Severe DR by processing fundus images throgh image clean- ing and feature learning. The results are displayed via a

based coordination attention mechanism, IEEE Access, vol. 11, pp. 124441124460, Nov. 2023.

  1. G. Parthasharathi, R. Premnivas, and K. Jasmine, Diabetic retinopathy detection using machine learning, J. Innov. Image Process., vol. 4, no. 1, pp. 2633, 2022.
  2. P. Madan et al., An optimization-based diabetes prediction model using CNN and bi-directional LSTM in real-time environment, Applied Sciences, vol. 12, Art. no. 3989, 2022.
  3. M. Mujahid et al., Pneumonia classification from X-ray images with

    inception V3 and convolutional neural network, Diagnostics, vol. 12,

    no. 5, p. 1280, May 2022.

  4. N. Tsiknakis et al., Deep learning for diabetic retinopathy detection and

    classification based on fundus images: A review, Comput. Biol. Med., vol. 135, Art. no. 104599, Jan. 2021.

  5. Z. Khan et al., Diabetic retinopathy detection using VGG-NIN a deep

    learning architecture, IEEE Access, vol. 9, pp. 6140861416, 2021.

  6. S. K. Bhoi, Prediction of diabetes in females of Pima Indian heritage: A complete supervised learning approach, Turkish Journal of Computer

    and Mathematics Education (TURCOMAT), vol. 12, pp. 30743084, 2021.

  7. S. Zhu et al., Tortuosity of retinal main and branching arterioles, venules in patients with type 2 diabetes and diabetic retinopathy in

    China, IEEE Access, vol. 8, pp. 62016212, Jan. 2020.

  8. A. K. Gangwar and V. Ravi, Diabetic retinopathy detection using transfer learning and deep learning, in Evolution in Computational Intelligence, vol. 1. Springer, 2020, pp. 679689.
  9. A. Panwar et al., Stratification of the lesions in color fundus images of diabetic retinopathy patients using deep learning models and machine learning classifiers, in Proc. ADCOM, Springer, 2020, pp. 653666.
  10. W. L. Alyoubi et al., Diabetic retinopathy detection through deep learning techniques: A review, Informat. Med. Unlocked, vol. 20, Art. no. 100377, 2020.
  11. A. Sarwar et al., Diagnosis of diabetes type-II using hybrid machine learning based ensemble model, International Journal of Information Technology, vol. 12, pp. 419428, 2020.
  12. H. Zhou et al., Diabetes prediction model based on an enhanced deep neural network, EURASIP Journal on Wireless Communications and Networking, vol. 2020, Art. no. 148, 2020.
  13. H. Naz and S. Ahuja, Deep learning approach for diabetes prediction using PIMA Indian dataset, Journal of Diabetes and Metabolic Disor-ders, vol. 19, pp. 391403, 2020.
  14. P. Saranya and S. Prabakaran, Automatic detection of non-proliferative diabetic retinopathy in retinal fundus images using convolution neural network, J. Ambient Intell. Humanized Comput., pp. 110, Sep. 2020.