This repository contains the pretrained weights for PRS-Med, a modular framework for position reasoning segmentation in medical imaging. PRS-Med combines a vision-language model (LLaVA-Med) with a lightweight image encoder (TinySAM) and a custom mask decoder to perform context-aware medical image segmentation.
Accepted at CVPRW 2026.
Model Architecture
PRS-Med consists of three main components:
Component
Description
Details
LLaVA-Med
Vision-language model for semantic reasoning
Mistral-7B backbone, fine-tuned with LoRA (r=16, alpha=16)
TinySAM
Lightweight image encoder
ViT-Tiny, extracts 256-dim features at 64x64 spatial resolution
Prompted Mask Decoder
Cross-attention fusion + upsampling
Fuses LLM embeddings with image features to produce 1024x1024 masks
Classification Head
6-class medical modality classifier
Brain, Breast, Lung CT, Lung X-ray, Skin (ISIC), Other
0.5 * StructureLoss + 0.5 * LLM Loss + ClassificationLoss
Supported Medical Modalities
Modality
Dataset
Brain MRI
Brain Tumor CT Scan
Breast Ultrasound
Breast Ultrasound
Lung CT
Lung CT
Lung X-ray
Lung X-ray
Skin Lesion
ISIC Skin Cancer
Polyp
Polyp Endoscopy
Citation
bibtex
1@article{trinh2025prs,
2 title = {Prs-med: Position reasoning segmentation with vision-language model in medical imaging},
3 author = {Trinh, Quoc-Huy and Nguyen, Minh-Van and Zeng, Jung and Bagci, Ulas and Jha, Debesh},
4 journal = {arXiv preprint arXiv:2505.11872},
5 year = {2025}
6}