Glaucoma Detection in Retinal Fundus Images

U-Net segmentation of optic cup & disc with automated CDR diagnosis.

Domain
Computer Vision
Year
2025
Type
Research report — internal engineering work

This is internal engineering and R&D work, not a client project. It is published to show technical depth — the modelling, evaluation, and tooling behind the AI automation we build for clients. No client is associated with it.

Glaucoma is the second-largest cause of blindness worldwide and needs early diagnosis. This project segments the optic cup and optic disc from retinal fundus images using a U-Net model, then derives a Cup-to-Disc Ratio (CDR) to flag likelihood of glaucoma — a system that works without excessive equipment or specialist time.

Tools & methods

  • Python
  • U-Net (encoder/decoder)
  • OpenCV
  • TensorFlow / Keras
Full technical report

Objectives

  • Segment optic cup and optic disc from fundus images.
  • Compute the Cup-to-Disc Ratio for diagnosis.
  • Evaluate with accuracy, precision, recall and IoU.

Process

  • Preprocess: convert images to a uniform (256×256×1) grayscale format; build image, optic-cup and optic-disc lists by thresholding masks.
  • Build a U-Net from conv/encoder/decoder blocks (conv layers + BatchNorm + ReLU, max-pool down, transpose-conv up with skip connections).
  • Train on the dataset (batch size 2, 25–30 epochs).
  • Predict masks, compute CDR; CDR > 0.4 → high likelihood of glaucoma.

Results

  • High segmentation accuracy (optic disc & cup accuracy > 0.98).
  • Automated CDR-based diagnosis with per-task precision/recall/IoU.

What we took from it

  • Consistent preprocessing (fixed input shape) is critical for U-Net.
  • Skip connections preserve spatial detail for fine segmentation.

From the report

  • U-Net architecture for optic cup & disc segmentation
    U-Net architecture for optic cup & disc segmentation
  • Predicted vs original cup/disc masks
    Predicted vs original cup/disc masks
  • Segmentation metrics with predicted masks
    Segmentation metrics with predicted masks
  • Predicted vs original masks (sample 2)
    Predicted vs original masks (sample 2)
  • Predicted vs original masks (sample 3)
    Predicted vs original masks (sample 3)
  • Predicted vs original masks (sample 4)
    Predicted vs original masks (sample 4)

Filter by category

Every project and study. Showing 25 of 26.

Client engagements

  • OpenInterview marketing site shown on a laptop — upload a résumé to generate a shareable video profile
    Client engagement

    US-based HR technology startup · HR technology & recruitment

    OpenInterview

    OpenInterview is a video interview platform that turns a candidate résumé into a recruiter ready profile with a video introduction availability details and one shareable link. Barakode built the product from résumé parsing and video processing to public profiles and Stripe subscriptions.

    Delivered
    4 services
    Timeline
    August 2024 – November 2024
    • React.js
    • Node.js
    • REST API
    • AI résumé processing
    • Cloud storage

    Platform launched and live at openinterview.me, serving job seekers internationally.

    View case study
  • Beyut Libya real-estate platform on a laptop — sign-in screen with the Add New Property wizard behind it
    Client engagement

    Real-estate marketplace operator · Real estate

    Beyut Libya

    Beyut Libya is a bilingual property marketplace for Libya. Buyers can find verified homes with live filters while agents manage their inventory through a secure admin panel. The platform supports residential and commercial property across the country.

    Delivered
    4 services
    Timeline
    October 2024 – January 2025
    • Next.js
    • React.js
    • Node.js
    • REST API
    • MySQL

    Platform live and operating nationwide at beyutlibya.com.

    View case study
  • Gman tailoring platform dashboard shown on screen
    Client engagement

    Growing tailoring & fashion-retail business · Tailoring & fashion retail

    Gman Stitching Platform

    A full-cycle tailoring and order-management platform: customers, measurements, orders, inventory, billing, and accounting in one system. It replaced a PHP/Laravel application that had become too slow to use and too brittle to change.

    Delivered
    3 services
    Timeline
    January 2023 – March 2023
    • React.js
    • Redux
    • Ant Design
    • Node.js
    • Express.js

    Approximately 70% improvement in application response time after the rebuild.

    View case study
  • Barakah Accounts inventory items screen
    Client engagement

    Restaurant operations team · Hospitality & food service

    Barakah Accounts

    A restaurant ERP built to bring orders, stock, billing, reporting, and the day-to-day handover between front-of-house and back-office teams into one working system.

    Delivered
    3 services
    Timeline
    Live product
    • NestJS
    • PostgreSQL
    • Redis

    Live restaurant ERP available at app.barakahaccounts.com.

    View case study
  • Ophir Jewellery purchase orders screen
    Client engagement

    Jewellery business · Jewellery retail & operations

    Ophir Jewellery ERP

    An ERP for a jewellery operation that brings product records, stock, customer activity, order handling, and business reporting into one calmer working view.

    Delivered
    3 services
    Timeline
    Live product
    • NestJS
    • PostgreSQL
    • Redis

    Live jewellery ERP available at ophir.eaquirstech.com.

    View case study
  • Turner 10 sales workspace screen
    Client engagement

    Real-estate operations team · Real estate

    Turner 10 Real Estate ERP

    A real-estate ERP that gives the team one practical place to follow properties, enquiries, availability, client records, and the internal work that supports every deal.

    Delivered
    3 services
    Timeline
    Live product
    • NestJS
    • PostgreSQL
    • Redis

    Live real-estate ERP available at turner10.eaquirstech.com.

    View case study
  • HMS hospital management purchase returns workspace with settlement, credit note, replacement, and refund summaries
    Client engagement

    Hospital operations team · Healthcare administration

    HMS

    HMS brings hospital administration, patient services, billing, pharmacy, and procurement into one operational workspace. Teams can review daily work and follow supplier purchase returns from a clear shared interface.

    Delivered
    3 services
    Timeline
    Hospital project
    • NestJS
    • PostgreSQL
    • Redis
    View case study

Engineering & AI R&D

This is internal and academic engineering work. Each study includes its full technical report.

Need this kind of capability in a real product?

Tell us the workflow you want to automate and we will map the practical version of it — grounded, reviewable, and connected to the tools you already run.

Contact via WhatsApp+92 300 8698044
Cost Estimator
Message us on WhatsApp