Spaces:
Running
on
Zero
Running
on
Zero
Update mask_adapter/sam_maskadapter.py
Browse files
mask_adapter/sam_maskadapter.py
CHANGED
@@ -188,7 +188,7 @@ class SAMVisualizationDemo(object):
|
|
188 |
select_mask.extend(locs[0].tolist())
|
189 |
for idx in select_mask:
|
190 |
select_cls[idx] = class_preds[idx]
|
191 |
-
semseg = torch.einsum("qc,qhw->chw", select_cls.float(), pred_masks.tensor.float())
|
192 |
|
193 |
r = semseg
|
194 |
blank_area = (r[0] == 0)
|
|
|
188 |
select_mask.extend(locs[0].tolist())
|
189 |
for idx in select_mask:
|
190 |
select_cls[idx] = class_preds[idx]
|
191 |
+
semseg = torch.einsum("qc,qhw->chw", select_cls.float(), pred_masks.tensor.to(text_features).float())
|
192 |
|
193 |
r = semseg
|
194 |
blank_area = (r[0] == 0)
|