Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -250,7 +250,7 @@ def sam_process(input_first_frame_image, checkpoint, tracking_points, trackings_
|
|
250 |
plt.close()
|
251 |
torch.cuda.empty_cache()
|
252 |
|
253 |
-
return "output_first_frame.jpg", frame_names, inference_state
|
254 |
|
255 |
def propagate_to_all(video_in, checkpoint, stored_inference_state, stored_frame_names, video_frames_dir, vis_frame_type, progress=gr.Progress(track_tqdm=True)):
|
256 |
#### PROPAGATION ####
|
@@ -416,19 +416,19 @@ with gr.Blocks() as demo:
|
|
416 |
queue = False
|
417 |
)
|
418 |
|
419 |
-
|
420 |
working_frame.change(
|
421 |
fn = switch_working_frame,
|
422 |
inputs = [working_frame, scanned_frames, video_frames_dir],
|
423 |
outputs = [first_frame_path, tracking_points, trackings_input_label, input_first_frame_image, points_map, working_frame],
|
424 |
queue=False
|
425 |
)
|
426 |
-
|
427 |
|
428 |
submit_btn.click(
|
429 |
fn = sam_process,
|
430 |
inputs = [input_first_frame_image, checkpoint, tracking_points, trackings_input_label, video_frames_dir, scanned_frames, working_frame],
|
431 |
-
outputs = [output_result, stored_frame_names, stored_inference_state
|
432 |
)
|
433 |
|
434 |
propagate_btn.click(
|
|
|
250 |
plt.close()
|
251 |
torch.cuda.empty_cache()
|
252 |
|
253 |
+
return "output_first_frame.jpg", frame_names, inference_state
|
254 |
|
255 |
def propagate_to_all(video_in, checkpoint, stored_inference_state, stored_frame_names, video_frames_dir, vis_frame_type, progress=gr.Progress(track_tqdm=True)):
|
256 |
#### PROPAGATION ####
|
|
|
416 |
queue = False
|
417 |
)
|
418 |
|
419 |
+
"""
|
420 |
working_frame.change(
|
421 |
fn = switch_working_frame,
|
422 |
inputs = [working_frame, scanned_frames, video_frames_dir],
|
423 |
outputs = [first_frame_path, tracking_points, trackings_input_label, input_first_frame_image, points_map, working_frame],
|
424 |
queue=False
|
425 |
)
|
426 |
+
"""
|
427 |
|
428 |
submit_btn.click(
|
429 |
fn = sam_process,
|
430 |
inputs = [input_first_frame_image, checkpoint, tracking_points, trackings_input_label, video_frames_dir, scanned_frames, working_frame],
|
431 |
+
outputs = [output_result, stored_frame_names, stored_inference_state]
|
432 |
)
|
433 |
|
434 |
propagate_btn.click(
|