Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,13 +42,13 @@ SUBSAMPLE = 2
|
|
| 42 |
def stream_object_detection(video, conf_threshold):
|
| 43 |
cap = cv2.VideoCapture(video)
|
| 44 |
|
| 45 |
-
|
| 46 |
|
| 47 |
iterating = True
|
| 48 |
#desired_fps = fps // SUBSAMPLE
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
#n_frames = 0
|
| 53 |
|
| 54 |
while iterating:
|
|
|
|
| 42 |
def stream_object_detection(video, conf_threshold):
|
| 43 |
cap = cv2.VideoCapture(video)
|
| 44 |
|
| 45 |
+
fps = int(cap.get(cv2.CAP_PROP_FPS))
|
| 46 |
|
| 47 |
iterating = True
|
| 48 |
#desired_fps = fps // SUBSAMPLE
|
| 49 |
+
batch = []
|
| 50 |
+
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) // 2
|
| 51 |
+
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) // 2
|
| 52 |
#n_frames = 0
|
| 53 |
|
| 54 |
while iterating:
|