Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,12 @@ SUBSAMPLE = 2
|
|
40 |
def stream_object_detection(video, conf_threshold):
|
41 |
cap = cv2.VideoCapture(video)
|
42 |
|
|
|
|
|
|
|
|
|
43 |
while iterating:
|
|
|
44 |
frame = cv2.resize( frame, (0,0), fx=0.5, fy=0.5)
|
45 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
46 |
if n_frames % SUBSAMPLE == 0:
|
@@ -72,7 +77,6 @@ def stream_object_detection(video, conf_threshold):
|
|
72 |
end = time.time()
|
73 |
print("time taken for processing boxes", end - start)
|
74 |
|
75 |
-
iterating, frame = cap.read()
|
76 |
n_frames += 1
|
77 |
|
78 |
|
|
|
40 |
def stream_object_detection(video, conf_threshold):
|
41 |
cap = cv2.VideoCapture(video)
|
42 |
|
43 |
+
iterating = True
|
44 |
+
batch = []
|
45 |
+
|
46 |
+
|
47 |
while iterating:
|
48 |
+
iterating, frame = cap.read()
|
49 |
frame = cv2.resize( frame, (0,0), fx=0.5, fy=0.5)
|
50 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
51 |
if n_frames % SUBSAMPLE == 0:
|
|
|
77 |
end = time.time()
|
78 |
print("time taken for processing boxes", end - start)
|
79 |
|
|
|
80 |
n_frames += 1
|
81 |
|
82 |
|