czg1225 / SlimSAM

SlimSAM: 0.1% Data Makes Segment Anything Slim
Apache License 2.0
248 stars 14 forks source link

Import SAMModel,SAMProcessor from hugging face #9

Open qevr opened 5 months ago

qevr commented 5 months ago

Hi,

Can someone please tell the syntax to load SAMModel,SAMProcessor from hugging face, the library importing step is missing in documentation ?

czg1225 commented 5 months ago

Hi @qevr , Sorry for this missing. You can load SamModel and SamProcessor like this:

from transformers import SamModel, SamProcessor

Thanks

NielsRogge commented 5 months ago

Hi,

This is all explained here right? https://huggingface.co/docs/transformers/model_doc/sam