Vision-Language SAM

November 22, 2024 ยท View on GitHub

Installation

  1. Create a virtual environment conda create -n medsam python=3.10 -y and activate it conda activate VLSAM
  2. Install Pytorch 2.0
  3. Or install the same environment as https://github.com/bowang-lab/MedSAM

Model Training

Data preprocessing

Download SAM checkpoint and place it at work_dir/SAM/sam_vit_b_01ec64.pth .

Training on one GPU

python train.py

Inference

python Inference_vlsam.py

Reference

Contents

  1. 1Installation
  2. 2Model Training
  3. 2.1Data preprocessing
  4. 2.2Training on one GPU
  5. 2.3Inference
  6. 3Reference