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
Leakage-free retrain + evaluation
Browse files- README.md +4 -4
- best_finetune.keras +1 -1
- best_head.keras +1 -1
- cataract_final.keras +1 -1
- evaluation.json +38 -38
- log_finetune.csv +11 -11
- log_head.csv +25 -25
README.md
CHANGED
|
@@ -17,13 +17,13 @@ NeuroGSD group project, Faculty of Information Technology, University of Moratuw
|
|
| 17 |
Research and academic evaluation only. **Not a medical device.** Not clinically
|
| 18 |
validated, no regulatory clearance, must not inform decisions about real patients.
|
| 19 |
|
| 20 |
-
## Results (leakage-free held-out test set, n=
|
| 21 |
|
| 22 |
| Metric | Value | 95% CI |
|
| 23 |
|---|---|---|
|
| 24 |
-
| Accuracy | 0.
|
| 25 |
-
| Balanced accuracy | 0.
|
| 26 |
-
| Quadratic weighted kappa | 0.
|
| 27 |
| Macro AUC | nan | — |
|
| 28 |
| Within-one-grade agreement | 1.000 | — |
|
| 29 |
|
|
|
|
| 17 |
Research and academic evaluation only. **Not a medical device.** Not clinically
|
| 18 |
validated, no regulatory clearance, must not inform decisions about real patients.
|
| 19 |
|
| 20 |
+
## Results (leakage-free held-out test set, n=59)
|
| 21 |
|
| 22 |
| Metric | Value | 95% CI |
|
| 23 |
|---|---|---|
|
| 24 |
+
| Accuracy | 0.983 | 0.949–1.000 |
|
| 25 |
+
| Balanced accuracy | 0.964 | 0.875–1.000 |
|
| 26 |
+
| Quadratic weighted kappa | 0.988 | 0.956–1.000 |
|
| 27 |
| Macro AUC | nan | — |
|
| 28 |
| Within-one-grade agreement | 1.000 | — |
|
| 29 |
|
best_finetune.keras
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 70281268
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41372ea19e760c46bce697010b9085d86d749ede844bd4e949ed05f69ecf0ffd
|
| 3 |
size 70281268
|
best_head.keras
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 27852980
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:014b894b0e7fd831ef56430674850eadc8a07adfcffabc7cea975ab5064652ff
|
| 3 |
size 27852980
|
cataract_final.keras
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 70281269
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2409fa2c040a4f03bcdedebc56a27f02bfa09c7a92390d3d86105e0d883be144
|
| 3 |
size 70281269
|
evaluation.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
| 1 |
{
|
| 2 |
-
"n_test":
|
| 3 |
"tta": true,
|
| 4 |
"leakage_free": true,
|
| 5 |
-
"accuracy": 0.
|
| 6 |
-
"balanced_accuracy": 0.
|
| 7 |
-
"qwk": 0.
|
| 8 |
-
"mcc": 0.
|
| 9 |
"macro_auc": NaN,
|
| 10 |
-
"mae_grades": 0.
|
| 11 |
"within_one_grade": 1.0,
|
| 12 |
-
"log_loss": 0.
|
| 13 |
"bootstrap_ci": {
|
| 14 |
"accuracy": {
|
| 15 |
-
"mean": 0.
|
| 16 |
-
"lo": 0.
|
| 17 |
-
"hi":
|
| 18 |
},
|
| 19 |
"balanced_accuracy": {
|
| 20 |
-
"mean": 0.
|
| 21 |
-
"lo": 0.
|
| 22 |
-
"hi":
|
| 23 |
},
|
| 24 |
"qwk": {
|
| 25 |
-
"mean": 0.
|
| 26 |
-
"lo": 0.
|
| 27 |
-
"hi":
|
| 28 |
}
|
| 29 |
},
|
| 30 |
"confusion_matrix": [
|
|
@@ -37,20 +37,20 @@
|
|
| 37 |
[
|
| 38 |
0,
|
| 39 |
6,
|
| 40 |
-
|
| 41 |
0
|
| 42 |
],
|
| 43 |
[
|
| 44 |
0,
|
| 45 |
0,
|
| 46 |
-
|
| 47 |
0
|
| 48 |
],
|
| 49 |
[
|
| 50 |
0,
|
| 51 |
0,
|
| 52 |
-
|
| 53 |
-
|
| 54 |
]
|
| 55 |
],
|
| 56 |
"per_class": {
|
|
@@ -62,34 +62,34 @@
|
|
| 62 |
},
|
| 63 |
"1": {
|
| 64 |
"precision": 1.0,
|
| 65 |
-
"recall": 0.
|
| 66 |
-
"f1-score": 0.
|
| 67 |
-
"support":
|
| 68 |
},
|
| 69 |
"2": {
|
| 70 |
-
"precision": 0.
|
| 71 |
"recall": 1.0,
|
| 72 |
-
"f1-score": 0.
|
| 73 |
-
"support":
|
| 74 |
},
|
| 75 |
"3": {
|
| 76 |
"precision": 1.0,
|
| 77 |
-
"recall":
|
| 78 |
-
"f1-score":
|
| 79 |
-
"support":
|
| 80 |
},
|
| 81 |
-
"accuracy": 0.
|
| 82 |
"macro avg": {
|
| 83 |
-
"precision": 0.
|
| 84 |
-
"recall": 0.
|
| 85 |
-
"f1-score": 0.
|
| 86 |
-
"support":
|
| 87 |
},
|
| 88 |
"weighted avg": {
|
| 89 |
-
"precision": 0.
|
| 90 |
-
"recall": 0.
|
| 91 |
-
"f1-score": 0.
|
| 92 |
-
"support":
|
| 93 |
}
|
| 94 |
}
|
| 95 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"n_test": 59,
|
| 3 |
"tta": true,
|
| 4 |
"leakage_free": true,
|
| 5 |
+
"accuracy": 0.9830508474576272,
|
| 6 |
+
"balanced_accuracy": 0.9642857142857143,
|
| 7 |
+
"qwk": 0.9882727092029417,
|
| 8 |
+
"mcc": 0.971513726759843,
|
| 9 |
"macro_auc": NaN,
|
| 10 |
+
"mae_grades": 0.01694915254237288,
|
| 11 |
"within_one_grade": 1.0,
|
| 12 |
+
"log_loss": 0.1904372375299754,
|
| 13 |
"bootstrap_ci": {
|
| 14 |
"accuracy": {
|
| 15 |
+
"mean": 0.9830169491525423,
|
| 16 |
+
"lo": 0.9491525423728814,
|
| 17 |
+
"hi": 1.0
|
| 18 |
},
|
| 19 |
"balanced_accuracy": {
|
| 20 |
+
"mean": 0.9636371017360907,
|
| 21 |
+
"lo": 0.875,
|
| 22 |
+
"hi": 1.0
|
| 23 |
},
|
| 24 |
"qwk": {
|
| 25 |
+
"mean": 0.9874861564441398,
|
| 26 |
+
"lo": 0.9562298281312692,
|
| 27 |
+
"hi": 1.0
|
| 28 |
}
|
| 29 |
},
|
| 30 |
"confusion_matrix": [
|
|
|
|
| 37 |
[
|
| 38 |
0,
|
| 39 |
6,
|
| 40 |
+
1,
|
| 41 |
0
|
| 42 |
],
|
| 43 |
[
|
| 44 |
0,
|
| 45 |
0,
|
| 46 |
+
35,
|
| 47 |
0
|
| 48 |
],
|
| 49 |
[
|
| 50 |
0,
|
| 51 |
0,
|
| 52 |
+
0,
|
| 53 |
+
10
|
| 54 |
]
|
| 55 |
],
|
| 56 |
"per_class": {
|
|
|
|
| 62 |
},
|
| 63 |
"1": {
|
| 64 |
"precision": 1.0,
|
| 65 |
+
"recall": 0.8571428571428571,
|
| 66 |
+
"f1-score": 0.9230769230769231,
|
| 67 |
+
"support": 7.0
|
| 68 |
},
|
| 69 |
"2": {
|
| 70 |
+
"precision": 0.9722222222222222,
|
| 71 |
"recall": 1.0,
|
| 72 |
+
"f1-score": 0.9859154929577465,
|
| 73 |
+
"support": 35.0
|
| 74 |
},
|
| 75 |
"3": {
|
| 76 |
"precision": 1.0,
|
| 77 |
+
"recall": 1.0,
|
| 78 |
+
"f1-score": 1.0,
|
| 79 |
+
"support": 10.0
|
| 80 |
},
|
| 81 |
+
"accuracy": 0.9830508474576272,
|
| 82 |
"macro avg": {
|
| 83 |
+
"precision": 0.9930555555555556,
|
| 84 |
+
"recall": 0.9642857142857143,
|
| 85 |
+
"f1-score": 0.9772481040086674,
|
| 86 |
+
"support": 59.0
|
| 87 |
},
|
| 88 |
"weighted avg": {
|
| 89 |
+
"precision": 0.9835216572504708,
|
| 90 |
+
"recall": 0.9830508474576272,
|
| 91 |
+
"f1-score": 0.9825183172043997,
|
| 92 |
+
"support": 59.0
|
| 93 |
}
|
| 94 |
}
|
| 95 |
}
|
log_finetune.csv
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
epoch,acc,learning_rate,loss,val_acc,val_loss,val_qwk
|
| 2 |
-
0,0.
|
| 3 |
-
1,0.
|
| 4 |
-
2,0.
|
| 5 |
-
3,0.
|
| 6 |
-
4,0.
|
| 7 |
-
5,0.
|
| 8 |
-
6,0.
|
| 9 |
-
7,0.
|
| 10 |
-
8,0.
|
| 11 |
-
9,0.
|
| 12 |
-
10,0.
|
|
|
|
| 1 |
epoch,acc,learning_rate,loss,val_acc,val_loss,val_qwk
|
| 2 |
+
0,0.9881129264831543,9.999999747378752e-06,0.27213847637176514,0.9152542352676392,0.3951820731163025,0.8440105755541998
|
| 3 |
+
1,0.9885993599891663,9.999999747378752e-06,0.27813324332237244,0.9152542352676392,0.39619433879852295,0.7578659370725034
|
| 4 |
+
2,0.9869706630706787,9.999999747378752e-06,0.2833753228187561,0.9152542352676392,0.3945697844028473,0.7578659370725034
|
| 5 |
+
3,0.9869706630706787,9.999999747378752e-06,0.27418798208236694,0.9152542352676392,0.39326488971710205,0.7578659370725034
|
| 6 |
+
4,0.9837133288383484,9.999999747378752e-06,0.27106282114982605,0.9152542352676392,0.3924816846847534,0.7578659370725034
|
| 7 |
+
5,0.9885993599891663,9.999999747378752e-06,0.2840113043785095,0.9152542352676392,0.392253577709198,0.7578659370725034
|
| 8 |
+
6,0.9804560542106628,9.999999747378752e-06,0.2774450182914734,0.9152542352676392,0.3948898911476135,0.7578659370725034
|
| 9 |
+
7,0.9918566942214966,9.999999747378752e-06,0.2633183002471924,0.9152542352676392,0.39582300186157227,0.7578659370725034
|
| 10 |
+
8,0.990227997303009,9.999999747378752e-06,0.27457863092422485,0.9152542352676392,0.3983452320098877,0.7578659370725034
|
| 11 |
+
9,0.990227997303009,9.999999747378752e-06,0.267590194940567,0.9152542352676392,0.40089669823646545,0.7578659370725034
|
| 12 |
+
10,0.9951140284538269,9.999999747378752e-06,0.26098212599754333,0.9152542352676392,0.39580008387565613,0.7578659370725034
|
log_head.csv
CHANGED
|
@@ -1,26 +1,26 @@
|
|
| 1 |
epoch,acc,learning_rate,loss,val_acc,val_loss,val_qwk
|
| 2 |
-
0,0.
|
| 3 |
-
1,0.
|
| 4 |
-
2,0.
|
| 5 |
-
3,0.
|
| 6 |
-
4,0.
|
| 7 |
-
5,0.
|
| 8 |
-
6,0.
|
| 9 |
-
7,0.
|
| 10 |
-
8,0.
|
| 11 |
-
9,0.
|
| 12 |
-
10,0.
|
| 13 |
-
11,0.
|
| 14 |
-
12,0.
|
| 15 |
-
13,0.
|
| 16 |
-
14,0.
|
| 17 |
-
15,0.
|
| 18 |
-
16,0.
|
| 19 |
-
17,0.
|
| 20 |
-
18,0.
|
| 21 |
-
19,0.
|
| 22 |
-
20,0.
|
| 23 |
-
21,0.
|
| 24 |
-
22,0.
|
| 25 |
-
23,0.
|
| 26 |
-
24,0.
|
|
|
|
| 1 |
epoch,acc,learning_rate,loss,val_acc,val_loss,val_qwk
|
| 2 |
+
0,0.6612377762794495,0.0010000000474974513,1.0813597440719604,0.4237288236618042,1.1277486085891724,0.2985772753849152
|
| 3 |
+
1,0.8973941206932068,0.0010000000474974513,0.6030792593955994,0.7457627058029175,0.8226550221443176,0.6426790167438546
|
| 4 |
+
2,0.9348534345626831,0.0010000000474974513,0.504050612449646,0.8644067645072937,0.6954477429389954,0.719047619047619
|
| 5 |
+
3,0.9446253776550293,0.0010000000474974513,0.39159250259399414,0.8813559412956238,0.6843019723892212,0.7285457091418284
|
| 6 |
+
4,0.9495114088058472,0.0010000000474974513,0.4188724458217621,0.8644067645072937,0.7304669618606567,0.723545490042952
|
| 7 |
+
5,0.9511400461196899,0.0010000000474974513,0.36688876152038574,0.8135592937469482,0.692980945110321,0.7009573868969401
|
| 8 |
+
6,0.9723126888275146,0.0010000000474974513,0.3414730727672577,0.8813559412956238,0.6467596888542175,0.7329265892540838
|
| 9 |
+
7,0.9706840515136719,0.0010000000474974513,0.335051566362381,0.9152542352676392,0.6519331932067871,0.7578659370725034
|
| 10 |
+
8,0.9706840515136719,0.0010000000474974513,0.32793745398521423,0.9322034120559692,0.5852716565132141,0.7675334909377463
|
| 11 |
+
9,0.9576547145843506,0.0010000000474974513,0.35312023758888245,0.9152542352676392,0.5942530035972595,0.7578659370725034
|
| 12 |
+
10,0.9739413857460022,0.0010000000474974513,0.327210396528244,0.9152542352676392,0.534002959728241,0.763323782234957
|
| 13 |
+
11,0.9641693830490112,0.0010000000474974513,0.32755348086357117,0.9152542352676392,0.5403637886047363,0.8501074848544069
|
| 14 |
+
12,0.9804560542106628,0.0010000000474974513,0.3122323453426361,0.9322034120559692,0.47280600666999817,0.7675334909377463
|
| 15 |
+
13,0.975570023059845,0.0010000000474974513,0.30920541286468506,0.8983050584793091,0.48284080624580383,0.7723765432098766
|
| 16 |
+
14,0.9706840515136719,0.0010000000474974513,0.32432639598846436,0.8813559412956238,0.5428078770637512,0.7052267486548809
|
| 17 |
+
15,0.9739413857460022,0.0010000000474974513,0.32023704051971436,0.9152542352676392,0.4765341877937317,0.8501074848544069
|
| 18 |
+
16,0.9739413857460022,0.0010000000474974513,0.3043287396430969,0.8983050584793091,0.5218567848205566,0.9302600472813238
|
| 19 |
+
17,0.9804560542106628,0.0010000000474974513,0.30412283539772034,0.8983050584793091,0.43766137957572937,0.7483520744474603
|
| 20 |
+
18,0.975570023059845,0.0010000000474974513,0.29872557520866394,0.9322034120559692,0.4098648130893707,0.9131075110456554
|
| 21 |
+
19,0.9853420257568359,0.0010000000474974513,0.2886912226676941,0.8983050584793091,0.43425893783569336,0.7522900763358779
|
| 22 |
+
20,0.9804560542106628,0.0010000000474974513,0.2837938964366913,0.9491525292396545,0.3998212516307831,0.9627603618767094
|
| 23 |
+
21,0.9788273572921753,0.0010000000474974513,0.2839686870574951,0.9152542352676392,0.42340466380119324,0.809215844785772
|
| 24 |
+
22,0.9885993599891663,0.0010000000474974513,0.2704813480377197,0.9322034120559692,0.3931242823600769,0.7712291585886002
|
| 25 |
+
23,0.9837133288383484,0.0010000000474974513,0.27949148416519165,0.9661017060279846,0.37841087579727173,0.881858229875851
|
| 26 |
+
24,0.9869706630706787,0.0010000000474974513,0.2755202353000641,0.9661017060279846,0.37384745478630066,0.881858229875851
|