Skip to content

KrishNachnani/glaucoma-detector-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GlaucoScan.ai

Open-source full stack AI tool for early glaucoma detection from fundus images, optimized for mobile and low-resource clinics.

MIT License Stars Downloads DOI


✨ Key Features

  • πŸ” Glaucoma prediction using lightweight MLP architecture
  • πŸ–ΌοΈ Supports fundus image upload via modern UI (Next.js)
  • βš™οΈ FastAPI backend with modular components for preprocessing, training, and inference
  • 🧠 Energy-efficient model optimized for low-resource clinics
  • 🐳 Docker-ready for fast deployment

πŸ§ͺ Live Demo

Try it: glaucoscan.ai Watch the video demo: YouTube Link


πŸ“¦ Download Inference Demo

Grab the latest lightweight package for local prediction:

Download


πŸ“š Table of Contents

  1. Project Overview
  2. System Architecture
  3. Process Flow
  4. Folder Structure
  5. Quick Start
  6. More Details
  7. Contact

🧩 Project Overview

This repository combines two key components:

  • πŸ”§ glaucoscan-API: FastAPI-based backend for image processing and classification.
  • 🌐 glaucoscan-UI: Next.js frontend for uploading images, getting predictions, and user interaction.

Core Model Architecture

flowchart LR
    A[Retinal Image] --> B[ResNet50\nFeature Extractor]
    B --> C[Feature Vector\n2048-dim]
    C --> D[MLP Classifier]
    D --> E{Prediction}
    E -->|Yes| F[Glaucoma]
    E -->|No| G[No Glaucoma]
    style B fill:#f9d77e,stroke:#333,stroke-width:2px
    style D fill:#a1de93,stroke:#333,stroke-width:2px
Loading

πŸ” Process Flow

graph TD
    A[Raw Retinal Images] --> B[Data Augmentation]
    B --> C[Feature Extraction]
    A --> C
    C --> D[Feature Scaling]
    D --> E[Feature Selection]
    E --> F[Class Balancing\nSMOTE]
    F --> G[Grid Search\nHyperparameter Tuning]
    G --> H[Model Training]
    H --> I[Trained Model]
    style B fill:#f9d77e,stroke:#333,stroke-width:2px
    style F fill:#a1de93,stroke:#333,stroke-width:2px
Loading

πŸ—‚οΈ Folder Structure

Glaucoma/
β”œβ”€β”€ glaucoscan-API/     # Backend: FastAPI service
β”œβ”€β”€ glaucoscan-UI/      # Frontend: Next.js application
β”œβ”€β”€ README.md           # This file

Each subproject includes its own README.md with setup instructions, configuration options, and advanced usage.


πŸš€ Quick Start

Backend (API)

cd glaucoscan-API
pip install -r requirements.txt
python app.py
# API docs: http://localhost:8236/docs

Frontend (UI)

cd glaucoscan-UI
npm install
npm run dev
# Access app at http://localhost:3000

Docker (Optional)

Each component has its own run-docker.sh script:

cd glaucoscan-API && ./run_docker.sh
cd glaucoscan-UI  && ./run-docker.sh

Run Local Prediction Script

You can test the trained model locally without running the full API or frontend.

cd glaucoscan-API
pip install -r requirements.txt
python predict.py

This uses example_input.csv, a sample 2048-dimensional feature vector, and outputs:

Prediction: Glaucoma (class 0)


πŸ”Ž More Details

  • πŸ“˜ API Documentation: See glaucoscan-API/README.md
  • πŸ“˜ UI Documentation: See glaucoscan-UI/README.md

πŸ“¬ Contact

For questions or support, reach out at:


πŸ“ Citation

This software release is archived and citable via Zenodo.

DOI

If you use this work in your research, please cite the following papers:

  1. Energy Efficient Learning Algorithms for Glaucoma Diagnosis
    Proceedings of the 22nd IEEE International Conference on Machine Learning and Applications (ICMLA 2023)
    Krish Nachnani
    DOI: 10.1109/ICMLA58977.2023.00307

  2. Leveraging GAN-based Data Augmentation for Advanced Glaucoma Diagnostics
    In Recent Advances in Deep Learning Applications, CRC Press, Taylor & Francis Group.
    Krish Nachnani
    Available online (Extended version of the ICMLA 2023 paper, with additional results and discussion.)

  3. GlaucoScan v1.1: Lightweight AI for Early Glaucoma Detection (Software)
    Krish Nachnani
    Zenodo, 2025. DOI: 10.5281/zenodo.15567617


πŸͺͺ License

This project is licensed under the MIT License.