Spaces:
Sleeping
Sleeping
Commit
·
b026005
1
Parent(s):
5e15859
sam vit l
Browse files- main.py +6 -3
- sam_vit_l_0b3195.pth +3 -0
main.py
CHANGED
@@ -14,9 +14,12 @@ CORS(app)
|
|
14 |
cudaOrNah = "cuda" if torch.cuda.is_available() else "cpu"
|
15 |
print(cudaOrNah)
|
16 |
|
17 |
-
# Global model setup
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
20 |
sam = sam_model_registry[model_type](checkpoint=checkpoint)
|
21 |
sam.to(device=cudaOrNah)
|
22 |
mask_generator = SamAutomaticMaskGenerator(
|
|
|
14 |
cudaOrNah = "cuda" if torch.cuda.is_available() else "cpu"
|
15 |
print(cudaOrNah)
|
16 |
|
17 |
+
# Global model setup
|
18 |
+
# running out of memory adjusted
|
19 |
+
# checkpoint = "sam_vit_h_4b8939.pth"
|
20 |
+
# model_type = "vit_h"
|
21 |
+
checkpoint = "sam_vit_l_0b3195.pth"
|
22 |
+
model_type = "vit_l"
|
23 |
sam = sam_model_registry[model_type](checkpoint=checkpoint)
|
24 |
sam.to(device=cudaOrNah)
|
25 |
mask_generator = SamAutomaticMaskGenerator(
|
sam_vit_l_0b3195.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3adcc4315b642a4d2101128f611684e8734c41232a17c648ed1693702a49a622
|
3 |
+
size 1249524607
|