<<<<<<< HEAD
license: apache-2.0 language: en library_name: pytorch tags: - image-classification - medical-imaging - diabetic-retinopathy - pytorch - timm - efficientnet datasets: - aptos2019-blindness-detection widget: - src: model/gradcam_visualizations/gradcam_sample_003.png example_title: No DR Example - src: model/gradcam_visualizations/gradcam_sample_007.png example_title: Severe DR Example
Diabetic Retinopathy Grading Model (V2)
This is a multi-task deep learning model trained to classify the severity of Diabetic Retinopathy (DR) from retinal fundus images. It is based on the EfficientNet-B3 architecture and was specifically optimized to improve the Quadratic Weighted Kappa (QWK) score, a clinically relevant metric for ordinal classification tasks like DR grading.
This model is the second iteration (V2) of a project focused on building a diagnostically "smarter" classifier that is more sensitive to severe, vision-threatening stages of the disease.
Model Details
- Architecture:
timm/efficientnet_b3backbone with a custom multi-task head. - Input Size: 512x512 pixels.
- Output: A dictionary containing logits for three tasks:
severity: 5 classes (0: No DR, 1: Mild, 2: Moderate, 3: Severe, 4: Proliferative).lesions: 5 classes (multi-label for various lesion types).regions: 5 classes (multi-label for affected anatomical regions).
- Training Objective: The model was trained focusing only on the
severitytask by setting the loss weights for auxiliary tasks to zero. The auxiliary heads can still produce outputs for interpretability.
How to Get Started & Use
The model can be easily loaded from Hugging Face Hub for inference.
# Install required libraries
pip install torch torchvision timm albumentations huggingface-hub numpy<2.0 pillow opencv-python
=======
---
license: apache-2.0
---
>>>>>>> 96df5800dd01e6edcea4c1417179b056d6e3e22d