Spaces:
Running
on
Zero
Running
on
Zero
Update sam2_mask.py
Browse files- sam2_mask.py +2 -1
sam2_mask.py
CHANGED
@@ -9,6 +9,7 @@ import matplotlib.pyplot as plt
|
|
9 |
from PIL import Image, ImageFilter
|
10 |
from sam2.build_sam import build_sam2
|
11 |
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
|
|
12 |
|
13 |
def preprocess_image(image):
|
14 |
return image, gr.State([]), gr.State([]), image
|
@@ -172,7 +173,7 @@ def create_sam2_tab():
|
|
172 |
fn = preprocess_image,
|
173 |
inputs = [points_map],
|
174 |
# outputs=[sam_input_image, first_frame, tracking_points, trackings_input_label],
|
175 |
-
outputs = [first_frame, tracking_points, trackings_input_label, sam_input_image]
|
176 |
queue=False
|
177 |
)
|
178 |
|
|
|
9 |
from PIL import Image, ImageFilter
|
10 |
from sam2.build_sam import build_sam2
|
11 |
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
12 |
+
from gradio_image_prompter import ImagePrompter
|
13 |
|
14 |
def preprocess_image(image):
|
15 |
return image, gr.State([]), gr.State([]), image
|
|
|
173 |
fn = preprocess_image,
|
174 |
inputs = [points_map],
|
175 |
# outputs=[sam_input_image, first_frame, tracking_points, trackings_input_label],
|
176 |
+
outputs = [first_frame, tracking_points, trackings_input_label, sam_input_image],
|
177 |
queue=False
|
178 |
)
|
179 |
|