Update app.py
Browse files
app.py
CHANGED
@@ -32,12 +32,6 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
32 |
face_samples_frequent = [Image.open(path) for path in face_samples_frequent]
|
33 |
face_samples_other = [Image.open(path) for path in face_samples_other]
|
34 |
|
35 |
-
# Convert timecodes to seconds for plotting
|
36 |
-
df['Timecode_Seconds'] = df['Timecode'].apply(lambda x: sum(float(t) * 60 ** i for i, t in enumerate(reversed(x.split(':')))))
|
37 |
-
|
38 |
-
kde_plot = create_kdeplot(df, mse_embeddings, mse_posture)
|
39 |
-
joint_plot = create_jointplot(df, mse_embeddings, mse_posture)
|
40 |
-
|
41 |
output = [
|
42 |
exec_time, results_summary,
|
43 |
df, mse_embeddings, mse_posture,
|
@@ -47,8 +41,7 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
47 |
anomaly_faces_embeddings_pil, anomaly_frames_posture_pil,
|
48 |
face_samples_frequent, face_samples_other,
|
49 |
aligned_faces_folder, frames_folder,
|
50 |
-
mse_embeddings, mse_posture
|
51 |
-
kde_plot, joint_plot
|
52 |
]
|
53 |
|
54 |
return output
|
@@ -121,8 +114,7 @@ with gr.Blocks() as iface:
|
|
121 |
anomaly_frames_features, anomaly_frames_posture,
|
122 |
face_samples_most_frequent, face_samples_others,
|
123 |
aligned_faces_folder_store, frames_folder_store,
|
124 |
-
mse_heatmap_embeddings_store, mse_heatmap_posture_store
|
125 |
-
kde_plot, joint_plot
|
126 |
]
|
127 |
).then(
|
128 |
lambda: gr.Group(visible=True),
|
|
|
32 |
face_samples_frequent = [Image.open(path) for path in face_samples_frequent]
|
33 |
face_samples_other = [Image.open(path) for path in face_samples_other]
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
output = [
|
36 |
exec_time, results_summary,
|
37 |
df, mse_embeddings, mse_posture,
|
|
|
41 |
anomaly_faces_embeddings_pil, anomaly_frames_posture_pil,
|
42 |
face_samples_frequent, face_samples_other,
|
43 |
aligned_faces_folder, frames_folder,
|
44 |
+
mse_embeddings, mse_posture
|
|
|
45 |
]
|
46 |
|
47 |
return output
|
|
|
114 |
anomaly_frames_features, anomaly_frames_posture,
|
115 |
face_samples_most_frequent, face_samples_others,
|
116 |
aligned_faces_folder_store, frames_folder_store,
|
117 |
+
mse_heatmap_embeddings_store, mse_heatmap_posture_store
|
|
|
118 |
]
|
119 |
).then(
|
120 |
lambda: gr.Group(visible=True),
|