reab5555 commited on
Commit
694c98e
·
verified ·
1 Parent(s): a882402

Update visualization.py

Browse files
Files changed (1) hide show
  1. visualization.py +1 -0
visualization.py CHANGED
@@ -203,6 +203,7 @@ def plot_posture(df, posture_scores, color='blue', anomaly_threshold=3):
203
 
204
  def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, output_path):
205
  from matplotlib.backends.backend_agg import FigureCanvasAgg
 
206
  # Open the video
207
  cap = cv2.VideoCapture(video_path)
208
  fps = cap.get(cv2.CAP_PROP_FPS)
 
203
 
204
  def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, output_path):
205
  from matplotlib.backends.backend_agg import FigureCanvasAgg
206
+ import cv2
207
  # Open the video
208
  cap = cv2.VideoCapture(video_path)
209
  fps = cap.get(cv2.CAP_PROP_FPS)