Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def iter_clips(video_path, num_segments=4, stride_size=16):
|
|
48 |
max_start_frame = len(vr) - frame_sample_size
|
49 |
curr_frame = 0
|
50 |
fps = vr.get_avg_fps()
|
51 |
-
while curr_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)
|
|
|
48 |
max_start_frame = len(vr) - frame_sample_size
|
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)
|