Spaces:
Configuration error
Configuration error
Commit
·
4de346a
1
Parent(s):
e7ce0d3
Update app
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ CHECKPOINT_PATH = "model_rgb.pth"
|
|
41 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
42 |
use_cuda = torch.cuda.is_available()
|
43 |
print("Use cuda status: ", use_cuda)
|
44 |
-
batch_size =
|
45 |
fps = 25
|
46 |
n_negative_samples = 100
|
47 |
|
@@ -1321,9 +1321,9 @@ def process_video_syncoffset(video_path, num_avg_frames, apply_preprocess):
|
|
1321 |
print("Successfully loaded the model")
|
1322 |
|
1323 |
# Extract embeddings
|
|
|
1324 |
video_emb, audio_emb = get_embeddings(video_sequences, audio_sequences, model, calc_aud_emb=True)
|
1325 |
|
1326 |
-
|
1327 |
# L2 normalize embeddings
|
1328 |
video_emb = torch.nn.functional.normalize(video_emb, p=2, dim=1)
|
1329 |
audio_emb = torch.nn.functional.normalize(audio_emb, p=2, dim=1)
|
|
|
41 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
42 |
use_cuda = torch.cuda.is_available()
|
43 |
print("Use cuda status: ", use_cuda)
|
44 |
+
batch_size = 24
|
45 |
fps = 25
|
46 |
n_negative_samples = 100
|
47 |
|
|
|
1321 |
print("Successfully loaded the model")
|
1322 |
|
1323 |
# Extract embeddings
|
1324 |
+
print("Obtaining audio and video embeddings...")
|
1325 |
video_emb, audio_emb = get_embeddings(video_sequences, audio_sequences, model, calc_aud_emb=True)
|
1326 |
|
|
|
1327 |
# L2 normalize embeddings
|
1328 |
video_emb = torch.nn.functional.normalize(video_emb, p=2, dim=1)
|
1329 |
audio_emb = torch.nn.functional.normalize(audio_emb, p=2, dim=1)
|