yuxin
commited on
Commit
·
a3e2e90
1
Parent(s):
ad9a9f8
add model
Browse files- model_segvol_single.py +3 -6
model_segvol_single.py
CHANGED
@@ -45,13 +45,10 @@ class SegVolModel(PreTrainedModel):
|
|
45 |
zoomed_image=None,
|
46 |
text_prompt=None,
|
47 |
bbox_prompt=None,
|
|
|
48 |
point_prompt=None,
|
49 |
-
|
50 |
-
|
51 |
-
if bbox_prompt is not None:
|
52 |
-
bbox_prompt, bbox_prompt_map = bbox_prompt
|
53 |
-
if point_prompt is not None:
|
54 |
-
point_prompt, point_prompt_map = point_prompt
|
55 |
# print(image.shape, zoomed_image.shape, text_prompt)
|
56 |
assert image.shape[0] == 1 and zoomed_image.shape[0] == 1, 'batch size should be 1'
|
57 |
# print(bbox_prompt.shape, bbox_prompt_map.shape, point_prompt[0].shape, point_prompt[1].shape, point_prompt_map.shape)
|
|
|
45 |
zoomed_image=None,
|
46 |
text_prompt=None,
|
47 |
bbox_prompt=None,
|
48 |
+
bbox_prompt_map=None,
|
49 |
point_prompt=None,
|
50 |
+
point_prompt_map=None,
|
51 |
+
use_zoom=True):
|
|
|
|
|
|
|
|
|
52 |
# print(image.shape, zoomed_image.shape, text_prompt)
|
53 |
assert image.shape[0] == 1 and zoomed_image.shape[0] == 1, 'batch size should be 1'
|
54 |
# print(bbox_prompt.shape, bbox_prompt_map.shape, point_prompt[0].shape, point_prompt[1].shape, point_prompt_map.shape)
|