Abijith commited on
Commit
a3b4745
·
1 Parent(s): 0386c75

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,8 +47,8 @@ def segment_to_bbox(segment_indexs):
47
  return [np.min(x_points), np.min(y_points), np.max(x_points), np.max(y_points)]
48
 
49
  def clipseg_prediction(image):
50
- img_w = image.width
51
- img_h = image.height
52
  inputs = clip_processor(text=prompts, images=[image] * len(prompts), padding="max_length", return_tensors="pt")
53
  # predict
54
  with torch.no_grad():
 
47
  return [np.min(x_points), np.min(y_points), np.max(x_points), np.max(y_points)]
48
 
49
  def clipseg_prediction(image):
50
+
51
+ img_w, img_h = image.shape
52
  inputs = clip_processor(text=prompts, images=[image] * len(prompts), padding="max_length", return_tensors="pt")
53
  # predict
54
  with torch.no_grad():