MedicineToken / Medical-SAM2

Medical SAM 2: Segment Medical Images As Video Via Segment Anything Model 2
Apache License 2.0
453 stars 57 forks source link

Inference using SAM2 #7

Closed MikhailKulyabin closed 2 months ago

MikhailKulyabin commented 2 months ago

Hi! Is there a way to use the finetuned model in the SAM2 inference?

xuexue49 commented 2 months ago

i thinking you should using model_cfg = "sam2_hiera_t.yaml" and load the pre_train weight

WuJunde commented 2 months ago

fine-tune means "slightly train the model", so technically, there is no way to "fine-tune" the model in inferencešŸ¤”. if you mean adapt the model to your data with light-weight training, then "adapters" are what you need: https://github.com/MedicineToken/Medical-SAM-Adapter (it's for sam1, but I think it should also work for sam2). if you mean change the results without training, then you should adjust your prompt (click, bbox, etc), you can do that either manually or automatically.