freealise commited on
Commit
38e2927
1 Parent(s): c755218

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -117,6 +117,7 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
117
  #out = cv2.VideoWriter(output_path, cv2.VideoWriter_fourcc(*"avc1"), frame_rate, (output_width, frame_height))
118
  #fourcc = cv2.VideoWriter_fourcc(*'mp4v')
119
  #out = cv2.VideoWriter(output_path, fourcc, frame_rate, (output_width, frame_height))
 
120
  count=0
121
  depth_frames = []
122
  orig_frames = []
@@ -160,8 +161,8 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
160
 
161
  cv2.imwrite(f"f{count}.jpg", raw_frame)
162
  orig_frames.append(f"f{count}.jpg")
163
- global masks
164
  masks.append(f"f{count}.jpg")
 
165
  cv2.imwrite(f"f{count}_dmap.jpg", depth_color)
166
  depth_frames.append(f"f{count}_dmap.jpg")
167
  count += 1
@@ -320,7 +321,8 @@ def select_frame(v, evt: gr.SelectData):
320
  masks[frame_selected] = v
321
  frame_selected = evt.index
322
  v = masks[frame_selected]
323
- #print(v)
 
324
  return v, frame_selected
325
 
326
  def switch_rows(v):
 
117
  #out = cv2.VideoWriter(output_path, cv2.VideoWriter_fourcc(*"avc1"), frame_rate, (output_width, frame_height))
118
  #fourcc = cv2.VideoWriter_fourcc(*'mp4v')
119
  #out = cv2.VideoWriter(output_path, fourcc, frame_rate, (output_width, frame_height))
120
+ global masks
121
  count=0
122
  depth_frames = []
123
  orig_frames = []
 
161
 
162
  cv2.imwrite(f"f{count}.jpg", raw_frame)
163
  orig_frames.append(f"f{count}.jpg")
 
164
  masks.append(f"f{count}.jpg")
165
+
166
  cv2.imwrite(f"f{count}_dmap.jpg", depth_color)
167
  depth_frames.append(f"f{count}_dmap.jpg")
168
  count += 1
 
321
  masks[frame_selected] = v
322
  frame_selected = evt.index
323
  v = masks[frame_selected]
324
+ print(evt.index)
325
+ print(frame_selected)
326
  return v, frame_selected
327
 
328
  def switch_rows(v):