Spaces:
Runtime error
Runtime error
Commit
·
1748a6b
1
Parent(s):
92a7202
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,6 +125,7 @@ def calculate_fps(input_video, batch_size):
|
|
| 125 |
#print("total vid duration", total_vid_duration)
|
| 126 |
#print("frames to process", frames_to_process)
|
| 127 |
#print("batch size", batch_size)
|
|
|
|
| 128 |
return frames, frames_per_second
|
| 129 |
|
| 130 |
def preprocess_and_invert(input_video,
|
|
@@ -166,9 +167,12 @@ def preprocess_and_invert(input_video,
|
|
| 166 |
not_processed = True
|
| 167 |
else:
|
| 168 |
preprocess_config['frames'] = frames
|
|
|
|
|
|
|
| 169 |
preprocess_config['data_path'] = input_video.split(".")[0]
|
| 170 |
|
| 171 |
total_vid_frames = len(preprocess_config['frames'])
|
|
|
|
| 172 |
total_vid_duration = total_vid_frames/n_fps_input
|
| 173 |
|
| 174 |
if(total_vid_duration < 1):
|
|
|
|
| 125 |
#print("total vid duration", total_vid_duration)
|
| 126 |
#print("frames to process", frames_to_process)
|
| 127 |
#print("batch size", batch_size)
|
| 128 |
+
print("fps", frames_per_second)
|
| 129 |
return frames, frames_per_second
|
| 130 |
|
| 131 |
def preprocess_and_invert(input_video,
|
|
|
|
| 167 |
not_processed = True
|
| 168 |
else:
|
| 169 |
preprocess_config['frames'] = frames
|
| 170 |
+
|
| 171 |
+
print("pre-process fps ", n_fps_input)
|
| 172 |
preprocess_config['data_path'] = input_video.split(".")[0]
|
| 173 |
|
| 174 |
total_vid_frames = len(preprocess_config['frames'])
|
| 175 |
+
print("total frames", total_vid_frames)
|
| 176 |
total_vid_duration = total_vid_frames/n_fps_input
|
| 177 |
|
| 178 |
if(total_vid_duration < 1):
|