Spaces:
Running
on
Zero
Running
on
Zero
roychao19477
commited on
Commit
·
58e2fbb
1
Parent(s):
59b28a8
Update module
Browse files
app.py
CHANGED
@@ -60,6 +60,7 @@ import os
|
|
60 |
import tempfile
|
61 |
from ultralytics import YOLO
|
62 |
from moviepy import ImageSequenceClip
|
|
|
63 |
|
64 |
# Load face detector
|
65 |
model = YOLO("yolov8n-face.pt").cuda() # assumes CUDA available
|
@@ -184,7 +185,7 @@ def extract_faces(video_file):
|
|
184 |
|
185 |
# ------------------------------- #
|
186 |
# AVSE models
|
187 |
-
noisy =
|
188 |
|
189 |
vr = VideoReader(output_path, ctx=cpu(0))
|
190 |
frames = vr.get_batch(list(range(len(vr)))).asnumpy()
|
|
|
60 |
import tempfile
|
61 |
from ultralytics import YOLO
|
62 |
from moviepy import ImageSequenceClip
|
63 |
+
from scipy.io import wavfile
|
64 |
|
65 |
# Load face detector
|
66 |
model = YOLO("yolov8n-face.pt").cuda() # assumes CUDA available
|
|
|
185 |
|
186 |
# ------------------------------- #
|
187 |
# AVSE models
|
188 |
+
noisy = wavfile.read(audio_path)[1].astype(np.float32) / (2 ** 15)
|
189 |
|
190 |
vr = VideoReader(output_path, ctx=cpu(0))
|
191 |
frames = vr.get_batch(list(range(len(vr)))).asnumpy()
|