GradeEye 3ch-balanced: checkpoints for retinopathy analysis
2 min readupdated
A set of 48 pre-trained checkpoints based on ConvNeXt, DeiT3, and MaxViT architectures for classifying diabetic retinopathy from RGB fundus images. The model uses a class-balanced sampler and the CORN method for ordinal classification of disease stages. The checkpoints were obtained using a strict leave-one-dataset-out (LODO) protocol while preserving exponential moving average (EMA) weights from the best validation step. The solution is aimed at researchers and developers of medical computer vision systems.
Key features
- Various backbones: Support for `convnext_small`, `convnext_tiny`, `deit3_small_patch16_384`, and `maxvit_tiny_tf_384` models.
- Balanced sampling: Preservation of all images with frame-balanced weights to combat class imbalance.
- QWK metric: Checkpoints selected by the best Quadratic Weighted Kappa score on validation.
- Calibration: Includes `calibration.json` with parameters for temperature scaling and biases.
What you can do
- Medical image evaluation: Apply checkpoints to classify stages of diabetic retinopathy from retinal scans.
- LODO research: Test model robustness on external datasets (eyepacs, aptos, messidor2, ddr).
- Pipeline integration: Use `model.safetensors` weights along with `torch` and `timm` libraries in custom analysis scripts.
Example
from modeling import load_model, corn_predict, corn_predict_probas
model = load_model("model.safetensors", "config.json")
logits = model(x) # (B, 4) raw CORN logits
label = corn_predict(logits) # (B,) class in {0..4}
proba = corn_predict_probas(logits) # (B, 5)
Read more
DetailsArchitectures: ConvNeXt, DeiT3, MaxViT
Input data: 3-channel RGB (384×384)
Dependencies: torch, timm, safetensors
Benchmarks: Val QWK from 0.68 to 0.90+ depending on fold and seed










Comments