Skip to content

Commit

Permalink
Handle case when no behavior is defined for loaded video
Browse files Browse the repository at this point in the history
  • Loading branch information
healthonrails committed Oct 24, 2024
1 parent 582ef35 commit 16293db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion annolid/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def __init__(self,
self.save_video_with_color_mask = False
self.auto_recovery_missing_instances = False
self.compute_optical_flow = True
self.behaviors = None
# Create progress bar
self.progress_bar = QtWidgets.QProgressBar()
self.progress_bar.setRange(0, 100)
Expand Down Expand Up @@ -2234,7 +2235,7 @@ def image_to_canvas(self, qimage, filename, frame_number):
else:
if behaivor in flags:
del flags[behaivor]
else:
elif self.behaviors is not None:
for behavior in self.behaviors:
if self.is_behavior_active(self.frame_number, behavior):
flags[behavior] = True
Expand Down

0 comments on commit 16293db

Please sign in to comment.