Image Segmentation
Transformers
Safetensors
English
prima
text-generation
computer-vision
multi-image-reasoning
pixel-grounding
vision-language
custom-code
custom_code
Instructions to use kanguyen-vn/PRIMA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kanguyen-vn/PRIMA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="kanguyen-vn/PRIMA", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("kanguyen-vn/PRIMA", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Include clean PRIMA code and evaluator; document metrics, initialization, and MIT contributions
91c1e9e verified Download code/model/SAM/modeling/__init__.py from kanguyen-vn/PRIMA: direct link, hf CLI and curl.
- Browser
- Download file 385 Bytes
-
https://huggingface.co/kanguyen-vn/PRIMA/resolve/main/code/model/SAM/modeling/__init__.py
- Command line
-
hf download hf://kanguyen-vn/PRIMA/code/model/SAM/modeling/__init__.py
-
curl -L -o __init__.py https://huggingface.co/kanguyen-vn/PRIMA/resolve/main/code/model/SAM/modeling/__init__.py
385 Bytes
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |
| # All rights reserved. | |
| # This source code is licensed under the license found in the | |
| # LICENSE file in the root directory of this source tree. | |
| from .image_encoder import ImageEncoderViT | |
| from .mask_decoder import MaskDecoder | |
| from .prompt_encoder import PromptEncoder | |
| from .sam import Sam | |
| from .transformer import TwoWayTransformer | |