Update app.py
Browse files
app.py
CHANGED
@@ -18,18 +18,22 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
|
|
18 |
print(f"Error occurred: {results[0]}")
|
19 |
return [results[0]] + [None] * 27
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
29 |
|
|
|
30 |
anomaly_faces_embeddings_pil = [Image.fromarray(face) for face in anomaly_faces_embeddings] if anomaly_faces_embeddings is not None else []
|
31 |
anomaly_frames_posture_pil = [Image.fromarray(frame) for frame in anomaly_frames_posture_images] if anomaly_frames_posture_images is not None else []
|
32 |
|
|
|
33 |
face_samples_frequent = [Image.open(path) for path in face_samples_frequent] if face_samples_frequent is not None else []
|
34 |
|
35 |
output = [
|
|
|
18 |
print(f"Error occurred: {results[0]}")
|
19 |
return [results[0]] + [None] * 27
|
20 |
|
21 |
+
(
|
22 |
+
exec_time, results_summary, df, mse_embeddings, mse_posture, mse_voice,
|
23 |
+
mse_plot_embeddings, mse_plot_posture, mse_plot_voice,
|
24 |
+
mse_histogram_embeddings, mse_histogram_posture, mse_histogram_voice,
|
25 |
+
mse_heatmap_embeddings, mse_heatmap_posture, mse_heatmap_voice,
|
26 |
+
audio_waveform_plot, face_samples_frequent,
|
27 |
+
anomaly_faces_embeddings, anomaly_frames_posture_images,
|
28 |
+
aligned_faces_folder, frames_folder,
|
29 |
+
stacked_heatmap
|
30 |
+
) = results
|
31 |
|
32 |
+
# Convert numpy arrays to PIL Images
|
33 |
anomaly_faces_embeddings_pil = [Image.fromarray(face) for face in anomaly_faces_embeddings] if anomaly_faces_embeddings is not None else []
|
34 |
anomaly_frames_posture_pil = [Image.fromarray(frame) for frame in anomaly_frames_posture_images] if anomaly_frames_posture_images is not None else []
|
35 |
|
36 |
+
# Load face samples
|
37 |
face_samples_frequent = [Image.open(path) for path in face_samples_frequent] if face_samples_frequent is not None else []
|
38 |
|
39 |
output = [
|