  
          data = self.serializer.load(self.file)
  
          if skip_faces:
              # Remove items from algnments that have no faces so they will
              # be re-detected
              del_keys = [key for key, val in data.items() if not val]
              logger.debug("Frames with no faces selected for redetection: %s", len(del_keys))
              for key in del_keys:
                  if key in data:
 
</s> remove 
    @staticmethod
    def _remove_invalid_keys(dictionary, valid_keys):
        """ Remove items from dict that are no longer required """
        for key in list(dictionary.keys()):
            if key not in valid_keys:
                logger.trace("Removing from output: '%s'", key)
                del dictionary[key]
 </s> add  </s> remove         self._remove_invalid_keys(batch, ("detected_faces", "filename", "image"))
        logger.trace("Item out: %s", {key: val
                                      for key, val in batch.items()
                                      if key != "image"})
        for filename, image, face in zip(batch["filename"],
                                         batch["image"],
                                         batch["detected_faces"]):
 </s> add         logger.trace("Item out: %s", {key: val.shape if isinstance(val, np.ndarray) else val
                                      for key, val in batch.items()})

        for filename, face in zip(batch["filename"], batch["detected_faces"]): </s> remove         self._remove_invalid_keys(batch, ("detected_faces", "filename", "image"))
        logger.trace("Item out: %s", {key: val
                                      for key, val in batch.items()
                                      if key != "image"})
        for filename, image, face in zip(batch["filename"],
                                         batch["image"],
                                         batch["detected_faces"]):
 </s> add         logger.trace("Item out: %s", {key: val.shape if isinstance(val, np.ndarray) else val
                                      for key, val in batch.items()})
        for filename, face in zip(batch["filename"], batch["detected_faces"]): </s> remove             if not item["detected_faces"]:
 </s> add             if not item.detected_faces: </s> remove             if not item["detected_faces"]:
 </s> add             if not item.detected_faces:
            # Remove items from alignments that have no faces so they will
  
          data = self.serializer.load(self.file)
  
          if skip_faces:
            # Remove items from alignments that have no faces so they will
              # be re-detected
              del_keys = [key for key, val in data.items() if not val]
              logger.debug("Frames with no faces selected for redetection: %s", len(del_keys))
              for key in del_keys:
                  if key in data:
keep keep keep keep replace keep keep keep keep keep
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
scripts/fsmedia.py