DR Detection β€” ResNet-50 (Baseline)

ResNet-50 baseline for comparing against EfficientNet-B4 on Diabetic Retinopathy severity grading. Trained on APTOS 2019 dataset.

Source code: https://github.com/anish030803/Computer-Vison- Primary model: anishanish383/dr-detection-efficientnet-b4 (better performance)

Model Details

  • Architecture: ResNet-50 (via timm, ImageNet pretrained)
  • Custom Head: Global Average Pool β†’ BatchNorm β†’ Dropout(0.4) β†’ Linear(2048β†’256, ReLU) β†’ Dropout(0.3) β†’ Linear(256β†’5)
  • Input: 380Γ—380 RGB fundus images
  • Output: 5-class probabilities
  • Parameters: 24M
  • Preprocessing: Ben Graham's method

Performance

Single train/val split (used as baseline):

Metric Value
Best Val QWK 0.7281

Compared to EfficientNet-B4 primary model: ResNet-50 is ~0.06 QWK worse despite having more parameters (24M vs 18M).

Why include this baseline?

The ResNet-50 baseline establishes a reference for the EfficientNet-B4 improvement. It's intentionally trained with the same hyperparameters and pipeline so results are directly comparable.

Usage

Same as EfficientNet but use build_resnet:

from src.models.resnet_baseline import build_resnet
from src.utils.config import load_config
from src.utils.checkpoint import load_checkpoint
from huggingface_hub import hf_hub_download

ckpt_path = hf_hub_download(repo_id="anishanish383/dr-detection-resnet50", filename="best.pt")
config = load_config("configs/train_resnet.yaml")
model = build_resnet(config)
load_checkpoint(ckpt_path, model)
model.eval()

Limitations

Same as the EfficientNet model β€” this is a research baseline, not for clinical use. See the primary model card for full details.

License

MIT

Downloads last month
3
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support