URECA · CCEB26087 — Specular Microscopy Analysis Pipeline

Image Quality & ECD Screening Report

Automated summary of the Binary Image Quality and Binary ECD AI models' predictions, alongside real segmented-cell ECD measurements, across the ROCKI / TA-CAT specular microscopy dataset.

Source files: predictions_ImageQuality.xlsx, Grade2Plus_BinaryECDPredictions_ECDValues.xlsx
Subject
Eye
Visit

1 · Image Quality Gate (Binary AI Model)

Every captured frame is screened by the Binary Image Quality AI model before any downstream analysis. Images it predicts Bad are excluded / flagged for manual review; images it predicts Good proceed to the Binary ECD AI model.

2 · ECD Screening

Only images the quality gate predicts Good reach this step. The Binary ECD AI model classifies each as Acceptable or Low ECD directly — this is the model's own fixed decision, not a live threshold you can move; the histogram below plots the real, segmented-cell ECD values for reference against the clinical 1000 cells/mm² cutoff the model was trained on.

Binary ECD AI model decision boundary: 1000 cells/mm² (fixed by training, not adjustable)
Distribution of estimated ECD values (cells/mm²)

3 · Screening Pass Rate by Visit

Share of quality-passing images the Binary ECD AI model classifies as Acceptable at each study visit, for the current filter selection.

4 · Per-Subject Summary

Image counts and pass rate for every subject in the current filter selection. Sort of last resort for spotting subjects worth a closer look.

5 · Regional ECD Map — Baseline vs. Follow-up

Reconstructs the 15-location widefield capture per eye — 1 central, 8 paracentral and 6 peripheral images — as a spatial map, using the three-zone layout from the project's own region diagram (and matching the imaging protocol in Cheong et al., 2025). Box colour is the Binary ECD AI model's Pass/Fail/Excluded call; the number in each box is the real, segmented-cell ECD value, and arrows/deltas compare that real value against the other selected visit — so colour reflects the AI's prediction while every number here is the ground truth. Positions with no captured image for the selected visit are left empty rather than shown as a placeholder.

Subject
Eye
Visit A
Visit B
Assumed location numbering (edit LOCATION_MAP in the script if your capture protocol differs): location 1 = central (blue zone), locations 2–9 = paracentral ring (pink zone), locations 10–15 = peripheral ring (green zone) — kept as three separate regions rather than merged, per the project's region diagram. Filenames only carry a location index, not its physical position, so this mapping is inferred from that layout rather than confirmed against the capture device. The source data also carries cell area, hexagonality (HEX%) and coefficient-of-variation (CV%) per image; only ECD is visualised here.

6 · AI IQ and ECD Screening Color Maps

The 15-location screening result as a single-visit wheel: outer ring = 6 peripheral locations, inner ring = 8 paracentral locations, centre = the 1 central location. Colour is the Binary ECD AI model's own Acceptable/Low decision (after the Binary Image Quality AI model's gate) — not based on computed ECD from segmented cells. Click a segment to highlight it in the preview panel, which shows the captured image and the model's confidence for that location where available.

Subject
Eye
Visit
Outer ring — Peripheral Inner ring — Paracentral Centre — Central
Preview
Click a segment to inspect it

7 · ECD Values Color Map

Same 15-location single-visit wheel as Section 6, but always coloured by the real, segmented-cell ECD value on the 0–3000 scale shown — never the AI prediction. Click a segment to see its captured image and exact ECD value in the preview panel.

Subject
Eye
Visit
Outer ring — Peripheral Inner ring — Paracentral Centre — Central
3000 2500 2000 1500 1000 0
Preview
Click a segment to inspect it

8 · Color Maps of ECD Values over Longitudinal Visits

The same wheel as Section 7, shown across visits side by side — always coloured by the real, segmented-cell ECD value (0–3000 scale), so a genuine change over time is visible at a glance. Compare exactly two visits with a decline callout, or view every visit the subject has at once.

Subject
Eye
1st visit
2nd visit

9 · Data Consistency Notes

The two source files were checked for cross-referencing consistency. These counts are informational — they don't block the report, but are worth resolving at the source.

10 · Predict New Image Coming soon

This report is currently built from pre-computed spreadsheet exports. The plan is to let this page call the two AI models directly: upload a new specular microscopy image, run it through the Binary Image Quality model, and — if it passes — the Binary ECD model, then show the result alongside the rest of this dashboard. Nothing below is wired up yet; it's a placeholder for that integration so the layout exists ahead of time.

Expected output (mockup)
Binary Image Quality AI modelGood / Bad
Binary ECD AI modelAcceptable / Low
Confidence— %
Real ECD (if measured)— cells/mm²
What this needs to go live: an inference endpoint that runs the same two models used to build this report against a freshly uploaded image, returning the same shape of result (qpred/qconf/aipred/aiconf) that build_report.py already produces for every existing record — so the new prediction can reuse this page's existing rendering code (whWedgeColor, the pass/fail categories, etc.) instead of a separate display path.