Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
e7ce0d3
1
Parent(s):
90e5b39
Update app
Browse files
app.py
CHANGED
|
@@ -195,7 +195,7 @@ def inference_video(avi_dir, work_dir, padding=0):
|
|
| 195 |
dets = []
|
| 196 |
fidx = 0
|
| 197 |
|
| 198 |
-
print("Detecting people in the video using YOLO
|
| 199 |
def generate_detections():
|
| 200 |
global dets, fidx
|
| 201 |
while True:
|
|
@@ -1012,13 +1012,13 @@ def load_masked_input_frames(test_videos, spec, wav_file, scene_num, result_fold
|
|
| 1012 |
print("Successfully loaded the video frames")
|
| 1013 |
|
| 1014 |
# Extract the keypoints from the frames
|
| 1015 |
-
kp_dict, status = get_keypoints(frames)
|
| 1016 |
-
if status != "success":
|
| 1017 |
-
|
| 1018 |
-
print("Successfully extracted the keypoints")
|
| 1019 |
|
| 1020 |
# Mask the frames using the keypoints extracted from the frames and prepare the input to the model
|
| 1021 |
-
masked_frames, num_frames, orig_masked_frames, status = load_rgb_masked_frames(frames, kp_dict, asd=True)
|
| 1022 |
if status != "success":
|
| 1023 |
return None, None, status
|
| 1024 |
print("Successfully loaded the masked frames")
|
|
@@ -1087,7 +1087,7 @@ def get_embeddings(video_sequences, audio_sequences, model, calc_aud_emb=True):
|
|
| 1087 |
audio_emb = []
|
| 1088 |
|
| 1089 |
model = model.cuda()
|
| 1090 |
-
|
| 1091 |
for i in tqdm(range(0, len(video_sequences), batch_size)):
|
| 1092 |
video_inp = video_sequences[i:i+batch_size, ]
|
| 1093 |
vid_emb = model.forward_vid(video_inp.to(device), return_feats=False)
|
|
|
|
| 195 |
dets = []
|
| 196 |
fidx = 0
|
| 197 |
|
| 198 |
+
print("Detecting people in the video using YOLO...")
|
| 199 |
def generate_detections():
|
| 200 |
global dets, fidx
|
| 201 |
while True:
|
|
|
|
| 1012 |
print("Successfully loaded the video frames")
|
| 1013 |
|
| 1014 |
# Extract the keypoints from the frames
|
| 1015 |
+
# kp_dict, status = get_keypoints(frames)
|
| 1016 |
+
# if status != "success":
|
| 1017 |
+
# return None, None, status
|
| 1018 |
+
# print("Successfully extracted the keypoints")
|
| 1019 |
|
| 1020 |
# Mask the frames using the keypoints extracted from the frames and prepare the input to the model
|
| 1021 |
+
masked_frames, num_frames, orig_masked_frames, status = load_rgb_masked_frames(frames, kp_dict=None, asd=True)
|
| 1022 |
if status != "success":
|
| 1023 |
return None, None, status
|
| 1024 |
print("Successfully loaded the masked frames")
|
|
|
|
| 1087 |
audio_emb = []
|
| 1088 |
|
| 1089 |
model = model.cuda()
|
| 1090 |
+
|
| 1091 |
for i in tqdm(range(0, len(video_sequences), batch_size)):
|
| 1092 |
video_inp = video_sequences[i:i+batch_size, ]
|
| 1093 |
vid_emb = model.forward_vid(video_inp.to(device), return_feats=False)
|