Spaces:
Runtime error
Runtime error
roychao19477
commited on
Commit
·
723a16d
1
Parent(s):
9e0d895
Update module
Browse files
app.py
CHANGED
|
@@ -104,7 +104,6 @@ def run_avse_inference(video_path, audio_path):
|
|
| 104 |
|
| 105 |
with torch.no_grad():
|
| 106 |
estimated = avse_model.enhance(data).reshape(-1)
|
| 107 |
-
print(estimated.shape)
|
| 108 |
|
| 109 |
# Save result
|
| 110 |
tmp_wav = audio_path.replace(".wav", "_enhanced.wav")
|
|
@@ -150,7 +149,7 @@ def extract_faces(video_file):
|
|
| 150 |
# version 2
|
| 151 |
h, w, _ = frame.shape
|
| 152 |
x1, y1, x2, y2 = box.xyxy[0].cpu().numpy()
|
| 153 |
-
pad_ratio = 0.
|
| 154 |
|
| 155 |
dx = (x2 - x1) * pad_ratio
|
| 156 |
dy = (y2 - y1) * pad_ratio
|
|
|
|
| 104 |
|
| 105 |
with torch.no_grad():
|
| 106 |
estimated = avse_model.enhance(data).reshape(-1)
|
|
|
|
| 107 |
|
| 108 |
# Save result
|
| 109 |
tmp_wav = audio_path.replace(".wav", "_enhanced.wav")
|
|
|
|
| 149 |
# version 2
|
| 150 |
h, w, _ = frame.shape
|
| 151 |
x1, y1, x2, y2 = box.xyxy[0].cpu().numpy()
|
| 152 |
+
pad_ratio = 0.5 # 30% padding
|
| 153 |
|
| 154 |
dx = (x2 - x1) * pad_ratio
|
| 155 |
dy = (y2 - y1) * pad_ratio
|