Commit
·
c5e3f79
1
Parent(s):
1579b70
fixing
Browse files- services/summarizer.py +5 -5
services/summarizer.py
CHANGED
@@ -25,9 +25,9 @@ def get_scores(features):
|
|
25 |
def get_selected_indices(scores, picks, threshold=SCORE_THRESHOLD):
|
26 |
selected = [picks[i] for i, score in enumerate(scores) if score >= threshold]
|
27 |
print("Threshold for selection:", threshold)
|
28 |
-
print("Scores:", len(scores)
|
29 |
-
print("Picks:", len(picks)
|
30 |
-
print("Selected
|
31 |
return selected
|
32 |
|
33 |
def save_summary_video(video_path, selected_indices, output_path, fps=15):
|
@@ -59,8 +59,8 @@ def save_summary_video(video_path, selected_indices, output_path, fps=15):
|
|
59 |
out.write(frame)
|
60 |
out.release()
|
61 |
|
62 |
-
print("Fixing the video with ffmpeg")
|
63 |
-
fix_video_with_ffmpeg(output_path)
|
64 |
|
65 |
def fix_video_with_ffmpeg(path):
|
66 |
temp_path = path + ".fixed.mp4"
|
|
|
25 |
def get_selected_indices(scores, picks, threshold=SCORE_THRESHOLD):
|
26 |
selected = [picks[i] for i, score in enumerate(scores) if score >= threshold]
|
27 |
print("Threshold for selection:", threshold)
|
28 |
+
print("Scores:", len(scores))
|
29 |
+
print("Picks:", len(picks))
|
30 |
+
print("Selected:", len(selected), selected)
|
31 |
return selected
|
32 |
|
33 |
def save_summary_video(video_path, selected_indices, output_path, fps=15):
|
|
|
59 |
out.write(frame)
|
60 |
out.release()
|
61 |
|
62 |
+
# print("Fixing the video with ffmpeg")
|
63 |
+
# fix_video_with_ffmpeg(output_path)
|
64 |
|
65 |
def fix_video_with_ffmpeg(path):
|
66 |
temp_path = path + ".fixed.mp4"
|