freealise commited on
Commit
432443b
1 Parent(s): 552a896

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -170,7 +170,7 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
170
 
171
  global frame_selected
172
  global masks
173
- masks = [gr.ImageEditor(interactive=True, transforms=(None,), eraser=gr.Eraser(), brush=gr.Brush(), layers=True)] * len(orig_frames)
174
  return final_vid, final_zip, orig_frames, depth_frames, masks[frame_selected] #output_path
175
 
176
  def depth_edges_mask(depth):
@@ -363,7 +363,7 @@ with gr.Blocks(css=css) as demo:
363
  input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
364
  output_frame = gr.Gallery(label="Frame", type='numpy', preview=True, columns=8192)
365
  output_depth = gr.Gallery(label="Depth", type='numpy', preview=True, columns=8192, interactive=False)
366
- output_mask = gr.ImageEditor(interactive=True, transforms=(None,), eraser=gr.Eraser(), brush=gr.Brush(), layers=True)
367
  submit = gr.Button("Submit")
368
  with gr.Column():
369
  model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
 
170
 
171
  global frame_selected
172
  global masks
173
+ masks = orig_frames
174
  return final_vid, final_zip, orig_frames, depth_frames, masks[frame_selected] #output_path
175
 
176
  def depth_edges_mask(depth):
 
363
  input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
364
  output_frame = gr.Gallery(label="Frame", type='numpy', preview=True, columns=8192)
365
  output_depth = gr.Gallery(label="Depth", type='numpy', preview=True, columns=8192, interactive=False)
366
+ output_mask = gr.ImageEditor(interactive=True, transforms=(None,), eraser=gr.Eraser(), brush=gr.Brush(colors=['black', 'darkgray', 'gray', 'lightgray', 'white']), layers=True)
367
  submit = gr.Button("Submit")
368
  with gr.Column():
369
  model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')