Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
EfficientSAM_pytorch
Commits
58b90e88
Commit
58b90e88
authored
Sep 14, 2024
by
dcuai
Browse files
Update inference_segment_everything.py
parent
6afd1192
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
inference_segment_everything.py
inference_segment_everything.py
+2
-1
No files found.
inference_segment_everything.py
View file @
58b90e88
...
@@ -6,6 +6,7 @@ from PIL import Image
...
@@ -6,6 +6,7 @@ from PIL import Image
import
io
import
io
import
cv2
import
cv2
GRID_SIZE
=
32
GRID_SIZE
=
32
torch
.
backends
.
cudnn
.
enabled
=
False
from
segment_anything.utils.amg
import
(
from
segment_anything.utils.amg
import
(
batched_mask_to_box
,
batched_mask_to_box
,
calculate_stability_score
,
calculate_stability_score
,
...
@@ -139,4 +140,4 @@ show_anns_ours(mask_efficient_sam_vits, ax[2])
...
@@ -139,4 +140,4 @@ show_anns_ours(mask_efficient_sam_vits, ax[2])
ax
[
2
].
title
.
set_text
(
"EfficientSAM (VIT-small)"
)
ax
[
2
].
title
.
set_text
(
"EfficientSAM (VIT-small)"
)
ax
[
2
].
axis
(
'off'
)
ax
[
2
].
axis
(
'off'
)
plt
.
savefig
(
"results/segmenteverything.png"
,
bbox_inches
=
'tight'
)
plt
.
savefig
(
"results/segmenteverything.png"
,
bbox_inches
=
'tight'
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment