Skip to content

shaischaudhry/AI-ROP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-ROP

Automated Diagnosis of Retinopathy of Prematurity in Infants using Multi-Level Classification

AI-ROP is an AI-powered diagnostic tool for the early detection and classification of Retinopathy of Prematurity (ROP) in premature infants. It uses deep learning and image processing techniques to analyze retinal fundus images and classify them into three clinically relevant categories:

  • Healthy
  • ROP (Retinopathy of Prematurity)
  • RD (Retinal Detachment)

Demo

Watch the application in action:

https://github.com/shaischaudhry/AI-ROP/blob/main/demo.mp4

Features

  • Real-time retinal image classification with confidence scoring
  • Weighted ensemble of Xception, DenseNet, and InceptionV3
  • Vessel segmentation module for enhanced feature focus
  • User-friendly web interface built with React and Material-UI
  • Flask backend API for model inference
  • Robust preprocessing using OpenCV and image enhancement techniques
  • Data augmentation and management using RoboFlow

Technologies Used

Frontend

  • React with TypeScript
  • Vite for development and building
  • Material-UI for modern UI components
  • Tailwind CSS for styling

Backend

  • Python Flask API
  • TensorFlow, Keras for deep learning models
  • OpenCV, Pillow for image processing
  • NumPy for numerical computations

Development & Training

  • Google Colab, Kaggle, Jupyter Notebook (Model Training)
  • RoboFlow for data management

System Architecture

  • Web Interface (React): Modern, responsive UI for image upload and result visualization
  • Flask API Backend: RESTful API handling image processing and model inference
  • Image Processing Module: Resize, normalize, denoise, contrast enhancement, vessel segmentation
  • Model Integration: Weighted soft voting among Xception, DenseNet, InceptionV3 for robust predictions

Application Workflow

  1. Upload Fundus Image via web interface
  2. Preprocessing: Resize, normalize, segment vessels
  3. Initial Classification: Healthy vs Unhealthy
  4. Secondary Classification: ROP vs Retinal Detachment if Unhealthy
  5. Display Results: Visual feedback with diagnosis and confidence score

Project Files

Core Application

  • app.py - Main Flask backend application
  • AIROP.py - Core AI-ROP classification module
  • 1M_AIROP.py - Enhanced version with additional features

Jupyter Notebooks

  • all-augmented-classification.ipynb - Complete classification pipeline with data augmentation
  • healthy-augmented-classification.ipynb - Healthy vs unhealthy classification
  • collage-vessel-segmentation.ipynb - Vessel segmentation techniques
  • overlay-vessel-segmentation.ipynb - Advanced vessel overlay methods

Frontend

  • src/ - React TypeScript application source code
  • package.json - Node.js dependencies and scripts

Backend

  • backend/ - Flask application and model files
  • requirements.txt - Python dependencies

Use Cases

  • NICUs: Early detection for prompt treatment
  • Remote Clinics/Telemedicine: AI-supported diagnosis without specialists
  • Research and National Screening Programs

Getting Started

Prerequisites

  • Node.js (for frontend)
  • Python 3.8+ (for backend)
  • TensorFlow 2.x

Installation

  1. Clone the repository
git clone https://github.com/shaischaudhry/AI-ROP.git
cd AI-ROP
  1. Install frontend dependencies
npm install
  1. Install backend dependencies
cd backend
pip install -r requirements.txt
  1. Run the application
# Start backend (from backend directory)
python app.py

# Start frontend (from root directory)
npm run dev

Acknowledgements

Clinical support and dataset provided by:

  • Dr. Tayyaba Gul Malik, Head of Ophthalmology, Lahore General Hospital

License

This project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

License: CC BY-NC-ND 4.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published