Image Segmentation
sam2
PyTorch
segment-anything
medical-imaging
optical-coherence-tomography
oct
glaucoma
Instructions to use enslinr/sam2-oct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sam2
How to use enslinr/sam2-oct with sam2:
# Use SAM2 with images import torch from sam2.sam2_image_predictor import SAM2ImagePredictor predictor = SAM2ImagePredictor.from_pretrained(enslinr/sam2-oct) 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(enslinr/sam2-oct) 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
Upload folder using huggingface_hub
Browse files
MGU/final_runs_Glaucoma_last.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59b3545c8956dc90fc807248f7e4e0942dfc48fdc3730dc435ef008d7106216a
|
| 3 |
+
size 919710777
|
MGU_prompted/MGU_prompt_training_last.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b45394f5a259762fd820f2733dea7f2890c756d6862ae3b8ef620943501a78ca
|
| 3 |
+
size 919873817
|
NR206/final_runs_NR206_last.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d9f04ffed41a38afbc280776fe403762978e904b5860cadc36167b9a617ef0bc
|
| 3 |
+
size 916332153
|