--- title: gradeeye emoji: ๐Ÿ“š colorFrom: pink colorTo: green sdk: static pinned: true thumbnail: >- https://cdn-uploads.huggingface.co/production/uploads/68cef9e7195e8b94d3557b81/CAfWeW32yUYWygr9dMb4Y.png --- # GradEye Model checkpoints and code supporting our study on **per-threshold calibration under domain shift** in diabetic retinopathy (DR) grading. We use a CORN ordinal regression head across a leave-one-domain-out (LODO) protocol on four public fundus photograph datasets, and show that calibration โ€” not just accuracy โ€” degrades non-uniformly across ordinal thresholds under domain shift. ๐Ÿ”— Paper: coming soon ๐Ÿ”— Code: [github.com/yourname/gradeeye](https://github.com/yourname/gradeeye) ๐Ÿ“„ License: see below (per-repo, not MIT โ€” derived from restricted-use source data) ## What we publish Pretrained CNN/ViT backbones (ConvNeXt-Tiny, DeiT-3 Small/384, MaxViT-Tiny/384) with a CORN ordinal regression head, trained under a strict LODO protocol across four DR fundus photograph domains, plus auxiliary-channel variants (learned segmentation masks, Sobel edge maps) and the U-Net segmentation models used to generate them. ## Data sources (LODO folds) | Domain | Role | |:--|:--| | EyePACS | held-out fold / testing source | | APTOS | held-out fold / testing source | | Messidor-2 | held-out fold / testing source | | DDR | held-out fold / testing source | Each model is trained on 3 of the 4 domains and evaluated on the 4th, held-out domain โ€” the model never sees that domain during training or model selection. ## Key findings | # | Finding | Headline number | |--:|:--|:--| | 1 | Per-threshold calibration diverges structurally under domain shift | ECE range 0.05โ€“0.29 across thresholds (6ร— spread on Messidor-2) | | 2 | Post-hoc temperature scaling fails under shift โ€” and fails the *opposite* way expected | T saturates at upper bound (5.0); model is under-confident, not overconfident | | 3 | Class balancing hurts cross-domain accuracy in this LODO setup | unbalanced beats balanced by +3.93% mean QWK | | 4 | Mild NPDR (grade 1) is the dominant cross-study failure mode | F1 < 0.13 on every fold, every variant | | 5 | Best cross-domain backbone (of 3 tested) | ConvNeXt-Tiny, mean QWK 0.686 ยฑ 0.156 | Full per-fold, per-variant tables are in the paper and in each repo's model card. ## Repository structure One repo per training configuration (backbone ร— channel variant ร— loss). See the [Collection] *(link once live)* for the full index. Each repo's model card documents architecture, LODO fold, training hyperparameters, and metrics for that specific checkpoint set. ## License Model weights are derived from datasets with **non-commercial, research/academic-use restrictions** (EyePACS and APTOS Kaggle competition terms prohibit redistribution and commercial use). Accordingly, all checkpoints in this org are released under **`cc-by-nc-4.0`**, research use only. See each repo's card for source-dataset attribution. Raw source images are not redistributed โ€” only trained model weights. ## Status This is an active research project; some tables in the paper are still being finalized (confidence intervals, seed sensitivity, full ablation matrix). Findings above are from completed runs and are stable; exact numbers may be refined before camera-ready. ## Author [Ahmed Farhanur Rashid] ยท [GitHub](https://github.com/ahmed-farhanur-rashid)