We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The text was updated successfully, but these errors were encountered:
改成vit_h,或vit_l
Sorry, something went wrong.
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 = 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
No branches or pull requests
The text was updated successfully, but these errors were encountered: