get_sam_model()#

function get_sam_model(sam_checkpoint='//bk06/D$/ben_bki06/sam_vit_h_4b8939.pth', model_type='vit_h', device='cuda')#

Get the same model to use for the prediction.

Parameters:
  • sam_checkpoint (str)

  • model_type (str)

  • device (str)

Return type:

tuple[segment_anything.predictor.Sam, segment_anything.SamPredictor]