          self._remove_invalid_keys(batch, ("detected_faces", "filename", "image"))
          batch = self._dict_lists_to_list_dicts(batch)
  
          for item in batch:
              logger.trace("final output: %s", {k: v.shape if isinstance(v, np.ndarray) else v
                                                for k, v in item.items()})
              yield item
  
      @staticmethod
      def to_detected_face(left, top, right, bottom):
          """ Return a :class:`~lib.faces_detect.DetectedFace` object for the bounding box """
          return DetectedFace(x=int(round(left)),
 
</s> remove         self._remove_invalid_keys(batch, ("detected_faces", "filename", "image"))
 </s> add  </s> remove                                                  for k, v in batch.items() if k != "image"})
 </s> add                                                  for k, v in batch.items()}) </s> remove         if isinstance(item, dict):
            logger.trace("item: %s, queue: %s",
                         {k: v.shape if isinstance(v, np.ndarray) else v
                          for k, v in item.items()},
                         queue)
 </s> add         if isinstance(item, ExtractMedia):
            logger.trace("filename: '%s', image shape: %s, detected_faces: %s, queue: %s, "
                         "item: %s",
                         item.filename, item.image_shape, item.detected_faces, queue, item)
            self._extract_media[item.filename] = item </s> remove                                      len(self._rollover["detected_faces"]),
                                     frame_faces, item["filename"])
 </s> add                                      len(self._rollover.detected_faces), frame_faces,
                                     item.filename) </s> remove                                      len(self._rollover["detected_faces"]),
                                     frame_faces, item["filename"])
 </s> add                                      len(self._rollover.detected_faces), frame_faces,
                                     item.filename)
            output = self._extract_media.pop(item["filename"])
            output.add_detected_faces(item["detected_faces"])
            logger.trace("final output: (filename: '%s', image shape: %s, detected_faces: %s, "
                         "item: %s", output.filename, output.image_shape, output.detected_faces,
                         output)
            yield output
          self._remove_invalid_keys(batch, ("detected_faces", "filename", "image"))
          batch = self._dict_lists_to_list_dicts(batch)
  
          for item in batch:
            output = self._extract_media.pop(item["filename"])
            output.add_detected_faces(item["detected_faces"])
            logger.trace("final output: (filename: '%s', image shape: %s, detected_faces: %s, "
                         "item: %s", output.filename, output.image_shape, output.detected_faces,
                         output)
            yield output
            output = self._extract_media.pop(item["filename"])
            output.add_detected_faces(item["detected_faces"])
            logger.trace("final output: (filename: '%s', image shape: %s, detected_faces: %s, "
                         "item: %s", output.filename, output.image_shape, output.detected_faces,
                         output)
            yield output
            output = self._extract_media.pop(item["filename"])
            output.add_detected_faces(item["detected_faces"])
            logger.trace("final output: (filename: '%s', image shape: %s, detected_faces: %s, "
                         "item: %s", output.filename, output.image_shape, output.detected_faces,
                         output)
            yield output
  
      @staticmethod
      def to_detected_face(left, top, right, bottom):
          """ Return a :class:`~lib.faces_detect.DetectedFace` object for the bounding box """
          return DetectedFace(x=int(round(left)),
keep keep keep keep replace replace replace keep keep keep keep keep
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
plugins/extract/detect/_base.py