tianrun-chen / SAM-Adapter-PyTorch

Adapting Meta AI's Segment Anything to Downstream Tasks with Adapters and Prompts
MIT License
968 stars 83 forks source link

Demo config may load wrong pretrained weight file? #6

Closed DuinoDu closed 1 year ago

DuinoDu commented 1 year ago

Hi, thanks for awesome work!

I found that given config yaml use ./pretrained/sam_vit_l_0b3195.pth, but sam model actually use sam_vit_h config:

https://github.com/tianrun-chen/SAM-Adapter-PyTorch/blob/main/configs/demo.yaml#L86-92

sam config:

https://github.com/facebookresearch/segment-anything/blob/main/segment_anything/build_sam.py#L14-L21

May be a typo?

tianrun-chen commented 1 year ago

Thanks for your interests! As we shown in the manuscript, we use the ViT-H version of SAM in the final version of the paper. You can make modifications of yaml file to match your local disk location.