bowang-lab / MedSAM

Segment Anything in Medical Images
https://www.nature.com/articles/s41467-024-44824-z
Apache License 2.0
3k stars 416 forks source link

Fine-tune question #257

Closed midcola closed 4 months ago

midcola commented 6 months ago

Hello, is there a guideline for fine-tuning MedSAM on my own dataset? thx

JunMa11 commented 5 months ago

Hi @midcola ,

You can use the training script for fine-tuning. Just need to pass the trained model checkpoint. https://github.com/bowang-lab/MedSAM/blob/2b7c64cf80bf1aba546627db9b13db045dd1cbab/train_one_gpu.py#L162

We also have tutorial for fine-tuning litemedsam: https://github.com/bowang-lab/MedSAM/tree/LiteMedSAM?tab=readme-ov-file#fine-tune-pretrained-lite-medsam

midcola commented 5 months ago

@JunMa11 Thanks for your reply!