Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ def detect_video(video):
|
|
| 83 |
if not ret:
|
| 84 |
break
|
| 85 |
for i in tqdm(range(nb_frames)):
|
| 86 |
-
ret, image_np =
|
| 87 |
input_tensor = tf.convert_to_tensor(np.expand_dims(image_np, 0), dtype=tf.uint8)
|
| 88 |
results = detection_model(input_tensor)
|
| 89 |
image_np_with_detections = viz_utils.visualize_boxes_and_labels_on_image_array(
|
|
|
|
| 83 |
if not ret:
|
| 84 |
break
|
| 85 |
for i in tqdm(range(nb_frames)):
|
| 86 |
+
ret, image_np = cap.read()
|
| 87 |
input_tensor = tf.convert_to_tensor(np.expand_dims(image_np, 0), dtype=tf.uint8)
|
| 88 |
results = detection_model(input_tensor)
|
| 89 |
image_np_with_detections = viz_utils.visualize_boxes_and_labels_on_image_array(
|