Instructions to use syscv-community/sam-hq-vit-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use syscv-community/sam-hq-vit-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("mask-generation", model="syscv-community/sam-hq-vit-base")# Load model directly from transformers import AutoProcessor, AutoModelForMaskGeneration processor = AutoProcessor.from_pretrained("syscv-community/sam-hq-vit-base") model = AutoModelForMaskGeneration.from_pretrained("syscv-community/sam-hq-vit-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 576 Bytes
9a34892 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | {
"do_convert_rgb": true,
"do_normalize": true,
"do_pad": true,
"do_rescale": true,
"do_resize": true,
"image_mean": [
0.485,
0.456,
0.406
],
"image_processor_type": "SamImageProcessor",
"image_std": [
0.229,
0.224,
0.225
],
"mask_pad_size": {
"height": 256,
"width": 256
},
"mask_size": {
"longest_edge": 256
},
"pad_size": {
"height": 1024,
"width": 1024
},
"processor_class": "SamHQProcessor",
"resample": 2,
"rescale_factor": 0.00392156862745098,
"size": {
"longest_edge": 1024
}
}
|