Spaces:
Runtime error
Runtime error
Update video_detection.py
Browse files- video_detection.py +2 -2
video_detection.py
CHANGED
@@ -51,8 +51,8 @@ def video_detection(cap):
|
|
51 |
while iterating:
|
52 |
frame = cv2.resize( frame, (0,0), fx=0.5, fy=0.5)
|
53 |
#frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
54 |
-
if n_frames % SUBSAMPLE == 0:
|
55 |
-
|
56 |
#if len(batch) == 2 * desired_fps:
|
57 |
if len(batch) == 4:
|
58 |
#inputs = image_processor(images=batch, return_tensors="pt").to("cuda")
|
|
|
51 |
while iterating:
|
52 |
frame = cv2.resize( frame, (0,0), fx=0.5, fy=0.5)
|
53 |
#frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
54 |
+
#if n_frames % SUBSAMPLE == 0:
|
55 |
+
batch.append(frame)
|
56 |
#if len(batch) == 2 * desired_fps:
|
57 |
if len(batch) == 4:
|
58 |
#inputs = image_processor(images=batch, return_tensors="pt").to("cuda")
|