Home

Awesome

Medical Phrase Grounding with Region-Phrase Context Contrastive Alignment

Implementation for the MICCAI 2023 paper "Medical Phrase Grounding with Region-Phrase Context Contrastive Alignment"[ArXiv link].

News: In 2024.6.20, we added an online demo for MedRPG.

News: In 2023.8.15, we first released the code of MedRPG.


Image Text

Environment

As shown in requirements.txt

Get to know MedRPG

You can quickly know MedRPG by accessing the online demo.

Try a demo with our pretrained checkpoint

  1. Download our released checkpoint to folder released_checkpoint
  2. Modify line 144,145,146 in demo.py to config the input (we put some images in the folder data_demo)
  3. Run demo.py and the output image will be saved in demo_cases

Train and Test

  1. Download the pretrained baseline model to folder pretrained (include DETR pretrained model and TransVG pretrained model)
  2. Download the MS_CXR dataset to folder ln_data
  3. Run the script script_ours_MS_CXR.sh to train, val and test our model, models will be saved in folder checkpoint

Citation

@inproceedings{chen23MedRPG,
     author = {Chen, Zhihao and Zhou, Yang and Tran, Anh and Zhao, Junting and Wan, Liang and Ooi, G.S.K. and Cheng, L.T.-E. and Thng, C.H. and Xu, Xinxing and Liu, Yong and Fu, Huazhu},
     title = {Medical Phrase Grounding with Region-Phrase Context Contrastive Alignment},
     booktitle = {MICCAI},
     year = {2023}
}