RetinaX: AI-Powered Diabetic Retinopathy Screening

💡 Inspiration

Diabetic retinopathy is an eye condition associated with diabetes that can damage the retina and potentially lead to vision loss. Early screening can help identify people who may need further eye examinations.

We were inspired by the potential of artificial intelligence to analyze retinal fundus images and provide visual explanations for model predictions. This led us to develop RetinaX, an AI-assisted screening prototype that combines deep learning with explainable AI.

Our goal is to explore how AI can make retinal image analysis more understandable and accessible.


🔍 What It Does

RetinaX analyzes retinal fundus images using a deep learning model based on ResNet-18 and generates visual explanations using Grad-CAM.

Key Features

  • AI-Based Image Analysis: Processes uploaded retinal fundus images using a trained deep learning model.
  • Prediction Results: Displays the model's predicted output.
  • Grad-CAM Visualization: Highlights image regions that influenced the model's prediction.
  • Web Interface: Provides a user-friendly interface for uploading images and viewing results.
  • Patient Tracking and Appointments: Supports the planned organization of screening-related information and follow-up workflows.

🛠️ How We Built It

We developed RetinaX by integrating a web application with a separate AI inference service.

Technology Stack

Layer Technology
Frontend HTML, CSS, JavaScript
Backend Node.js
AI API Python, FastAPI
Deep Learning Framework PyTorch
Model Architecture ResNet-18
Explainable AI Grad-CAM
Version Control Git and GitHub

Workflow

  1. The user uploads a retinal fundus image through the web interface.
  2. The Node.js application sends the image to the AI service.
  3. The FastAPI service preprocesses the image.
  4. The ResNet-18 model generates a prediction.
  5. Grad-CAM generates a heatmap to visualize regions influencing the prediction.
  6. The result is returned to the web interface for display.

The classification workflow can be represented as:

$$ \text{Fundus Image} \rightarrow \text{Preprocessing} \rightarrow \text{ResNet-18} \rightarrow \text{Prediction} $$

The explainability workflow is:

$$ \text{Feature Activations} + \text{Gradients} \rightarrow \text{Grad-CAM Heatmap} $$


🚧 Challenges We Ran Into

During development, we encountered several challenges:

  • Technology Integration: Connecting a Node.js application with a Python-based AI service.
  • Model Management: Managing the trained model checkpoint separately from the source code.
  • Environment Configuration: Resolving dependencies and configuring the Node.js and Python environments.
  • Model Explainability: Integrating Grad-CAM to visualize regions that influence the model's output.
  • Deployment: Understanding hosting requirements for the frontend, Node.js backend, and AI inference service.

These challenges helped us understand the importance of integration, testing, and deployment in real-world AI applications.


🏆 Accomplishments We're Proud Of

We are proud to have:

  • Combined deep learning and web development in one project.
  • Integrated a ResNet-18-based image classification approach with an explainability technique.
  • Explored Grad-CAM visualizations to make predictions easier to interpret.
  • Organized the project into separate web and AI components.
  • Collaborated as a team and managed the source code using GitHub.

RetinaX helped us move beyond model development and explore the process of building an AI-powered application.


📚 What We Learned

Through this project, we learned:

  • How to integrate a machine learning model into a web application.
  • How ResNet-18 can be used for image classification.
  • How Grad-CAM uses gradients and feature maps to produce visual explanations.
  • How to connect Node.js with a Python FastAPI service.
  • How to manage dependencies, model files, and source code.
  • Why model evaluation, data privacy, and responsible AI practices are essential in healthcare-related projects.

We also learned that a prediction and its heatmap do not establish a medical diagnosis or prove that a model is clinically reliable.


🚀 What's Next for RetinaX?

Our future plans include:

  • Model Evaluation: Evaluate performance using suitable test datasets and metrics such as sensitivity, specificity, precision, recall, and F1-score.
  • Improved Explainability: Refine Grad-CAM visualizations and communicate their limitations clearly.
  • Deployment: Make the complete application accessible through a reliable hosting setup.
  • Better User Experience: Improve image uploads, result presentation, accessibility, and error handling.
  • Patient Workflow: Improve patient tracking and appointment management with appropriate privacy protections.
  • Clinical Validation: Explore external validation and expert evaluation before considering any real-world clinical use.

Our vision is to develop RetinaX into a more reliable, understandable, and responsibly designed AI screening prototype.


👥 Team

  • Nandana (Team Lead)
  • Theja R (Team Member)
  • Feona Varghese (Team Member)
  • Hannath C Shabeer (Team Member)

⚠️ Disclaimer

RetinaX is an educational and experimental prototype, not a clinically validated diagnostic system. Its predictions and Grad-CAM visualizations must not be used to diagnose diabetic retinopathy or guide treatment decisions. Users with concerns about their eye health should consult a qualified eye-care professional.

Built With

  • aptos-2019
  • computer-vision
  • deep-learning
  • explainable-ai
  • grad-cam
  • healthcare
  • image-classification
  • kaggle
  • medical-imaging
  • numpy
  • pillow
  • python
  • pytorch
  • reportlab
  • resnet
  • streamlit
  • torchvision
  • transfer-learning
Share this project:

Updates

Submission history