reab5555 commited on
Commit
58366da
·
verified ·
1 Parent(s): 05e5fff

Update visualization.py

Browse files
Files changed (1) hide show
  1. visualization.py +2 -1
visualization.py CHANGED
@@ -268,7 +268,8 @@ def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, mse_v
268
  def create_heatmap(t):
269
  frame_count = int(t * video.fps)
270
 
271
- if hasattr(ax, 'line'):
 
272
  ax.lines.pop(0)
273
  ax.axvline(x=frame_count, color='blue', linewidth=2)
274
 
 
268
  def create_heatmap(t):
269
  frame_count = int(t * video.fps)
270
 
271
+ # Clear previous lines
272
+ if hasattr(ax, 'lines') and len(ax.lines) > 0:
273
  ax.lines.pop(0)
274
  ax.axvline(x=frame_count, color='blue', linewidth=2)
275