bowang-lab / MedSAM

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

Inference with Angiogram image #298

Closed huynhkhoa44 closed 2 months ago

huynhkhoa44 commented 2 months ago

I want to inference MedSam with my data. my data is a list of angiogram images in png format extracted from a DCM file. I tried testing with the google colab medsam.ipynb link you provided, however i got the error:

"RuntimeError: Given groups=1, weight of size [768, 3, 16, 16], expected input[1, 4, 1024, 1024] to have 3 channels, but got 4 channels instead"

below is my image, my purpose is to perform vessel segmentation and classify it as LAD, LCX or RCA vessel. Is it possible with MedSam or not. Thank you very much !! F03-002-LAD 4_anon_33

antoniaaaaaaaa commented 2 months ago

Hi ,I got same issue, Have you solve this?

JunMa11 commented 2 months ago

Hi @antoniaaaaaaaa ,

MedSAM may not be able to segment the vessels because the bounding box is not a proper prompt.

Training a fully automatic model based on existing dataset would be a better choice. https://www.nature.com/articles/s41597-023-02871-z