Downloads · 30 days
2
4% of all-time downloads
moksh555/medgemma-LORA-brain-cancer
medgemma-LORA-brain-cancer is a image-text-to-text model from moksh555. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as other.
A LoRA fine-tune of google/medgemma-4b-it for classifying brain MRI scans into three tumor types.
Downloads · 30 days
2
4% of all-time downloads
All-time downloads
56
Public
Repo size
6.6 GB
Likes
0
Public
Click a slice to open those files.
.safetensors3.3 GB · 99%
From the Hugging Face model README
A LoRA fine-tune of google/medgemma-4b-it for classifying brain MRI scans into three tumor types.
Parameter-efficient (LoRA) fine-tune of MedGemma-4B, adapted to classify brain MRI images as glioma, meningioma, or tumor. Only the LoRA adapters plus lm_head and embed_tokens were trained.
brain_gliomabrain_menin (meningioma)brain_tumorBrain Cancer MRI dataset (CC-BY-SA-4.0), split into train and validation.
Held-out validation split:
| Metric | Base | Fine-tuned |
|---|---|---|
| Accuracy | [0.33] | [0.98] |
| Weighted F1 | [0.17] | [0.98] |
```python from peft import PeftModel from transformers import AutoModelForImageTextToText, AutoProcessor import torch
base = AutoModelForImageTextToText.from_pretrained( "google/medgemma-4b-it", torch_dtype=torch.bfloat16, device_map="auto" ) model = PeftModel.from_pretrained(base, "moksh555/medgemma-LORA-brain-cancer") processor = AutoProcessor.from_pretrained("moksh555/medgemma-LORA-brain-cancer") ```
For research and educational purposes only. NOT a medical device — must not be used for clinical diagnosis or treatment decisions. Trained on a limited dataset; predictions are no substitute for professional medical evaluation, and performance on scans from different equipment or populations is untested.