Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -55,8 +55,8 @@ def clear_points(image):
|
|
55 |
# we clean all
|
56 |
return [
|
57 |
image, # first_frame_path
|
58 |
-
|
59 |
-
|
60 |
image, # points_map
|
61 |
#gr.State() # stored_inference_state
|
62 |
]
|
@@ -220,7 +220,7 @@ def load_model(checkpoint):
|
|
220 |
# return [sam2_checkpoint, model_cfg]
|
221 |
|
222 |
|
223 |
-
|
224 |
def get_mask_sam_process(
|
225 |
stored_inference_state,
|
226 |
input_first_frame_image,
|
@@ -264,11 +264,8 @@ def get_mask_sam_process(
|
|
264 |
inference_state = stored_inference_state
|
265 |
|
266 |
|
267 |
-
|
268 |
-
|
269 |
-
# predictor = build_sam2_video_predictor(model_cfg, sam2_checkpoint)
|
270 |
-
else:
|
271 |
-
inference_state["device"] = 'cpu'
|
272 |
|
273 |
# segment and track one object
|
274 |
# predictor.reset_state(inference_state) # if any previous tracking, reset
|
|
|
55 |
# we clean all
|
56 |
return [
|
57 |
image, # first_frame_path
|
58 |
+
[], # tracking_points
|
59 |
+
[], # trackings_input_label
|
60 |
image, # points_map
|
61 |
#gr.State() # stored_inference_state
|
62 |
]
|
|
|
220 |
# return [sam2_checkpoint, model_cfg]
|
221 |
|
222 |
|
223 |
+
|
224 |
def get_mask_sam_process(
|
225 |
stored_inference_state,
|
226 |
input_first_frame_image,
|
|
|
264 |
inference_state = stored_inference_state
|
265 |
|
266 |
|
267 |
+
|
268 |
+
inference_state["device"] = 'cpu'
|
|
|
|
|
|
|
269 |
|
270 |
# segment and track one object
|
271 |
# predictor.reset_state(inference_state) # if any previous tracking, reset
|