          self._remove_zero_sized_faces(batch)
          if self.min_size > 0 and batch.get("detected_faces", None):
              batch["detected_faces"] = self._filter_small_faces(batch["detected_faces"])
  
          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()})
 
</s> remove             logger.trace("final output: %s", {k: v.shape if isinstance(v, np.ndarray) else v
                                              for k, v in item.items()})
            yield item
 </s> add             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 </s> remove                                                  for k, v in batch.items() if k != "image"})
 </s> add                                                  for k, v in batch.items()}) </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) </s> remove             batch["scaled_image"] = np.array(batch["scaled_image"], dtype="float32")
 </s> add             batch["image"] = np.array(batch["image"], dtype="float32")
          self._remove_zero_sized_faces(batch)
          if self.min_size > 0 and batch.get("detected_faces", None):
              batch["detected_faces"] = self._filter_small_faces(batch["detected_faces"])
  

          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()})
keep keep keep keep 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