Image Segmentation
Transformers
Safetensors
sam2
instance-segmentation
panoptic-segmentation
semantic-segmentation
zero-shot
open-vocabulary
beit3
fiftyone
Instructions to use Voxel51/openworld-sam with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Voxel51/openworld-sam with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="Voxel51/openworld-sam")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Voxel51/openworld-sam", device_map="auto") - sam2
How to use Voxel51/openworld-sam with sam2:
# Use SAM2 with images import torch from sam2.sam2_image_predictor import SAM2ImagePredictor predictor = SAM2ImagePredictor.from_pretrained("Voxel51/openworld-sam") with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): predictor.set_image(<your_image>) masks, _, _ = predictor.predict(<input_prompts>)# Use SAM2 with videos import torch from sam2.sam2_video_predictor import SAM2VideoPredictor predictor = SAM2VideoPredictor.from_pretrained("Voxel51/openworld-sam") with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): state = predictor.init_state(<your_video>) # add new prompts and instantly get the output on the same frame frame_idx, object_ids, masks = predictor.add_new_points(state, <your_prompts>) # propagate the prompts to get masklets throughout the video for frame_idx, object_ids, masks in predictor.propagate_in_video(state): ... - Notebooks
- Google Colab
- Kaggle
Commit History
-
Add CLIP-based semantic re-ranking for instance segmentation (#3)
- Add CLIP-based semantic re-ranking for instance segmentation (b2cfad7be30e7700eec19835c3e47127d95e0db4) - Add CLIP-based semantic re-ranking for instance segmentation (7d52a1a84585fd0a99026902e22986b14b6af041)bca4a6c
-
resolve image_embeddings/high_res_features per chunk
Verified signature4287589 -
mask-decoder vectorization
Verified signaturec008cb2
-
feat: configurable mask_decoder_chunk_size (#2)
- feat: configurable mask_decoder_chunk_size (84a08b18e5cd0a5dabad1bd2c029ab3e32d7f39b)d065dbb -
fix: filter low res masks before upsampling + rename nms and iou thresh vars (#1)
- fix: filter low res masks before upsampling + rename nms and iou thresh vars (82b414cf08666134a4306f105caebc954c463e74) - fix: rename nms and iou thresh vars (30e90a4e19753deeb68aa5b34b95e78c9f05c42b) - feat: top k filtering takes effect (a9e0824ede8853987bd2613f82c365e315be9f05)a019070
-
Update ReadMe with notes for missing/mismatch warnings
Verified signatureb01a913
-
Update modeling_openworld_sam.py
Verified signature`post_init` for compatibility with transformers >= 5df551a1
-
Upload README.md with huggingface_hub
Verified signature1980f1c -
Upload modeling_openworld_sam.py with huggingface_hub
Verified signaturecf5208f -
Upload config.json with huggingface_hub
Verified signaturea38ed61 -
Upload folder using huggingface_hub
Verified signature98405c9 -
initial commit
Verified signaturee5db8ea