Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expecting value: line 1 column 1 (char 0) #31

Open
yangjun19950118 opened this issue May 9, 2024 · 2 comments
Open

Expecting value: line 1 column 1 (char 0) #31

yangjun19950118 opened this issue May 9, 2024 · 2 comments

Comments

@yangjun19950118
Copy link

image

@yangjun19950118
Copy link
Author

Uploading 1715390632499.jpg…
改成vit_h,或vit_l

@yangjun19950118
Copy link
Author

models = {
'vit_b': './checkpoints/sam_vit_b_01ec64.pth',
'vit_l': './checkpoints/sam_vit_l_0b3195.pth',
'vit_h': './checkpoints/sam_vit_h_4b8939.pth'
}

def get_sam_predictor(model_type='vit_b', device='cuda'):

sam model

sam = sam_model_registrymodel_type
sam = sam.to(device)

predictor = SamPredictor(sam)

return predictor

def get_mask_generator(model_type='vit_b', device='cuda'):
sam = sam_model_registrymodel_type
sam = sam.to(device)
mask_generator = SamAutomaticMaskGenerator(
model=sam)
return mask_generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant