Quality Triaged Endothelial Morphometry with Calibrated Confidence
About
Summary
A research algorithm for automated analysis of corneal endothelial specular microscopy images. It estimates three commonly reported endothelial morphometry measurements:
- Cell density (CD) in cells/mm²
- Coefficient of variation (CV) of cell area
- Hexagonality (HEX) as a fraction between 0 and 1
The algorithm also calculates a quality-aware confidence score (%) to identify images for which the measurements may require manual review.
Developed as a deterministic, multi-branch image-analysis pipeline. It combines illumination correction, boundary enhancement, independent watershed segmentations, morphology and topology measurements, image-quality assessment, segmentation-agreement checks, and learned output calibration. The primary measurements do not require a GPU.
Mechanism
The algorithm has not been established as a replacement for clinical interpretation or validated for autonomous diagnosis.
Algorithm description¶
The pipeline performs the following operations:
- Loads a two-dimensional microscopy image and obtains pixel-spacing information when available.
- Converts color images to grayscale and applies conservative illumination and background correction.
- Generates multiple image representations for boundary, contrast, texture, and quality analysis.
- Performs a primary marker-controlled watershed segmentation.
- Performs an independent distance-transform watershed segmentation.
- Compares the segmentation branches and conservatively repairs likely merge errors.
- Measures individual-cell morphology, adjacency, topology, boundary quality, texture, and local gradability.
- Selects a contiguous analysis region containing sufficiently gradable and consistently segmented cells.
- Calculates CD, CV, and HEX from eligible cells.
- Applies learned calibration models and generates quality-aware confidence estimates.
Independent preprocessing, stability, and feature-analysis branches are executed concurrently on CPU. This improves runtime without changing the underlying measurements.
Input details¶
The preferred input is a single two-dimensional .mha image containing a corneal endothelial specular microscopy field.
The underlying pipeline can also read:
.mhdwith its associated.rawfile.tifand.tiff.png
Grayscale and RGB images are accepted. RGB images are converted to grayscale. Three-dimensional images and multipage image stacks are not supported.
Images near the development resolution of 972 × 1296 pixels are preferred, although other two-dimensional resolutions may be processed.
Output details¶
- CD: cells/mm²
- CV: unitless coefficient of variation
- HEX: fraction of eligible cells meeting the configured hexagonality definition
- Confidence: percentage expressing the calibrated probability of measurements being within predefined tolerances when the confidence model is available
Confidence should be interpreted as a quality and review-prioritization signal, not as a guarantee of measurement accuracy.
Interfaces
This algorithm implements all of the following input-output combinations:
| Inputs | Outputs | |
|---|---|---|
| 1 |
Validation and Performance
Internal validation¶
We evaluated the current model using five-fold, slide-grouped cross-validation. Grouping by slide_id helps prevent images from the same slide from appearing in both the training and validation portions of a fold.
The validation table contained 5,988 matched records. Images were divided into three quality groups using the percentage of the image considered gradable:
| Quality group | Internal tier | Gradable portion of image | Records |
|---|---|---|---|
| Low quality | VERY_LOW | Less than 10% | 762 |
| Medium quality | POOR | 10% to less than 50% | 1,460 |
| High quality | GOOD | 50% or greater | 3,766 |
Performance was measured using absolute percentage error. Because a small number of severely degraded images can produce very large errors, median percentage error is the main summary measure.
Confidence is the model's estimated probability that the calibrated result falls within the accepted error range:
- Cell Density (CD): within ±15% of the reference value
- Coefficient of Variation (CV): within ±20% of the reference value
- Hexagonality (HEX): within ±20% of the reference value
Results by image quality¶
| Image quality | Metric | Evaluable records | Raw median error | Calibrated median error | Calibrated mean error | Results within tolerance | Mean confidence |
|---|---|---|---|---|---|---|---|
| Low | CD | 732 | 79.8% | 9.3% | 13.8% | 71.3% | 70.3% |
| Low | CV | 629 | 22.2% | 11.1% | 13.3% | 80.0% | 79.8% |
| Low | HEX | 500 | 54.5% | 9.4% | 11.6% | 85.6% | 81.6% |
| Medium | CD | 1,460 | 14.0% | 7.9% | 12.4% | 77.1% | 77.5% |
| Medium | CV | 1,457 | 14.6% | 9.9% | 12.0% | 83.3% | 82.2% |
| Medium | HEX | 1,447 | 24.3% | 9.1% | 11.6% | 84.6% | 80.4% |
| High | CD | 3,766 | 9.3% | 7.8% | 11.6% | 77.5% | 77.5% |
| High | CV | 3,763 | 14.1% | 9.9% | 12.8% | 80.9% | 80.3% |
| High | HEX | 3,758 | 19.7% | 8.8% | 11.1% | 86.3% | 81.4% |
Overall performance¶
| Metric | Evaluable records | Raw median error | Calibrated median error | Calibrated mean error | Results within tolerance | Mean confidence |
|---|---|---|---|---|---|---|
| CD | 5,958 | 11.9% | 8.0% | 12.1% | 76.7% | 76.6% |
| CV | 5,849 | 14.8% | 10.0% | 12.7% | 81.4% | 80.7% |
| HEX | 5,705 | 21.6% | 8.9% | 11.3% | 85.8% | 81.1% |
Overall confidence by quality¶
| Image quality | Mean overall confidence | Observed results within tolerance |
|---|---|---|
| Low | 75.0% | 76.5% |
| Medium | 79.9% | 81.6% |
| High | 79.7% | 81.6% |
Calibration produced the largest improvement on low-quality images, where the raw segmentation measurements were most vulnerable to incomplete or poorly defined cell borders. Confidence should be interpreted as measurement reliability—not as a diagnosis, disease probability, or assessment of corneal health.
These results are from internal cross-validation on the development dataset. They do not represent independent external or prospective clinical validation. Records without a finite prediction or usable reference value were excluded separately for each metric.
Challenge Performance
| Date | Challenge | Phase | Rank |
|---|---|---|---|
| Aug. 9, 2026 | CLEAR-EC | Phase I: Screening Phase (Preliminary Evaluation) | 7 |
Uses and Directions
Appropriate uses¶
CLEAR-EC may be used to:
- Generate research measurements of endothelial cell density, area variation, and hexagonality.
- Perform reproducible morphometry on compatible specular microscopy images.
- Screen research datasets for potentially ungradable or unreliable images.
- Prioritize low-confidence cases for manual review.
- Compare automated measurements with expert annotations or instrument-derived measurements.
- Support method-development, reproducibility, and retrospective research studies.
Directions¶
- Provide one two-dimensional corneal specular microscopy image.
- Prefer
.mhawith correct physical pixel-spacing metadata. - Avoid resizing, cropping, contrast manipulation, or screenshot conversion before submission.
- Review CD, CV, HEX, and the confidence information together.
- Manually inspect low-confidence or visibly poor-quality cases.
- Confirm pixel calibration before interpreting CD in cells/mm².
Inappropriate uses¶
The algorithm should not be used:
- As the sole basis for diagnosis or treatment.
- To determine surgical eligibility without clinician review.
- For autonomous patient management.
- With OCT, fundus, slit-lamp, histology, or unrelated microscopy images.
- With three-dimensional scans or multipage image stacks.
- When image calibration is unknown and an exact clinical CD measurement is required.
Warnings
- Research use only: CLEAR-EC is not a medical device and has not received regulatory clearance or approval.
- Clinical oversight required: Outputs must be reviewed by an appropriately qualified clinician or researcher.
- Calibration affects CD: Cell density depends directly on the physical pixel size. MHA images should contain correct
ElementSpacingmetadata. For images without usable metadata, the algorithm uses a fallback calibration of approximately 0.7716 µm/pixel. - PNG limitations: PNG images are accepted, but they generally do not contain physical pixel-spacing metadata. PNG is suitable for functional testing, but CD may be inaccurate if the fallback calibration does not match the acquisition device.
- Image quality: Blur, glare, saturation, folds, uneven illumination, incomplete cell borders, or a small gradable region can reduce reliability.
- Confidence limitations: A high confidence score does not guarantee that a measurement is correct. A low confidence score indicates that manual review is recommended.
- Domain limitations: Performance may differ for devices, acquisition protocols, image resolutions, patient populations, or disease states not represented during development.
- Input limitations: Only two-dimensional images are supported. Volumetric MHA, DICOM, NIfTI, multipage TIFF, PDF, and ZIP files are not valid individual Grand Challenge inputs.
- Do not preprocess: Resizing, sharpening, denoising, lossy compression, or contrast enhancement can alter cell borders and affect the results.
Common Error Messages
| Error message or symptom | Likely cause | Solution |
|---|---|---|
Time limit exceeded |
An older container is active, the submitted image is unusually large, or inference exceeded the platform limit. | Use the CPU-optimized container dated 2026-08-09. Submit one image and review the TIMING lines in the job logs. |
Only startup and /health appear in the logs |
The request is still processing or was stopped before /invoke completed. |
Confirm that the optimized container is active and inspect the stage-timing log messages. |
Could not find manifest.json |
A source archive or model tarball was uploaded as the container. | Upload the container archive created using docker save, not the model or GitHub source archive. |
algorithm model with this checksum already exists |
The same model tarball was uploaded more than once. | Select the existing active model instead of uploading it again. |
No supported input images found |
The input format is unsupported or the submitted item is a ZIP rather than an image. | Upload one .mha, .mhd, .tif, .tiff, or .png image. |
Inference produced no finite cell-density result |
No usable endothelial segmentation could be obtained. | Confirm that the image shows a visible endothelial mosaic and is not blank, severely blurred, or unrelated to corneal specular microscopy. |
| Container validation fails | The incorrect archive, architecture, API label, or port was used. | Use an AMD64 Docker-save archive with the invoke API label and server port 4743. |
| CD appears implausibly high or low | Pixel-spacing metadata is missing or incorrect. | Use an MHA image with correct ElementSpacing, or verify that the fallback calibration matches the imaging device. |
| PNG runs but CD differs from the instrument | PNG does not normally preserve physical pixel spacing. | Convert the original acquisition to MHA with correct spacing metadata or interpret the PNG result as a functional test only. |