sindhuhegde commited on
Commit
4de346a
·
1 Parent(s): e7ce0d3

Update app

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = 48
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)