Upload GradeEye baseline-3ch checkpoints
Browse files- README.md +52 -0
- aptos/convnext_tiny/config.json +45 -0
- aptos/convnext_tiny/lodo_aptos_convnext_tiny_best.meta.json +38 -0
- aptos/convnext_tiny/lodo_aptos_convnext_tiny_best.safetensors +3 -0
- aptos/convnext_tiny/lodo_aptos_convnext_tiny_best_ema.safetensors +3 -0
- aptos/deit3_small_patch16_384/config.json +45 -0
- aptos/deit3_small_patch16_384/lodo_aptos_deit3_small_patch16_384_best.meta.json +38 -0
- aptos/deit3_small_patch16_384/lodo_aptos_deit3_small_patch16_384_best.safetensors +3 -0
- aptos/deit3_small_patch16_384/lodo_aptos_deit3_small_patch16_384_best_ema.safetensors +3 -0
- aptos/maxvit_tiny_tf_384/config.json +45 -0
- aptos/maxvit_tiny_tf_384/lodo_aptos_maxvit_tiny_tf_384_best.meta.json +38 -0
- aptos/maxvit_tiny_tf_384/lodo_aptos_maxvit_tiny_tf_384_best.safetensors +3 -0
- aptos/maxvit_tiny_tf_384/lodo_aptos_maxvit_tiny_tf_384_best_ema.safetensors +3 -0
- ddr/convnext_tiny/config.json +45 -0
- ddr/convnext_tiny/lodo_ddr_convnext_tiny_best.meta.json +38 -0
- ddr/convnext_tiny/lodo_ddr_convnext_tiny_best.safetensors +3 -0
- ddr/convnext_tiny/lodo_ddr_convnext_tiny_best_ema.safetensors +3 -0
- ddr/deit3_small_patch16_384/config.json +45 -0
- ddr/deit3_small_patch16_384/lodo_ddr_deit3_small_patch16_384_best.meta.json +38 -0
- ddr/deit3_small_patch16_384/lodo_ddr_deit3_small_patch16_384_best.safetensors +3 -0
- ddr/deit3_small_patch16_384/lodo_ddr_deit3_small_patch16_384_best_ema.safetensors +3 -0
- ddr/maxvit_tiny_tf_384/config.json +45 -0
- ddr/maxvit_tiny_tf_384/lodo_ddr_maxvit_tiny_tf_384_best.meta.json +38 -0
- ddr/maxvit_tiny_tf_384/lodo_ddr_maxvit_tiny_tf_384_best.safetensors +3 -0
- ddr/maxvit_tiny_tf_384/lodo_ddr_maxvit_tiny_tf_384_best_ema.safetensors +3 -0
- eyepacs/convnext_tiny/config.json +45 -0
- eyepacs/convnext_tiny/lodo_eyepacs_convnext_tiny_best.meta.json +38 -0
- eyepacs/convnext_tiny/lodo_eyepacs_convnext_tiny_best.safetensors +3 -0
- eyepacs/convnext_tiny/lodo_eyepacs_convnext_tiny_best_ema.safetensors +3 -0
- eyepacs/deit3_small_patch16_384/config.json +45 -0
- eyepacs/deit3_small_patch16_384/lodo_eyepacs_deit3_small_patch16_384_best.meta.json +38 -0
- eyepacs/deit3_small_patch16_384/lodo_eyepacs_deit3_small_patch16_384_best.safetensors +3 -0
- eyepacs/deit3_small_patch16_384/lodo_eyepacs_deit3_small_patch16_384_best_ema.safetensors +3 -0
- eyepacs/maxvit_tiny_tf_384/config.json +45 -0
- eyepacs/maxvit_tiny_tf_384/lodo_eyepacs_maxvit_tiny_tf_384_best.meta.json +38 -0
- eyepacs/maxvit_tiny_tf_384/lodo_eyepacs_maxvit_tiny_tf_384_best.safetensors +3 -0
- eyepacs/maxvit_tiny_tf_384/lodo_eyepacs_maxvit_tiny_tf_384_best_ema.safetensors +3 -0
- messidor2/convnext_tiny/config.json +45 -0
- messidor2/convnext_tiny/lodo_messidor2_convnext_tiny_best.meta.json +38 -0
- messidor2/convnext_tiny/lodo_messidor2_convnext_tiny_best.safetensors +3 -0
- messidor2/convnext_tiny/lodo_messidor2_convnext_tiny_best_ema.safetensors +3 -0
- messidor2/deit3_small_patch16_384/config.json +45 -0
- messidor2/deit3_small_patch16_384/lodo_messidor2_deit3_small_patch16_384_best.meta.json +38 -0
- messidor2/deit3_small_patch16_384/lodo_messidor2_deit3_small_patch16_384_best.safetensors +3 -0
- messidor2/deit3_small_patch16_384/lodo_messidor2_deit3_small_patch16_384_best_ema.safetensors +3 -0
- messidor2/maxvit_tiny_tf_384/config.json +45 -0
- messidor2/maxvit_tiny_tf_384/lodo_messidor2_maxvit_tiny_tf_384_best.meta.json +38 -0
- messidor2/maxvit_tiny_tf_384/lodo_messidor2_maxvit_tiny_tf_384_best.safetensors +3 -0
- messidor2/maxvit_tiny_tf_384/lodo_messidor2_maxvit_tiny_tf_384_best_ema.safetensors +3 -0
- modeling.py +44 -0
README.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- medical-imaging
|
| 5 |
+
- diabetic-retinopathy
|
| 6 |
+
- domain-generalization
|
| 7 |
+
- pytorch
|
| 8 |
+
pipeline_tag: image-classification
|
| 9 |
+
library_name: pytorch
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# GradeEye baseline-3ch
|
| 13 |
+
|
| 14 |
+
This repository contains GradeEye CORN ordinal diabetic-retinopathy classifiers using three backbones (`convnext_tiny`, `deit3_small_patch16_384`, `maxvit_tiny_tf_384`) at 384x384 resolution, with 3-channel input and a 4-threshold ordinal head. The `_ema.safetensors` file is the **primary** artifact: the paper's reported evaluation metrics were generated using the EMA state dict. The unsuffixed `.safetensors` file is the corresponding raw `model_state_dict` secondary artifact.
|
| 15 |
+
|
| 16 |
+
## Checkpoints
|
| 17 |
+
|
| 18 |
+
| Primary EMA weights | Raw secondary weights | Architecture | Held-out fold | Best QWK | Epoch |
|
| 19 |
+
|---|---|---|---|---:|---:|
|
| 20 |
+
| `lodo_aptos_convnext_tiny_best_ema.safetensors` | `lodo_aptos_convnext_tiny_best.safetensors` | `convnext_tiny` | aptos | 0.7614 | 6 |
|
| 21 |
+
| `lodo_aptos_deit3_small_patch16_384_best_ema.safetensors` | `lodo_aptos_deit3_small_patch16_384_best.safetensors` | `deit3_small_patch16_384` | aptos | 0.7064 | 6 |
|
| 22 |
+
| `lodo_aptos_maxvit_tiny_tf_384_best_ema.safetensors` | `lodo_aptos_maxvit_tiny_tf_384_best.safetensors` | `maxvit_tiny_tf_384` | aptos | 0.6558 | 11 |
|
| 23 |
+
| `lodo_ddr_convnext_tiny_best_ema.safetensors` | `lodo_ddr_convnext_tiny_best.safetensors` | `convnext_tiny` | ddr | 0.7506 | 3 |
|
| 24 |
+
| `lodo_ddr_deit3_small_patch16_384_best_ema.safetensors` | `lodo_ddr_deit3_small_patch16_384_best.safetensors` | `deit3_small_patch16_384` | ddr | 0.7252 | 3 |
|
| 25 |
+
| `lodo_ddr_maxvit_tiny_tf_384_best_ema.safetensors` | `lodo_ddr_maxvit_tiny_tf_384_best.safetensors` | `maxvit_tiny_tf_384` | ddr | 0.5483 | 14 |
|
| 26 |
+
| `lodo_eyepacs_convnext_tiny_best_ema.safetensors` | `lodo_eyepacs_convnext_tiny_best.safetensors` | `convnext_tiny` | eyepacs | 0.7820 | 1 |
|
| 27 |
+
| `lodo_eyepacs_deit3_small_patch16_384_best_ema.safetensors` | `lodo_eyepacs_deit3_small_patch16_384_best.safetensors` | `deit3_small_patch16_384` | eyepacs | 0.7684 | 8 |
|
| 28 |
+
| `lodo_eyepacs_maxvit_tiny_tf_384_best_ema.safetensors` | `lodo_eyepacs_maxvit_tiny_tf_384_best.safetensors` | `maxvit_tiny_tf_384` | eyepacs | 0.6500 | 17 |
|
| 29 |
+
| `lodo_messidor2_convnext_tiny_best_ema.safetensors` | `lodo_messidor2_convnext_tiny_best.safetensors` | `convnext_tiny` | messidor2 | 0.7615 | 10 |
|
| 30 |
+
| `lodo_messidor2_deit3_small_patch16_384_best_ema.safetensors` | `lodo_messidor2_deit3_small_patch16_384_best.safetensors` | `deit3_small_patch16_384` | messidor2 | 0.7253 | 5 |
|
| 31 |
+
| `lodo_messidor2_maxvit_tiny_tf_384_best_ema.safetensors` | `lodo_messidor2_maxvit_tiny_tf_384_best.safetensors` | `maxvit_tiny_tf_384` | messidor2 | 0.5182 | 8 |
|
| 32 |
+
|
| 33 |
+
## Preprocessing
|
| 34 |
+
|
| 35 |
+
1. Resize the RGB fundus image to 384x384 using the same offline preprocessing pipeline.
|
| 36 |
+
2. Convert RGB to float in [0,1] and apply ImageNet normalization: mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225).
|
| 37 |
+
|
| 38 |
+
## Loading
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
import json
|
| 42 |
+
from modeling import load_model
|
| 43 |
+
|
| 44 |
+
config = json.load(open('config.json'))
|
| 45 |
+
model = load_model('lodo_eyepacs_convnext_tiny_best_ema.safetensors', config)
|
| 46 |
+
# model(x) returns CORN logits with shape (batch, 4)
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
Install `torch`, `timm`, and `safetensors`, and make the GradeEye source repository available on `PYTHONPATH`.
|
| 50 |
+
|
| 51 |
+
## Intended use and limitations
|
| 52 |
+
|
| 53 |
+
These weights are released for research and reproducibility only. They are not validated for clinical diagnosis or treatment decisions. Performance varies substantially by held-out dataset and should not be interpreted as clinical-grade generalization.
|
| 54 |
+
|
| 55 |
+
Source code and paper materials: [https://github.com/ahmed-farhanur-rashid/gradeeye](https://github.com/ahmed-farhanur-rashid/gradeeye).
|
aptos/convnext_tiny/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "convnext_tiny",
|
| 5 |
+
"backbone_timm_name": "convnext_tiny",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 512,
|
| 14 |
+
"dropout": 0.4,
|
| 15 |
+
"channels_last": true,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_aptos_convnext_tiny_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_aptos_convnext_tiny_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "aptos"
|
| 45 |
+
}
|
aptos/convnext_tiny/lodo_aptos_convnext_tiny_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7613941888114648,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/aptos/convnext_tiny/lodo_aptos_convnext_tiny_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 6,
|
| 13 |
+
"global_step": 8198,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_aptos_convnext_tiny_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_aptos_convnext_tiny_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "convnext_tiny",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": true,
|
| 23 |
+
"dropout": 0.4,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 512,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 64,
|
| 32 |
+
"phase2_full_training": 24
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
aptos/convnext_tiny/lodo_aptos_convnext_tiny_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69a26a60f469642a92c0b7c11da15fab85ffe1f7e30ee6ea8b5a05be03cb5d91
|
| 3 |
+
size 113269368
|
aptos/convnext_tiny/lodo_aptos_convnext_tiny_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:031562ecc8ce73e5a3ed18e2ffdbb921f48ae8c45db7791dbebd458a44adbc58
|
| 3 |
+
size 113269368
|
aptos/deit3_small_patch16_384/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "deit3_small_patch16_384",
|
| 5 |
+
"backbone_timm_name": "deit3_small_patch16_384",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 384,
|
| 14 |
+
"dropout": 0.3,
|
| 15 |
+
"channels_last": false,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_aptos_deit3_small_patch16_384_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_aptos_deit3_small_patch16_384_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "aptos"
|
| 45 |
+
}
|
aptos/deit3_small_patch16_384/lodo_aptos_deit3_small_patch16_384_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7063935995279769,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/aptos/deit3_small_patch16_384/lodo_aptos_deit3_small_patch16_384_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 6,
|
| 13 |
+
"global_step": 11432,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_aptos_deit3_small_patch16_384_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_aptos_deit3_small_patch16_384_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "deit3_small_patch16_384",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": false,
|
| 23 |
+
"dropout": 0.3,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 384,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 64,
|
| 32 |
+
"phase2_full_training": 16
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
aptos/deit3_small_patch16_384/lodo_aptos_deit3_small_patch16_384_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d245e0632601999c18b47e4a34dd875435e26eb10091f565fe9388a7ee308c9
|
| 3 |
+
size 88057776
|
aptos/deit3_small_patch16_384/lodo_aptos_deit3_small_patch16_384_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6391d54afb45e9150bfcf99507e1b594c3759588d31c99f8b4ffd1dd5ffc0a36
|
| 3 |
+
size 88057776
|
aptos/maxvit_tiny_tf_384/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "maxvit_tiny_tf_384",
|
| 5 |
+
"backbone_timm_name": "maxvit_tiny_tf_384",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 512,
|
| 14 |
+
"dropout": 0.4,
|
| 15 |
+
"channels_last": false,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_aptos_maxvit_tiny_tf_384_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_aptos_maxvit_tiny_tf_384_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "aptos"
|
| 45 |
+
}
|
aptos/maxvit_tiny_tf_384/lodo_aptos_maxvit_tiny_tf_384_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.6557566734353691,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/aptos/maxvit_tiny_tf_384/lodo_aptos_maxvit_tiny_tf_384_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 11,
|
| 13 |
+
"global_step": 36729,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_aptos_maxvit_tiny_tf_384_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_aptos_maxvit_tiny_tf_384_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "maxvit_tiny_tf_384",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": false,
|
| 23 |
+
"dropout": 0.4,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 512,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 32,
|
| 32 |
+
"phase2_full_training": 8
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
aptos/maxvit_tiny_tf_384/lodo_aptos_maxvit_tiny_tf_384_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5200f8349c6a52ed12fc3908a831a4efa27b78298322544a5711ab3c0265d15
|
| 3 |
+
size 122302616
|
aptos/maxvit_tiny_tf_384/lodo_aptos_maxvit_tiny_tf_384_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca69365547272c6ffb9ad2419ef903838d713e7dad4d788c89949d21b5a8dae6
|
| 3 |
+
size 122302616
|
ddr/convnext_tiny/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "convnext_tiny",
|
| 5 |
+
"backbone_timm_name": "convnext_tiny",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 512,
|
| 14 |
+
"dropout": 0.4,
|
| 15 |
+
"channels_last": true,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_ddr_convnext_tiny_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_ddr_convnext_tiny_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "ddr"
|
| 45 |
+
}
|
ddr/convnext_tiny/lodo_ddr_convnext_tiny_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7506140888561054,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/ddr/convnext_tiny/lodo_ddr_convnext_tiny_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 3,
|
| 13 |
+
"global_step": 5208,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_ddr_convnext_tiny_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_ddr_convnext_tiny_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "convnext_tiny",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": true,
|
| 23 |
+
"dropout": 0.4,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 512,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 64,
|
| 32 |
+
"phase2_full_training": 24
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
ddr/convnext_tiny/lodo_ddr_convnext_tiny_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:068bc43c1d122536cfb58a2a222886b5f97dd36f7b58ca40b330f22129ac7f20
|
| 3 |
+
size 113269368
|
ddr/convnext_tiny/lodo_ddr_convnext_tiny_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0cde14e317e2630a6f525757b37669d26d2b0c31680c7f926f505030cbc85a47
|
| 3 |
+
size 113269368
|
ddr/deit3_small_patch16_384/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "deit3_small_patch16_384",
|
| 5 |
+
"backbone_timm_name": "deit3_small_patch16_384",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 384,
|
| 14 |
+
"dropout": 0.3,
|
| 15 |
+
"channels_last": false,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_ddr_deit3_small_patch16_384_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_ddr_deit3_small_patch16_384_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "ddr"
|
| 45 |
+
}
|
ddr/deit3_small_patch16_384/lodo_ddr_deit3_small_patch16_384_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7252182450988855,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/ddr/deit3_small_patch16_384/lodo_ddr_deit3_small_patch16_384_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 3,
|
| 13 |
+
"global_step": 6984,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_ddr_deit3_small_patch16_384_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_ddr_deit3_small_patch16_384_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "deit3_small_patch16_384",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": false,
|
| 23 |
+
"dropout": 0.3,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 384,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 64,
|
| 32 |
+
"phase2_full_training": 16
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
ddr/deit3_small_patch16_384/lodo_ddr_deit3_small_patch16_384_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cffbaa74cb5ab4a400930992e696dd631a10253b97fbe54cbf4c7a1f064a4a9f
|
| 3 |
+
size 88057776
|
ddr/deit3_small_patch16_384/lodo_ddr_deit3_small_patch16_384_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cec6f5796b0076caaabdc1a08b4d2beec8bd5ca2ad41ce06ddb080064b4f5706
|
| 3 |
+
size 88057776
|
ddr/maxvit_tiny_tf_384/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "maxvit_tiny_tf_384",
|
| 5 |
+
"backbone_timm_name": "maxvit_tiny_tf_384",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 512,
|
| 14 |
+
"dropout": 0.4,
|
| 15 |
+
"channels_last": false,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_ddr_maxvit_tiny_tf_384_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_ddr_maxvit_tiny_tf_384_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "ddr"
|
| 45 |
+
}
|
ddr/maxvit_tiny_tf_384/lodo_ddr_maxvit_tiny_tf_384_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.5482642270604744,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/ddr/maxvit_tiny_tf_384/lodo_ddr_maxvit_tiny_tf_384_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 14,
|
| 13 |
+
"global_step": 43255,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_ddr_maxvit_tiny_tf_384_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_ddr_maxvit_tiny_tf_384_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "maxvit_tiny_tf_384",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": false,
|
| 23 |
+
"dropout": 0.4,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 512,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 32,
|
| 32 |
+
"phase2_full_training": 8
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
ddr/maxvit_tiny_tf_384/lodo_ddr_maxvit_tiny_tf_384_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2332c0861549725a05e6d3bd404dc502a2596cf64fad99022970f9527c55f719
|
| 3 |
+
size 122302616
|
ddr/maxvit_tiny_tf_384/lodo_ddr_maxvit_tiny_tf_384_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c64c1e1ac3ee1253aa3c86e5ce2354d322d38d64bc2362f4faba04f25fdb3180
|
| 3 |
+
size 122302616
|
eyepacs/convnext_tiny/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "convnext_tiny",
|
| 5 |
+
"backbone_timm_name": "convnext_tiny",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 512,
|
| 14 |
+
"dropout": 0.4,
|
| 15 |
+
"channels_last": true,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_eyepacs_convnext_tiny_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_eyepacs_convnext_tiny_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "eyepacs"
|
| 45 |
+
}
|
eyepacs/convnext_tiny/lodo_eyepacs_convnext_tiny_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7820317857888303,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/eyepacs/convnext_tiny/lodo_eyepacs_convnext_tiny_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 1,
|
| 13 |
+
"global_step": 786,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_eyepacs_convnext_tiny_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_eyepacs_convnext_tiny_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "convnext_tiny",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": true,
|
| 23 |
+
"dropout": 0.4,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 512,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 64,
|
| 32 |
+
"phase2_full_training": 24
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
eyepacs/convnext_tiny/lodo_eyepacs_convnext_tiny_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab3775b5d113b362464de844d11ce0b7ab543b1247dc46ee341659c69709b3b0
|
| 3 |
+
size 113269368
|
eyepacs/convnext_tiny/lodo_eyepacs_convnext_tiny_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e95a4a0735ba9dfd09f34911035fd844a536230bda67741e8ae6bc70b668eb60
|
| 3 |
+
size 113269368
|
eyepacs/deit3_small_patch16_384/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "deit3_small_patch16_384",
|
| 5 |
+
"backbone_timm_name": "deit3_small_patch16_384",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 384,
|
| 14 |
+
"dropout": 0.3,
|
| 15 |
+
"channels_last": false,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_eyepacs_deit3_small_patch16_384_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_eyepacs_deit3_small_patch16_384_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "eyepacs"
|
| 45 |
+
}
|
eyepacs/deit3_small_patch16_384/lodo_eyepacs_deit3_small_patch16_384_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7684374648510071,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/eyepacs/deit3_small_patch16_384/lodo_eyepacs_deit3_small_patch16_384_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 8,
|
| 13 |
+
"global_step": 3125,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_eyepacs_deit3_small_patch16_384_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_eyepacs_deit3_small_patch16_384_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "deit3_small_patch16_384",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": false,
|
| 23 |
+
"dropout": 0.3,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 384,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 64,
|
| 32 |
+
"phase2_full_training": 16
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
eyepacs/deit3_small_patch16_384/lodo_eyepacs_deit3_small_patch16_384_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07ae1653d9e64e27f2e07c0d8bbdac09ee2f649829e87092857fe46da0baa23a
|
| 3 |
+
size 88057776
|
eyepacs/deit3_small_patch16_384/lodo_eyepacs_deit3_small_patch16_384_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:888875e04a4be230fcdba117bc902081cc8b490e31d8742765722297f048af88
|
| 3 |
+
size 88057776
|
eyepacs/maxvit_tiny_tf_384/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "maxvit_tiny_tf_384",
|
| 5 |
+
"backbone_timm_name": "maxvit_tiny_tf_384",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 512,
|
| 14 |
+
"dropout": 0.4,
|
| 15 |
+
"channels_last": false,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_eyepacs_maxvit_tiny_tf_384_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_eyepacs_maxvit_tiny_tf_384_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "eyepacs"
|
| 45 |
+
}
|
eyepacs/maxvit_tiny_tf_384/lodo_eyepacs_maxvit_tiny_tf_384_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.6500080983317436,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/eyepacs/maxvit_tiny_tf_384/lodo_eyepacs_maxvit_tiny_tf_384_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 17,
|
| 13 |
+
"global_step": 11740,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_eyepacs_maxvit_tiny_tf_384_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_eyepacs_maxvit_tiny_tf_384_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "maxvit_tiny_tf_384",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": false,
|
| 23 |
+
"dropout": 0.4,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 512,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 32,
|
| 32 |
+
"phase2_full_training": 8
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
eyepacs/maxvit_tiny_tf_384/lodo_eyepacs_maxvit_tiny_tf_384_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb76b503d8cb46d75ffca7a630bea0a40b6d8398e1993d43ee69814f6f2b1e4f
|
| 3 |
+
size 122302616
|
eyepacs/maxvit_tiny_tf_384/lodo_eyepacs_maxvit_tiny_tf_384_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0edf62751f8fc5b52c5affc7027b7ebfb1c71db4556b9d28c2bcf197199cc157
|
| 3 |
+
size 122302616
|
messidor2/convnext_tiny/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "convnext_tiny",
|
| 5 |
+
"backbone_timm_name": "convnext_tiny",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 512,
|
| 14 |
+
"dropout": 0.4,
|
| 15 |
+
"channels_last": true,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_messidor2_convnext_tiny_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_messidor2_convnext_tiny_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "messidor2"
|
| 45 |
+
}
|
messidor2/convnext_tiny/lodo_messidor2_convnext_tiny_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7614860286460639,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/messidor2/convnext_tiny/lodo_messidor2_convnext_tiny_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 10,
|
| 13 |
+
"global_step": 12653,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_messidor2_convnext_tiny_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_messidor2_convnext_tiny_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "convnext_tiny",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": true,
|
| 23 |
+
"dropout": 0.4,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 512,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 64,
|
| 32 |
+
"phase2_full_training": 24
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
messidor2/convnext_tiny/lodo_messidor2_convnext_tiny_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb2f04801b0d49d163a4ec40a5f7192fce57f324ae0b678e2653467b17ea8648
|
| 3 |
+
size 113269368
|
messidor2/convnext_tiny/lodo_messidor2_convnext_tiny_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33b2f5b98efded1ba159228b0bc71db7acfa7fa2b9fbeb7400d7403fb909d0cc
|
| 3 |
+
size 113269368
|
messidor2/deit3_small_patch16_384/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "deit3_small_patch16_384",
|
| 5 |
+
"backbone_timm_name": "deit3_small_patch16_384",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 384,
|
| 14 |
+
"dropout": 0.3,
|
| 15 |
+
"channels_last": false,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_messidor2_deit3_small_patch16_384_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_messidor2_deit3_small_patch16_384_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "messidor2"
|
| 45 |
+
}
|
messidor2/deit3_small_patch16_384/lodo_messidor2_deit3_small_patch16_384_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.7253012991702625,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/messidor2/deit3_small_patch16_384/lodo_messidor2_deit3_small_patch16_384_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 5,
|
| 13 |
+
"global_step": 10690,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_messidor2_deit3_small_patch16_384_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_messidor2_deit3_small_patch16_384_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "deit3_small_patch16_384",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": false,
|
| 23 |
+
"dropout": 0.3,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 384,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 64,
|
| 32 |
+
"phase2_full_training": 16
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
messidor2/deit3_small_patch16_384/lodo_messidor2_deit3_small_patch16_384_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a2ecf42b571d01e82f81c38c42b138195f024e47ed7765a174489b5d03f783e
|
| 3 |
+
size 88057776
|
messidor2/deit3_small_patch16_384/lodo_messidor2_deit3_small_patch16_384_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64ff4841c17d38c1911778a4f2fd9cf5c85d1ab9319a1da9bf333724ce410cb1
|
| 3 |
+
size 88057776
|
messidor2/maxvit_tiny_tf_384/config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "DRGradingModel",
|
| 3 |
+
"task": "diabetic-retinopathy-grading",
|
| 4 |
+
"architecture": "maxvit_tiny_tf_384",
|
| 5 |
+
"backbone_timm_name": "maxvit_tiny_tf_384",
|
| 6 |
+
"in_channels": 3,
|
| 7 |
+
"image_size": 384,
|
| 8 |
+
"num_classes": 5,
|
| 9 |
+
"ordinal_head": "CORN",
|
| 10 |
+
"num_thresholds": 4,
|
| 11 |
+
"use_cbam": true,
|
| 12 |
+
"cbam_num_stages": 2,
|
| 13 |
+
"head_hidden_dim": 512,
|
| 14 |
+
"dropout": 0.4,
|
| 15 |
+
"channels_last": false,
|
| 16 |
+
"ema_decay": 0.999,
|
| 17 |
+
"loss_type": "corn",
|
| 18 |
+
"use_class_weighting": true,
|
| 19 |
+
"use_mixup": true,
|
| 20 |
+
"primary_weights": "lodo_messidor2_maxvit_tiny_tf_384_best_ema.safetensors",
|
| 21 |
+
"secondary_weights": "lodo_messidor2_maxvit_tiny_tf_384_best.safetensors",
|
| 22 |
+
"normalization": {
|
| 23 |
+
"rgb": {
|
| 24 |
+
"mean": [
|
| 25 |
+
0.485,
|
| 26 |
+
0.456,
|
| 27 |
+
0.406
|
| 28 |
+
],
|
| 29 |
+
"std": [
|
| 30 |
+
0.229,
|
| 31 |
+
0.224,
|
| 32 |
+
0.225
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"extra_channel": "Already in [0,1]; appended after RGB normalization; not ImageNet-normalized."
|
| 36 |
+
},
|
| 37 |
+
"class_names": [
|
| 38 |
+
"No DR",
|
| 39 |
+
"Mild",
|
| 40 |
+
"Moderate",
|
| 41 |
+
"Severe",
|
| 42 |
+
"Proliferative DR"
|
| 43 |
+
],
|
| 44 |
+
"held_out_fold": "messidor2"
|
| 45 |
+
}
|
messidor2/maxvit_tiny_tf_384/lodo_messidor2_maxvit_tiny_tf_384_best.meta.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": 0.5182327564528264,
|
| 3 |
+
"checkpoint_source": "saved/checkpoints/baseline_3ch/messidor2/maxvit_tiny_tf_384/lodo_messidor2_maxvit_tiny_tf_384_best.pt",
|
| 4 |
+
"class_names": [
|
| 5 |
+
"No DR",
|
| 6 |
+
"Mild",
|
| 7 |
+
"Moderate",
|
| 8 |
+
"Severe",
|
| 9 |
+
"Proliferative DR"
|
| 10 |
+
],
|
| 11 |
+
"ema_state_dict_present": true,
|
| 12 |
+
"epoch": 8,
|
| 13 |
+
"global_step": 30244,
|
| 14 |
+
"phase_name": "phase2_full_training",
|
| 15 |
+
"primary_weights": "lodo_messidor2_maxvit_tiny_tf_384_best_ema.safetensors",
|
| 16 |
+
"primary_weights_kind": "ema",
|
| 17 |
+
"secondary_weights": "lodo_messidor2_maxvit_tiny_tf_384_best.safetensors",
|
| 18 |
+
"secondary_weights_kind": "raw_model_state_dict",
|
| 19 |
+
"training_config": {
|
| 20 |
+
"arch": "maxvit_tiny_tf_384",
|
| 21 |
+
"cbam_num_stages": 2,
|
| 22 |
+
"channels_last": false,
|
| 23 |
+
"dropout": 0.4,
|
| 24 |
+
"ema_decay": 0.999,
|
| 25 |
+
"head_hidden_dim": 512,
|
| 26 |
+
"img_size": 384,
|
| 27 |
+
"in_chans": 3,
|
| 28 |
+
"loss_type": "corn",
|
| 29 |
+
"num_thresholds": 4,
|
| 30 |
+
"phase_batches": {
|
| 31 |
+
"phase1_frozen": 32,
|
| 32 |
+
"phase2_full_training": 8
|
| 33 |
+
},
|
| 34 |
+
"use_cbam": true,
|
| 35 |
+
"use_class_weighting": true,
|
| 36 |
+
"use_mixup": true
|
| 37 |
+
}
|
| 38 |
+
}
|
messidor2/maxvit_tiny_tf_384/lodo_messidor2_maxvit_tiny_tf_384_best.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ca317c23e61438d8a53ba1613872241ad3334204005052c5def4f020f1c0c2b
|
| 3 |
+
size 122302616
|
messidor2/maxvit_tiny_tf_384/lodo_messidor2_maxvit_tiny_tf_384_best_ema.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f4962a5800ab99a859682d606f90f2e43c3edc53563fca2359ff2b0d3567ee6
|
| 3 |
+
size 122302616
|
modeling.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Minimal GradeEye classifier loader for Hugging Face Hub.
|
| 2 |
+
|
| 3 |
+
Requires the GradeEye source package on PYTHONPATH plus torch, timm, and
|
| 4 |
+
safetensors. The architecture is the same DRGradingModel used during training.
|
| 5 |
+
EMA files are the primary weights and reproduce the paper evaluation protocol.
|
| 6 |
+
"""
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
import sys
|
| 11 |
+
import torch
|
| 12 |
+
|
| 13 |
+
# For local source checkout usage. Users may instead install the GradeEye package.
|
| 14 |
+
try:
|
| 15 |
+
from src.models.dr_model import DRGradingModel
|
| 16 |
+
except ImportError as exc:
|
| 17 |
+
raise ImportError(
|
| 18 |
+
"Install/clone GradeEye and make its repository root available on PYTHONPATH."
|
| 19 |
+
) from exc
|
| 20 |
+
from safetensors.torch import load_file
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def load_model(weights_path: str | Path, config: dict, device: str = "cpu") -> DRGradingModel:
|
| 24 |
+
"""Instantiate DRGradingModel and strictly load a .safetensors state dict."""
|
| 25 |
+
model = DRGradingModel(
|
| 26 |
+
pretrained=False,
|
| 27 |
+
use_cbam=config["use_cbam"],
|
| 28 |
+
cbam_num_stages=config["cbam_num_stages"],
|
| 29 |
+
num_thresholds=config["num_thresholds"],
|
| 30 |
+
head_hidden_dim=config["head_hidden_dim"],
|
| 31 |
+
dropout=config["dropout"],
|
| 32 |
+
output_mode="corn",
|
| 33 |
+
arch=config["architecture"],
|
| 34 |
+
in_chans=config["in_channels"],
|
| 35 |
+
img_size=config["image_size"],
|
| 36 |
+
)
|
| 37 |
+
state_dict = load_file(str(weights_path), device="cpu")
|
| 38 |
+
result = model.load_state_dict(state_dict, strict=True)
|
| 39 |
+
if result.missing_keys or result.unexpected_keys:
|
| 40 |
+
raise RuntimeError(
|
| 41 |
+
f"State-dict mismatch: missing={result.missing_keys}, "
|
| 42 |
+
f"unexpected={result.unexpected_keys}"
|
| 43 |
+
)
|
| 44 |
+
return model.to(device).eval()
|