Data-Quality-Aware Fundus Classification with Anatomy-Guided Glaucoma Assessment and Cross-Dataset Evaluation

Imdadul Haque Sourav, Marjana Jannat Miti, Md. Jehadul Islam MonyarXiv 2026

TL;DR

High accuracy in medical AI is often a mirage created by "dirty" data and models that overfit to specific cameras. This paper demonstrates that by rigorously auditing datasets for duplicates and forcing models to focus on actual eye anatomy (like the optic disc), we can build AI that actually generalizes to new hospitals and different hardware.

What Problem Does This Paper Address?

Deep learning models for retinal disease often boast spectacular "internal" accuracy—sometimes hitting 95% or higher on the dataset they were trained on. But when these models are deployed in a new clinic with a different camera, their performance often falls off a cliff.

The authors identify two main culprits:

  1. Data Quality Issues: Many public datasets contain "exact duplicates" (the same image appearing in both training and testing) or "label conflicts" (the same image labeled as "Healthy" in one folder and "Glaucoma" in another). This allows models to "cheat" by memorizing specific images rather than learning disease features.
  2. Domain Shift: Models often learn to recognize the camera rather than the disease. If a specific camera is only used for glaucoma patients, the model might just learn to identify that camera's unique noise pattern.

Methods

The researchers developed a multi-tiered approach to build a more robust classifier:

  • The Data Audit: Before training, they ran a "union-find" algorithm based on image hashes to find and remove 942 conflicting or duplicate images from their primary dataset.
  • The Global Ensemble: They trained three state-of-the-art "expert" networks (ConvNeXt-Small, EfficientNetV2-Small, and DenseNet169) to look at the whole fundus image.
  • The Anatomy-Guided Specialist: This is the "secret sauce." Instead of looking at the whole image, this branch focuses specifically on the optic disc. It segments the "disc" and the "cup" (the central indentation), calculates clinical features like the Cup-to-Disc Ratio (CDR), and creates a specialized "three-channel composite" for a smaller network to analyze.
  • The Fusion: They mixed the predictions of the global experts with the anatomy specialist at a fixed 50/50 ratio.
Figure 1: Study overview. (a) Data: 5 318 released images in nine classes; 942 images in groups of identical photographs with conflicting labels, and six same-label copies, were removed, leaving 4 370 images split into training (3 059), validation (655) and test (656) images. All fitted quantities use the validation split only. (b) Model: three global experts (ConvNeXt-S, EfficientNetV2-S, DenseNet-169) are combined by an equal soft vote; the anatomy branch (locate disc, segment, three-channel composite with CDR measurements, specialist for Glaucoma, Healthy and Myopia) is mixed with the vote at a fixed 50/50 ratio to give the final nine-class probabilities. (c) Evaluation tiers: internal test (main), frozen-model evaluation on RFMiD and JSIEC (exploratory), the REFUGE comparison (confirmatory) and replication on G1020, ORIGA and PAPILA. Dashed arrows mean frozen models with nothing refitted.

Datasets

The authors used a wide array of datasets to prove their point:

  • Training/Internal Test: A public collection of 5,318 photographs from two hospitals in Faridpur, Bangladesh.
  • External Multi-Disease Evaluation: RFMiD and JSIEC.
  • External Glaucoma Evaluation: REFUGE (the primary "confirmatory" test), plus G1020, ORIGA, and PAPILA for replication.

Key Insights and Ideas

  • Auditing is Essential: The audit revealed that nearly 18% of the original dataset was problematic (duplicates or conflicting labels). Without this step, internal accuracy metrics are essentially meaningless.
Table 5 Duplicate and label-conflict audit of the development dataset, and the resulting partitions. “Lost” counts images in duplicate groups whose members carried more than one label; such groups were removed in full. Pool: after this removal, with each remaining group of identical photographs reduced to one image (six same-label copies: two diabetic retinopathy, two disc oedema, one glaucoma, one retinal detachment).
  • Anatomy as a Regularizer: By forcing the model to look at the optic disc and cup—the same things a human ophthalmologist examines—the researchers created a "specialist" that is much more robust to camera changes.
  • The "Internal vs. External" Paradox: Interestingly, adding the anatomy specialist didn't improve accuracy on the internal test set. However, it significantly boosted performance on external datasets. This suggests that standard "global" networks are leaving a lot of generalizable knowledge on the table in favor of easy, dataset-specific shortcuts.
Figure 2: Anatomy-guided pipeline. (1) The fundus image is cropped to the fundus circle. (2) A square disc region of interest (34% of the shorter side) is cut around the localised optic disc and resized to 384 px. (3) A U-Net with a ResNet-34 encoder, trained on Drishti-GS only, segments disc and cup. (4) A vessel map is computed from the green channel by a multi-scale black top-hat transform (not learned). (5) Nine standardised anatomical measurements are derived from the masks, among them the vertical, horizontal and area cup-to-disc ratios (CDR). (6) Disc luminance, vessel map and disc/cup map form a three-channel composite. (7) A ConvNeXt-T (288 px) reads the composite and an MLP with 32 units reads the measurements. (8) A three-way head outputs Glaucoma, Healthy and Myopia probabilities, temperature-scaled on validation. (9) The specialist’s output 𝑃is mixed at a fixed 50/50 ratio with the global ensemble’s normalised split 𝑏of the same three classes, 𝑞= 0.5 𝑏+ 0.5 𝑃. The mixed split 𝑞is multiplied by 𝑚, the ensemble’s total probability on the three classes, so this mass is kept and the other six classes are unchanged. The result 𝑚𝑞is ̃𝑝in Eq. 1, where 𝑃is written 𝐬.

Key Results

  • Internal Performance: The best single model reached an internal accuracy of 0.910.
  • External Generalization: On the REFUGE dataset, the anatomy-guided fusion improved balanced accuracy by 7.4 percentage points compared to a standard ensemble.
  • Robustness: On the RFMiD dataset, the anatomy branch raised external closed-set accuracy by 4.9 percentage points.
  • Segmentation Quality: Their U-Net segmenter achieved high Dice scores (a measure of overlap) of 0.966 for the disc and 0.915 for the cup, proving the anatomy features were reliable.

Limitations and Future Work

  • Threshold Transfer: While the ranking of images (AUC) improved, the specific "thresholds" for diagnosis did not transfer well. A model set to be 90% specific on the training data might only be 41% specific on a new dataset. This means models still need local calibration before being used in a new clinic.
  • Patient-Level Splits: The primary dataset lacked patient identifiers, making it impossible to ensure that images from the same patient didn't end up in both training and testing (though the image-level audit helps mitigate this).
  • Future Directions: The authors suggest that future work should focus on "domain adaptation" (helping models adjust to new cameras automatically) and using even more diverse external cohorts for validation.

Summary updated

Abstract

Background: Deep learning fundus classifiers often perform well internally, but duplicated images, inconsistent labels, acquisition differences and poor threshold transfer can undermine their reliability. We assess nine-class classifiers beyond internal accuracy, using a data audit, frozen-model external evaluation and an anatomy-guided specialist. Methods: Nine-class experts (ConvNeXt-Small, EfficientNetV2-Small, DenseNet169) were trained with three seeds. Auditing 5,318 images for exact duplicates and cross-label conflicts removed 464 conflict groups (942 images) and six same-label copies, leaving 4,370 images. An anatomy-guided glaucoma specialist read disc-centred crops with vessel and disc/cup segmentation maps, plus cup-to-disc features. Frozen models were evaluated on RFMiD and JSIEC, and a prespecified comparison on REFUGE was replicated on ORIGA, G1020 and PAPILA. Results: ConvNeXt-Small reached an internal accuracy of 0.910, macro-F1 of 0.917 and AUC of 0.982; disc and cup Dice scores were 0.966 and 0.915. Across seeds, the fixed anatomy-guided mix left internal accuracy unchanged relative to equal soft voting (-0.001) but raised mean external closed-set accuracy by 4.9 percentage points on RFMiD (positive in two of three seeds) and 2.3 on JSIEC. On REFUGE (800 photographs) it improved balanced accuracy by 7.4 percentage points (95% CI 5.1 to 9.5), and by 2.1 on ORIGA, with positive gains on G1020 and PAPILA. Thresholds transferred poorly (REFUGE sensitivity 0.950, specificity 0.411). Conclusions: Retinal classifiers should be judged by data-quality auditing, anatomy-informed modelling and multi-cohort evaluation. Anatomy-guided fusion improved transfer at no internal cost, but gains varied by cohort and thresholds did not transfer, so internal metrics alone do not establish reliable performance.
BibTeX
@misc{sourav2026data,
  author = {Imdadul Haque Sourav and Marjana Jannat Miti and Md. Jehadul Islam Mony},
  title = {{Data-Quality-Aware Fundus Classification with Anatomy-Guided Glaucoma Assessment and Cross-Dataset Evaluation}},
  year = {2026},
  eprint = {2611.29834},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29834},
}
Figure