              for alignment in alignments:
                  alignment["landmarks_xy"] = alignment.pop("landmarksXY")
                  update_count += 1
          logger.debug("Updated landmarks_xy: %s", update_count)
          self.save()
 
</s> remove             else:
                self.interface.iterate_frame("navigation",
                                             navigation["last_request"])
                frame = frame_list[navigation["frame_idx"]]["frame_fullname"]
 </s> add             self.interface.iterate_frame("navigation", navigation["last_request"])
            frame = frame_list[navigation["frame_idx"]]["frame_fullname"] </s> remove             self.help.render()
            cv2.imshow("Frame", frame)
            cv2.imshow("Faces", faces)
            key = cv2.waitKey(1)
 </s> add             if self.interface.redraw():
                self.help.render()
                cv2.imshow("Frame", frame)
                cv2.imshow("Faces", faces)
                self.interface.set_redraw(False)
            key = cv2.waitKey(1000) </s> remove             if key:
 </s> add             if key and key != -1:
    # Landmarks stored as list instead of numpy array
    def has_legacy_landmarks_list(self):
        """ check for legacy landmarks stored as list """
        logger.debug("checking legacy landmarks as list")
        retval = not all(isinstance(face["landmarks_xy"], np.ndarray)
                         for faces in self.data.values()
                         for face in faces)
        return retval

    def update_legacy_landmarks_list(self):
        """ Update landmarksXY to landmarks_xy and save alignments """
        update_count = 0
        for alignments in self.data.values():
            for alignment in alignments:
                test = alignment["landmarks_xy"]
                if not isinstance(test, np.ndarray):
                    alignment["landmarks_xy"] = np.array(test, dtype="float32")
                    update_count += 1
        logger.debug("Updated landmarks_xy: %s", update_count)
              for alignment in alignments:
                  alignment["landmarks_xy"] = alignment.pop("landmarksXY")
                  update_count += 1
          logger.debug("Updated landmarks_xy: %s", update_count)
    # Landmarks stored as list instead of numpy array
    def has_legacy_landmarks_list(self):
        """ check for legacy landmarks stored as list """
        logger.debug("checking legacy landmarks as list")
        retval = not all(isinstance(face["landmarks_xy"], np.ndarray)
                         for faces in self.data.values()
                         for face in faces)
        return retval

    def update_legacy_landmarks_list(self):
        """ Update landmarksXY to landmarks_xy and save alignments """
        update_count = 0
        for alignments in self.data.values():
            for alignment in alignments:
                test = alignment["landmarks_xy"]
                if not isinstance(test, np.ndarray):
                    alignment["landmarks_xy"] = np.array(test, dtype="float32")
                    update_count += 1
        logger.debug("Updated landmarks_xy: %s", update_count)
keep keep keep keep replace
 lib.alignments - Auto update legacy list landmarks to numpy array 
lib/alignments.py