Instructions to use GimhanSathsara843/cataract-severity-efficientnetb0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use GimhanSathsara843/cataract-severity-efficientnetb0 with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://GimhanSathsara843/cataract-severity-efficientnetb0") - Notebooks
- Google Colab
- Kaggle
Cataract Severity Classification
EfficientNetB0 with a squeeze-excitation attention block, fine-tuned to grade anterior-segment eye images into four severity levels: Normal, Mild, Moderate, Severe.
NeuroGSD group project, Faculty of Information Technology, University of Moratuwa.
Intended use
Research and academic evaluation only. Not a medical device. Not clinically validated, no regulatory clearance, must not inform decisions about real patients.
Results (leakage-free held-out test set, n=63)
| Metric | Value | 95% CI |
|---|---|---|
| Accuracy | 0.952 | 0.905โ1.000 |
| Balanced accuracy | 0.902 | 0.775โ1.000 |
| Quadratic weighted kappa | 0.946 | 0.854โ1.000 |
| Macro AUC | 0.953 | โ |
| Within-one-grade agreement | 0.984 | โ |
Data and splitting
357 unique images. The source export applied augmentation before splitting, so several augmented copies of one photograph existed. Splits are therefore grouped by original image ID: training keeps all augmented copies, while validation and test keep one representative per group. This eliminates train/test leakage that would otherwise inflate every metric substantially.
Input
224x224 RGB, raw 0-255 float (EfficientNet normalisation is inside the graph). Preprocessing must match training exactly:
- Median blur, kernel 3
- CLAHE on the LAB L channel, clip 2.0, 8x8 tiles
- Resize to 224x224, INTER_AREA
No ROI crop and no circular mask โ these images are rectangular anterior-segment photographs, and a circular mask removes roughly 29% of real content.
Limitations
- Only 357 unique images; the Normal grade has just 29, so its metrics rest on a handful of test cases and the confidence intervals are wide.
- Single-source dataset; other cameras, lighting and populations are unverified.
- Labels were graded by the student team and reviewed by a domain expert, not independently double-graded.
- Grade 2 accounts for the majority of unique images; apparent class balance in the raw file counts was an artefact of augmentation.
Citation
NeuroGSD (2026). AI Based Early Detection System for Common Eye Diseases Using Medical Image Analysis. University of Moratuwa.
- Downloads last month
- 212