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)
Watch the application in action:
https://github.com/shaischaudhry/AI-ROP/blob/main/demo.mp4
- 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
- React with TypeScript
- Vite for development and building
- Material-UI for modern UI components
- Tailwind CSS for styling
- Python Flask API
- TensorFlow, Keras for deep learning models
- OpenCV, Pillow for image processing
- NumPy for numerical computations
- Google Colab, Kaggle, Jupyter Notebook (Model Training)
- RoboFlow for data management
- 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
- Upload Fundus Image via web interface
- Preprocessing: Resize, normalize, segment vessels
- Initial Classification: Healthy vs Unhealthy
- Secondary Classification: ROP vs Retinal Detachment if Unhealthy
- Display Results: Visual feedback with diagnosis and confidence score
app.py- Main Flask backend applicationAIROP.py- Core AI-ROP classification module1M_AIROP.py- Enhanced version with additional features
all-augmented-classification.ipynb- Complete classification pipeline with data augmentationhealthy-augmented-classification.ipynb- Healthy vs unhealthy classificationcollage-vessel-segmentation.ipynb- Vessel segmentation techniquesoverlay-vessel-segmentation.ipynb- Advanced vessel overlay methods
src/- React TypeScript application source codepackage.json- Node.js dependencies and scripts
backend/- Flask application and model filesrequirements.txt- Python dependencies
- NICUs: Early detection for prompt treatment
- Remote Clinics/Telemedicine: AI-supported diagnosis without specialists
- Research and National Screening Programs
- Node.js (for frontend)
- Python 3.8+ (for backend)
- TensorFlow 2.x
- Clone the repository
git clone https://github.com/shaischaudhry/AI-ROP.git
cd AI-ROP- Install frontend dependencies
npm install- Install backend dependencies
cd backend
pip install -r requirements.txt- Run the application
# Start backend (from backend directory)
python app.py
# Start frontend (from root directory)
npm run devClinical support and dataset provided by:
- Dr. Tayyaba Gul Malik, Head of Ophthalmology, Lahore General Hospital
This project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
