Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
77624ae
1
Parent(s):
378f7fc
Update app
Browse files
app.py
CHANGED
|
@@ -1333,11 +1333,12 @@ def process_video_syncoffset(video_path, num_avg_frames, apply_preprocess):
|
|
| 1333 |
print("Obtaining audio and video embeddings...")
|
| 1334 |
video_emb, audio_emb = get_embeddings(video_sequences, audio_sequences, model, calc_aud_emb=True)
|
| 1335 |
print("Obtained embeddings")
|
| 1336 |
-
video_emb = torch.cat(video_emb, dim=0)
|
| 1337 |
-
audio_emb = torch.cat(audio_emb, dim=0)
|
| 1338 |
print("Successfully extracted GestSync embeddings")
|
| 1339 |
|
| 1340 |
# L2 normalize embeddings
|
|
|
|
| 1341 |
video_emb = torch.nn.functional.normalize(video_emb, p=2, dim=1)
|
| 1342 |
audio_emb = torch.nn.functional.normalize(audio_emb, p=2, dim=1)
|
| 1343 |
|
|
|
|
| 1333 |
print("Obtaining audio and video embeddings...")
|
| 1334 |
video_emb, audio_emb = get_embeddings(video_sequences, audio_sequences, model, calc_aud_emb=True)
|
| 1335 |
print("Obtained embeddings")
|
| 1336 |
+
# video_emb = torch.cat(video_emb, dim=0)
|
| 1337 |
+
# audio_emb = torch.cat(audio_emb, dim=0)
|
| 1338 |
print("Successfully extracted GestSync embeddings")
|
| 1339 |
|
| 1340 |
# L2 normalize embeddings
|
| 1341 |
+
print("Normalizing embeddings")
|
| 1342 |
video_emb = torch.nn.functional.normalize(video_emb, p=2, dim=1)
|
| 1343 |
audio_emb = torch.nn.functional.normalize(audio_emb, p=2, dim=1)
|
| 1344 |
|