Spaces:
Sleeping
Sleeping
Commit ·
4191ebf
1
Parent(s): ff15b72
Trying SAM2
Browse files
app.py
CHANGED
|
@@ -6,7 +6,8 @@ from PIL import Image
|
|
| 6 |
|
| 7 |
# Load models
|
| 8 |
# sam_pipe = pipeline("mask-generation", model="facebook/sam-vit-base", device=-1)
|
| 9 |
-
sam_pipe = pipeline("mask-generation", model="syscv-community/sam-hq-vit-huge", device=-1)
|
|
|
|
| 10 |
|
| 11 |
processor = CLIPSegProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 12 |
model = CLIPSegForImageSegmentation.from_pretrained("CIDAS/clipseg-rd64-refined")
|
|
|
|
| 6 |
|
| 7 |
# Load models
|
| 8 |
# sam_pipe = pipeline("mask-generation", model="facebook/sam-vit-base", device=-1)
|
| 9 |
+
# sam_pipe = pipeline("mask-generation", model="syscv-community/sam-hq-vit-huge", device=-1)
|
| 10 |
+
sam_pipe = pipeline("mask-generation", model="facebook/sam2-hiera-large", device=-1)
|
| 11 |
|
| 12 |
processor = CLIPSegProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 13 |
model = CLIPSegForImageSegmentation.from_pretrained("CIDAS/clipseg-rd64-refined")
|