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
|
Download code/docs/installation.md from kanguyen-vn/PRIMA: direct link, hf CLI and curl.
- Browser
- Download file 1 kB
-
https://huggingface.co/kanguyen-vn/PRIMA/resolve/main/code/docs/installation.md
- Command line
-
hf download hf://kanguyen-vn/PRIMA/code/docs/installation.md
-
curl -L -o installation.md https://huggingface.co/kanguyen-vn/PRIMA/resolve/main/code/docs/installation.md
1 kB
| # Installation | |
| The initial implementation targets Python 3.10, PyTorch 1.13.1 with CUDA 11.7, and Transformers 4.42.3. Inference uses BF16. This environment has been used for development; a fresh installation remains to be validated. | |
| ```bash | |
| conda create -n prima python=3.10 -y | |
| conda activate prima | |
| pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 \ | |
| --extra-index-url https://download.pytorch.org/whl/cu117 | |
| pip install -r requirements.txt | |
| ``` | |
| COCO caption metrics require a Java runtime. Training writes progress and scalar losses to standard output. | |
| MMCV and MMDetection are not required. Run commands from the project root. Placeholders must be replaced before loading a model or dataset. | |
| Run the release interface checks with: | |
| ```bash | |
| python -m unittest discover -s tests -v | |
| ``` | |
| These tests cover checkpoint loading, grounding-mask alignment, and evaluation behavior without downloading model weights or datasets. Test caches and generated outputs are excluded by `.gitignore`. | |