reab5555 commited on
Commit
1622ad2
·
verified ·
1 Parent(s): a464e4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -15,13 +15,12 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
15
 
16
  if isinstance(results[0], str) and results[0].startswith("Error"):
17
  print(f"Error occurred: {results[0]}")
18
- return [results[0]] + [None] * 18 # Increased by 1 for the new heatmap video
19
 
20
  exec_time, results_summary, df, mse_embeddings, mse_posture, \
21
  mse_plot_embeddings, mse_histogram_embeddings, \
22
  mse_plot_posture, mse_histogram_posture, \
23
  mse_heatmap_embeddings, mse_heatmap_posture, \
24
- mse_voice, mse_plot_voice, mse_histogram_voice, mse_heatmap_voice, \
25
  face_samples_frequent, \
26
  anomaly_faces_embeddings, anomaly_frames_posture_images, \
27
  aligned_faces_folder, frames_folder, \
@@ -52,14 +51,14 @@ def process_and_show_completion(video_input_path, anomaly_threshold_input, fps,
52
  print(error_message)
53
  import traceback
54
  traceback.print_exc()
55
- return [error_message] + [None] * 18 # Increased by 1 for the new heatmap video
56
 
57
  with gr.Blocks() as iface:
58
  gr.Markdown("""
59
  # Multimodal Behavioral Anomalies Detection
60
 
61
- This tool detects anomalies in facial expressions, body language, and voice over the timeline of a video.
62
- It extracts faces, postures, and voice features from video frames, and analyzes them to identify anomalies using time series analysis and a variational autoencoder (VAE) approach.
63
  """)
64
 
65
  with gr.Row():
@@ -87,11 +86,6 @@ with gr.Blocks() as iface:
87
  mse_posture_heatmap = gr.Plot(label="MSE Heatmap: Body Posture")
88
  anomaly_frames_posture = gr.Gallery(label="Anomaly Frames (Body Posture)", columns=6, rows=2, height="auto")
89
 
90
- with gr.Tab("Voice"):
91
- mse_voice_plot = gr.Plot(label="MSE: Voice")
92
- mse_voice_hist = gr.Plot(label="MSE Distribution: Voice")
93
- mse_voice_heatmap = gr.Plot(label="MSE Heatmap: Voice")
94
-
95
  with gr.Tab("Video with Heatmap"):
96
  heatmap_video = gr.Video(label="Video with Anomaly Heatmap")
97
 
 
15
 
16
  if isinstance(results[0], str) and results[0].startswith("Error"):
17
  print(f"Error occurred: {results[0]}")
18
+ return [results[0]] + [None] * 17
19
 
20
  exec_time, results_summary, df, mse_embeddings, mse_posture, \
21
  mse_plot_embeddings, mse_histogram_embeddings, \
22
  mse_plot_posture, mse_histogram_posture, \
23
  mse_heatmap_embeddings, mse_heatmap_posture, \
 
24
  face_samples_frequent, \
25
  anomaly_faces_embeddings, anomaly_frames_posture_images, \
26
  aligned_faces_folder, frames_folder, \
 
51
  print(error_message)
52
  import traceback
53
  traceback.print_exc()
54
+ return [error_message] + [None] * 17
55
 
56
  with gr.Blocks() as iface:
57
  gr.Markdown("""
58
  # Multimodal Behavioral Anomalies Detection
59
 
60
+ This tool detects anomalies in facial expressions and body language over the timeline of a video.
61
+ It extracts faces and postures from video frames, and analyzes them to identify anomalies using time series analysis and a variational autoencoder (VAE) approach.
62
  """)
63
 
64
  with gr.Row():
 
86
  mse_posture_heatmap = gr.Plot(label="MSE Heatmap: Body Posture")
87
  anomaly_frames_posture = gr.Gallery(label="Anomaly Frames (Body Posture)", columns=6, rows=2, height="auto")
88
 
 
 
 
 
 
89
  with gr.Tab("Video with Heatmap"):
90
  heatmap_video = gr.Video(label="Video with Anomaly Heatmap")
91