                  continue
  
              extracted_faces += self.output_faces(frame)
  
          if extracted_faces != 0 and not self.arguments.large:
              self.alignments.save()
          logger.info("%s face(s) extracted", extracted_faces)
  
      def output_faces(self, frame):
          """ Output the frame's faces to file """
          logger.trace("Outputting frame: %s", frame)
          face_count = 0
 
</s> remove     def output_faces(self, frame):
        """ Output the frame's faces to file """
        logger.trace("Outputting frame: %s", frame)
 </s> add         Returns
        -------
        int
            The total number of faces that have been extracted
        """
        logger.trace("Outputting frame: %s", filename) </s> remove             extracted_faces += self.output_faces(frame)
 </s> add     def _output_faces(self, filename, image):
        """ For each frame save out the faces and update the face hash back to alignments </s> remove         frame_fullname = frame["frame_fullname"]
        frame_name = frame["frame_name"]
        extension = os.path.splitext(frame_fullname)[1]
        faces = self.select_valid_faces(frame_fullname)
 </s> add         frame_name, extension = os.path.splitext(filename)
        faces = self._select_valid_faces(filename, image) </s> remove             if not self.alignments.frame_exists(frame_name):
                logger.verbose("Skipping '%s' - Alignments not found", frame_name)
                continue
 </s> add     def _set_skip_list(self):
        """ Set the indices for frames that should be skipped based on the `extract_every_n`
        command line option.

        Returns
        -------
        list or ``None``
            A list of indices to be skipped if extract_every_n is not `1` otherwise
            returns ``None``
        """
        skip_num = self._arguments.extract_every_n
        if skip_num == 1:
            logger.debug("Not skipping any frames")
            return None
        skip_list = []
        for idx, item in enumerate(self._frames.file_list_sorted):
            if idx % skip_num != 0:
                logger.trace("Adding image '%s' to skip list due to extract_every_n = %s",
                             item["frame_fullname"], skip_num)
                skip_list.append(idx)
        logger.debug("Adding skip list: %s", skip_list)
        return skip_list
        Parameters
        ----------
        filename: str
            The filename (without the full path) of the current frame
        image: :class:`numpy.ndarray`
            The full frame that faces are to be extracted from
                  continue
  
              extracted_faces += self.output_faces(frame)
  
        Parameters
        ----------
        filename: str
            The filename (without the full path) of the current frame
        image: :class:`numpy.ndarray`
            The full frame that faces are to be extracted from
        Parameters
        ----------
        filename: str
            The filename (without the full path) of the current frame
        image: :class:`numpy.ndarray`
            The full frame that faces are to be extracted from
        Parameters
        ----------
        filename: str
            The filename (without the full path) of the current frame
        image: :class:`numpy.ndarray`
            The full frame that faces are to be extracted from
  
      def output_faces(self, frame):
          """ Output the frame's faces to file """
          logger.trace("Outputting frame: %s", frame)
          face_count = 0
keep keep keep keep replace replace replace keep keep keep keep keep
 lib.alignments: improve re-extraction speed by 500% 
tools/lib_alignments/jobs.py