s194649 commited on
Commit
dcd8315
·
1 Parent(s): 9c32f6d
Files changed (2) hide show
  1. app.py +1 -1
  2. inference.py +0 -1
app.py CHANGED
@@ -99,7 +99,7 @@ with block:
99
  cv2.circle(prompt_image, (x, y), 5, color, -1)
100
  point_coords.append([x,y])
101
  point_labels.append(point_label_radio)
102
- sam_masks = sam_cpu.cond_pred(pts=np.array(point_coords), lbls=np.array(point_labels), embedding=embedding, image_size=input_image.size)
103
  return [ prompt_image,
104
  (input_image, sam_masks),
105
  point_coords,
 
99
  cv2.circle(prompt_image, (x, y), 5, color, -1)
100
  point_coords.append([x,y])
101
  point_labels.append(point_label_radio)
102
+ sam_masks = sam_cpu.cond_pred(pts=np.array(point_coords), lbls=np.array(point_labels), embedding=embedding)
103
  return [ prompt_image,
104
  (input_image, sam_masks),
105
  point_coords,
inference.py CHANGED
@@ -232,7 +232,6 @@ class CustomSamPredictor(SamPredictor):
232
 
233
  def decode_and_predict(
234
  self,
235
- image_size: Tuple[int, int],
236
  embedding: torch.Tensor,
237
  point_coords: Optional[np.ndarray] = None,
238
  point_labels: Optional[np.ndarray] = None,
 
232
 
233
  def decode_and_predict(
234
  self,
 
235
  embedding: torch.Tensor,
236
  point_coords: Optional[np.ndarray] = None,
237
  point_labels: Optional[np.ndarray] = None,