YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

license: mit language: en tags:

image-classification

medical-imaging

diabetic-retinopathy

resnet

fine-tuning

progressive-resizing

sih-2025 base_model: microsoft/resnet-50

Progressively Resized ResNet50 for Diabetic Retinopathy Grading This repository contains a collection of ResNet50 models fine-tuned for classifying diabetic retinopathy severity. These models are the result of an advanced, multi-stage progressive resizing experiment.

The strategy involves starting with a fine-tuned model and continuing to train it on progressively higher image resolutions. This allows the model to first learn general features on smaller images and then refine its understanding by learning fine-grained details from larger, higher-quality images.

Model Versions This repository contains several model checkpoints, each representing the best-performing model at a specific resolution stage. The final model from the highest resolution stage represents the culmination of this experiment.

best_model_384px.pth: Fine-tuned on 384x384 images.

best_model_512px.pth: Fine-tuned on 512x512 images.

best_model_768px.pth: Fine-tuned on 768x768 images.

best_model_1024px.pth: The final model, fine-tuned on 1024x1024 images.

Performance (Final Model) The final model's performance was evaluated on the official test set from the IDRiD dataset.

Classification Report precision recall f1-score support

  Grade 0       0.76      0.65      0.70        34
  Grade 1       0.11      0.40      0.17         5
  Grade 2       0.59      0.59      0.59        32
  Grade 3       0.64      0.47      0.55        19
  Grade 4       0.40      0.31      0.35        13

 accuracy                           0.54       103
macro avg       0.50      0.48      0.47       103

weighted avg 0.61 0.54 0.57 103

Confusion Matrix Grade 0 Grade 1 Grade 2 Grade 3 Grade 4 Grade 0 22 10 2 0 0 Grade 1 2 2 1 0 0 Grade 2 4 4 19 3 2 Grade 3 0 2 4 9 4 Grade 4 1 0 6 2 4

How to Use a Specific Model You can load any of the model versions using PyTorch. Make sure to use the correct filename.

import torch from torchvision import models from huggingface_hub import hf_hub_download

1. Define the model architecture

model = models.resnet50(weights=None) model.fc = torch.nn.Linear(model.fc.in_features, 5) # 5 classes

2. Load the fine-tuned weights for the desired resolution

weights_path = hf_hub_download( repo_id="Arko007/Diabetic-Retinopathy", filename="best_model_1024px.pth" # Change this to load other versions ) model.load_state_dict(torch.load(weights_path, map_location='cpu')) model.eval()

3. Preprocess your image using the correct size for the model you loaded

...

Developed by: Arko007 for SIH 2025.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support