fix: account for threshold
Browse files
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,
|
48 |
-
positive_masks = get_masks(pos_prompts, img,
|
49 |
-
negative_masks = get_masks(neg_prompts, img,
|
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)
|