Mask Generation
Transformers
Safetensors
sam
segment-anything
medical-image-segmentation
polyp-segmentation
gastrointestinal
fine-tuned
Instructions to use Mayank022/sam-vit-base-kvasir-polyp-segmentation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mayank022/sam-vit-base-kvasir-polyp-segmentation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("mask-generation", model="Mayank022/sam-vit-base-kvasir-polyp-segmentation")# Load model directly from transformers import AutoProcessor, AutoModelForMaskGeneration processor = AutoProcessor.from_pretrained("Mayank022/sam-vit-base-kvasir-polyp-segmentation") model = AutoModelForMaskGeneration.from_pretrained("Mayank022/sam-vit-base-kvasir-polyp-segmentation") - Notebooks
- Google Colab
- Kaggle
| { | |
| "image_processor": { | |
| "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 | |
| }, | |
| "resample": 2, | |
| "rescale_factor": 0.00392156862745098, | |
| "size": { | |
| "longest_edge": 1024 | |
| } | |
| }, | |
| "processor_class": "SamProcessor" | |
| } | |