ACADEMIC RESEARCH SYSTEM / 01

The signal is already there. We help you look closer.

RetinaScan AI is an academic screening system for retinal fundus photographs. It checks image quality, estimates patterns associated with diabetic retinopathy, and shows where the model looked.

  • QC GATE · ACTIVE
  • MODEL ARTIFACTS · NOT INSTALLED
  • PIPELINE · OpenCV → EfficientNet-B0 → Grad-CAM
FIG. 01 — Fundus photograph / model inputRGB · saved to backend/storage/

FIELD NOTE / 02

RETINASCAN AI — A READING INSTRUMENT02 / 07

A photograph can be both ordinary and difficult to read.

A fundus photograph is taken in seconds — in a clinic corridor, lights low, patient tired. Most frames come back ordinary. A few carry quiet changes, a microaneurysm here, a blot hemorrhage there, exudates gathering near the macula, that are easy to miss when the reader is rushed, fatigued, or simply human.

RetinaScan AI was built for that moment. It does not stand in for a clinician's judgement. It organizes attention: it confirms the photograph is readable, screens for patterns associated with diabetic retinopathy, and leaves a visible trace of where the model looked — so a qualified reader can decide what the image really says.

  • ORDINARYA routine photograph, taken in seconds, filed with hundreds like it.
  • DIFFICULTFine vascular changes at low contrast; inconsistent to see, even for experts.
  • SHAREDOne record — quality, probability, attention map — that human and model can both point at.
Close crop of branching retinal blood vessels over warm amber tissue, shown enlarged as a visual detail.
FIG. 02 — Vascular detail, enlargedvisual detail · not a diagnosis

METHOD / 03

From image to insight.

Every screening passes through four stations. Each one writes to the same JSON record, and each one can be inspected on its own.

FOUR STATIONS · ONE RECORD03 / 07
  1. STATION 01 · PRE-ANALYSIS

    Quality gate

    Before any model sees the image, OpenCV checks it. Frames that fail field coverage, illumination, or focus are rejected and logged — never silently interpreted.

    cv2 · field-coverage · luminance-window · blur-variance → reject log

  2. STATION 02 · INFERENCE

    EfficientNet-B0 screening

    Accepted images are preprocessed and read at 224×224 by a calibrated EfficientNet-B0, producing an academic binary screen: patterns associated with diabetic retinopathy, or not.

    torch · efficientnet_b0 · 224×224 · binary head

  3. STATION 03 · INTERPRETATION

    Calibrated confidence

    The raw score is mapped through calibration so the number behaves like a probability. Value, threshold, and model version are written into the record together.

    calibrated p̂ · threshold logged · model-version pinned

  4. STATION 04 · EXPLANATION

    Grad-CAM explanation

    Gradients from the final convolutional block are weighted back onto the image to show where the model attended. An attention map — never proof of a lesion.

    grad-cam · last conv block · upsampled to field

PLATE / 04

Attention, side by side.

One photograph, two views: the image the camera made, and the map the model left behind. Drag the divider — or use arrow keys — when a report exists.

ORIGINAL ↔ GRAD-CAM04 / 07
ORIGINAL
A · ORIGINAL FUNDUS PHOTOGRAPH
MODEL ATTENTION
B · GRAD-CAM OVERLAY
AWAITING REPORT

NO ACTIVE REPORT

Run a screening to see the original image and model attention map here.

Start a screening
Grad-CAM shows model attention, not verified medical lesions.

EVIDENCE / 05

What is verified, and nothing more.

This page presents the project's actual architecture as editorial annotations. No metric, confidence value, or status is displayed unless it comes from a verified artifact on this machine.

MODEL NOT READY — ARTIFACTS ABSENT

  • E.01

    EfficientNet-B0, binary

    A single classification head: patterns associated with diabetic retinopathy, or not. Academic screening, not staging, not diagnosis.

  • E.02

    OpenCV preprocessing & quality gate

    Deterministic checks run before inference. Rejected frames are logged with their failure reason, keeping model errors interpretable.

  • E.03

    Calibrated probability output

    Reported confidence is calibrated; raw logits are never presented as certainty, and the calibration version is pinned to each record.

  • E.04

    JSON-file record store

    Each screening writes one JSON record: image reference, quality result, calibrated probability, model version, Grad-CAM path.

  • E.05

    React + FastAPI, responsive

    A responsive React front end speaks to a FastAPI service — the same code path on a lab monitor or a phone in a corridor.

  • E.06

    Explicit non-goals

    No database, no Docker, no PDF export, no fabricated prediction path. The constraints are part of the honesty of the demo.

EVALUATION LEDGERSOURCE · artifacts/final/evaluation_metrics.json
DATASET
SPLIT
IMAGE SIZE
TRAINING CONFIG
REPORTED METRICS

No verified evaluation output is installed. Exact values will render here only from the file above — dataset, split, image size and training configuration included. Nothing is invented.

JOURNAL / 06

Notes from the bench.

Short working notes on why the system is shaped the way it is.

BENCH LOG · 202506 / 07

NOTE 01 · QC FIRST

Why the quality gate comes first

Most unreliable screening results begin upstream, in the photograph itself. Rejecting unusable frames with OpenCV — before any model sees them — keeps the record honest and the model's failures interpretable.

NOTE 02 · CALIBRATION

What calibration buys a screening

A raw score can rank images but cannot be read as risk. Calibration maps the classifier's output to a probability that behaves like one — and the mapping's version is written into every report.

NOTE 03 · GRAD-CAM

Reading Grad-CAM without over-reading it

An attention map explains the model, not the retina. We publish it beside the same disclaimer every time, because the most dangerous overlay is the one that looks like a diagnosis.

KNOWLEDGE BASE / 07

Frequently Asked Questions

Essential clinical context, technical methodologies, and screening classifications explained.

FAQS · DIABETIC RETINOPATHY & AI07 / 07

What is Diabetic Retinopathy (DR)?

Diabetic Retinopathy is a microvascular complication of diabetes mellitus affecting the retina. Chronic high blood glucose damages retinal capillaries, leading to microaneurysms, intraretinal blot hemorrhages, hard lipid exudates, macular edema, and potential vision loss if left untreated.

How does RetinaScan AI screen fundus photographs?

RetinaScan AI applies a 4-stage pipeline: (1) An adaptive OpenCV image clarity gate with CLAHE microvascular enhancement; (2) A calibrated EfficientNet-B0 deep convolutional neural network for 4-class severity inference; (3) Grad-CAM gradient-weighted class activation heatmaps to highlight pathological attention; and (4) An institutional diagnostic report with print and email delivery.

What are the 4 clinical severity grades assessed by the AI?

The model grades fundus scans into four clinical stages: Stage 0 (No DR / Healthy Retina) with clear microvasculature; Stage 1 (Mild DR) characterized by early microaneurysms; Stage 2 (Moderate DR) marked by hemorrhages and hard exudates; and Stage 3 & 4 (Severe NPDR & Proliferative DR) indicating high-risk neovascularization.

What image types are acceptable for screening?

The system accepts digital posterior-pole retinal fundus photographs (50° field) with a clear view of the macula, optic disc, and major vascular arcades in standard JPEG, PNG, or WebP formats (up to 10 MB).

BEGIN / 08

Begin with one clear image.

Upload a single fundus photograph. The system returns one record: quality result, calibrated probability, attention map — and the disclaimer that belongs with them.

USE FICTIONAL OR CONSENTED DATA · THIS ACADEMIC RESULT IS NOT A DIAGNOSIS.