Spaces:
Running
Running
Ubuntu
commited on
Commit
•
4e48206
1
Parent(s):
60b5a4c
- .ipynb_checkpoints/app-checkpoint.py +2 -1
- app.py +2 -1
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -7,7 +7,8 @@ import numpy as np
|
|
7 |
|
8 |
def video_identity(filepath):
|
9 |
vid = EncodedVideo.from_path(filepath)
|
10 |
-
|
|
|
11 |
write_video('out.mp4', video_arr, fps=60)
|
12 |
capture = cv2.VideoCapture('out.mp4')
|
13 |
while (True):
|
|
|
7 |
|
8 |
def video_identity(filepath):
|
9 |
vid = EncodedVideo.from_path(filepath)
|
10 |
+
clip = vid.get_clip(start_sec, start_sec + duration)
|
11 |
+
video_arr = torch.from_numpy(clip['video']).permute(3, 0, 1, 2)
|
12 |
write_video('out.mp4', video_arr, fps=60)
|
13 |
capture = cv2.VideoCapture('out.mp4')
|
14 |
while (True):
|
app.py
CHANGED
@@ -7,7 +7,8 @@ import numpy as np
|
|
7 |
|
8 |
def video_identity(filepath):
|
9 |
vid = EncodedVideo.from_path(filepath)
|
10 |
-
|
|
|
11 |
write_video('out.mp4', video_arr, fps=60)
|
12 |
capture = cv2.VideoCapture('out.mp4')
|
13 |
while (True):
|
|
|
7 |
|
8 |
def video_identity(filepath):
|
9 |
vid = EncodedVideo.from_path(filepath)
|
10 |
+
clip = vid.get_clip(start_sec, start_sec + duration)
|
11 |
+
video_arr = torch.from_numpy(clip['video']).permute(3, 0, 1, 2)
|
12 |
write_video('out.mp4', video_arr, fps=60)
|
13 |
capture = cv2.VideoCapture('out.mp4')
|
14 |
while (True):
|