Downloads · 30 days
7
3% of all-time downloads
Yasmine97/BiomedCLIP_for_AD
BiomedCLIP_for_AD is a machine learning model from Yasmine97. 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 open_clip.
This model fine-tunes BiomedCLIP (PubMedBERT ViT-B/16) for Alzheimer’s disease classification from MRI (3D volumes) and synthetic clinical text.
Downloads · 30 days
7
3% of all-time downloads
All-time downloads
251
Public
Repo size
1.6 GB
Likes
0
Public
Click a slice to open those files.
.pt786 MB · 50%
From the Hugging Face model README
This model fine-tunes BiomedCLIP (PubMedBERT ViT-B/16) for Alzheimer’s disease classification from MRI (3D volumes) and synthetic clinical text.
CN – Cognitively NormalMCI – Mild Cognitive ImpairmentDementiapip install open_clip_torch nibabel torch torchvision
##Load Pretrained Model
import torch from model import BiomedClipClassifier, predict_from_paths
device = "cuda" if torch.cuda.is_available() else "cpu"
model = BiomedClipClassifier.from_pretrained(".", device=device)
pred, probs = predict_from_paths( model, "/path/to/sample_brain.nii.gz", "Patient shows mild memory impairment and hippocampal atrophy.", device=device )
print("Prediction:", pred) print("Probabilities:", probs) # [CN, MCI, Dementia]
##Run Inference
python inference.py --weights . --mri /path/to/sample.nii.gz --text "Patient shows memory issues"