nateraw commited on
Commit
96f2ad7
β€’
1 Parent(s): 8b7f367

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -49,7 +49,7 @@ def iter_clips(video_path, num_segments=4, stride_size=16):
49
  curr_frame = 0
50
  fps = vr.get_avg_fps()
51
  while curr_frame == 0 or curr_frame < max_start_frame:
52
- stop_frame = min(frame_sample_size, len(vr))
53
  curr_sec, stop_sec = curr_frame / fps, stop_frame / fps
54
  frame_ids = get_frame_ids(curr_frame, stop_frame, num_segments=num_segments, jitter=False)
55
  frames = video_loader_by_frames('./', video_path, frame_ids)
 
49
  curr_frame = 0
50
  fps = vr.get_avg_fps()
51
  while curr_frame == 0 or curr_frame < max_start_frame:
52
+ stop_frame = min(curr_frame + frame_sample_size, len(vr))
53
  curr_sec, stop_sec = curr_frame / fps, stop_frame / fps
54
  frame_ids = get_frame_ids(curr_frame, stop_frame, num_segments=num_segments, jitter=False)
55
  frames = video_loader_by_frames('./', video_path, frame_ids)