Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -223,6 +223,14 @@ def extract_feature_timeseries(video_path:str, frame_skip:int=FRAME_SKIP, debug:
|
|
| 223 |
total=int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) or 1
|
| 224 |
print(f"[INFO] Reading {total} frames @ {fps:.2f}fps ...")
|
| 225 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
rec,idx=[],0
|
| 227 |
while True:
|
| 228 |
ret,frame=cap.read()
|
|
|
|
| 223 |
total=int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) or 1
|
| 224 |
print(f"[INFO] Reading {total} frames @ {fps:.2f}fps ...")
|
| 225 |
|
| 226 |
+
if total > 1200:
|
| 227 |
+
frame_skip = 4
|
| 228 |
+
elif total > 2400:
|
| 229 |
+
frame_skip = 6
|
| 230 |
+
else:
|
| 231 |
+
frame_skip = FRAME_SKIP
|
| 232 |
+
|
| 233 |
+
|
| 234 |
rec,idx=[],0
|
| 235 |
while True:
|
| 236 |
ret,frame=cap.read()
|