Spaces:
Running
on
Zero
Running
on
Zero
Update inference_video.py
Browse files- inference_video.py +2 -3
inference_video.py
CHANGED
|
@@ -15,9 +15,6 @@ import numpy as np
|
|
| 15 |
|
| 16 |
IMAGE_FORMATS = ('.png', '.jpg', '.jpeg', '.tiff', '.bmp', '.gif')
|
| 17 |
|
| 18 |
-
cap = cv2.VideoCapture(video)
|
| 19 |
-
fps = cap.get(cv2.CAP_PROP_FPS)
|
| 20 |
-
|
| 21 |
|
| 22 |
def inference_image(image, size):
|
| 23 |
global model2
|
|
@@ -69,6 +66,8 @@ zee = 0
|
|
| 69 |
|
| 70 |
def convert_frames_to_video(pathIn,pathOut,fps):
|
| 71 |
global INPUT_DIR
|
|
|
|
|
|
|
| 72 |
frame_array = []
|
| 73 |
files = [f for f in os.listdir(pathIn) if isfile(join(pathIn, f))]
|
| 74 |
#for sorting the file names properly
|
|
|
|
| 15 |
|
| 16 |
IMAGE_FORMATS = ('.png', '.jpg', '.jpeg', '.tiff', '.bmp', '.gif')
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
def inference_image(image, size):
|
| 20 |
global model2
|
|
|
|
| 66 |
|
| 67 |
def convert_frames_to_video(pathIn,pathOut,fps):
|
| 68 |
global INPUT_DIR
|
| 69 |
+
cap = cv2.VideoCapture(f'/{INPUT_DIR}/videos/input.mp4')
|
| 70 |
+
fps = cap.get(cv2.CAP_PROP_FPS)
|
| 71 |
frame_array = []
|
| 72 |
files = [f for f in os.listdir(pathIn) if isfile(join(pathIn, f))]
|
| 73 |
#for sorting the file names properly
|