diff --git a/annolid/gui/app.py b/annolid/gui/app.py index fc65403..bd8b8e0 100644 --- a/annolid/gui/app.py +++ b/annolid/gui/app.py @@ -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) @@ -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