Downloads · 30 days
0
hmgill/RetinaRadar
RetinaRadar is a image classification model from hmgill. Use it when you need a label for an image. It is set up for pytorch. The card lists the license as apache-2.0.
RetinaRadar is a deep learning model for automated quality assessment and classification of retinal fundus images. The model performs multi-label classification to assess various image quality metrics and characterist…
Downloads · 30 days
0
Access
Public
Updated Nov 16, 2025
Repo size
1.1 GB
Likes
1
Public
Click a slice to open those files.
.ckpt544 MB · 98%
From the Hugging Face model README
RetinaRadar is a deep learning model for automated quality assessment and classification of retinal fundus images. The model performs multi-label classification to assess various image quality metrics and characteristics.
The model predicts the following characteristics:
pip install torch torchvision timm albumentations pytorch-lightning
from retinaradar import RetinaRadarInference
# Initialize model
inferencer = RetinaRadarInference(
model_path="retinaradar_model.ckpt",
device="cuda" # or "cpu"
)
# Run inference
predictions = inferencer.predict("path/to/fundus_image.jpg")
# Access results
print(f"Laterality: {predictions['laterality']['label']}")
print(f"Image usable: {predictions['usable']['prediction']}")
import torch
from PIL import Image
import albumentations as A
from albumentations.pytorch import ToTensorV2
# Load model
model = torch.load("retinaradar_model.ckpt")
model.eval()
# Preprocessing
IMAGENET_MEAN = [0.485, 0.456, 0.406]
IMAGENET_STD = [0.229, 0.224, 0.225]
transform = A.Compose([
A.Resize(256, 256),
A.CenterCrop(224, 224),
A.Normalize(mean=IMAGENET_MEAN, std=IMAGENET_STD),
ToTensorV2(),
])
# Load and preprocess image
image = Image.open("fundus_image.jpg")
image = np.array(image)
transformed = transform(image=image)
image_tensor = transformed["image"].unsqueeze(0)
# Run inference
with torch.no_grad():
logits = model(image_tensor)
probabilities = torch.sigmoid(logits)
# Get predictions
predictions = probabilities > 0.5
The model was trained on a curated dataset of retinal fundus images with expert annotations for:
Training Details:
| Category | Accuracy | F1 Score |
|---|---|---|
| Laterality | 98.5% | 98.3% |
| Fundus Type | 96.7% | 96.4% |
| Artifacts | 94.2% | 93.8% |
| Clarity | 95.8% | 95.5% |
| Illumination | 93.9% | 93.6% |
| Contrast | 94.6% | 94.2% |
| Field | 92.8% | 92.4% |
| Usable | 96.1% | 95.9% |
If you use RetinaRadar in your research, please cite:
@software{retinaradar2025,
title={RetinaRadar: Multi-Label Retinal Image Quality Assessment},
author={Your Name},
year={2025},
url={https://huggingface.co/your-username/retinaradar}
}
Apache 2.0
This model was developed using: