luca-medeiros / lang-segment-anything

SAM with text prompt
Apache License 2.0
1.62k stars 174 forks source link

Load samhq model? #45

Open crapthings opened 10 months ago

crapthings commented 10 months ago

https://github.com/SysCV/sam-hq#model-checkpoints

https://huggingface.co/lkeab/hq-sam/tree/main

how to load sam_hq model?

luca-medeiros commented 9 months ago

Hey https://github.com/luca-medeiros/lang-segment-anything#usage here you can find custom checkpoint usage. havent test your case tho

CkShibit commented 9 months ago

image How to soulve the problem??

luca-medeiros commented 8 months ago

Hey, I think I found the issue. https://github.com/luca-medeiros/lang-segment-anything/blob/134a48a81ebd691686187ecce2d016fb327a8852/lang_sam/lang_sam.py#L76 I believe here should be: sam = sam_model_registry[self.sam_type](checkpoint=ckpt_path)

Mind trying and writing a PR if it works?