Downloads · 30 days
0
0% of all-time downloads
Haris-83/dr-screening-tool
dr-screening-tool is a machine learning model from Haris-83. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for tensorflow. The card lists the license as mit.
A lightweight, privacy-preserving DR severity classification system with an integrated Federated Learning defense mechanism. MS Thesis project.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
1
Public
Repo size
133 MB
Likes
0
Public
Click a slice to open those files.
.h5133 MB · 100%
From the Hugging Face model README
A lightweight, privacy-preserving DR severity classification system with an integrated Federated Learning defense mechanism. MS Thesis project.
| Model | Parameters | Size |
|---|---|---|
| MobileNetV2 | 2.2M | ~10 MB |
| EfficientNetB0 | 4.0M | ~20 MB |
| ResNet50V2 | 24.8M | ~97 MB |
Each model is a frozen pretrained backbone + custom classifier head:
GAP Dense(256,ReLU) BN Dropout(0.5) Dense(128,ReLU) BN Dropout(0.3) Dense(64,ReLU) Dense(5,Softmax)
| Class | Label | Description |
|---|---|---|
| 0 | No DR | No signs of diabetic retinopathy |
| 1 | Mild NPDR | Microaneurysms only |
| 2 | Moderate NPDR | More than microaneurysms |
| 3 | Severe NPDR | Extensive hemorrhages |
| 4 | Proliferative DR | Neovascularization |
The three models are combined via probability averaging with temperature scaling (T=1.5, calibrated on the APTOS 2019 validation set to minimize negative log-likelihood).
Test accuracy: ~74% on a combined APTOS 2019 + IDRiD subsample (2,000 images).
pip install -r requirements.txt
python app.py
The Gradio app launches at http://localhost:7860 with:
This repo also contains code for evaluating a lightweight FL defense against label-flipping poisoning attacks. The defense uses:
See the training script train_ensemble_colab.py for the full pipeline.
@mastersthesis{haris2026dr,
title={A Lightweight Defense Against Label-Flipping Poisoning Attacks in Federated Learning for Diabetic Retinopathy Detection},
author={Haris},
year={2026},
school={COMSATS University Islamabad, Abbottabad Campus}
}