sessex commited on
Commit
a987a32
·
1 Parent(s): 1057483

fix: account for threshold

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -44,9 +44,9 @@ def get_masks(prompts, img, threhsold):
44
  return masks
45
 
46
 
47
- def extract_image(img, pos_prompts, neg_prompts, threhsold):
48
- positive_masks = get_masks(pos_prompts, img, 0.5)
49
- negative_masks = get_masks(neg_prompts, img, 0.5)
50
 
51
  # combine masks into one masks, logic OR
52
  pos_mask = np.any(np.stack(positive_masks), axis=0)
 
44
  return masks
45
 
46
 
47
+ def extract_image(img, pos_prompts, neg_prompts, threshold):
48
+ positive_masks = get_masks(pos_prompts, img, threshold)
49
+ negative_masks = get_masks(neg_prompts, img, threshold)
50
 
51
  # combine masks into one masks, logic OR
52
  pos_mask = np.any(np.stack(positive_masks), axis=0)