wondervictor commited on
Commit
d6fc514
·
verified ·
1 Parent(s): c0cbd03

Update mask_adapter/sam_maskadapter.py

Browse files
Files changed (1) hide show
  1. mask_adapter/sam_maskadapter.py +1 -1
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)